linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	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, "Rafael J. Wysocki" <rjw@sisk.pl>,
	"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [PATCH 05/11] spi/pxa2xx: make clock rate configurable from platform data
Date: Wed, 9 Jan 2013 12:25:50 +0000	[thread overview]
Message-ID: <20130109122550.GA20956@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <50EC90C3.2090604@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2502 bytes --]

On Tue, Jan 08, 2013 at 10:33:55PM +0100, Rafael J. Wysocki wrote:
> On 1/8/2013 2:10 PM, Mark Brown wrote:
> >On Tue, Jan 08, 2013 at 02:41:53PM +0200, Mika Westerberg wrote:

> >>Do you mean enabling CONFIG_COMMON_CLK on x86?

> >Yes.

> Why so?  x86 doesn't have a notion of direct clock control, at least
> not on the ACPI systems.

So, a couple of things here.  One is that your SFI systems *do* have
user controllable clocks so they really should be using the clock API.

The other is that even if the CPU doesn't want to use clocks off-CPU
devices may wish to - for example, a PCI card using off the shelf
components or in this case a device on the SPI bus on the laptop which
requires a clock and wants to manage it at runtime if possible.  We
should be able to arrange things so that drivers can work with clocks
using the standard clock API.  I'm really hopinng that having the clock
API will eventually enable us to work with clocks in off-SoC devices but
right now the only option is open coding.

> >I'm sure it's not beyond the bounds of possibility that we could solve
> >this problem...

> No, it isn't.  Any suggestions?

Well, the most obvious solution would be to just hard code this
information in the kernel and set it up based on what you do know.  For
example if this is a SoC-internal clock then set it up based on knowing
the SoC (this seems to be basically what Mika is suggesting).

> >It is something that needs to be resolved for your smartphone SoCs for

> We're not talking about smartphones and even not about SoCs here, sorry.

> This is a laptop CPU that happens to have an SPI controller integrated.

These are still x86 systems so are part of why it seems like a good idea
to make the clock API available on x86.

> >this and for other things like platform data for external chips, what's
> >actually happening in practical systems here is that people are just
> >hacking the arch code as there's no mechanism for providing
> >configuration at present.

> I'm not sure what you're referring to, but here we have ACPI as a
> configuration mechanism.

> Which doesn't allow us to control clocks directly.

Right, and because the BIOS guys don't provide any mechanism for
handling this stuff using the BIOS information what people actually
deploying systems are doing is just hacking the arch code which gets us
the worst of both worlds - we have to put things into the BIOS but we
then have to put extra information into the kernel to actually make
things functional.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-01-09 12:25 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 [this message]
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
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=20130109122550.GA20956@opensource.wolfsonmicro.com \
    --to=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 \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@sisk.pl \
    /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).