[PATCH v4 03/10] pinctrl: mvebu: kirkwood pinctrl driver

Linus Walleij linus.walleij at linaro.org
Fri Sep 21 14:14:20 EDT 2012


On Thu, Sep 20, 2012 at 9:36 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:

> If I understand correctly, we would like drivers to be able to read
> some common "system" registers to figure out which SoC variant we are
> running on. Such feature should normally be provided by code in
> arch/arm/mach-*/ and called by drivers, but we are trying to eliminate
> all dependencies of driver code on architecture code, correct?

So what I think is that any such mechanism would defy the idea
with device tree providing all platform configuration, including
the ASIC/SoC variant.

The only not-so-unelegant idea I have is for the machine to
go in and fiddle with the device tree, e.g. add some info into
the tree somewhere stating into the nodes which ASIC variant
it is. Maybe even modify the compatible value at runtime.

But it somehow feels like cracking an egg with a sledgehammer.

I think we need to meditate on this.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list