]> err.no Git - linux-2.6/commitdiff
[PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_alloc()
authorAristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Sun, 7 Aug 2005 16:42:33 +0000 (09:42 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 7 Aug 2005 17:00:39 +0000 (10:00 -0700)
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>
arch/ppc/8xx_io/fec.c

index 33ff2976ce25fe5f71955f8712cf46c74c0331d1..8a9a76c1467db4015429a7b8077e86727316c7b2 100644 (file)
@@ -1575,7 +1575,7 @@ static int __init fec_enet_init(void)
        struct fec_enet_private *fep;
        int i, j, k, err;
        unsigned char   *eap, *iap, *ba;
-       unsigned long   mem_addr;
+       dma_addr_t      mem_addr;
        volatile        cbd_t   *bdp;
        cbd_t           *cbd_base;
        volatile        immap_t *immap;
@@ -1640,7 +1640,8 @@ static int __init fec_enet_init(void)
                printk("FEC initialization failed.\n");
                return 1;
        }
-       cbd_base = (cbd_t *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr);
+       cbd_base = (cbd_t *)dma_alloc_coherent(dev->class_dev.dev, PAGE_SIZE,
+                                              &mem_addr, GFP_KERNEL);
 
        /* Set receive and transmit descriptor base.
        */
@@ -1657,7 +1658,10 @@ static int __init fec_enet_init(void)
 
                /* Allocate a page.
                */
-               ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr);
+               ba = (unsigned char *)dma_alloc_coherent(dev->class_dev.dev,
+                                                        PAGE_SIZE,
+                                                        &mem_addr,
+                                                        GFP_KERNEL);
                /* BUG: no check for failure */
 
                /* Initialize the BD for every fragment in the page.