1. 07 Apr, 2017 3 commits
  2. 29 Mar, 2017 2 commits
    • Geert Uytterhoeven's avatar
      base: soc: Allow early registration of a single SoC device · 6e12db37
      Geert Uytterhoeven authored
      Commit 1da1b362 ("base: soc: Early register bus when needed")
      added support for early registration of SoC devices from a
      core_initcall().  However, some drivers need to check the SoC revision
      from an early_initcall(), which is even earlier.
      
      A specific example is the Renesas R-Car SYSC driver, which manages PM
      Domains and thus needs to be initialized from an early_initcall.
      Preproduction versions of the R-Car H3 SoC have an additional power
      area, which no longer exists on H3 ES2.0, so the R-Car SYSC driver needs
      to check the exact SoC revision before instantiating a PM Domain for
      that power area.
      
      While registering the SoC bus and device, and using soc_device_match(),
      from an early_initcall() do work, the "soc" directory and the "soc0"
      file end up wrongly in the sysfs root, as the "bus" resp. "devices"
      directories haven't been created yet.
      
      To fix this, allow to register a single SoC device early on.
      As long as the SoC bus isn't registered, soc_device_match() just
      matches against this early device.
      When the SoC bus is registered later, the early device is registered for
      real.
      
      Note that soc_device_register() returns NULL (no error, but also not a
      valid pointer) when registering an early device.  Hence platform devices
      cannot be instantiated as children of the "soc0" node representing an
      early SoC device.  This should not be an issue, as that practice has
      been deprecated for new platforms.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      6e12db37
    • Geert Uytterhoeven's avatar
      base: soc: Let soc_device_match() return no match when called too early · 0656db9e
      Geert Uytterhoeven authored
      If soc_device_match() is called before the SoC bus has been registered,
      bus_for_each_dev() returns -EINVAL, which is considered a match, as it
      is non-zero.
      
      While calling soc_device_match() too early can be considered an
      integration mistake, returning a match is counter-intuitive:
      soc_device_match() is typically used to handle quirks, i.e. to deviate
      from the default path.  Hence add a check to abort checking and return
      no match instead.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      0656db9e
  3. 19 Feb, 2017 11 commits
  4. 18 Feb, 2017 1 commit
  5. 17 Feb, 2017 19 commits
  6. 16 Feb, 2017 4 commits