Getting code into the Linux kernel
Digispeaker is based on open source software. The main operating system is the Linux kernel running on the PowerPC MPC5200B. My past kernel programming projects have all been based on x86 hardware so I'm learning a lot about how things are done on the PowerPC. Instead of a BIOS like x86 machines, the PowerPC uses a standard called Open Firmware. Open Firmware contains a device tree language for describing the hardware layout of a particular PowerPC based design. Here's a small section of a device tree description:
- i2c@3d40 {
- compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
- reg = <3d40 40>;
- interrupts = <2 10 0>;
- interrupt-parent = <&mpc5200_pic>;
- rtc@51 {
- compatible = "epson,rtc8564";
- reg = <51>;
- reg = <51>;
- };
- codec@27 {
- compatible = "ti,tas5504";
- reg = <27>;
- reg = <27>;
- };
- reg = <3d40 40>;
};
- compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
This section describes the i2c controller. The i2c controller implements a bus. The rtc and codec are attached to this bus.
I'm implementing code for supporting this syntax of describe the i2c devices as children of the i2c bus in the device tree. Reading this email thread will give you an idea of what needs to be done to get code into the Linux kernel.
- jonsmirl's blog
- Login or register to post comments