[PATCH 0/4] Misc changes for CSSI boards

This series contains misc fixes and changes for CSSI boards.
I will send a pull request later before close of the merge window.
Hugo Dubois (2): board: cssi: Initialise port F on MIAE board: cssi: Properly initialise MAC address for fibre on CMPC885 board
Jean-Michel CASAUBON (2): board: cssi: Fix MCR3000 board environment board: cssi: Allow use without HUSH shell
board/cssi/cmpc885/cmpc885.c | 4 +++- board/cssi/cmpc885/cmpc885.env | 4 ++-- board/cssi/cmpcpro/cmpcpro.env | 4 ++-- board/cssi/common/common.c | 36 ++++++++++++++++++++++++++++++++-- board/cssi/mcr3000/mcr3000.env | 2 +- 5 files changed, 42 insertions(+), 8 deletions(-)

From: Jean-Michel CASAUBON jean-michel.casaubon@csgroup.eu
Remove a stray semicolon in MCR3000 board environment.
Signed-off-by: Jean-Michel CASAUBON jean-michel.casaubon@csgroup.eu Reviewed-by: DUBOIS Hugo hugo.dubois.ext@csgroup.eu Signed-off-by: Christophe Leroy christophe.leroy@csgroup.eu --- board/cssi/mcr3000/mcr3000.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/cssi/mcr3000/mcr3000.env b/board/cssi/mcr3000/mcr3000.env index 372ab09094..380c10c4ce 100644 --- a/board/cssi/mcr3000/mcr3000.env +++ b/board/cssi/mcr3000/mcr3000.env @@ -8,7 +8,7 @@ dhcp_ip=ip=:::::eth0:dhcp console_args=console=ttyCPM0,115200N8 loadkernel=ubi part nand0;ubifsmount ubi0;ubifsload ${loadaddr} /boot/${filename};ubifsumount; ubi detach bootcmd=run flashboot -flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off;${ofl_args}; run loadkernel; bootm ${loadaddr} +flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off ${ofl_args}; run loadkernel; bootm ${loadaddr} tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:mcr3k:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename}; bootm ${loadaddr} dhcpboot=dhcp ${loadaddr} ${filename};setenv bootargs ${console_args} ${dhcp_ip} ${ofl_args}; bootm ${loadaddr} update=echo 'Updating ubi image'; if tftp 0x2000 $ubifile; then nand erase.chip; nand write 0x2000 0x00 $filesize; fi

From: Jean-Michel CASAUBON jean-michel.casaubon@csgroup.eu
HUSH shell is not always wanted/desirable.
Add missing braces in environment in order to allow use without HUSH shell.
Signed-off-by: Jean-Michel CASAUBON jean-michel.casaubon@csgroup.eu Cc: DUBOIS Hugo hugo.dubois.ext@csgroup.eu Signed-off-by: Christophe Leroy christophe.leroy@csgroup.eu --- board/cssi/cmpc885/cmpc885.env | 4 ++-- board/cssi/cmpcpro/cmpcpro.env | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/board/cssi/cmpc885/cmpc885.env b/board/cssi/cmpc885/cmpc885.env index 51ab5ce2cf..570117cd36 100644 --- a/board/cssi/cmpc885/cmpc885.env +++ b/board/cssi/cmpc885/cmpc885.env @@ -2,6 +2,6 @@ loadaddr=0x1a00000 filename=cmpc885.itb console_args=console=ttyCPM0,115200N8 loadkernel=ubi part nand0;ubifsmount ubi0;ubifsload ${loadaddr} /boot/${filename};ubifsumount; ubi detach -flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; run loadkernel; bootm $loadaddr#$config -tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename};bootm $loadaddr#$config +flashboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; run loadkernel; bootm ${loadaddr}#${config} +tftpboot=setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename};bootm ${loadaddr}#${config} update=echo 'Updating ubi image'; if tftp $loadaddr $ubifile; then nand erase.chip; nand write $loadaddr 0x00 $filesize; fi; diff --git a/board/cssi/cmpcpro/cmpcpro.env b/board/cssi/cmpcpro/cmpcpro.env index 7394b8386e..47b436ff6b 100644 --- a/board/cssi/cmpcpro/cmpcpro.env +++ b/board/cssi/cmpcpro/cmpcpro.env @@ -3,6 +3,6 @@ filename=cmpcpro.itb netdev=eth0 console_args=console=ttyS0,115200N8 loadkernel=ubi part nand0;ubifsmount ubi0; ubifsload ${loadaddr} /boot/${filename}; ubifsumount; ubi detach -flashboot=mw.w 90000040 0x000E 1; setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; run loadkernel; bootm $loadaddr#$config -tftpboot=mw.w 90000040 0x000E 1; setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename}; bootm $loadaddr#$config +flashboot=mw.w 90000040 0x000E 1; setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; run loadkernel; bootm ${loadaddr}#${config} +tftpboot=mw.w 90000040 0x000E 1; setenv bootargs ${console_args} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off ${ofl_args}; tftp ${loadaddr} ${filename}; bootm ${loadaddr}#${config} update=echo 'Updating ubi image'; mw.w 90000040 0x000E 1; if tftp $loadaddr $ubifile; then nand erase.chip; nand write $loadaddr 0x00 $filesize; fi;

