SPI controller hangs in 2.6 and not in 2.4 (on MPC875)
DI BACCO ANTONIO - technolabs
Antonio.DiBacco at technolabs.it
Mon Feb 26 06:51:12 EST 2007
Hi Melinda,
the problem in my case was caused by the following instructions to allocate the buffers for SPI controller tx and rx:
rxbuffer = (u8*)m8xx_cpm_hostalloc(SPI_MAX_BUFFER_SIZE);
txbuffer = (u8*)m8xx_cpm_hostalloc(SPI_MAX_BUFFER_SIZE);
// Set the bd's rx and tx buffer address pointers
rbdf->cbd_bufaddr = virt_to_bus((void *)rxbuffer);
tbdf->cbd_bufaddr = virt_to_bus((void *)txbuffer);
I don't know why (I'm asking an opinion to Vitaly Bordug), I replaced the allocation of rx and tx buffers with:
...->cbd_bufaddr = __pa(__get_free_page(GFP_KERNEL | GFP_DMA))
but it will better to use dma_alloc_coherent.
In my case the use of m8xx_cpm_hostalloc led to an immediate kernel hang after giving the start command to the spi controller.
Bye,
Antonio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070225/2fe9c6ce/attachment.htm
More information about the Linuxppc-embedded
mailing list