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.


                             
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Reply via email to