Re: AT91 kernel programming documentation ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux