From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, grant.likely@secretlab.ca,
linus.walleij@linaro.org, eric.y.miao@gmail.com,
linux@arm.linux.org.uk, haojian.zhuang@gmail.com,
chao.bi@intel.com, "H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [PATCH 05/11] spi/pxa2xx: make clock rate configurable from platform data
Date: Thu, 10 Jan 2013 13:54:41 +0100 [thread overview]
Message-ID: <2921304.SsX3sQo2BU@vostro.rjw.lan> (raw)
In-Reply-To: <20130110123837.GO13897@intel.com>
On Thursday, January 10, 2013 02:38:37 PM Mika Westerberg wrote:
> On Thu, Jan 10, 2013 at 11:58:03AM +0200, Mika Westerberg wrote:
> > On Wed, Jan 09, 2013 at 11:07:26PM +0100, Rafael J. Wysocki wrote:
> > > We hardcode different kinds of information into the kernel anyway, but it
> > > would be good to be able to use some criteria to decide whether or not we need
> > > that information on the given system.
> > >
> > > In this particular case, we'll only need the fixed clock rate for the SPI
> > > which is not present on other x86 systems to date.
> > >
> > > Mika, do you have any idea what checks to apply to figure out whether or not
> > > the SPI clock will be necessary?
> >
> > I've tried to figure out them but so far I have no ideas :-/
> >
> > If we put that behind some config option, it 1) confuses users and 2)
> > distro makers will select it anyway, so I don't see this as an option.
> >
> > > Perhaps we can add a check into acpi_create_platform_device()? Something like
> > > "if the device ID is present in table X, then run function Y for the device"
> > > where Y will configure the clock if the SPI is matched?
> >
> > That would work but then we must also make sure that if the device was
> > enumerated from PCI, it gets this clock via some other means.
> >
> > The LPSS devices can be configured to either appear on PCI or ACPI and of
> > course ACPI has the advantage because then we can enumerate the slave
> > devices behind the bus as well. However, it might be possible that we need
> > to support PCI enumeration at some point.
> >
> > Furthermore, the SPI controller has an existing PCI glue driver
> > (spi-pxa2xx-pci.c) that needs to pass this clock as well. This is for Intel
> > CE4100 platform and we must make sure that it still works after our change.
>
> Here's one more proposal based on the discussion so far.
>
> 1. Enable CONFIG_COMMON_CLK on x86.
>
> 2. Create Lynxpoint specific clock driver and place it under
> drivers/clk/x86/clk-lpt.c. This is a platform driver for
> platform device named 'clk-lpt'.
>
> 3. We make the acpi_create_platform_device() match on, lets say
> "INT33C" (a partial match), and in such case it assumes that we are
> running on Lynxpoint. It will then create platform device for 'clk-lpt'.
>
> 4. Now the clk-lpt driver creates the clocks.
>
> 5. The SPI driver gets the clock it wants.
That sounds reasonable to me. Mark, what do you think?
> In case of CE4100 we make drivers/clk/x86/clk-ce4100.c that exposes
> ce4100_clk_init(). This gets called from arch/x86/platform/ce4100/ce4100.c.
>
> I'm not sure about the LPSS PCI case. Maybe we can forget that for now
> (except the CE4100 case which obviously must work)? Or add similar quirk to
> the PCI side that creates the platform device for clocks.
I would wait for now until we have evidence that the LPSS PCI will be used in
practice at all. Then we can add a PCI quirk along the above lines, I think.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
next prev parent reply other threads:[~2013-01-10 12:48 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 10:44 [PATCH 00/11] spi/pxa2xx: add Intel Lynxpoint SPI controller support Mika Westerberg
2013-01-07 10:44 ` [PATCH 01/11] spi/pxa2xx: allow building on a 64-bit kernel Mika Westerberg
2013-01-08 3:27 ` Eric Miao
2013-01-08 10:29 ` Mika Westerberg
2013-01-07 10:44 ` [PATCH 02/11] spi/pxa2xx: convert to the pump message infrastructure Mika Westerberg
2013-01-17 9:26 ` Linus Walleij
2013-01-07 10:44 ` [PATCH 03/11] spi/pxa2xx-pci: switch to use pcim_* interfaces Mika Westerberg
2013-01-08 10:59 ` Mark Brown
2013-01-07 10:44 ` [PATCH 04/11] spi/pxa2xx: embed the ssp_device to platform data Mika Westerberg
2013-01-07 10:44 ` [PATCH 05/11] spi/pxa2xx: make clock rate configurable from " Mika Westerberg
2013-01-08 11:02 ` Mark Brown
2013-01-08 12:41 ` Mika Westerberg
2013-01-08 13:10 ` Mark Brown
2013-01-08 21:33 ` Rafael J. Wysocki
2013-01-09 10:51 ` Mika Westerberg
2013-01-09 21:52 ` Rafael J. Wysocki
2013-01-10 10:00 ` Mika Westerberg
2013-01-09 12:25 ` Mark Brown
2013-01-09 22:07 ` Rafael J. Wysocki
2013-01-10 9:58 ` Mika Westerberg
2013-01-10 12:38 ` Mika Westerberg
2013-01-10 12:54 ` Rafael J. Wysocki [this message]
2013-01-10 12:51 ` Mark Brown
2013-01-10 13:07 ` Mika Westerberg
2013-01-10 13:23 ` Rafael J. Wysocki
2013-01-10 13:33 ` Mika Westerberg
2013-01-10 13:18 ` Rafael J. Wysocki
2013-01-10 13:33 ` Mark Brown
2013-01-10 13:58 ` Mika Westerberg
2013-01-10 21:56 ` Rafael J. Wysocki
2013-01-11 10:59 ` Mark Brown
2013-01-10 13:08 ` Mika Westerberg
2013-01-08 21:37 ` Rafael J. Wysocki
2013-01-07 10:44 ` [PATCH 06/11] spi/pxa2xx: use the private DMA API only when CONFIG_ARCH_PXA is set Mika Westerberg
2013-01-17 9:36 ` Linus Walleij
2013-01-17 10:00 ` Mika Westerberg
2013-01-07 10:44 ` [PATCH 07/11] spi/pxa2xx: add support for DMA engine Mika Westerberg
2013-01-17 9:48 ` Linus Walleij
2013-01-17 10:39 ` Mika Westerberg
2013-01-07 10:44 ` [PATCH 08/11] spi/pxa2xx: add support for runtime PM Mika Westerberg
2013-01-07 10:44 ` [PATCH 09/11] spi/pxa2xx: add support for SPI_LOOP Mika Westerberg
2013-01-07 10:44 ` [PATCH 10/11] spi/pxa2xx: add support for Intel Low Power Subsystem SPI Mika Westerberg
2013-01-07 10:44 ` [PATCH 11/11] spi/pxa2xx: add support for Lynxpoint SPI controllers Mika Westerberg
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=2921304.SsX3sQo2BU@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=chao.bi@intel.com \
--cc=eric.y.miao@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=haojian.zhuang@gmail.com \
--cc=hpa@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mika.westerberg@linux.intel.com \
/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
all inboxes | Powered by JetHome®