diff options
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r-- | arch/powerpc/cpu/mpc8260/ether_fcc.c | 22 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8260/ether_scc.c | 4 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/ether_fcc.c | 6 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/fec.c | 12 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/scc.c | 7 | ||||
-rw-r--r-- | arch/powerpc/cpu/ppc4xx/Kconfig | 2 |
7 files changed, 28 insertions, 26 deletions
diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index f9f15b59e5..30ea3de9cf 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -183,7 +183,7 @@ static int fec_recv(struct eth_device* dev) } else { /* Pass the packet up to the protocol layers. */ - NetReceive(NetRxPackets[rxIdx], length - 4); + net_process_received_packet(net_rx_packets[rxIdx], length - 4); } @@ -243,7 +243,7 @@ static int fec_init(struct eth_device* dev, bd_t *bis) { rtx.rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; rtx.rxbd[i].cbd_datlen = 0; - rtx.rxbd[i].cbd_bufaddr = (uint)NetRxPackets[i]; + rtx.rxbd[i].cbd_bufaddr = (uint)net_rx_packets[i]; } rtx.rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; @@ -299,7 +299,7 @@ static int fec_init(struct eth_device* dev, bd_t *bis) * it unique by setting a few bits in the upper byte of the * non-static part of the address. */ -#define ea eth_get_dev()->enetaddr +#define ea eth_get_ethaddr() pram_ptr->fen_paddrh = (ea[5] << 8) + ea[4]; pram_ptr->fen_paddrm = (ea[3] << 8) + ea[2]; pram_ptr->fen_paddrl = (ea[1] << 8) + ea[0]; @@ -637,7 +637,7 @@ eth_loopback_test (void) puts ("FCC Ethernet External loopback test\n"); - eth_getenv_enetaddr("ethaddr", NetOurEther); + eth_getenv_enetaddr("ethaddr", net_ethaddr); /* * global initialisations for all FCC channels @@ -720,8 +720,8 @@ eth_loopback_test (void) bdp->cbd_sc = BD_ENET_TX_READY | BD_ENET_TX_PAD | \ BD_ENET_TX_LAST | BD_ENET_TX_TC; - memset ((void *)bp, patbytes[i], ELBT_BUFSZ); - NetSetEther (bp, NetBcastAddr, 0x8000); + memset((void *)bp, patbytes[i], ELBT_BUFSZ); + net_set_ether(bp, net_bcast_ethaddr, 0x8000); } ecp->txbd[ELBT_NTXBD - 1].cbd_sc |= BD_ENET_TX_WRAP; @@ -799,11 +799,9 @@ eth_loopback_test (void) * So, far we have only been given one Ethernet address. We use * the same address for all channels */ -#define ea NetOurEther - fpp->fen_paddrh = (ea[5] << 8) + ea[4]; - fpp->fen_paddrm = (ea[3] << 8) + ea[2]; - fpp->fen_paddrl = (ea[1] << 8) + ea[0]; -#undef ea + fpp->fen_paddrh = (net_ethaddr[5] << 8) + net_ethaddr[4]; + fpp->fen_paddrm = (net_ethaddr[3] << 8) + net_ethaddr[2]; + fpp->fen_paddrl = (net_ethaddr[1] << 8) + net_ethaddr[0]; fpp->fen_minflr = PKT_MINBUF_SIZE; /* min frame len register */ /* @@ -1016,7 +1014,7 @@ eth_loopback_test (void) &ecp->rxbufs[i][0]; ours = memcmp (ehp->et_src, \ - NetOurEther, 6); + net_ethaddr, 6); prot = swap16 (ehp->et_protlen); tb = prot & 0x8000; diff --git a/arch/powerpc/cpu/mpc8260/ether_scc.c b/arch/powerpc/cpu/mpc8260/ether_scc.c index c988def9b4..5ba8bed20d 100644 --- a/arch/powerpc/cpu/mpc8260/ether_scc.c +++ b/arch/powerpc/cpu/mpc8260/ether_scc.c @@ -146,7 +146,7 @@ static int sec_rx(struct eth_device *dev) else { /* Pass the packet up to the protocol layers. */ - NetReceive(NetRxPackets[rxIdx], length - 4); + net_process_received_packet(net_rx_packets[rxIdx], length - 4); } @@ -263,7 +263,7 @@ static int sec_init(struct eth_device *dev, bd_t *bis) { rtx->rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; rtx->rxbd[i].cbd_datlen = 0; /* Reset */ - rtx->rxbd[i].cbd_bufaddr = (uint)NetRxPackets[i]; + rtx->rxbd[i].cbd_bufaddr = (uint)net_rx_packets[i]; } rtx->rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig index 4d6cb0964b..88a3bd6814 100644 --- a/arch/powerpc/cpu/mpc83xx/Kconfig +++ b/arch/powerpc/cpu/mpc83xx/Kconfig @@ -49,6 +49,7 @@ config TARGET_MPC837XERDB config TARGET_IDS8313 bool "Support ids8313" + select DM config TARGET_KM8360 bool "Support km8360" diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c index 166dc9ed17..14358aeb03 100644 --- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c +++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c @@ -186,7 +186,7 @@ static int fec_recv(struct eth_device* dev) } else { /* Pass the packet up to the protocol layers. */ - NetReceive(NetRxPackets[rxIdx], length - 4); + net_process_received_packet(net_rx_packets[rxIdx], length - 4); } @@ -263,7 +263,7 @@ static int fec_init(struct eth_device* dev, bd_t *bis) { rtx.rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; rtx.rxbd[i].cbd_datlen = 0; - rtx.rxbd[i].cbd_bufaddr = (uint)NetRxPackets[i]; + rtx.rxbd[i].cbd_bufaddr = (uint)net_rx_packets[i]; } rtx.rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; @@ -338,7 +338,7 @@ static int fec_init(struct eth_device* dev, bd_t *bis) * it unique by setting a few bits in the upper byte of the * non-static part of the address. */ -#define ea eth_get_dev()->enetaddr +#define ea eth_get_ethaddr() pram_ptr->fen_paddrh = (ea[5] << 8) + ea[4]; pram_ptr->fen_paddrm = (ea[3] << 8) + ea[2]; pram_ptr->fen_paddrl = (ea[1] << 8) + ea[0]; diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c index 22b8ec752b..2e196033c2 100644 --- a/arch/powerpc/cpu/mpc8xx/fec.c +++ b/arch/powerpc/cpu/mpc8xx/fec.c @@ -247,21 +247,21 @@ static int fec_recv (struct eth_device *dev) rtx->rxbd[rxIdx].cbd_sc); #endif } else { - uchar *rx = NetRxPackets[rxIdx]; + uchar *rx = net_rx_packets[rxIdx]; length -= 4; #if defined(CONFIG_CMD_CDP) - if ((rx[0] & 1) != 0 - && memcmp ((uchar *) rx, NetBcastAddr, 6) != 0 - && !is_cdp_packet((uchar *)rx)) + if ((rx[0] & 1) != 0 && + memcmp((uchar *)rx, net_bcast_ethaddr, 6) != 0 && + !is_cdp_packet((uchar *)rx)) rx = NULL; #endif /* * Pass the packet up to the protocol layers. */ if (rx != NULL) - NetReceive (rx, length); + net_process_received_packet(rx, length); } /* Give the buffer back to the FEC. */ @@ -576,7 +576,7 @@ static int fec_init (struct eth_device *dev, bd_t * bd) for (i = 0; i < PKTBUFSRX; i++) { rtx->rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; rtx->rxbd[i].cbd_datlen = 0; /* Reset */ - rtx->rxbd[i].cbd_bufaddr = (uint) NetRxPackets[i]; + rtx->rxbd[i].cbd_bufaddr = (uint) net_rx_packets[i]; } rtx->rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 251966b4a0..549844032b 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -159,7 +159,8 @@ static int scc_recv (struct eth_device *dev) #endif } else { /* Pass the packet up to the protocol layers. */ - NetReceive (NetRxPackets[rxIdx], length - 4); + net_process_received_packet(net_rx_packets[rxIdx], + length - 4); } @@ -280,7 +281,7 @@ static int scc_init (struct eth_device *dev, bd_t * bis) for (i = 0; i < PKTBUFSRX; i++) { rtx->rxbd[i].cbd_sc = BD_ENET_RX_EMPTY; rtx->rxbd[i].cbd_datlen = 0; /* Reset */ - rtx->rxbd[i].cbd_bufaddr = (uint) NetRxPackets[i]; + rtx->rxbd[i].cbd_bufaddr = (uint) net_rx_packets[i]; } rtx->rxbd[PKTBUFSRX - 1].cbd_sc |= BD_ENET_RX_WRAP; @@ -339,7 +340,7 @@ static int scc_init (struct eth_device *dev, bd_t * bis) pram_ptr->sen_gaddr3 = 0x0; /* Group Address Filter 3 (unused) */ pram_ptr->sen_gaddr4 = 0x0; /* Group Address Filter 4 (unused) */ -#define ea eth_get_dev()->enetaddr +#define ea eth_get_ethaddr() pram_ptr->sen_paddrh = (ea[5] << 8) + ea[4]; pram_ptr->sen_paddrm = (ea[3] << 8) + ea[2]; pram_ptr->sen_paddrl = (ea[1] << 8) + ea[0]; diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig index 9e52d3f22d..89cb3e9c4e 100644 --- a/arch/powerpc/cpu/ppc4xx/Kconfig +++ b/arch/powerpc/cpu/ppc4xx/Kconfig @@ -43,6 +43,8 @@ config TARGET_BUBINGA config TARGET_CANYONLANDS bool "Support canyonlands" + select DM + select DM_SERIAL config TARGET_EBONY bool "Support ebony" |