From: "H. Peter Anvin" <hpa@zytor.com>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: linux-kernel@vger.kernel.org,
Davide Ciminaghi <ciminaghi@gnudd.com>,
Giancarlo Asnaghi <giancarlo.asnaghi@st.com>,
x86@kernel.org, Ingo Molnar <mingo@redhat.com>,
Russell King <linux@arm.linux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
devicetree@vger.kernel.org
Subject: Re: [PATCH 00/26] STA2X11 devicetree support for amba/pci
Date: Wed, 07 Aug 2013 08:41:41 -0700 [thread overview]
Message-ID: <52026AB5.80009@zytor.com> (raw)
In-Reply-To: <cover.1375867291.git.rubini@gnudd.com>
On 08/07/2013 03:16 AM, Alessandro Rubini wrote:
>
> Some of the problems he found are:
>
> * Passing a dtb to the kernel: we use a modified kexec at present
> because x86 boot loaders can't pass the DT blob, to our knowledge.
>
> * Passing correct irq numbers to the AMBA drivers, because PCI MSI
> irq numbers are dynamically allocated (we solved this by using
> of_update_property() at runtime). We also had to register a new
> irq domain for msi irqs, otherwise of_irq_map_one() would complain
> about irqs lacking a corresponding domain.
>
> * Switching to a new gpio driver with devicetree support (we took the
> Nomadik gpio/pinctrl because our device apparently has more or less
> the same gpio cell as the Nomadik chip). This requires implementation
> of writel_relaxed() and IRQF_VALID on x86: we hacked them internally
> but the patches are not part of this set. We're willing to solve
> these incompatibilities first, if there's interest.
>
> * Writing a suitable dts: at present, a dts only exists for one
> of the STA2X11 based boards (Intel Northville). This includes a
> copy of all the physical addresses for the devices, as dts requires
> that, even if such addresses are automatically assigned by PCI.
> Clearly, with this approach we kill PCI autodetect: if you plug
> to a different slot you need a different dts.
>
> This got us a more or less working kernel on the Northville board
> (where the device is soldered on the motherboard and acts as main chipset).
> The plug-in PCIe board cannot be supported by device tree, as far as
> we know, which in our opinion is a strong downside of device tree in favor
> of the platform data "shit".
>
OK, so we have a real corner case here... which is a plugin board beyond
which sits a bus normally used by fixed devices. You are definitely
correct that this is something that stresses current means of
description to the breaking point.
*Note there are some questions below that I would perfectly understand
if you can't talk about publicly, if so, please contact me privately at
my corporate address.*
However, the plugin board is very different from it being the main
chipset, in no small part because you can boot without it. I think this
is the first time I have ever heard of a chip which can act both as a
system chipset and a plugin card.
The mainboard case is relatively straightforward -- we should use ACPI 5
(preferred for x86) or device tree to describe it. My understanding
from what you describe so far is that the only existing case is the
Northville which is a mainboard.
For the plugin case, my thinking is that we probably do need a driver of
some kind which at least contains the description of the board, as I
assume one is not present in any kind of firmware on the board itself
(*do any such boards or plans for them actually exist at this point?*)
Ideally that driver should be (primarily?) a data object (an ACPI 5 SSDT
or a DTB file) rather than open coded C.
I believe ACPI 5 unlike device tree should be able to specify the
dynamic properties that you are rightfully concerned with.
Sorry if this feels like a wild goose chase to you. Some of this
problem domain is not very well handled by the current code, but we
really have to draw a hard line to make sure it doesn't descend into
unmaintainable chaos.
We have similar issues with MinnowBoard and are trying to use that as a
platform to figure out how a lot of these things need to be handled.
-hpa
next prev parent reply other threads:[~2013-08-07 15:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 10:16 [PATCH 00/26] STA2X11 devicetree support for amba/pci Alessandro Rubini
2013-08-07 10:16 ` [PATCH 01/26] x86: fix warning for sta2x11 Alessandro Rubini
2013-08-07 10:16 ` [PATCH 02/26] DMA: PL330: use prefix in reg names to build under x86 Alessandro Rubini
2013-08-07 10:16 ` [PATCH 03/26] mmc: Use the new <linux/sizes.h> Alessandro Rubini
2013-08-07 10:17 ` [PATCH 04/26] x86: add CONFIG_ARM_AMBA, selected by STA2X11 Alessandro Rubini
2013-08-07 10:17 ` [PATCH 05/26] drivers/amba: add support for a PCI bridge Alessandro Rubini
2013-08-07 10:17 ` [PATCH 06/26] x86 STA2X11: select devicetree related config items Davide Ciminaghi
2013-08-07 10:17 ` [PATCH 07/26] OF platform: export of_amba_device_create() Davide Ciminaghi
2013-08-07 10:17 ` [PATCH 08/26] OF platform, of_amba_device_create(): add parent resource to parameters Davide Ciminaghi
2013-08-07 10:17 ` [PATCH 09/26] kernel irqdomain: export irq_domain_disassociate() Davide Ciminaghi
2013-08-07 10:19 ` [PATCH 10/26] x86 devicetree: add irq domain for msi irqs Davide Ciminaghi
2013-08-07 10:19 ` [PATCH 11/26] x86 devicetree: add functions for handling setup/teardown of MSI irqs Davide Ciminaghi
2013-08-07 10:19 ` [PATCH 12/26] x86 kernel apic: notify MSI irqdomain(s) on etup/teardown of MSI IRQs Davide Ciminaghi
2013-08-07 10:19 ` [PATCH 13/26] drivers/amba/pci-amba.c: use devicetree for amba device creation Davide Ciminaghi
2013-08-07 10:19 ` [PATCH 14/26] gpio: remove sta2x11-gpio Davide Ciminaghi
2013-08-07 19:49 ` Linus Walleij
2013-08-07 10:20 ` [PATCH 15/26] x86 STA2X11: remove the sta2x11-mfd driver Davide Ciminaghi
2013-08-07 10:20 ` [PATCH 16/26] x86 STA2X11 platform: add sta2x11_platform_init() Davide Ciminaghi
2013-08-07 10:20 ` [PATCH 17/26] x86 STA2X11 platform: add sta2x11_instance_data helpers Davide Ciminaghi
2013-08-07 10:20 ` [PATCH 18/26] x86 STA2X11 platform: add a common probe function for platform devices Davide Ciminaghi
2013-08-07 10:20 ` [PATCH 19/26] x86 STA2X11 platform: create sta2x11-clock-regs device Davide Ciminaghi
2013-08-07 10:20 ` [PATCH 20/26] x86 STA2X11 platform: remove useless pr_info()'s Davide Ciminaghi
2013-08-07 10:21 ` [PATCH 21/26] AMBA: pci-amba bridge: improve code readability Davide Ciminaghi
2013-08-07 10:21 ` [PATCH 22/26] AMBA: pci-amba bridge: extend number of amba devs per pci device Davide Ciminaghi
2013-08-07 10:21 ` [PATCH 23/26] AMBA: pci-amba bridge: export function creating pci-amba device names Davide Ciminaghi
2013-08-07 10:21 ` [PATCH 24/26] x86 STA2X11: add dts for Intel's Northville board Davide Ciminaghi
2013-08-07 10:21 ` [PATCH 25/26] drivers/clk: sta2x11 common clock framework implementation Davide Ciminaghi
2013-08-07 10:22 ` [PATCH 26/26] pinctrl: add support for sta2x11 (via pinctrl-nomadik) Davide Ciminaghi
2013-08-07 19:47 ` Linus Walleij
2013-08-07 20:43 ` Alessandro Rubini
2013-08-07 15:41 ` H. Peter Anvin [this message]
2013-08-07 21:12 ` [PATCH 00/26] STA2X11 devicetree support for amba/pci Alessandro Rubini
2013-08-07 21:15 ` H. Peter Anvin
2013-08-07 22:05 ` H. Peter Anvin
2013-08-07 22:12 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52026AB5.80009@zytor.com \
--to=hpa@zytor.com \
--cc=ciminaghi@gnudd.com \
--cc=devicetree@vger.kernel.org \
--cc=giancarlo.asnaghi@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@redhat.com \
--cc=rubini@gnudd.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).