Skip to content

Commit

Permalink
[PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_all…
Browse files Browse the repository at this point in the history
…oc()

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>
  • Loading branch information
Aristeu Sergio Rozanski Filho authored and Linus Torvalds committed Aug 7, 2005
1 parent 8b0ed2f commit fc007dd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arch/ppc/8xx_io/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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.
Expand Down

0 comments on commit fc007dd

Please sign in to comment.