From: Ned F. <nfo...@wh...> - 2008-04-08 14:48:01
|
rketcham wrote: > Dave, > Ahhh. That's good to know. I'm actually working on a driver to communicate > with my SPI to UART chip. I wanted the SPI chip to raise an interrupt when > it's RX buffer reached a certain level. On the interrupt, I want the > interrupt service routine to check several registers on the SPI chip to > determine the cause of the interrupt and retrieve data from the buffer. > > To do this, I think I only need access to three registers on the PXA270: > > SSDR2 for TX and RX (0x41700010) > GPCR2 for GPIO clear (0x40E0002C) > GPSR2 for GPIO set(0x40E00020) > > The last two are for my chip select (although, I could use the Frame pin). > What's the usual way for doing this? If you are new to kernel programming and are trying to write a device driver, as was my situation last year, I recommend that an easier to way to learn would be to read a good reference book. I found the following to be very helpful: "Linux Device Drivers" THIRD EDITION, by Jonathan Corbet, Alessandro, Rubini, and Greg Kroah-Hartman, published by O'Reilly. The third edition covers the 2.6 kernel. Even though I was expanding a driver that already existed and worked (pxa2xx_spi.c), I could never have understood all the things I needed to know by polling a mailing list. -- Ned Forrester nfo...@wh... Oceanographic Systems Lab 508-289-2226 Applied Ocean Physics and Engineering Dept. Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 http://www.whoi.edu/hpb/Site.do?id=1532 http://www.whoi.edu/page.do?pid=10079 |