All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] primecell: make correct clock parsing possible
@ 2014-02-11 11:37 ` Mark Rutland
  0 siblings, 0 replies; 52+ messages in thread
From: Mark Rutland @ 2014-02-11 11:37 UTC (permalink / raw)
  To: devicetree; +Cc: Mark Rutland, robh+dt, pawel.moll, linux-arm-kernel

Currently either the drivers for primecell peripherals and their bindings
disagree, or those bindings disagree with the primecell binding which they
derive from. It is impossible in some cases to meet the requirements of both
bindings and drivers.

These patches attempt to harmonize the bindings and the drivers with what's in
use today, in a backwards compatible fashion, relieving us of our present
Kafkaesque nightmare. Each peripheral's clock(s) are given explicit names which
can be used, though code will fall back to the existing behaviour if said names
are not provided. Additionally the currently unmet ordering requirement of
apb_pclk is dropped, given all existing that code requires this to be named
anyway.

I've used IS_ERR to test is a clock wasn't provided by name, but this isn't
always right. In the case of a dodgy clock specifier we might get an error,
even if the expected name was provided explicitly in clock-names. For that case
it would be nice to fail rather than grabbing an almost certainly incorrect
clock. I'm not entirely sure how to check for that with the current
infrastructure though, and while it's possible to use of_property_match_string
to achieve the desired effect, it feels like working around the abstraction we
have in place today.

There are some other issues in the area which remain:

* The pl041 exists in DTs, but has no binding.

* Both pl110 and pl111 have no binding, but appear to be in use on OF
  platforms, with the nspire code proving some sideband data via
  OF_DEV_AUXDATA. The driver grabs a clock (CLCDCLK) without using a name.

* I'm not sure what to do with sp804. The bindings imply a given set of names
  with a specific ordering, but all the dts do something different and the
  driver doesn't bother with names. The given binding is incompatible with the
  primecell binding's ordering requirement for apb_plck.

* There's no binding for the sp805, which grabs a clock with no name.

* There's no binding for the pl341 or pl354. Both seem to be unused yet exist
  in DTs.

* The PL330 docs don't mention clocks at all, though the apb_pclk is required.
  Use of PCLKEN isn't supported, but this doesn't seem to be a problem so far.

Thanks,
Mark.

Mark Rutland (7):
  Documentation: devicetree: fix up pl011 clocks
  serial: amba-pl011: attempt to get uartclk by name
  Documentation: devicetree: fix up pl022 clocks
  spi: pl022: attempt to get sspclk by name
  Documentation: devicetree: fix up pl18x clocks
  mmc: arm-mmci: attempt to get mclk by name
  Documentation: devicetree: loosen primecell clock requirements

 Documentation/devicetree/bindings/arm/primecell.txt | 11 ++++++-----
 Documentation/devicetree/bindings/mmc/mmci.txt      |  4 ++++
 Documentation/devicetree/bindings/serial/pl011.txt  |  6 ++++--
 Documentation/devicetree/bindings/spi/spi_pl022.txt |  2 ++
 drivers/mmc/host/mmci.c                             |  9 ++++++++-
 drivers/spi/spi-pl022.c                             |  9 ++++++++-
 drivers/tty/serial/amba-pl011.c                     |  9 ++++++++-
 7 files changed, 40 insertions(+), 10 deletions(-)

-- 
1.8.1.1

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2014-02-24 12:26 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 11:37 [PATCH 0/7] primecell: make correct clock parsing possible Mark Rutland
2014-02-11 11:37 ` Mark Rutland
2014-02-11 11:37 ` [PATCH 1/7] Documentation: devicetree: fix up pl011 clocks Mark Rutland
2014-02-11 11:37   ` Mark Rutland
     [not found] ` <1392118632-11312-1-git-send-email-mark.rutland-5wv7dgnIgG8@public.gmane.org>
2014-02-11 11:37   ` [PATCH 2/7] serial: amba-pl011: attempt to get uartclk by name Mark Rutland
2014-02-11 11:37     ` Mark Rutland
2014-02-11 11:37   ` [PATCH 3/7] Documentation: devicetree: fix up pl022 clocks Mark Rutland
2014-02-11 11:37     ` Mark Rutland
     [not found]     ` <1392118632-11312-4-git-send-email-mark.rutland-5wv7dgnIgG8@public.gmane.org>
