Hello, I am porting a FEC driver from linux 2.6.10 to uclinux which requires the usage of DMA transfers to function.
In the FEC driver, I need to allocate a DMA buffer using a call like "kmalloc(sz, GFP_DMA)". In the stock uclinux kernel, this call fails because apparently the ZONE_DMA is not defined. In order for me to get this FEC driver working, what I need to do (I think) is the following: 1) define a ZONE_DMA area of 1MB 2) mark the ZONE_DMA region as cache-inhibited I cannot figure out how to mod the uclinux kernel to make step #1 work as all my calls to "kmalloc(sz,GFP_DMA)" return NULL. Can someone give me ideas on how to setup a ZONE_DMA for a coldfire arch? Is there an alternate way to alloc a buffer which is cache inhibited? Any help would be appreciated, Thanks, Dave Meador Here is my attempt to mod arch/m68knommu/mm/init.c to enable a ZONE_DMA zone: { unsigned long zones_size[MAX_NR_ZONES] = {0, }; unsigned int dma_reserve = (1*1024*1024); // reserve 1MB for DMA set_dma_reserve(dma_reserve >> PAGE_SHIFT); end_mem &= PAGE_MASK; zones_size[ZONE_DMA] = dma_reserve >> PAGE_SHIFT; zones_size[ZONE_NORMAL] = ((end_mem - PAGE_OFFSET ) >> PAGE_SHIFT) - zones_size[ZONE_DMA]; #ifdef CONFIG_HIGHMEM zones_size[ZONE_HIGHMEM] = 0; #endif free_area_init(zones_size); } _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev