struct net_device *dev;
struct scc_enet_private *cep;
int i, j, k, err;
+ uint dp_offset;
unsigned char *eap, *ba;
dma_addr_t mem_addr;
bd_t *bd;
* These are relative offsets in the DP ram address space.
* Initialize base addresses for the buffer descriptors.
*/
- i = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE);
- ep->sen_genscc.scc_rbase = i;
- cep->rx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
+ dp_offset = cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
+ ep->sen_genscc.scc_rbase = dp_offset;
+ cep->rx_bd_base = cpm_dpram_addr(dp_offset);
- i = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE);
- ep->sen_genscc.scc_tbase = i;
- cep->tx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
+ dp_offset = cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
+ ep->sen_genscc.scc_tbase = dp_offset;
+ cep->tx_bd_base = cpm_dpram_addr(dp_offset);
cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
cep->cur_rx = cep->rx_bd_base;