2014-02-13 12:55       ` Linus Walleij
2014-02-13 12:55         ` Linus Walleij
2014-02-11 11:37   ` [PATCH 4/7] spi: pl022: attempt to get sspclk by name Mark Rutland
2014-02-11 11:37     ` Mark Rutland
     [not found]     ` <1392118632-11312-5-git-send-email-mark.rutland-5wv7dgnIgG8@public.gmane.org>
2014-02-11 12:06       ` Mark Brown
2014-02-11 12:06         ` Mark Brown
     [not found]         ` <20140211120645.GH13533-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-11 13:39           ` Mark Rutland
2014-02-11 13:39             ` Mark Rutland
2014-02-11 14:08           ` Arnd Bergmann
2014-02-11 14:08             ` Arnd Bergmann
     [not found]             ` <201402111508.06267.arnd-r2nGTMty4D4@public.gmane.org>
2014-02-11 15:04               ` Russell King - ARM Linux
2014-02-11 15:04                 ` Russell King - ARM Linux
     [not found]                 ` <20140211150438.GJ26684-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-02-11 15:48                   ` Arnd Bergmann
2014-02-11 15:48                     ` Arnd Bergmann
2014-02-12 10:33             ` Mark Rutland
2014-02-12 10:33               ` Mark Rutland
     [not found]               ` <20140212103329.GC21992-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-02-12 10:55                 ` Mark Brown
2014-02-12 10:55                   ` Mark Brown
2014-02-12 11:21                 ` Arnd Bergmann
2014-02-12 11:21                   ` Arnd Bergmann
     [not found]                   ` <201402121221.51233.arnd-r2nGTMty4D4@public.gmane.org>
2014-02-12 11:47                     ` Mark Rutland
2014-02-12 11:47                       ` Mark Rutland
     [not found]                       ` <20140212114740.GE21992-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-02-12 13:03                         ` Arnd Bergmann
2014-02-12 13:03                           ` Arnd Bergmann
2014-02-12 16:12                           ` Mark Rutland
2014-02-12 16:12                             ` Mark Rutland
     [not found]                             ` <20140212161206.GD25957-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-02-12 16:22                               ` Mark Brown
2014-02-12 16:22                                 ` Mark Brown
2014-02-12 16:31                               ` Arnd Bergmann
2014-02-12 16:31                                 ` Arnd Bergmann
2014-02-24 12:26                                 ` Linus Walleij
2014-02-24 12:26                                   ` Linus Walleij
2014-02-12 15:13                         ` Mark Brown
2014-02-12 15:13                           ` Mark Brown
2014-02-11 11:37   ` [PATCH 5/7] Documentation: devicetree: fix up pl18x clocks Mark Rutland
2014-02-11 11:37     ` Mark Rutland
2014-02-11 11:37   ` [PATCH 6/7] mmc: arm-mmci: attempt to get mclk by name Mark Rutland
2014-02-11 11:37     ` Mark Rutland
2014-02-11 11:37   ` [PATCH 7/7] Documentation: devicetree: loosen primecell clock requirements Mark Rutland
2014-02-11 11:37     ` Mark Rutland
2014-02-11 12:33   ` [PATCH 0/7] primecell: make correct clock parsing possible Russell King - ARM Linux
2014-02-11 12:33     ` Russell King - ARM Linux
     [not found]     ` <20140211123356.GH26684-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-02-11 13:59       ` Mark Rutland
2014-02-11 13:59         ` Mark Rutland

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.