* AT91 kernel programming documentation ? @ 2008-07-30 13:53 Stefan Schoenleitner 2008-07-30 14:01 ` Robert Schwebel 0 siblings, 1 reply; 5+ messages in thread From: Stefan Schoenleitner @ 2008-07-30 13:53 UTC (permalink / raw) To: linux-embedded Hi, I'm looking for some good documentation concerning AT91 Linux kernel development. Currently I have a Olimex AT91SAM9260 development board which is supported by the at91 patch set. Now I would like to add different hardware to the board and write some kernel code for it. Unfortunately, there doesn't seem to be a lot of documentation. At the moment I'm reading mach-at91 related source code and trying to find out how things work. Specificly, I would like to know how the different SoC devices can be accessed and used, how I can do port multiplexing, how I can tell the kernel which hardware is attached to where and so on. Can you guys suggest any documentation ? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT91 kernel programming documentation ? 2008-07-30 13:53 AT91 kernel programming documentation ? Stefan Schoenleitner @ 2008-07-30 14:01 ` Robert Schwebel 2008-08-01 6:36 ` Stefan Schoenleitner 0 siblings, 1 reply; 5+ messages in thread From: Robert Schwebel @ 2008-07-30 14:01 UTC (permalink / raw) To: Stefan Schoenleitner; +Cc: linux-embedded On Wed, Jul 30, 2008 at 03:53:19PM +0200, Stefan Schoenleitner wrote: > I'm looking for some good documentation concerning AT91 Linux kernel > development. Currently I have a Olimex AT91SAM9260 development board > which is supported by the at91 patch set. The base functionality is supported in the Linux mainline. > Now I would like to add different hardware to the board and write some > kernel code for it. What kind of hardware? > Unfortunately, there doesn't seem to be a lot of documentation. At > the moment I'm reading mach-at91 related source code and trying to > find out how things work. I assume you've already bought a copy of the Rubini Device Driver book? > Specificly, I would like to know how the different SoC devices can be > accessed and used, how I can do port multiplexing, how I can tell the > kernel which hardware is attached to where and so on. Check arch/arm/mach-at91/*. It very much depends on what you want to do. Documentation/drivermodel/ might also be worth a look. rsc -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: AT91 kernel programming documentation ? 2008-07-30 14:01 ` Robert Schwebel @ 2008-08-01 6:36 ` Stefan Schoenleitner 2008-08-01 8:42 ` Book about embedded-type device drivers Thomas Petazzoni 0 siblings, 1 reply; 5+ messages in thread From: Stefan Schoenleitner @ 2008-08-01 6:36 UTC (permalink / raw) To: Robert Schwebel; +Cc: linux-embedded Hi, Robert Schwebel wrote: > [...] > >> Now I would like to add different hardware to the board and write some >> kernel code for it. > > What kind of hardware? An audio codec (TLV320AIC23B) connected to the I2C and I2S (over Atmel SSC) bus. There seems to be a codec driver already (drivers/media/video/tlv320aic23b.c) though it looks like I'll have to modify the driver a bit to support other sampling rates as well. Currently my first goal is to get the audio codec up and running so that it works with ALSA. Then I would like to add two SPI devices as well. Since most of the chipselect lines are already used I was thinking of using a demultiplexer which is supported by the AT91SAM9260. Due to the fact that the board will be a custom design, I guess I will also have to write a board implementation (i.e. arch/arm/mach-at91/board-<myboardname>.c) so that the kernel for example knows which ports are used for communication buses on the pins. Reading the source code already shed a little light on how things are done. > >> Unfortunately, there doesn't seem to be a lot of documentation. At >> the moment I'm reading mach-at91 related source code and trying to >> find out how things work. > > I assume you've already bought a copy of the Rubini Device Driver book? I read various papers and kernel documentation, parts of it also being from the second edition of the book. However, I just saw that there's a newer (third edition) available. It's online under a CC license: http://lwn.net/Kernel/LDD3/ However, although the book gives a good intoduction on writing drivers, it seems to miss some parts like SPI, I2C, board implementation and such. IMHO the best way is to use the book as reference for driver implementation and to read the existing AT91 kernel code. >> Specificly, I would like to know how the different SoC devices can be >> accessed and used, how I can do port multiplexing, how I can tell the >> kernel which hardware is attached to where and so on. > > Check arch/arm/mach-at91/*. It very much depends on what you want to do. > Documentation/drivermodel/ might also be worth a look. arch/arm/mach-at91 is where I looked at the source most of the time. However, I didn't notice Documentation/drivermodel until now. Thank you for mentioning it. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Book about embedded-type device drivers 2008-08-01 6:36 ` Stefan Schoenleitner @ 2008-08-01 8:42 ` Thomas Petazzoni 2008-08-01 9:13 ` Markus Franke 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni @ 2008-08-01 8:42 UTC (permalink / raw) To: linux-embedded Le Fri, 01 Aug 2008 08:36:49 +0200, Stefan Schoenleitner <dev.c0debabe@gmail.com> a écrit : > I read various papers and kernel documentation, parts of it also > being from the second edition of the book. > However, I just saw that there's a newer (third edition) available. > It's online under a CC license: http://lwn.net/Kernel/LDD3/ The 3rd edition is certainly newer than the second, but starts to be quite old. It has been written against the 2.6.10/2.6.11 kernels. > However, although the book gives a good intoduction on writing > drivers, it seems to miss some parts like SPI, I2C, board > implementation and such. IMHO the best way is to use the book as > reference for driver implementation and to read the existing AT91 > kernel code. In addition to « Linux Device Drivers », a good book is « Essential Linux Device Drivers », from Sreekrishnan Venkateswaran, available at Prentice Hall. This book is very recent (April 2008). 1. Introduction 2. A peek inside the kernel (timers, concurrency, memory, etc.) 3. Kernel facilities (threads, helper interfaces) 4. Laying the groundwork (IRQ, device model, memory barriers, etc.) 5. Character drivers 6. Serial drivers (including TTY drivers and line discipline drivers) 7. Input drivers (evdev interface, serio, keyboard, mice, touch controllers, accelerometers, etc.) 8. I2C (I2C core, EEPROM driver, RTC driver, i2c-dev, SPI, 1-wire) 9. PCMCIA and Compact Flash 10. PCI 11. USB 12. Video drivers (frame buffer, console drivers) 13. Audio drivers 14. Block drivers 15. Network interface cards 16. Linux without wires (Bluetooth, Infrared, Wifi) 17. MTD 18. Embedded Linux 19. Drivers in userspace 20. More devices and drivers 21. Debugging device drivers 22. Maintenance and delivery 23. Shutting Down I'm at the end of chapter 8, and until now, it's really good. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Book about embedded-type device drivers 2008-08-01 8:42 ` Book about embedded-type device drivers Thomas Petazzoni @ 2008-08-01 9:13 ` Markus Franke 0 siblings, 0 replies; 5+ messages in thread From: Markus Franke @ 2008-08-01 9:13 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: linux-embedded Hi, Thomas Petazzoni schrieb: > In addition to « Linux Device Drivers », a good book is « Essential > Linux Device Drivers », from Sreekrishnan Venkateswaran, available at > Prentice Hall. This book is very recent (April 2008). thank you very much for the hint. LDD3 is indeed a bit outdated and I also missed a chapter about I2C device driver development. Best regards, Markus ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-01 9:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-30 13:53 AT91 kernel programming documentation ? Stefan Schoenleitner 2008-07-30 14:01 ` Robert Schwebel 2008-08-01 6:36 ` Stefan Schoenleitner 2008-08-01 8:42 ` Book about embedded-type device drivers Thomas Petazzoni 2008-08-01 9:13 ` Markus Franke
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).