Skip to contentSkip to conversation

arm: rmobile: rzg2_beacon: Migrate reset to SYSRESET_PSCI

PATCH In review Adam Ford 2 participants 6 messages Dec 17, 2021 – Jan 23, 2022

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 arm: rmobile: rzg2_beacon: Migrate reset to SYSRESET_PSCI

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

board/beacon/beacon-rzg2m/beacon-rzg2m.c +0 -10
index df6044a429..4b41c6fdaa 100644
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
-#include <asm/arch/rcar-mstp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -18,15 +17,6 @@ int board_init(void)
 	return 0;
 }
 
-#define RST_BASE	0xE6160000
-#define RST_CA57RESCNT	(RST_BASE + 0x40)
-#define RST_CODE	0xA5A5000F
-
-void reset_cpu(void)
-{
-	writel(RST_CODE, RST_CA57RESCNT);
-}
-
 #if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
configs/rzg2_beacon_defconfig +2 -0
index 6c48c3b8c9..55d4982721 100644
@@ -70,6 +70,8 @@ CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_PSCI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
Signature · 1 line
2.32.0
author
#1 lore raw
Quoted 5 lines · Adam Ford

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

Marek,

Gentle ping on this one.

Quoted 45 lines
board/beacon/beacon-rzg2m/beacon-rzg2m.c +0 -10
index df6044a429..4b41c6fdaa 100644
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
-#include <asm/arch/rcar-mstp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -18,15 +17,6 @@ int board_init(void)
        return 0;
 }
 
-#define RST_BASE       0xE6160000
-#define RST_CA57RESCNT (RST_BASE + 0x40)
-#define RST_CODE       0xA5A5000F
-
-void reset_cpu(void)
-{
-       writel(RST_CODE, RST_CA57RESCNT);
-}
-
 #if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
configs/rzg2_beacon_defconfig +2 -1
index 6c48c3b8c9..55d4982721 100644
@@ -70,6 +70,8 @@ CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_PSCI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
--

2.32.0

author
#2 lore raw
Quoted 13 lines · Adam Ford
Quoted 5 lines · Adam Ford

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

Marek,

Gentle ping on this one.

Quoted 1 line

+ Tom

Any change you can apply this one since it only affects my boards?

adam

Quoted 44 lines
Quoted 44 lines
board/beacon/beacon-rzg2m/beacon-rzg2m.c +0 -10
index df6044a429..4b41c6fdaa 100644
@@ -6,7 +6,6 @@
 #include <common.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
-#include <asm/arch/rcar-mstp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -18,15 +17,6 @@ int board_init(void)
        return 0;
 }
 
-#define RST_BASE       0xE6160000
-#define RST_CA57RESCNT (RST_BASE + 0x40)
-#define RST_CODE       0xA5A5000F
-
-void reset_cpu(void)
-{
-       writel(RST_CODE, RST_CA57RESCNT);
-}
-
 #if IS_ENABLED(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
configs/rzg2_beacon_defconfig +2 -1
index 6c48c3b8c9..55d4982721 100644
@@ -70,6 +70,8 @@ CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_PSCI=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
--

2.32.0

#3 lore raw
Quoted 11 lines · Adam Ford
Quoted 10 lines · Adam Ford
Quoted 5 lines · Adam Ford

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

Marek,

Quoted 7 lines
Quoted 3 lines

Gentle ping on this one.

Quoted 1 line

+ Tom

Any change you can apply this one since it only affects my boards?

Last time I checked, the CI did not pass.

author
#4 lore raw
Quoted 17 lines · Marek Vasut
Quoted 15 lines · Adam Ford
Quoted 13 lines · Adam Ford
Quoted 5 lines · Adam Ford

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

Marek,

Gentle ping on this one.

Quoted 1 line
Quoted 5 lines
Quoted 3 lines

+ Tom

Any change you can apply this one since it only affects my boards?

Last time I checked, the CI did not pass.

Is there a log you can direct me to review? It's building fine for me against the current 'master'

adam

#5 lore raw
Quoted 18 lines · Adam Ford
Quoted 17 lines · Marek Vasut
Quoted 15 lines · Adam Ford
Quoted 13 lines · Adam Ford
Quoted 5 lines · Adam Ford

Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter.

Marek,

Gentle ping on this one.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

+ Tom

Any change you can apply this one since it only affects my boards?

Last time I checked, the CI did not pass.

Is there a log you can direct me to review? It's building fine for me against the current 'master'

It seems the pipeline just passed, so it must've been another intermittent error.