linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] platform: device tree support for early platform drivers
@ 2018-04-24 17:30 Bartosz Golaszewski
  2018-04-24 17:30 ` [PATCH 01/11] platform: early: provide early_platform_add_device() Bartosz Golaszewski
                   ` (14 more replies)
  0 siblings, 15 replies; 22+ messages in thread
From: Bartosz Golaszewski @ 2018-04-24 17:30 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, David Lechner, Michael Turquette,
	Stephen Boyd, Arnd Bergmann, Greg Kroah-Hartman, Rob Herring,
	Mark Rutland, Yoshinori Sato, Rich Felker, Frank Rowand,
	Rafael J . Wysocki, Jarkko Sakkinen, Dmitry Torokhov,
	Arend van Spriel, Heikki Krogerus, Michal Suchanek, Jan Kiszka,
	Andy Shevchenko
  Cc: linux-arm-kernel, linux-kernel, devicetree, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Device tree based systems often use OF_DECLARE() macros for devices
that need to be initialized early in the boot process such as clocks,
timers etc. However platform devices are more desirable.

This series aims at introducing support for early platform drivers for
OF-based systems.

The idea is to have a special compatible fallback string: "earlydev"
that similarily to "syscon" would be added to device nodes that need
early probing. We then need to call of_early_platform_populate() early
in the boot process to actually probe the registered devices.

I am aware that this new compatible does not strictly correspond with
the "hardware description only" rule of DT, but we already have many
functionalities that break this rule: syscon, gpio hogs etc.

The first user of this new functionality will be the DaVinci platform
for which we want to probe the pll, psc and timer drivers early in the
boot sequence but keep them implemented as platform drivers.

In the future, if this series gets accepted, this could become and
alternative to TIMER_OF_DECLARE, CLK_OF_DECLARE etc. and could lead
to deprecating of those macros in favor of early platform drivers.

Bartosz Golaszewski (11):
  platform: early: provide early_platform_add_device()
  platform: provide early_platform_driver_register_probe_all()
  platform: make support for early platform devices conditional
  of: platform: use pdev as name for vars of type struct platform_device
  platform: use a dedicated list_head for early devices
  of: provide for_each_compatible_child_node()
  dt-bindings: add bindings for early devices
  of: platform: provide of_early_platform_populate()
  platform: provide early_platform_driver()
  of: platform: provide of_early_platform_probe()
  misc: implement a dummy early platform driver

 Documentation/devicetree/bindings/early.txt |   7 +
 arch/sh/Kconfig                             |   1 +
 drivers/base/Kconfig                        |   4 +
 drivers/base/platform.c                     |  26 ++--
 drivers/misc/Kconfig                        |   8 ++
 drivers/misc/Makefile                       |   1 +
 drivers/misc/dummy-early.c                  |  40 ++++++
 drivers/of/device.c                         |  14 +-
 drivers/of/platform.c                       | 143 +++++++++++++++-----
 include/linux/device.h                      |   4 +
 include/linux/of.h                          |   3 +
 include/linux/of_device.h                   |   5 +
 include/linux/of_platform.h                 |  19 +++
 include/linux/platform_device.h             |  52 +++++++
 14 files changed, 279 insertions(+), 48 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/early.txt
 create mode 100644 drivers/misc/dummy-early.c

-- 
2.17.0

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

end of thread, other threads:[~2018-04-26  4:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 17:30 [PATCH 00/11] platform: device tree support for early platform drivers Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 01/11] platform: early: provide early_platform_add_device() Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 02/11] platform: provide early_platform_driver_register_probe_all() Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 03/11] platform: make support for early platform devices conditional Bartosz Golaszewski
2018-04-24 19:31   ` Randy Dunlap
2018-04-25 14:02   ` Rich Felker
2018-04-24 17:30 ` [PATCH 04/11] of: platform: use pdev as name for vars of type struct platform_device Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 05/11] platform: use a dedicated list_head for early devices Bartosz Golaszewski
2018-04-26  4:27   ` kbuild test robot
2018-04-24 17:30 ` [PATCH 06/11] of: provide for_each_compatible_child_node() Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 07/11] dt-bindings: add bindings for early devices Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 08/11] of: platform: provide of_early_platform_populate() Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 09/11] platform: provide early_platform_driver() Bartosz Golaszewski
2018-04-24 17:30 ` [PATCH 10/11] of: platform: provide of_early_platform_probe() Bartosz Golaszewski
2018-04-26  3:46   ` kbuild test robot
2018-04-24 17:30 ` [PATCH 11/11] misc: implement a dummy early platform driver Bartosz Golaszewski
2018-04-24 17:55 ` [PATCH 00/11] platform: device tree support for early platform drivers Mark Rutland
2018-04-24 17:59   ` Rich Felker
2018-04-24 17:57 ` Rich Felker
2018-04-25  9:33   ` Bartosz Golaszewski
2018-04-24 18:19 ` Robin Murphy
2018-04-24 19:39 ` Rob Herring

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