Skip to contentSkip to conversation

Enable R-Mobile Reset Driver

PATCH New Geert Uytterhoeven 2 participants 5 messages Feb 23, 2015 – Feb 24, 2015

Subsystems (4)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover Enable R-Mobile Reset Driver

Hi Simon, Magnus,

This patch series enables the R-Mobile Reset Driver, which is now in v4.0-rc1. It can be used to restart DT-based R-Mobile APE6 (r8a73a4), R-Mobile A1 (r8a7740), and SH-Mobile AG5 (sh73a0) through the system-controller nodes that have been added for PM Domain support. This series also removes the no longer needed restart callbacks on multiplatform r8a7740 and sh73a0.

More detailed depencencies are in the individual patches.

Thanks for applying!

Geert Uytterhoeven (3):
ARM: shmobile: Enable R-Mobile reset driver in multiplatform defconfig
ARM: shmobile: r8a7740: Remove restart callback
ARM: shmobile: sh73a0: Remove restart callback

 arch/arm/configs/shmobile_defconfig    | 3 +++
 arch/arm/mach-shmobile/setup-r8a7740.c | 8 --------
 arch/arm/mach-shmobile/setup-sh73a0.c  | 8 --------
 3 files changed, 3 insertions(+), 16 deletions(-)
Signature · 12 lines
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
author maintainer
#1 lore raw

PATCH 1/3 ARM: shmobile: Enable R-Mobile reset driver in multiplatform defconfig

This is used on R-Mobile APE6 (r8a73a4), R-Mobile A1 (r8a7740), and SH-Mobile AG5 (sh73a0).

---
To actually work, this depends on:
- commit fa0f8d6700857457 ("power: reset: Add reset driver for R-Mobile platforms"), which is in v4.0-rc1,
- the system-controller node in the SoC's .dtsi, which was added for PM domain support in:
- r8a73a4-multiplatform-for-v3.21 (r8a73a4),
- v4.0-rc1 (r8a7740),
- sh73a0-multiplatform-for-v3.21 (sh73a0).

Irrespectively of that, it's safe to apply anyway.

---
 arch/arm/configs/shmobile_defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/configs/shmobile_defconfig +3 -0
index fb7aa02125c4e695..a904c90f957931d8 100644
@@ -109,6 +109,9 @@ CONFIG_SPI_SH_HSPI=y
 CONFIG_GPIO_EM=y
 CONFIG_GPIO_RCAR=y
 CONFIG_GPIO_PCF857X=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_RMOBILE=y
 # CONFIG_HWMON is not set
 CONFIG_THERMAL=y
 CONFIG_CPU_THERMAL=y
Signature · 1 line
1.9.1
author maintainer
#2 lore raw

PATCH 2/3 ARM: shmobile: r8a7740: Remove restart callback

In reply to Geert Uytterhoeven

Remove the restart handling hack from the r8a7740 generic multiplatform case.

Restart on DT-based r8a7740 platforms is now handled through the R-Mobile reset driver.

This reverts commit 1174c712afa2779f ("ARM: shmobile: r8a7740: Add restart callback").

---
To avoid losing functionality, this depends on:
- commit fa0f8d6700857457 ("power: reset: Add reset driver for R-Mobile platforms"), which is in v4.0-rc1,
- commit aba07789d811b6cf ("ARM: shmobile: r8a7740 dtsi: Add PM domain

    support"), which is in v4.0-rc1,
  - "ARM: shmobile: Enable R-Mobile reset driver in multiplatform
    defconfig", which is the first patch of this series.
---
 arch/arm/mach-shmobile/setup-r8a7740.c | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/mach-shmobile/setup-r8a7740.c +0 -8
index dd64caf792160198..9832e48396a40a92 100644
@@ -842,13 +842,6 @@ static void __init r8a7740_generic_init(void)
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-#define RESCNT2 IOMEM(0xe6188020)
-static void r8a7740_restart(enum reboot_mode mode, const char *cmd)
-{
-	/* Do soft power on reset */
-	writel(1 << 31, RESCNT2);
-}
-
 static const char *r8a7740_boards_compat_dt[] __initdata = {
 	"renesas,r8a7740",
 	NULL,
@@ -861,7 +854,6 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
 	.init_machine	= r8a7740_generic_init,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7740_boards_compat_dt,
-	.restart	= r8a7740_restart,
 MACHINE_END
 
 #endif /* CONFIG_USE_OF */
Signature · 1 line
1.9.1
author maintainer
#3 lore raw

PATCH 3/3 ARM: shmobile: sh73a0: Remove restart callback

In reply to Geert Uytterhoeven

Remove the restart handling hack from the sh73a0 generic multiplatform case.

Restart on DT-based sh73a0 platforms is now handled through the R-Mobile reset driver.

This basically reverts commit cad900819fba0176 ("ARM: shmobile: sh73a0:
Add restart callback").

---
To avoid losing functionality, this depends on:
- commit fa0f8d6700857457 ("power: reset: Add reset driver for R-Mobile platforms"), which is in v4.0-rc1,
- commit 126693a80f451ecd ("ARM: shmobile: sh73a0 dtsi: Add PM domain

    support"), which is in sh73a0-multiplatform-for-v3.21,
  - "ARM: shmobile: Enable R-Mobile reset driver in multiplatform
    defconfig", which is the first patch of this series.
---
 arch/arm/mach-shmobile/setup-sh73a0.c | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/mach-shmobile/setup-sh73a0.c +0 -8
index d17d2682dfa8bd0c..e63c2c2558171498 100644
@@ -814,13 +814,6 @@ void __init sh73a0_add_early_devices(void)
 	shmobile_setup_console();
 }
 
-#define RESCNT2 IOMEM(0xe6188020)
-static void sh73a0_restart(enum reboot_mode mode, const char *cmd)
-{
-	/* Do soft power on reset */
-	writel((1 << 31), RESCNT2);
-}
-
 #ifdef CONFIG_USE_OF
 
 static void __init sh73a0_generic_init(void)
@@ -843,7 +836,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
 	.init_early	= shmobile_init_delay,
 	.init_machine	= sh73a0_generic_init,
 	.init_late	= shmobile_init_late,
-	.restart	= sh73a0_restart,
 	.dt_compat	= sh73a0_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
Signature · 1 line
1.9.1
#4 lore raw

cover Enable R-Mobile Reset Driver

In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

Hi Simon, Magnus,

This patch series enables the R-Mobile Reset Driver, which is now in v4.0-rc1. It can be used to restart DT-based R-Mobile APE6 (r8a73a4), R-Mobile A1 (r8a7740), and SH-Mobile AG5 (sh73a0) through the system-controller nodes that have been added for PM Domain support. This series also removes the no longer needed restart callbacks on multiplatform r8a7740 and sh73a0.

Quoted 3 lines

More detailed depencencies are in the individual patches.

Thanks for applying!

Thanks, done.