From 9502d03674e220d3f9efbb4420abe8d167460ba6 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Thu, 6 Nov 2014 15:43:36 +0900 Subject: arm: rmobile: alt: Remove board_late_init function Alt board does not use board_late_init function. This removes this function and define of BOARD_LATE_INIT from config. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'board/renesas/alt/alt.c') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 5c5a86f1455..cf6d64c49a1 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -155,11 +155,6 @@ void dram_init_banksize(void) gd->bd->bi_dram[0].size = ALT_SDRAM_SIZE; } -int board_late_init(void) -{ - return 0; -} - void reset_cpu(ulong addr) { u8 val; -- cgit v1.2.3 From 92ef38ee0989a5d85bac48e58c9f99e2618d2072 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 10 Nov 2014 09:16:43 +0900 Subject: arm: rmobile: alt: Enable channel 1 of sh-i2c Alt board was connected Power IC to channel 1 of sh-i2c. Source code that controls this is already included, but channel 1 of sh-i2c is not enabled. This enables channel 1 of sh-i2c, and can use. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'board/renesas/alt/alt.c') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index cf6d64c49a1..083e007fcfd 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -49,6 +49,10 @@ void s_init(void) #define SMSTPCR8 0xE6150990 #define ETHER_MSTP813 (1 << 13) +#define MSTPSR3 0xE6150048 +#define SMSTPCR3 0xE615013C +#define IIC1_MSTP323 (1 << 23) + #define mstp_setbits(type, addr, saddr, set) \ out_##type((saddr), in_##type(addr) | (set)) #define mstp_clrbits(type, addr, saddr, clear) \ @@ -69,6 +73,9 @@ int board_early_init_f(void) /* ETHER */ mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813); + /* IIC1 / sh-i2c ch1 */ + mstp_clrbits_le32(MSTPSR3, SMSTPCR3, IIC1_MSTP323); + return 0; } -- cgit v1.2.3 From f063b32cf5ee45add4be6e3f3e393917489cb35a Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 10 Nov 2014 09:16:44 +0900 Subject: arm: rmobile: alt: Fix typo in comment for sh-i2c PowerIC connected to channel 1 of sh-i2c, not channel 2. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/renesas/alt/alt.c') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 083e007fcfd..68ae9372c74 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -166,7 +166,7 @@ void reset_cpu(ulong addr) { u8 val; - i2c_set_bus_num(1); /* PowerIC connected to ch3 */ + i2c_set_bus_num(1); /* PowerIC connected to ch1 */ i2c_init(400000, 0); i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); val |= 0x02; -- cgit v1.2.3 From 46049bec07ab7b3ec5fef4d1e5247d83abd99c29 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 10 Nov 2014 09:16:45 +0900 Subject: arm: rmobile: alt: Remove i2c_init function The i2c_init function is no longer necessary. 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/alt/alt.c') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 68ae9372c74..039cb376d39 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -167,7 +167,6 @@ void reset_cpu(ulong addr) u8 val; i2c_set_bus_num(1); /* PowerIC connected to ch1 */ - i2c_init(400000, 0); i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); val |= 0x02; i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); -- cgit v1.2.3 From 4772684c70159c70a742811c14adc1f75b1b5aa1 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 10 Nov 2014 13:58:50 +0900 Subject: arm: rmobile: alt: Remove dram_init_banksize function Alt board is defined CONFIG_SYS_SDRAM_BASE, and this can use a basic function of dram_init_banksize instead. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu --- board/renesas/alt/alt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'board/renesas/alt/alt.c') diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c index 039cb376d39..523c5f131fa 100644 --- a/board/renesas/alt/alt.c +++ b/board/renesas/alt/alt.c @@ -88,7 +88,7 @@ void arch_preboot_os(void) int board_init(void) { /* adress of boot parameters */ - gd->bd->bi_boot_params = ALT_SDRAM_BASE + 0x100; + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; /* Init PFC controller */ r8a7794_pinmux_init(); @@ -156,12 +156,6 @@ const struct rmobile_sysinfo sysinfo = { CONFIG_RMOBILE_BOARD_STRING }; -void dram_init_banksize(void) -{ - gd->bd->bi_dram[0].start = ALT_SDRAM_BASE; - gd->bd->bi_dram[0].size = ALT_SDRAM_SIZE; -} - void reset_cpu(ulong addr) { u8 val; -- cgit v1.2.3