* [PATCH] 8xx: using dma_alloc_coherent() instead consistent_alloc()
@ 2005-07-28 9:14 Marcelo Tosatti
0 siblings, 0 replies; only message in thread
From: Marcelo Tosatti @ 2005-07-28 9:14 UTC (permalink / raw)
To: akpm; +Cc: linux-ppc-embedded
From: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br>
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>
Index: 2.6-8xx/arch/ppc/8xx_io/fec.c
===================================================================
--- 2.6-8xx.orig/arch/ppc/8xx_io/fec.c 2005-07-04 11:45:57.000000000 -0300
+++ 2.6-8xx/arch/ppc/8xx_io/fec.c 2005-07-04 11:45:58.000000000 -0300
@@ -1580,7 +1580,7 @@
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;
@@ -1645,7 +1645,8 @@
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.
*/
@@ -1662,7 +1663,10 @@
/* 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-28 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 9:14 [PATCH] 8xx: using dma_alloc_coherent() instead consistent_alloc() Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).