Hi, On Wed, Jul 07, 2010 at 22:32:58, Brian Niebuhr wrote: > > -----Original Message----- > > From: Sudhakar Rajashekhara [mailto:[email protected]] > > Sent: Wednesday, July 07, 2010 6:21 AM > > To: Brian Niebuhr; 'Brian Niebuhr'; > > [email protected] > > Cc: [email protected] > > Subject: Re: [spi-devel-general] [PATCH v2 0/1] davinci: > > spi:replaceexisting driver > > > > Hi Brian, > > > > On Tue, Jul 06, 2010 at 19:45:56, Brian Niebuhr wrote: > > > > On Sat, Jul 03, 2010 at 04:08:53, Brian Niebuhr wrote: > > > > > I have included all of the recommended changes in this > > > > [...] > > > > > > > > > > Quick update. > > > > > > > > I tested this patch on DM355 and DM365 EVMs. On DM355 all the > > > > 3 modes (DMA, > > > > Polled and Interrupt) worked fine. But in interrupt mode, on > > > > DM355, if I set > > > > "intr_level = 1", then kernel hangs during booting after printing > > > > "spi spi0.0: DaVinci SPI driver in Interrupt mode" on the console. > > > > > > Sudhakar - > > > > > > When you changed the interrupt level, did you also change the > > > IORESOURCE_IRQ entry for SPI0? Maybe we could set the > > interrupt level > > > automatically based on the IORESOURCE_IRQ provided? > > > > IORESOURCE_IRQ entry for dm365 were already present in dm365.c. > > > I should have been more clear: The intr_level setting chooses which IRQ > is used to signal events. If you change intr_level to 1 then you also > need to change the IRQ that is provided as a resource to the driver to > match. On DM355 intr_level=0 corresponds to SPINT0_0 (42) and > intr_level=1 corresponds to SPINT0_1 (43). > > > > > > > > > On DM365 only DMA and Polled mode worked fine. In interrupt > > > > mode, whether I > > > > set intr_level to ZERO or ONE, kernel booting hangs, > > similar to DM355. > > > > > > Does the interrupt mode of the existing driver work on DM365? > > > > > > > AFAIK, support for interrupt mode was not present in the > > earlier driver > > by Sandeep Paulraj. > > > > > I don't have one of these boards, so I can't debug the > > issue. If you > > > have any ideas where the problem might be I'd appreciate the help in > > > getting this resolved. > > > > As I mentioned in my earlier e-mail, on DM365 kernel booting > > hangs after > > Printing "spi spi0.0: DaVinci SPI driver in Interrupt mode" > > on the console. > > Control is in spi_sync() function waiting for completion. > > > I've got an idea what the problem is: When I was writing the driver I > was looking at the DM355 for as an example of the "version 1" SPI > controller. The DM355 doesn't have a TX interrupt, so I thought that > was a feature of the "version 1" controller. However, DM365 does have a > TX interrupt, even though it has a "version 1" controller. The > interrupt handler in the driver changes its processing based on whether > it is a "version 1" or "version 2" device, but obviously that's not > quite correct. > > Could you try one experiment for me on the DM365 board? Could you > change SPIINT_MASKINT to 0x0000015Fu and retest on the DM365 only? This > should make it behave like the DM355. If that fixes the problem, then > at least I know where the problem is. I don't have a good idea how to > solve it yet, though. >
Bingo. With the modification you suggested above, interrupt mode worked fine on DM365. Thanks, Sudhakar _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
