Updates for WRS SBC82xx boards
PATCH 5/5 Updates for WRS SBC82xx boards
patch5: fcc_enet-mac-addr.diff1
- restore proper collection of mac addr data in obsolete FCC driver by replacing mix of #ifdef and if() with case
arch/ppc/8260_io/fcc_enet.c renamed from arch/ppc/8260_io/fcc_enet.c.orig +8 -10
@@ -1962,32 +1962,30 @@* non-static part of the address. */ eap = (unsigned char *)&(ep->fen_paddrh); -for (i=5 ; i>=0 ; i--) {/* * The EP8260 only uses FCC3, so we can safely give it the real * MAC address. */ +for (i=5 ; i>=0 ; i--)switch (i) { +case 5 :#ifdef CONFIG_SBC82xx -if (i ==5 ) {/* bd->bi_enetaddr holds the SCC0 address; the FCC devices count up from there */ dev->dev_addr[i] = bd->bi_enetaddr[i] & ~3 ; dev->dev_addr[i] +=1 + fip->fc_fccnum; *eap++ = dev->dev_addr[i]; - } -#else -#ifndef CONFIG_RPX8260 -if (i ==3 ) { +break ; +#endif +case 3 : +#if !defined(CONFIG_RPX8260 ) && !defined(CONFIG_SBC82xx) dev->dev_addr[i] = bd->bi_enetaddr[i]; dev->dev_addr[i] |= (1 << (7 - fip->fc_fccnum)); *eap++ = dev->dev_addr[i]; - } else +break ;#endif - { +default : *eap++ = dev->dev_addr[i] = bd->bi_enetaddr[i]; - } -#endif } ep->fen_taddrh =0 ;
Quoted 4 lines · On Thu, 25 May 2006 14:32:32 -0400 Paul Gortmaker…
patch5: fcc_enet-mac-addr.diff1
- restore proper collection of mac addr data in obsolete FCC driver by replacing mix of #ifdef andif()with case
8260_io stuff is obsoleted by fs_enet. You should fit the board into ppc_sys infrastructure, fill the platform data and do per-board initialization in board-specific file - refer to platforms/mpc8272_setup.c for example...
Quoted 56 lines
Signed-off-by Paul Gortmaker <[email protected]>--- linux-2.6.16_rc5/arch/ppc/8260_io/fcc_enet.c.orig
2006-01-02 22:21:10.000000000 -0500 +++
linux-2.6.16_rc5/arch/ppc/8260_io/fcc_enet.c2006-02-27
18:01:45.000000000 -0500 @@ -1962,32 +1962,30 @@arch/ppc/8260_io/fcc_enet.c renamed from arch/ppc/8260_io/fcc_enet.c.orig +2
-2* non-static part of the address. */ eap = (unsigned char *)&(ep->fen_paddrh); -for (i=5 ; i>=0 ; i--) {/* * The EP8260 only uses FCC3, so we can safely give it the real * MAC address. */ +for (i=5 ; i>=0 ; i--)switch (i) { +case 5 :#ifdef CONFIG_SBC82xx -if (i ==5 ) {/* bd->bi_enetaddr holds the SCC0 address; the FCC devices count up from there */
arch/ppc/8260_io/fcc_enet.c renamed from arch/ppc/8260_io/fcc_enet.c.orig +4
-4dev->dev_addr[i] = bd->bi_enetaddr[i] & ~3 ; dev->dev_addr[i] +=1 + fip->fc_fccnum; *eap++ = dev->dev_addr[i]; - } -#else -#ifndef CONFIG_RPX8260 - if (i == 3) { +break ; +#endif +case 3 : +#if !defined(CONFIG_RPX8260 ) && !defined(CONFIG_SBC82xx) dev->dev_addr[i] = bd->bi_enetaddr[i]; dev->dev_addr[i] |= (1 << (7 -
fip->fc_fccnum)); *eap++ = dev->dev_addr[i];arch/ppc/8260_io/fcc_enet.c renamed from arch/ppc/8260_io/fcc_enet.c.orig +2
-2- } else +break ;#endif - { +default : *eap++ = dev->dev_addr[i] =bd->bi_enetaddr[i];
arch/ppc/8260_io/fcc_enet.c renamed from arch/ppc/8260_io/fcc_enet.c.orig +0
-2- } -#endif } ep->fen_taddrh =0 ;_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded