Thread (2 messages) flat view 2 messages, 2 authors, 2007-02-26

SPI controller hangs in 2.6 and not in 2.4 (on MPC875)

From: DI BACCO ANTONIO - technolabs <hidden>
Date: 2007-02-25 19:51:15

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.


                             
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help