linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* SPI controller hangs in 2.6 and not in 2.4 (on MPC875)
@ 2007-02-25 19:51 DI BACCO ANTONIO - technolabs
  2007-02-26  7:41 ` Vitaly Bordug
  0 siblings, 1 reply; 3+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2007-02-25 19:51 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

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.


                             

[-- Attachment #2: Type: text/html, Size: 1876 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: SPI controller hangs in 2.6 and not in 2.4 (on MPC875)
@ 2007-02-25 14:52 melinda develey
  0 siblings, 0 replies; 3+ messages in thread
From: melinda develey @ 2007-02-25 14:52 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

I have the same problem with an MPC875, I suspect there is a problem in the linux kernel. I'm using linux kernel 2.6.19 from denk and what's the version you are using?

Bye,
Antonio.


 
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

[-- Attachment #2: Type: text/html, Size: 497 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-26  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-25 19:51 SPI controller hangs in 2.6 and not in 2.4 (on MPC875) DI BACCO ANTONIO - technolabs
2007-02-26  7:41 ` Vitaly Bordug
  -- strict thread matches above, loose matches on Subject: below --
2007-02-25 14:52 melinda develey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).