aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAristeu Sergio Rozanski Filho <aris@conectiva.com.br>2005-08-07 12:42:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-07 13:00:39 -0400
commitfc007ddd609ccfce1cd392e65eed05aba8db32ce (patch)
treeb903127fe65626cb75287c0104e5d2ab96f0d876
parent8b0ed2fbdbea3f0d34404f1cbfdf02c4a673ca56 (diff)
[PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_alloc()
8xx: using dma_alloc_coherent() instead consistent_alloc() Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br> Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc/8xx_io/fec.c10
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.