X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2F8260_io%2Fenet.c;h=ac6d55fe22359c3ab2cd7854d95d227f8d49117f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b6dd2352ffcb206678d3eba143cbf9aa9bd0fdd8;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c index b6dd2352f..ac6d55fe2 100644 --- a/arch/ppc/8260_io/enet.c +++ b/arch/ppc/8260_io/enet.c @@ -39,13 +39,13 @@ #include #include #include +#include -#include +#include #include #include -#include #include -#include +#include #include /* @@ -376,7 +376,7 @@ scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) } if (must_restart) { - volatile cpm8260_t *cp; + volatile cpm_cpm2_t *cp; /* Some transmit errors cause the transmitter to shut * down. We now issue a restart transmit. Since the @@ -552,10 +552,10 @@ static void set_multicast_list(struct net_device *dev) /* Log any net taps. */ printk("%s: Promiscuous mode enabled.\n", dev->name); - cep->sccp->scc_pmsr |= SCC_PSMR_PRO; + cep->sccp->scc_psmr |= SCC_PSMR_PRO; } else { - cep->sccp->scc_pmsr &= ~SCC_PSMR_PRO; + cep->sccp->scc_psmr &= ~SCC_PSMR_PRO; if (dev->flags & IFF_ALLMULTI) { /* Catch all multicast addresses, so set the @@ -612,20 +612,21 @@ static int __init scc_enet_init(void) { struct net_device *dev; struct scc_enet_private *cep; - int i, j; + int i, j, err; + uint dp_offset; unsigned char *eap; unsigned long mem_addr; bd_t *bd; volatile cbd_t *bdp; - volatile cpm8260_t *cp; + volatile cpm_cpm2_t *cp; volatile scc_t *sccp; volatile scc_enet_t *ep; - volatile immap_t *immap; - volatile iop8260_t *io; + volatile cpm2_map_t *immap; + volatile iop_cpm2_t *io; cp = cpmp; /* Get pointer to Communication Processor */ - immap = (immap_t *)IMAP_ADDR; /* and to internal registers */ + immap = (cpm2_map_t *)CPM_MAP_ADDR; /* and to internal registers */ io = &immap->im_ioport; bd = (bd_t *)__res; @@ -680,13 +681,13 @@ static int __init scc_enet_init(void) * These are relative offsets in the DP ram address space. * Initialize base addresses for the buffer descriptors. */ - i = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8); - ep->sen_genscc.scc_rbase = i; - cep->rx_bd_base = (cbd_t *)&immap->im_dprambase[i]; + dp_offset = cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8); + ep->sen_genscc.scc_rbase = dp_offset; + cep->rx_bd_base = (cbd_t *)cpm_dpram_addr(dp_offset); - i = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8); - ep->sen_genscc.scc_tbase = i; - cep->tx_bd_base = (cbd_t *)&immap->im_dprambase[i]; + dp_offset = cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8); + ep->sen_genscc.scc_tbase = dp_offset; + cep->tx_bd_base = (cbd_t *)cpm_dpram_addr(dp_offset); cep->dirty_tx = cep->cur_tx = cep->tx_bd_base; cep->cur_rx = cep->rx_bd_base; @@ -820,7 +821,7 @@ static int __init scc_enet_init(void) /* Set processing mode. Use Ethernet CRC, catch broadcast, and * start frame search 22 bit times after RENA. */ - sccp->scc_pmsr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22); + sccp->scc_psmr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22); /* It is now OK to enable the Ethernet transmitter. * Unfortunately, there are board implementation differences here.