1. 21 Mar, 2013 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / scan: Add special handler for Intel Lynxpoint LPSS devices · f58b082a
      Rafael J. Wysocki authored
      Devices on the Intel Lynxpoint Low Power Subsystem (LPSS) have some
      common features that aren't shared with any other platform devices,
      including the clock and LTR (Latency Tolerance Reporting) registers.
      It is better to handle those features in common code than to bother
      device drivers with doing that (I/O functionality-wise the LPSS
      devices are generally compatible with other devices that don't
      have those special registers and may be handled by the same drivers).
      
      The clock registers of the LPSS devices are now taken care of by
      the special clk-x86-lpss driver, but the MMIO mappings used for
      accessing those registers can also be used for accessing the LTR
      registers on those devices (LTR support for the Lynxpoint LPSS is
      going to be added by a subsequent patch).  Thus it is convenient
      to add a special ACPI scan handler for the Lynxpoint LPSS devices
      that will create the MMIO mappings for accessing the clock (and
      LTR in the future) registers and will register the LPSS devices'
      clocks, so the clk-x86-lpss driver will only need to take care of
      the main Lynxpoint LPSS clock.
      
      Introduce a special ACPI scan handler for Intel Lynxpoint LPSS
      devices as described above.  This also reduces overhead related to
      browsing the ACPI namespace in search of the LPSS devices before the
      registration of their clocks, removes some LPSS-specific (and
      somewhat ugly) code from acpi_platform.c and shrinks the overall code
      size slightly.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarMike Turquette <mturquette@linaro.org>
      f58b082a
  2. 30 Jan, 2013 1 commit
  3. 23 Jan, 2013 1 commit
    • Mika Westerberg's avatar
      ACPI / platform: create LPSS clocks if Lynxpoint devices are found during scan · e375325c
      Mika Westerberg authored
      Intel Lynxpoint LPSS peripheral drivers depend on LPSS clock tree being
      created in order to function properly. The clock tree is exposed as a
      platform driver that binds to a device named 'clk-lpt'.
      
      To support this we modify the acpi_create_platform_device() to take one
      additional parameter called flags. This is passed from
      acpi_platform_device_ids[] array when acpi_create_platform_device() is
      called.
      
      We then introduce a new flag ACPI_PLATFORM_CLK which is used to tell
      acpi_create_platform_device() to create the platform clocks as well.
      
      Finally we set the ACPI_PLATFORM_CLK flags for all the Lynxpoint LPSS
      devices and make sure that when this flag is set we create the
      corresponding clock tree platform device.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e375325c
  4. 19 Jan, 2013 1 commit
  5. 27 Nov, 2012 1 commit
  6. 20 Nov, 2012 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / platform: Initialize ACPI handles of platform devices in advance · 863f9f30
      Rafael J. Wysocki authored
      The current platform device creation and registration code in
      acpi_create_platform_device() is quite convoluted.  This function
      takes an ACPI device node as an argument and eventually calls
      platform_device_register_resndata() to create and register a
      platform device object on the basis of the information contained
      in that code.  However, it doesn't associate the new platform
      device with the ACPI node directly, but instead it relies on
      acpi_platform_notify(), called from within device_add(), to find
      that ACPI node again with the help of acpi_platform_find_device()
      and acpi_platform_match() and then attach the new platform device
      to it.  This causes an additional ACPI namespace walk to happen and
      is clearly suboptimal.
      
      Use the observation that it is now possible to initialize the ACPI
      handle of a device before calling device_add() for it to make this
      code more straightforward.  Namely, add a new field to struct
      platform_device_info allowing us to pass the ACPI handle of interest
      to platform_device_register_full(), which will then use it to
      initialize the new device's ACPI handle before registering it.
      This will cause acpi_platform_notify() to use the ACPI handle from
      the device structure directly instead of using the .find_device()
      routine provided by the device's bus type.  In consequence,
      acpi_platform_bus, acpi_platform_find_device(), and
      acpi_platform_match() are not necessary any more, so remove them.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      863f9f30
  7. 14 Nov, 2012 4 commits