Skip to contentSkip to conversation

ARM: rmobile: rcar-common: Zap arch_preboot_os()

PATCH New Eugeniu Rosca 2 participants 2 messages Apr 9, 2019 Arm/RISC-V/Renesas architecture

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: rmobile: rcar-common: Zap arch_preboot_os()

v2018.01 commit e23eb942ad103f ("ARM: rmobile: Stop using rcar-common/common.c on Gen3") removed board/renesas/rcar-common/common.c from the build chain with the reasoning that calling arch_preboot_os() is no longer needed.

However, it left the arch_preboot_os() in place. Get rid of it. This is done in preparation of resurrecting rcar-common/common.c.

NOTE: The three removed header includes (io.h, sys_proto.h, rcar-mstp.h) are in direct relationship with the dropped arch_preboot_os() hook. The other headers (common.h, rmobile.h) are going to be needed by pretty much anything that is going to appear in the rcar common code. So, keep the two in place.

---
v2:
- [Marek] Drop Makefile changes. Reword the title/description.

v1:
- https://patchwork.ozlabs.org/patch/1082364/

---
 board/renesas/rcar-common/common.c | 53 ------------------------------
 1 file changed, 53 deletions(-)
board/renesas/rcar-common/common.c +0 -53
index 1129f4bf0c08..1ce6e2eac1bf 100644
@@ -8,57 +8,4 @@
  */
 
 #include <common.h>
-#include <asm/io.h>
-#include <asm/arch/sys_proto.h>
 #include <asm/arch/rmobile.h>
-#include <asm/arch/rcar-mstp.h>
-
-#define TSTR0		0x04
-#define TSTR0_STR0	0x01
-
-static struct mstp_ctl mstptbl[] = {
-	{ SMSTPCR0, MSTP0_BITS, CONFIG_SMSTP0_ENA,
-		RMSTPCR0, MSTP0_BITS, CONFIG_RMSTP0_ENA },
-	{ SMSTPCR1, MSTP1_BITS, CONFIG_SMSTP1_ENA,
-		RMSTPCR1, MSTP1_BITS, CONFIG_RMSTP1_ENA },
-	{ SMSTPCR2, MSTP2_BITS, CONFIG_SMSTP2_ENA,
-		RMSTPCR2, MSTP2_BITS, CONFIG_RMSTP2_ENA },
-	{ SMSTPCR3, MSTP3_BITS, CONFIG_SMSTP3_ENA,
-		RMSTPCR3, MSTP3_BITS, CONFIG_RMSTP3_ENA },
-	{ SMSTPCR4, MSTP4_BITS, CONFIG_SMSTP4_ENA,
-		RMSTPCR4, MSTP4_BITS, CONFIG_RMSTP4_ENA },
-	{ SMSTPCR5, MSTP5_BITS, CONFIG_SMSTP5_ENA,
-		RMSTPCR5, MSTP5_BITS, CONFIG_RMSTP5_ENA },
-#ifdef CONFIG_RCAR_GEN3
-	{ SMSTPCR6, MSTP6_BITS, CONFIG_SMSTP6_ENA,
-		RMSTPCR6, MSTP6_BITS, CONFIG_RMSTP6_ENA },
-#endif
-	{ SMSTPCR7, MSTP7_BITS, CONFIG_SMSTP7_ENA,
-		RMSTPCR7, MSTP7_BITS, CONFIG_RMSTP7_ENA },
-	{ SMSTPCR8, MSTP8_BITS, CONFIG_SMSTP8_ENA,
-		RMSTPCR8, MSTP8_BITS, CONFIG_RMSTP8_ENA },
-	{ SMSTPCR9, MSTP9_BITS, CONFIG_SMSTP9_ENA,
-		RMSTPCR9, MSTP9_BITS, CONFIG_RMSTP9_ENA },
-	{ SMSTPCR10, MSTP10_BITS, CONFIG_SMSTP10_ENA,
-		 RMSTPCR10, MSTP10_BITS, CONFIG_RMSTP10_ENA },
-	{ SMSTPCR11, MSTP11_BITS, CONFIG_SMSTP1_ENA,
-		 RMSTPCR11, MSTP11_BITS, CONFIG_RMSTP11_ENA },
-};
-
-void arch_preboot_os(void)
-{
-	int i;
-
-	/* stop TMU0 */
-	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
-
-	/* Stop module clock */
-	for (i = 0; i < ARRAY_SIZE(mstptbl); i++) {
-		mstp_setclrbits_le32((uintptr_t)mstptbl[i].s_addr,
-				     mstptbl[i].s_dis,
-				     mstptbl[i].s_ena);
-		mstp_setclrbits_le32((uintptr_t)mstptbl[i].r_addr,
-				     mstptbl[i].r_dis,
-				     mstptbl[i].r_ena);
-	}
-}
Signature · 1 line
2.21.0
Applied
#1 lore raw

