Misc changes for CSSI boards
cover 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(-)
Signature · 1 line
2.43.0
PATCH 1/4 board: cssi: Fix MCR3000 board environment
From: Jean-Michel CASAUBON <[email protected]>
Remove a stray semicolon in MCR3000 board environment.
--- board/cssi/mcr3000/mcr3000.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/cssi/mcr3000/mcr3000.env +1 -1
@@ -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
Signature · 1 line
2.43.0
PATCH 2/4 board: cssi: Allow use without HUSH shell
In reply to Christophe LeroyFrom: Jean-Michel CASAUBON <[email protected]>
HUSH shell is not always wanted/desirable.
Add missing braces in environment in order to allow use without HUSH shell.
--- board/cssi/cmpc885/cmpc885.env | 4 ++-- board/cssi/cmpcpro/cmpcpro.env | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
board/cssi/cmpc885/cmpc885.env +2 -2
@@ -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;
board/cssi/cmpcpro/cmpcpro.env +2 -2
@@ -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;
Signature · 1 line
2.43.0
PATCH 3/4 board: cssi: Initialise port F on MIAE
In reply to Christophe LeroyFrom: Hugo Dubois <[email protected]>
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.
--- board/cssi/common/common.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)
board/cssi/common/common.c +34 -2
@@ -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 (); + } }
Signature · 1 line
2.43.0
PATCH 4/4 board: cssi: Properly initialise MAC address for fibre on CMPC885 board
In reply to Christophe LeroyFrom: Hugo Dubois <[email protected]>
CMPC885 board can be pluged on a mother board with fibre interface, so fibre interface MAC address must be initialised for that case.
--- board/cssi/cmpc885/cmpc885.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
board/cssi/cmpc885/cmpc885.c +3 -1
@@ -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 ; }
Signature · 1 line
2.43.0