From: Hugo Dubois hugo.dubois.ext@csgroup.eu
When equiped with the SRSA audio board, MIAE equipment has an additional port called port F.
Initialise that port just like other ports of the board, so that it is already configured when starting Linux kernel.
Signed-off-by: Hugo Dubois hugo.dubois.ext@csgroup.eu Reviewed-by: CASAUBON Jean Michel jean-michel.casaubon@csgroup.eu Signed-off-by: Christophe Leroy christophe.leroy@csgroup.eu --- board/cssi/common/common.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/board/cssi/common/common.c b/board/cssi/common/common.c index 7ecf772620..54e8c3cd03 100644 --- a/board/cssi/common/common.c +++ b/board/cssi/common/common.c @@ -208,12 +208,44 @@ void misc_init_r_common(void) } }
+static void iop_setup_fpgam_common(void) +{ + u8 far_id = in_8(ADDR_FPGA_R_BASE + 0x43) >> 5; + + if(far_id == FAR_CASRSA) { + /* + * PFDIR[15] = 0 [0x01] + * PFDIR[14] = 1 [0x02] + * PFDIR[13] = 1 [0x04] + */ + clrsetbits_8(ADDR_FPGA_R_BASE + 0x37, 0x01, 0x06); + /* + * PFODR[15] = 1 [0x01] + * PFODR[14] = 0 [0x02] + * PFODR[13] = 0 [0x04] + */ + clrsetbits_8(ADDR_FPGA_R_BASE + 0x39, 0x06, 0x01); + /* + * PFDAT[15] = 0 [0x01] + * PFDAT[14] = 1 [0x02] + * PFDAT[13] = 1 [0x04] + * PFDAT[12] = 1 [0x08] + */ + clrsetbits_8(ADDR_FPGA_R_BASE + 0x3B, 0x01, 0x0E); + + /* Setup TOR_OUT */ + out_8(ADDR_FPGA_R_BASE + 0x32, 0x2A); + } +} + void iop_setup_common(void) { u8 type = in_8(ADDR_FPGA_R_BASE);
- if (type == TYPE_MCR) + if (type == TYPE_MCR) { iop_setup_mcr(); - else if (type == TYPE_MIAE) + } else if (type == TYPE_MIAE) { iop_setup_miae(); + iop_setup_fpgam_common(); + } }

From: Hugo Dubois hugo.dubois.ext@csgroup.eu
CMPC885 board can be pluged on a mother board with fibre interface, so fibre interface MAC address must be initialised for that case.
Signed-off-by: Hugo Dubois hugo.dubois.ext@csgroup.eu Reviewed-by: CASAUBON Jean Michel jean-michel.casaubon@csgroup.eu Signed-off-by: Christophe Leroy christophe.leroy@csgroup.eu --- board/cssi/cmpc885/cmpc885.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/cssi/cmpc885/cmpc885.c b/board/cssi/cmpc885/cmpc885.c index e11cfafaa5..49c13056ed 100644 --- a/board/cssi/cmpc885/cmpc885.c +++ b/board/cssi/cmpc885/cmpc885.c @@ -114,8 +114,10 @@ static int setup_mac(void) if (memcmp(din + EE_OFF_MAC1, &ident, sizeof(ident)) == 0) eth_env_set_enetaddr("ethaddr", din + EE_OFF_MAC1);
- if (memcmp(din + EE_OFF_MAC2, &ident, sizeof(ident)) == 0) + if (memcmp(din + EE_OFF_MAC2, &ident, sizeof(ident)) == 0) { eth_env_set_enetaddr("eth1addr", din + EE_OFF_MAC2); + eth_env_set_enetaddr("eth2addr", din + EE_OFF_MAC2); + }
return 0; }
participants (1)
-
Christophe Leroy