PATCH v2 1/1 ARM: rmobile: rcar-common: Zap arch_preboot_os()

Quoted 78 lines · Eugeniu Rosca

v2018.01 commit e23eb942ad103f ("ARM: rmobile: Stop using rcar-common/common.c on Gen3") removed board/renesas/rcar-common/common.c from the build chain with the reasoning that calling arch_preboot_os() is no longer needed.

However, it left the arch_preboot_os() in place. Get rid of it. This is done in preparation of resurrecting rcar-common/common.c.

NOTE: The three removed header includes (io.h, sys_proto.h, rcar-mstp.h) are in direct relationship with the dropped arch_preboot_os() hook. The other headers (common.h, rmobile.h) are going to be needed by pretty much anything that is going to appear in the rcar common code. So, keep the two in place.

---
v2:
- [Marek] Drop Makefile changes. Reword the title/description.

v1:
- https://patchwork.ozlabs.org/patch/1082364/

---
 board/renesas/rcar-common/common.c | 53 ------------------------------
 1 file changed, 53 deletions(-)
board/renesas/rcar-common/common.c +0 -43
index 1129f4bf0c08..1ce6e2eac1bf 100644
@@ -8,57 +8,4 @@
  */
 
 #include <common.h>
-#include <asm/io.h>
-#include <asm/arch/sys_proto.h>
 #include <asm/arch/rmobile.h>
-#include <asm/arch/rcar-mstp.h>
-
-#define TSTR0		0x04
-#define TSTR0_STR0	0x01
-
-static struct mstp_ctl mstptbl[] = {
-	{ SMSTPCR0, MSTP0_BITS, CONFIG_SMSTP0_ENA,
-		RMSTPCR0, MSTP0_BITS, CONFIG_RMSTP0_ENA },
-	{ SMSTPCR1, MSTP1_BITS, CONFIG_SMSTP1_ENA,
-		RMSTPCR1, MSTP1_BITS, CONFIG_RMSTP1_ENA },
-	{ SMSTPCR2, MSTP2_BITS, CONFIG_SMSTP2_ENA,
-		RMSTPCR2, MSTP2_BITS, CONFIG_RMSTP2_ENA },
-	{ SMSTPCR3, MSTP3_BITS, CONFIG_SMSTP3_ENA,
-		RMSTPCR3, MSTP3_BITS, CONFIG_RMSTP3_ENA },
-	{ SMSTPCR4, MSTP4_BITS, CONFIG_SMSTP4_ENA,
-		RMSTPCR4, MSTP4_BITS, CONFIG_RMSTP4_ENA },
-	{ SMSTPCR5, MSTP5_BITS, CONFIG_SMSTP5_ENA,
-		RMSTPCR5, MSTP5_BITS, CONFIG_RMSTP5_ENA },
-#ifdef CONFIG_RCAR_GEN3
-	{ SMSTPCR6, MSTP6_BITS, CONFIG_SMSTP6_ENA,
-		RMSTPCR6, MSTP6_BITS, CONFIG_RMSTP6_ENA },
-#endif
-	{ SMSTPCR7, MSTP7_BITS, CONFIG_SMSTP7_ENA,
-		RMSTPCR7, MSTP7_BITS, CONFIG_RMSTP7_ENA },
-	{ SMSTPCR8, MSTP8_BITS, CONFIG_SMSTP8_ENA,
-		RMSTPCR8, MSTP8_BITS, CONFIG_RMSTP8_ENA },
-	{ SMSTPCR9, MSTP9_BITS, CONFIG_SMSTP9_ENA,
-		RMSTPCR9, MSTP9_BITS, CONFIG_RMSTP9_ENA },
-	{ SMSTPCR10, MSTP10_BITS, CONFIG_SMSTP10_ENA,
-		 RMSTPCR10, MSTP10_BITS, CONFIG_RMSTP10_ENA },
-	{ SMSTPCR11, MSTP11_BITS, CONFIG_SMSTP1_ENA,
-		 RMSTPCR11, MSTP11_BITS, CONFIG_RMSTP11_ENA },
-};
-
-void arch_preboot_os(void)
-{
-	int i;
-
-	/* stop TMU0 */
-	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
-

board/renesas/rcar-common/common.c line 64

Quoted 10 lines
board/renesas/rcar-common/common.c +0 -10
-	/* Stop module clock */
-	for (i = 0; i < ARRAY_SIZE(mstptbl); i++) {
-		mstp_setclrbits_le32((uintptr_t)mstptbl[i].s_addr,
-				     mstptbl[i].s_dis,
-				     mstptbl[i].s_ena);
-		mstp_setclrbits_le32((uintptr_t)mstptbl[i].r_addr,
-				     mstptbl[i].r_dis,
-				     mstptbl[i].r_ena);
-	}
-}

Applied, thanks

Signature · 2 lines
Best regards,
Marek Vasut