]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: HISI LPC: Add ACPI support
authorJohn Garry <john.garry@huawei.com>
Mon, 19 Feb 2018 17:48:39 +0000 (01:48 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:29:24 +0000 (08:29 -0600)
commit1cdbe5ee19e604b3eede973f6be021470ae622be
treebbc5b62a61259cce9049b39d6fe62b2072ffa7b5
parent008cf8ab391e66c87cd6d1676404a5e5601979f9
UBUNTU: SAUCE: HISI LPC: Add ACPI support

BugLink: https://bugs.launchpad.net/bugs/1677319
Based on the previous patches, this patch supports the
LPC host on hip06/hip07 for ACPI FW.

It is the responsibility of the LPC host driver to
enumerate the child devices, as the ACPI scan code will
not enumerate children of "indirect IO" hosts.

The ACPI table for the LPC host controller and the child
devices is in the following format:
  Device (LPC0) {
    Name (_HID, "HISI0191")  // HiSi LPC
    Name (_CRS, ResourceTemplate () {
      Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000)
    })
  }

  Device (LPC0.IPMI) {
    Name (_HID, "IPI0001")
    Name (LORS, ResourceTemplate() {
      QWordIO (
        ResourceConsumer,
MinNotFixed,     // _MIF
MaxNotFixed,     // _MAF
PosDecode,
EntireRange,
0x0,             // _GRA
0xe4,            // _MIN
0x3fff,          // _MAX
0x0,             // _TRA
0x04,            // _LEN
, ,
BTIO
      )
    })

Since the IO resources of the child devices need to be
translated from LPC bus addresses to logical PIO addresses,
and we shouldn't modify the resources of the devices
generated in the FW scan, a per-child MFD is created as
a substitute. The MFD IO resources will be the translated
bus addresses of the ACPI child.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com>
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
[ v14 submittal ]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/bus/hisi_lpc.c