QUERY: How to handle SOC Configuration (Peripheral Multiplexing) in linux

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Mar 15 06:55:25 EDT 2010


On Mon, Mar 15, 2010 at 07:34:57PM +0900, jassi brar wrote:
> On Mon, Mar 15, 2010 at 7:22 PM, Shiraz HASHIM <shiraz.hashim at st.com> wrote:
> >> usually device makers(that release product versions with same SoC but
> >> different devices)
> >> want a single kernel image that detects the machine type and
> >> accordingly populate the
> >> device support. Managing separate images for similar devices is
> >> considered inefficient.
> >
> > Actually you have pointed to right thing and this is really important.
> > Some architectures (I think ppc) have device tree option to pass the
> > hardware configuration to the kernel from bootloader.
> > I dont know such option exists for arm. Lets hear others' opinions.
> I don't think you can't do without device-trees.

When there are problems in boot loaders, people _always_ want to work
around them in the kernel, because they do not want to fix the boot
loader and risk bricking their board.

We've seen this with the passing of machine IDs, we've seen it with
passing ATAG lists to the kernel - where boot loaders can't even get
the termination of the ATAG list (zero size tag with a NULL id) right.

Since boot loaders can't get this kind of simple stuff right, I'm
absolutely horrified by the idea of passing a much larger structure
from the boot loader to the kernel - the chances of that being correct
are infinitessimally small.

However, there is some work in progress for ARM device tree support,
but it's very slow going and doesn't seem to attract very much support
from within the ARM community.

What we have instead is a system of machine types, which allows the
kernel to select the correct board support file.  The board support
file declares platform devices and other data relevant to the board,
and is responsible for various initialization tasks.  Have a look at
PXA to see how this is done.

For the most part, it works very well, and cuts down on the boot loader
dependencies to _just_ ensuring that it passes a correct machine ID
number, an ATAG list describing the memory layout and kernel command
line.

Until ARM DT support has matured, I suggest following this long
established and well proven approach.



More information about the linux-arm-kernel mailing list