* mtd_dataflash cause udev hang
@ 2013-06-25 11:21 Samba Siva Reddy A
0 siblings, 0 replies; only message in thread
From: Samba Siva Reddy A @ 2013-06-25 11:21 UTC (permalink / raw)
To: linux-mtd
Hi,
I am working on the at91sam9x5 boards. I added the DataFLash partitions
on board-sam9x5.c file.
It hangs while booting up the board after Starting udev message and
after that getting the following messages.
Starting udev
udevd (672): /proc/672/oom_adj is deprecated, please use
/proc/672/oom_score_adj
instead.
then these traces come out.
udevd[672]: worker [688] unexpectedly returned with status 0x0100
udevd[672]: worker [688] failed while handling
'/devices/virtual/block/loop0'
udevd[672]: worker [691] unexpectedly returned with status 0x0100
udevd[672]: worker [691] failed while handling
'/devices/virtual/block/loop1'
udevd[672]: worker [692] unexpectedly returned with status 0x0100
1. Enable and ported the DMA Engine code from 2.6.39 kernel to
3.2.6 kernel.
2. Added the below code snippet for avoiding the stack overflow
while writing data to the dataFlash. I attached the file for your
reference.
static void *adjust_buffer_location(struct device *dev, void *buf) {
if (likely(buf < high_memory)) {
return buf;
}
else
{
struct page *pg;
pg = vmalloc_to_page(buf);
if (pg == 0)
{
dev_err(dev, "failed to vmalloc_to_page\n");
return NULL;
}
return page_address(pg) + ((size_t)buf & ~PAGE_MASK);
}
}
static int
atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) {
ptr = adjust_buffer_location(dev,(void *)xfer->tx_buf);
if(ptr)
xfer->tx_dma = dma_map_single(dev,
ptr, xfer->len,
DMA_TO_DEVICE);
if (dma_mapping_error(dev, xfer->tx_dma))
return -ENOMEM;
}
if (xfer->rx_buf) {
ptr=adjust_buffer_location(dev, xfer->rx_buf);
if(ptr)
xfer->rx_dma = dma_map_single(dev,
ptr, xfer->len,
DMA_FROM_DEVICE);
}
Could you please help any one on this issue.
Regards
Samba
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-25 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 11:21 mtd_dataflash cause udev hang Samba Siva Reddy A
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.