* Code cleanup, mostly for GCC-3.3.x
* Cleanup confusing use of CONFIG_ETH*ADDR - ust his only to pre-define a MAC address; use CONFIG_HAS_ETH* to enable support for additional ethernet addresses. * Cleanup drivers/i82365.c - avoid duplication of code * Fix bogus "cannot span across banks" flash error message * Add support for CompactFlash for the CPC45 Board.
This commit is contained in:
@@ -21,6 +21,6 @@
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -ffixed-r29 -mstring
|
||||
|
||||
@@ -809,14 +809,14 @@ int mpc8220_fec_initialize (bd_t * bis)
|
||||
{
|
||||
mpc8220_fec_priv *fec;
|
||||
|
||||
#ifdef CONFIG_ETH1ADDR
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
mpc8220_fec_priv *fec2;
|
||||
#endif
|
||||
struct eth_device *dev;
|
||||
char *tmp, *end;
|
||||
char env_enetaddr[6];
|
||||
|
||||
#ifdef CONFIG_ETH1ADDR
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
char env_enet1addr[6];
|
||||
#endif
|
||||
int i;
|
||||
@@ -826,7 +826,7 @@ int mpc8220_fec_initialize (bd_t * bis)
|
||||
memset (dev, 0, sizeof *dev);
|
||||
|
||||
fec->eth = (ethernet_regs *) MMAP_FEC1;
|
||||
#ifdef CONFIG_ETH1ADDR
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
fec2 = (mpc8220_fec_priv *) malloc (sizeof (*fec));
|
||||
fec2->eth = (ethernet_regs *) MMAP_FEC2;
|
||||
#endif
|
||||
@@ -860,7 +860,7 @@ int mpc8220_fec_initialize (bd_t * bis)
|
||||
}
|
||||
mpc8220_fec_set_hwaddr (fec, env_enetaddr);
|
||||
}
|
||||
#ifdef CONFIG_ETH1ADDR
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
tmp = getenv ("eth1addr");
|
||||
if (tmp) {
|
||||
for (i = 0; i < 6; i++) {
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -msoft-float
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float
|
||||
|
||||
@@ -1176,36 +1176,37 @@ int ppc_440x_eth_initialize (bd_t * bis)
|
||||
|
||||
/* See if we can actually bring up the interface, otherwise, skip it */
|
||||
switch (eth_num) {
|
||||
default: /* fall through */
|
||||
case 0:
|
||||
if (memcmp (bis->bi_enetaddr, "\0\0\0\0\0\0", 6) == 0) {
|
||||
bis->bi_phymode[eth_num] = BI_PHYMODE_NONE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
case 1:
|
||||
if (memcmp (bis->bi_enet1addr, "\0\0\0\0\0\0", 6) == 0) {
|
||||
bis->bi_phymode[eth_num] = BI_PHYMODE_NONE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_HAS_ETH2
|
||||
case 2:
|
||||
if (memcmp (bis->bi_enet2addr, "\0\0\0\0\0\0", 6) == 0) {
|
||||
bis->bi_phymode[eth_num] = BI_PHYMODE_NONE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_HAS_ETH3
|
||||
case 3:
|
||||
if (memcmp (bis->bi_enet3addr, "\0\0\0\0\0\0", 6) == 0) {
|
||||
bis->bi_phymode[eth_num] = BI_PHYMODE_NONE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (memcmp (bis->bi_enetaddr, "\0\0\0\0\0\0", 6) == 0) {
|
||||
bis->bi_phymode[eth_num] = BI_PHYMODE_NONE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Allocate device structure */
|
||||
@@ -1227,26 +1228,29 @@ int ppc_440x_eth_initialize (bd_t * bis)
|
||||
}
|
||||
|
||||
switch (eth_num) {
|
||||
default: /* fall through */
|
||||
case 0:
|
||||
hw->hw_addr = 0;
|
||||
memcpy (dev->enetaddr, bis->bi_enetaddr, 6);
|
||||
break;
|
||||
#ifdef CONFIG_HAS_ETH1
|
||||
case 1:
|
||||
hw->hw_addr = 0x100;
|
||||
memcpy (dev->enetaddr, bis->bi_enet1addr, 6);
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_HAS_ETH2
|
||||
case 2:
|
||||
hw->hw_addr = 0x400;
|
||||
memcpy (dev->enetaddr, bis->bi_enet2addr, 6);
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_HAS_ETH3
|
||||
case 3:
|
||||
hw->hw_addr = 0x600;
|
||||
memcpy (dev->enetaddr, bis->bi_enet3addr, 6);
|
||||
break;
|
||||
default:
|
||||
hw->hw_addr = 0;
|
||||
memcpy (dev->enetaddr, bis->bi_enetaddr, 6);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
hw->devnum = eth_num;
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
|
||||
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 -msoft-float
|
||||
|
||||
Reference in New Issue
Block a user