Skip to contentSkip to conversation

MIPS: ralink: add support for reset-controller API

PATCH New John Crispin 1 participant 1 message Sep 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 MIPS: ralink: add support for reset-controller API

Add a helper for reseting different devices on the SoC.

---
Changes in V3:
* rebase on upstream-sfr
* add select RESET_CONTROLLER

 arch/mips/Kconfig         |    2 ++
 arch/mips/ralink/common.h |    2 ++
 arch/mips/ralink/of.c     |    3 +++
 arch/mips/ralink/reset.c  |   62 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+)
arch/mips/Kconfig +2 -0
index 24727a0..a1a088b 100644
@@ -446,6 +446,8 @@ config RALINK
 	select SYS_HAS_EARLY_PRINTK
 	select HAVE_MACH_CLKDEV
 	select CLKDEV_LOOKUP
+	select ARCH_HAS_RESET_CONTROLLER
+	select RESET_CONTROLLER
 
 config SGI_IP22
 	bool "SGI IP22 (Indy/Indigo2)"
arch/mips/ralink/common.h +2 -0
index 83144c3..42dfd61 100644
@@ -46,6 +46,8 @@ extern void ralink_of_remap(void);
 extern void ralink_clk_init(void);
 extern void ralink_clk_add(const char *dev, unsigned long rate);
 
+extern void ralink_rst_init(void);
+
 extern void prom_soc_init(struct ralink_soc_info *soc_info);
 
 __iomem void *plat_of_remap_node(const char *node);
arch/mips/ralink/of.c +3 -0
index f25ea5b..ce38d11 100644
@@ -110,6 +110,9 @@ static int __init plat_of_setup(void)
 	if (of_platform_populate(NULL, of_ids, NULL, NULL))
 		panic("failed to populate DT\n");
 
+	/* make sure ithat the reset controller is setup early */
+	ralink_rst_init();
+
 	return 0;
 }
 
arch/mips/ralink/reset.c +62 -0

74 lines not on this page · raw message

Signature · 1 line
1.7.10.4