From: Alessandro Rubini <rubini@gnudd.com>
To: hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, giancarlo.asnaghi@st.com,
alan@linux.intel.com, tglx@linutronix.de, mingo@redhat.com,
sameo@linux.intel.com, x86@kernel.org
Subject: Re: [PATCH] x86/platform: sta2x11: add platform code
Date: Tue, 29 May 2012 09:34:17 +0200 [thread overview]
Message-ID: <20120529073417.GA25041@mail.gnudd.com> (raw)
In-Reply-To: <4FC477A1.4010709@zytor.com>
> I am not going to accept into the kernel a bunch of board-specific
> files.
Ok.
> PCI cards are different: they have PCI IDs, and they can be
> loaded, as modules, at runtime. Furthermore, they tend to be very
> limited in the amount of variation:
Well, please check drivers/media/video/bt8xx: the "bttv-cards" file is
the biggest one. But I see your point.
> a single chip (represented PCI ID) may be slightly differently wired
> on different boards (represented by subsystem ID), but the variation
> tends to be limited; in the rare case it is not, there is usually
> some form of discovery mechanism.
Here the thing is 4 uart, 4 mmc, 3 spi, 128 gpio, 2 dma engines, usb,
sata, audio, .... So some differences in wiring are there between
boards. And no, no autodiscovery unfortunately (but we can use the
command line, so the driver knows who the installation is when it runs
its probe methods).
> Those are the *only* kinds conditions under which that kind of things,
> in drivers, is acceptable. A list of mainboards and their wirings in C
> code? No way in hell.
Ok. Although you can think of them as plug in boards.
>> I'm pretty sure we don't have ACPI, and I'd avoid device tree if
>> possible (especially thinking of add-on cards). If you think it makes
>> more sense, I can offer the code to drivers/pci or other more generic
>> places.
>
> What does "offer the code" mean here? Just put the same sh*t in a
> different place? No, no, no, no.
Yes, that was the suggestion :)
> We have the device tree mechanism as an escape valve for the systems
> built without any sane consideration for the platform, and that is the
> last resort. I am generally not happy with that in the x86 space, even,
> because it means yet another failed platform, but it is still better
> than ad hoc hacks.
Unfortunately most vendors don't deal with autodetection, so the
number of "failed platforms" will increase, I fear. Especially
with increasing use of x86 in embedded contexts.
So, it seems I must go device-tree for the chipset-like mounting. And
what about plug in boards? I may arrange a firmware-loader mechanism
as an alternative, so the vendor of each board can provide the the
platform data for all the sub devices. Actually, if firmware loader is
acceptable, I'd try it first, to avoid changing the boot procedure;
maybe I can save myself from the device tree.
thanks
/alessandro
next prev parent reply other threads:[~2012-05-29 7:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-27 20:50 [PATCH] x86/platform: sta2x11: add platform code Alessandro Rubini
2012-05-28 23:38 ` H. Peter Anvin
2012-05-29 6:37 ` Alessandro Rubini
2012-05-29 6:43 ` H. Peter Anvin
2012-05-29 7:05 ` Alessandro Rubini
2012-05-29 7:15 ` H. Peter Anvin
2012-05-29 7:34 ` Alessandro Rubini [this message]
2012-05-29 7:39 ` H. Peter Anvin
2012-05-29 7:44 ` Alessandro Rubini
2012-06-04 10:16 ` Benjamin Herrenschmidt
2012-06-04 10:21 ` Alessandro Rubini
2012-06-04 10:17 ` Benjamin Herrenschmidt
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=20120529073417.GA25041@mail.gnudd.com \
--to=rubini@gnudd.com \
--cc=alan@linux.intel.com \
--cc=giancarlo.asnaghi@st.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sameo@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.