> -----Original Message----- > From: Sudhakar Rajashekhara [mailto:sudhakar....@ti.com] > Sent: Wednesday, July 07, 2010 6:21 AM > To: Brian Niebuhr; 'Brian Niebuhr'; > spi-devel-gene...@lists.sourceforge.net > Cc: davinci-linux-open-source@linux.davincidsp.com > 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. > > If the change I mentioned above fixes the issue on DM355, then > > I am not sure whether my earlier mail was clear in this regard or not > but interrupt mode works fine on DM355 if intr_level = 0. > Kernel booting > hangs on DM355 if intr_level = 1. > > > I've got to imagine that it's just a configuration issue > > of some sort on DM365. > > > > I am also of the same opinion. > > Thanks, > Sudhakar > > > > -------------------------------------------------------------- > ---------------- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > spi-devel-general mailing list > spi-devel-gene...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/spi-devel-general > > _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source