linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini@gnudd.com>
To: hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, ciminaghi@gnudd.com,
	giancarlo.asnaghi@st.com, x86@kernel.org, mingo@redhat.com,
	linux@arm.linux.org.uk, tglx@linutronix.de,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 00/26] STA2X11 devicetree support for amba/pci
Date: Wed, 7 Aug 2013 23:12:35 +0200	[thread overview]
Message-ID: <20130807211235.GA17863@mail.gnudd.com> (raw)
In-Reply-To: <52026AB5.80009@zytor.com>

[stripped list of issues from my original message follows]
>> Some of the problems he found are:
>> 
>>      * Passing a dtb to the kernel: we use a modified kexec at present
>>      * Passing correct irq numbers to the AMBA drivers
>>      * Switching to a new gpio driver with devicetree support
>>      * Writing a suitable dts: at present, a dts only exists for one
>>        of the STA2X11 based boards (Intel Northville).

> 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.

Basically, it's an ARM chip with a PCI interface. So it offers USB, SATA,
Eth, i2c, spi, gpio, can etc to the x86 CPU.

> *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.*

Thanks. I'm not aware of any such issues at this point, though.
 
> 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 main CPU in the Northville is an Atom, which IIUC has its own
memory controller -- and definitely a PCIe controller.  The Sta2x11
chip is connected to the PCIe bus, as both a slave and a master. It's
a busmaster for SATA, USB and something else, and equipped with a
PrimeCell PL080 as DMA engine for UART, I2C, SPI, MMC.

I'm aware it might be the first time this happens, but I also suspect
it will be common pretty soon: the industrial world wants I2C, UART,
SPI and GPIO, and bridging overt PCI to an external SoC is the right
approach, in my opinion.

> 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.

There are a pair of such mainboards around, but what we developers
only have the Northville at this time.

And the evaluation board, which is a PCIe card. With the previous
platform_data-based approach I could plug two of them and access all
devices (2 * 4 UART, 2 * 3 I2C etc).

> 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?*)

The board exists as an evaluation board. But I see nothing against an
industrial-grade commercial offering, to give SPI, CAN and all the
rest to PC users that need them, as a single do-it-all cheap board.

> Ideally that driver should be (primarily?) a data object (an ACPI 5 SSDT
> or a DTB file) rather than open coded C.

Mostly so. It used to be platform data, to register devices for
drivers that already exist. Like we did for Ether and CAN: just
add the vendor/device pair and PCI support where missing.
 
> I believe ACPI 5 unlike device tree should be able to specify the
> dynamic properties that you are rightfully concerned with.

We'll try to get acquainted with that, but my wild guess is that
platform data is still simpler. I'm aware of the issues, and I'm not
insisting, though.
 
> 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.

I understand. My impression of devicetree is exactly like that, I must
say.  What we have here is a very clean PCI enumeration of it all: we
only need to specify the mapping of GPIO pins (i.e. card-detect for
mmc) and DMA channels, as all the rest works by itself.

> 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.

Interesting. I'll take a look. We were looking for a simple PC today
and found that very thing as a viable option.

Thank you for your feedback.  May I ask three more questions (this is
the 1st)?

Is the patch-set a viable approach for mainline, modulo serious evaluation
of the hairy IRQ details and the other bits?

Would it make sense to work on devicetree support in x86 bootloaders
(especially yours, let's ignore grub)?

thank you again
/alessandro

  parent reply	other threads:[~2013-08-07 21:13 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 ` [PATCH 00/26] STA2X11 devicetree support for amba/pci H. Peter Anvin
2013-08-07 21:12 ` Alessandro Rubini [this message]
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=20130807211235.GA17863@mail.gnudd.com \
    --to=rubini@gnudd.com \
    --cc=ciminaghi@gnudd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=giancarlo.asnaghi@st.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@redhat.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).