1. 15 7月, 2013 1 次提交
  2. 20 6月, 2013 1 次提交
    • M
      ACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources · 204ebc0a
      Mika Westerberg 提交于
      acpi_get_override_irq() was added because there was a problem with
      buggy BIOSes passing wrong IRQ() resource for the RTC IRQ.  The
      commit that added the workaround was 61fd47e0 (ACPI: fix two
      IRQ8 issues in IOAPIC mode).
      
      With ACPI 5 enumerated devices there are typically one or more
      extended IRQ resources per device (and these IRQs can be shared).
      However, the acpi_get_override_irq() workaround forces all IRQs in
      range 0 - 15 (the legacy ISA IRQs) to be edge triggered, active high
      as can be seen from the dmesg below:
      
      	ACPI: IRQ 6 override to edge, high
      	ACPI: IRQ 7 override to edge, high
      	ACPI: IRQ 7 override to edge, high
      	ACPI: IRQ 13 override to edge, high
      
      Also /proc/interrupts for the I2C controllers (INT33C2 and INT33C3) shows
      the same thing:
      
      	7:          4          0          0          0   IO-APIC-edge INT33C2:00, INT33C3:00
      
      The _CSR method for INT33C2 (and INT33C3) device returns following
      resource:
      
      	Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, )
      	{
      		0x00000007,
      	}
      
      which states that this is supposed to be level triggered, active low,
      shared IRQ instead.
      
      Fix this by making sure that acpi_get_override_irq() gets only called
      when we are dealing with legacy IRQ() or IRQNoFlags() descriptors.
      
      While we are there, correct pr_warning() to print the right triggering
      value.
      
      This change turns out to be necessary to make DMA work correctly on
      systems based on the Intel Lynxpoint PCH (Platform Controller Hub).
      
      [rjw: Changelog]
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      204ebc0a
  3. 27 11月, 2012 1 次提交
  4. 17 11月, 2012 1 次提交
  5. 15 11月, 2012 2 次提交
    • R
      ACPI: Centralized processing of ACPI device resources · 8e345c99
      Rafael J. Wysocki 提交于
      Currently, whoever wants to use ACPI device resources has to call
      acpi_walk_resources() to browse the buffer returned by the _CRS
      method for the given device and create filters passed to that
      routine to apply to the individual resource items.  This generally
      is cumbersome, time-consuming and inefficient.  Moreover, it may
      be problematic if resource conflicts need to be resolved, because
      the different users of _CRS will need to do that in a consistent
      way.  However, if there are resource conflicts, the ACPI core
      should be able to resolve them centrally instead of relying on
      various users of acpi_walk_resources() to handle them correctly
      together.
      
      For this reason, introduce a new function, acpi_dev_get_resources(),
      that can be used by subsystems to obtain a list of struct resource
      objects corresponding to the ACPI device resources returned by
      _CRS and, if necessary, to apply additional preprocessing routine
      to the ACPI resources before converting them to the struct resource
      format.
      
      Make the ACPI code that creates platform device objects use
      acpi_dev_get_resources() for resource processing instead of executing
      acpi_walk_resources() twice by itself, which causes it to be much
      more straightforward and easier to follow.
      
      In the future, acpi_dev_get_resources() can be extended to meet
      the needs of the ACPI PNP subsystem and other users of _CRS in
      the kernel.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      8e345c99
    • R
      ACPI: Move device resources interpretation code from PNP to ACPI core · 046d9ce6
      Rafael J. Wysocki 提交于
      Move some code used for parsing ACPI device resources from the PNP
      subsystem to the ACPI core, so that other bus types (platform, SPI,
      I2C) can use the same routines for parsing resources in a consistent
      way, without duplicating code.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      046d9ce6