arm: prima2: move to generic reset controller driver framework
Subsystems (3)
PATCH v2 1/1 arm: prima2: move to generic reset controller driver framework
this moves to generic IP module reset framework, and make other drivers use common device_reset() API.
---
-v2: rebase againest 3.11-rc;
move the init function to init_machine to avoid redundant calling for non-csr platforms of multi-platform;
arch/arm/boot/dts/atlas6.dtsi | 3 +- arch/arm/boot/dts/marco.dtsi | 3 +- arch/arm/boot/dts/prima2.dtsi | 3 +- arch/arm/mach-prima2/Kconfig | 1 + arch/arm/mach-prima2/common.c | 12 +++++++- arch/arm/mach-prima2/common.h | 1 + arch/arm/mach-prima2/rstc.c | 72 +++++++++++++++++++++++++------------------ 7 files changed, 61 insertions(+), 34 deletions(-)
arch/arm/boot/dts/atlas6.dtsi +2 -1
@@ -56,9 +56,10 @@ #clock-cells = <1>; }; - reset-controller at 88010000 { + rstc: reset-controller at 88010000 { compatible = "sirf,prima2-rstc"; reg = <0x88010000 0x1000>; + #reset-cells = <1>; }; rsc-controller at 88020000 {
arch/arm/boot/dts/marco.dtsi +2 -1
@@ -58,9 +58,10 @@ #size-cells = <1>; ranges = <0xc2000000 0xc2000000 0x1000000>; - reset-controller at c2000000 { + rstc: reset-controller at c2000000 { compatible = "sirf,marco-rstc"; reg = <0xc2000000 0x10000>; + #reset-cells = <1>; }; };
arch/arm/boot/dts/prima2.dtsi +2 -1
@@ -67,9 +67,10 @@ #clock-cells = <1>; }; - reset-controller at 88010000 { + rstc: reset-controller at 88010000 { compatible = "sirf,prima2-rstc"; reg = <0x88010000 0x1000>; + #reset-cells = <1>; }; rsc-controller at 88020000 {
arch/arm/mach-prima2/Kconfig +1 -0
@@ -1,5 +1,6 @@ config ARCH_SIRF bool "CSR SiRF" if ARCH_MULTI_V7 + select ARCH_HAS_RESET_CONTROLLER select ARCH_REQUIRE_GPIOLIB select GENERIC_CLOCKEVENTS select GENERIC_IRQ_CHIP
arch/arm/mach-prima2/common.c +11 -1
@@ -16,7 +16,14 @@#include <linux/of_platform.h> #include "common.h" -void __init sirfsoc_init_late (void ) +static void __init sirfsoc_init_mach (void ) +{ +sirfsoc_of_rstc_init (); +of_platform_populate (NULL , of_default_bus_match_table, +NULL ,NULL ); +} + +static void __init sirfsoc_init_late (void ) {sirfsoc_pm_init (); }
@@ -45,6 +52,7 @@ DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") .nr_irqs = 128, .map_io = sirfsoc_map_io, .init_time = sirfsoc_init_time, + .init_machine = sirfsoc_init_mach, .init_late = sirfsoc_init_late, .dt_compat = atlas6_dt_match, .restart = sirfsoc_restart,
@@ -62,6 +70,7 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") .nr_irqs = 128, .map_io = sirfsoc_map_io, .init_time = sirfsoc_init_time, + .init_machine = sirfsoc_init_mach, .dma_zone_size = SZ_256M, .init_late = sirfsoc_init_late, .dt_compat = prima2_dt_match,
@@ -80,6 +89,7 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") .smp = smp_ops(sirfsoc_smp_ops), .map_io = sirfsoc_map_io, .init_time = sirfsoc_init_time, + .init_machine = sirfsoc_init_mach, .init_late = sirfsoc_init_late, .dt_compat = marco_dt_match, .restart = sirfsoc_restart,
arch/arm/mach-prima2/common.h +1 -0
@@ -22,6 +22,7 @@ extern struct smp_operations sirfsoc_smp_ops;extern void sirfsoc_secondary_startup (void );extern void sirfsoc_cpu_die (unsigned int cpu); +extern void __init sirfsoc_of_rstc_init (void );extern void __init sirfsoc_of_irq_init (void );extern void __init sirfsoc_of_clk_init (void );extern void sirfsoc_restart (enum reboot_mode ,const char *);
arch/arm/mach-prima2/rstc.c +42 -30
94 lines not on this page · raw message
Signature · 1 line
1.8.2.3
PATCH v2 1/1 arm: prima2: move to generic reset controller driver framework
2013/7/30 Barry Song <[email protected]>:
Quoted 5 lines
this moves to generic IP module reset framework, and make other drivers use common
device_reset()API.Cc Srinivas Kandagatla <[email protected]>Signed-off-by Barry Song <[email protected]>
Oolf, do you want to comment on it more, or apply it manually, or want me to send a pull request?
-barry
PATCH v2 1/1 arm: prima2: move to generic reset controller driver framework
Quoted 9 lines · Barry Song
2013/7/30 Barry Song <[email protected]>:
Quoted 5 lines
this moves to generic IP module reset framework, and make other drivers use common
device_reset()API.Cc Srinivas Kandagatla <[email protected]>Signed-off-by Barry Song <[email protected]>Oolf, do you want to comment on it more, or apply it manually, or want me to send a pull request?
Hi,
See my comments on the reset controller api pull request; there still seems to be some discussion about how to implement it. So the api is not likely to be ready until after 3.12.
-Olof