X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2F8260_io%2Fenet.c;h=3f8aa419771e1374611723aede0eaecda2c800bd;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=7a9a7bf31bb7f25e9de0c459b6d83a42b68307c8;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c index 7a9a7bf31..3f8aa4197 100644 --- a/arch/ppc/8260_io/enet.c +++ b/arch/ppc/8260_io/enet.c @@ -40,12 +40,12 @@ #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 @@ -613,19 +613,20 @@ static int __init scc_enet_init(void) struct net_device *dev; struct scc_enet_private *cep; 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.