From d8659c6d25219e3f89b6696b86c3b18dcf5c3fb5 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:08:11 +0900 Subject: arm: rmobile: lager: Fix change of the CPU frequency The change of the CPU frequency is waited for until PLL0ST of the PLLECR is set to 1. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/lager/lager.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/renesas') diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index 5302839..1fc5833 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -36,9 +36,14 @@ void s_init(void) /* CPU frequency setting. Set to 1.4GHz */ if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) { + u32 stat = 0; u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); + + do { + stat = readl(PLLECR) & PLL0ST; + } while (stat == 0x0); } /* QoS(Quality-of-Service) Init */ -- cgit v1.1 From fb6f6001ed0f0f8987728ef00e6bab2e2b9af706 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:26 +0900 Subject: arm: rmobile: lager: Add external RAM boot If CONFIG_RMOBILE_EXTRAM_BOOT is enabled, U-Boot is booted from External RAM. The default boot address is 0xB0000000. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/lager/qos.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'board/renesas') diff --git a/board/renesas/lager/qos.c b/board/renesas/lager/qos.c index ce7f8ba..dec37d2 100644 --- a/board/renesas/lager/qos.c +++ b/board/renesas/lager/qos.c @@ -13,7 +13,7 @@ #include /* QoS version 0.955 for ES1 and version 0.963 for ES2 */ - +#if defined(CONFIG_RMOBILE_EXTRAM_BOOT) enum { DBSC3_00, DBSC3_01, DBSC3_02, DBSC3_03, DBSC3_04, DBSC3_05, DBSC3_06, DBSC3_07, DBSC3_08, DBSC3_09, @@ -2381,3 +2381,8 @@ void qos_init(void) else qos_init_es1(); } +#else /* CONFIG_RMOBILE_EXTRAM_BOOT */ +void qos_init(void) +{ +} +#endif /* CONFIG_RMOBILE_EXTRAM_BOOT */ -- cgit v1.1 From 69191fedf49671cfed7de7067f2193c227e18ad1 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:27 +0900 Subject: arm: rmobile: koelsch: Add external RAM boot If CONFIG_RMOBILE_EXTRAM_BOOT is enabled, U-Boot is booted from External RAM. The default boot address is 0x70000000. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/koelsch/qos.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'board/renesas') diff --git a/board/renesas/koelsch/qos.c b/board/renesas/koelsch/qos.c index ecf3eed..d293e3d 100644 --- a/board/renesas/koelsch/qos.c +++ b/board/renesas/koelsch/qos.c @@ -14,7 +14,7 @@ #include /* QoS version 0.240 for ES1 and version 0.334 for ES2 */ - +#if defined(CONFIG_RMOBILE_EXTRAM_BOOT) enum { DBSC3_00, DBSC3_01, DBSC3_02, DBSC3_03, DBSC3_04, DBSC3_05, DBSC3_06, DBSC3_07, DBSC3_08, DBSC3_09, @@ -1304,3 +1304,8 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon); } +#else /* CONFIG_RMOBILE_EXTRAM_BOOT */ +void qos_init(void) +{ +} +#endif /* CONFIG_RMOBILE_EXTRAM_BOOT */ -- cgit v1.1 From c9b59bf795804a25b9654e729a491363ef9e6a54 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:28 +0900 Subject: arm: rmobile: alt: Add external RAM boot If CONFIG_RMOBILE_EXTRAM_BOOT is enabled, U-Boot is booted from External RAM. The default boot address is 0x70000000. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/qos.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'board/renesas') diff --git a/board/renesas/alt/qos.c b/board/renesas/alt/qos.c index d788aa0..f0b349f 100644 --- a/board/renesas/alt/qos.c +++ b/board/renesas/alt/qos.c @@ -13,6 +13,7 @@ #include #include +#if defined(CONFIG_RMOBILE_EXTRAM_BOOT) /* QoS version 0.11 */ enum { @@ -942,3 +943,8 @@ void qos_init(void) writel(0x00000001, &axi_qos->qosthres2); writel(0x00000001, &axi_qos->qosqon); } +#else /* CONFIG_RMOBILE_EXTRAM_BOOT */ +void qos_init(void) +{ +} +#endif /* CONFIG_RMOBILE_EXTRAM_BOOT */ -- cgit v1.1 From 1c556194d05845acdd271fe1e8f6d973b8841906 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:29 +0900 Subject: arm: rmobile: lager: Remove RAM address initialization Since board info structure is not still set up, the setting of RAM address causes illegal access. Therefore the setting of RAM address is removed. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/lager/lager.c | 1 - 1 file changed, 1 deletion(-) (limited to 'board/renesas') diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index 1fc5833..2bb8710 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -165,7 +165,6 @@ int board_phy_config(struct phy_device *phydev) int dram_init(void) { - gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->ram_size = CONFIG_SYS_SDRAM_SIZE; return 0; -- cgit v1.1 From ef97b6ed89f52c3a39777f710081eb53f9496086 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:30 +0900 Subject: arm: rmobile: koelsch: Remove RAM address initialization Since board info structure is not still set up, the setting of RAM address causes illegal access. Therefore the setting of RAM address is removed. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/koelsch/koelsch.c | 1 - 1 file changed, 1 deletion(-) (limited to 'board/renesas') diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c index bfd0cc6..37202f9 100644 --- a/board/renesas/koelsch/koelsch.c +++ b/board/renesas/koelsch/koelsch.c @@ -150,7 +150,6 @@ int board_eth_init(bd_t *bis) int dram_init(void) { - gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->ram_size = CONFIG_SYS_SDRAM_SIZE; return 0; -- cgit v1.1 From ca7bc8ff0d5255a85edf5d451d5e68006044e7cc Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:16:31 +0900 Subject: arm: rmobile: alt: Remove RAM address initialization Since board info structure is not still set up, the setting of RAM address causes illegal access. Therefore the setting of RAM address is removed. Signed-off-by: Hisashi Nakamura Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 1 - 1 file changed, 1 deletion(-) (limited to 'board/renesas') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 9d8e8f9..b668bf6 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -140,7 +140,6 @@ int board_eth_init(bd_t *bis) int dram_init(void) { - gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->ram_size = CONFIG_SYS_SDRAM_SIZE; return 0; -- cgit v1.1 From 0e429bdf216934bd8179aedc6eab5c7a6448d3b6 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 31 Oct 2014 16:30:25 +0900 Subject: arm: rmobile: alt: Fix typo of SCIF id Alt board use SCIF2, not SCIF0. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/renesas') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index b668bf6..5c5a86f 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -43,7 +43,7 @@ void s_init(void) #define MSTPSR7 0xE61501C4 #define SMSTPCR7 0xE615014C -#define SCIF0_MSTP719 (1 << 19) +#define SCIF2_MSTP719 (1 << 19) #define MSTPSR8 0xE61509A0 #define SMSTPCR8 0xE6150990 @@ -63,8 +63,8 @@ int board_early_init_f(void) /* TMU */ mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125); - /* SCIF0 */ - mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP719); + /* SCIF2 */ + mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF2_MSTP719); /* ETHER */ mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813); -- cgit v1.1