diff options
Diffstat (limited to 'arch/ppc/8xx_io/fec.c')
-rw-r--r-- | arch/ppc/8xx_io/fec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c index 33ff2976ce25..8a9a76c1467d 100644 --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c | |||
@@ -1575,7 +1575,7 @@ static int __init fec_enet_init(void) | |||
1575 | struct fec_enet_private *fep; | 1575 | struct fec_enet_private *fep; |
1576 | int i, j, k, err; | 1576 | int i, j, k, err; |
1577 | unsigned char *eap, *iap, *ba; | 1577 | unsigned char *eap, *iap, *ba; |
1578 | unsigned long mem_addr; | 1578 | dma_addr_t mem_addr; |
1579 | volatile cbd_t *bdp; | 1579 | volatile cbd_t *bdp; |
1580 | cbd_t *cbd_base; | 1580 | cbd_t *cbd_base; |
1581 | volatile immap_t *immap; | 1581 | volatile immap_t *immap; |
@@ -1640,7 +1640,8 @@ static int __init fec_enet_init(void) | |||
1640 | printk("FEC initialization failed.\n"); | 1640 | printk("FEC initialization failed.\n"); |
1641 | return 1; | 1641 | return 1; |
1642 | } | 1642 | } |
1643 | cbd_base = (cbd_t *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); | 1643 | cbd_base = (cbd_t *)dma_alloc_coherent(dev->class_dev.dev, PAGE_SIZE, |
1644 | &mem_addr, GFP_KERNEL); | ||
1644 | 1645 | ||
1645 | /* Set receive and transmit descriptor base. | 1646 | /* Set receive and transmit descriptor base. |
1646 | */ | 1647 | */ |
@@ -1657,7 +1658,10 @@ static int __init fec_enet_init(void) | |||
1657 | 1658 | ||
1658 | /* Allocate a page. | 1659 | /* Allocate a page. |
1659 | */ | 1660 | */ |
1660 | ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); | 1661 | ba = (unsigned char *)dma_alloc_coherent(dev->class_dev.dev, |
1662 | PAGE_SIZE, | ||
1663 | &mem_addr, | ||
1664 | GFP_KERNEL); | ||
1661 | /* BUG: no check for failure */ | 1665 | /* BUG: no check for failure */ |
1662 | 1666 | ||
1663 | /* Initialize the BD for every fragment in the page. | 1667 | /* Initialize the BD for every fragment in the page. |