Commit fc007ddd authored by Aristeu Sergio Rozanski Filho's avatar Aristeu Sergio Rozanski Filho Committed by Linus Torvalds

[PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_alloc()

8xx: using dma_alloc_coherent() instead consistent_alloc()
Signed-off-by: default avatarAristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: default avatarMarcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8b0ed2fb
...@@ -1575,7 +1575,7 @@ static int __init fec_enet_init(void) ...@@ -1575,7 +1575,7 @@ static int __init fec_enet_init(void)
struct fec_enet_private *fep; struct fec_enet_private *fep;
int i, j, k, err; int i, j, k, err;
unsigned char *eap, *iap, *ba; unsigned char *eap, *iap, *ba;
unsigned long mem_addr; dma_addr_t mem_addr;
volatile cbd_t *bdp; volatile cbd_t *bdp;
cbd_t *cbd_base; cbd_t *cbd_base;
volatile immap_t *immap; volatile immap_t *immap;
...@@ -1640,7 +1640,8 @@ static int __init fec_enet_init(void) ...@@ -1640,7 +1640,8 @@ static int __init fec_enet_init(void)
printk("FEC initialization failed.\n"); printk("FEC initialization failed.\n");
return 1; 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. /* Set receive and transmit descriptor base.
*/ */
...@@ -1657,7 +1658,10 @@ static int __init fec_enet_init(void) ...@@ -1657,7 +1658,10 @@ static int __init fec_enet_init(void)
/* Allocate a page. /* 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 */ /* BUG: no check for failure */
/* Initialize the BD for every fragment in the page. /* Initialize the BD for every fragment in the page.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment