[PULL][Bionic] LPC support for HiSilicon boards

dann frazier dann.frazier at canonical.com
Thu Feb 22 23:20:03 UTC 2018


BugLink: https://bugs.launchpad.net/bugs/1677319

We've carried this not-yet-upstream patchset since zesty, and I'm
resubmitting it here to avoid a regression of this feature in 18.04.

This series includes the latest upstream submittal (v14), which has
received a number of maintainer ACKs. The code is also demonstrably
more confined than it was in earlier revisions (like what we carried in
zesty/artful). I'll elaborate on that in the patch-by-patch review
below.

Assuming these are pulled in, I'll continue to monitor the upstream
progress and submit any necessary bug fixes until they are merged.
Test builds are available in ppa:dannf/test. Tested on an HiSilicon
D05, and regression tested on a ppc64el system.

= Patch-by-Patch Risk Assessment =
> [PATCH 01/11] UBUNTU: [Config] CONFIG_INDIRECT_PIO=y
This config will be added in the next patch (including earlier in the
sequence for bisecting purposes).

> [PATCH 02/11] UBUNTU: SAUCE: LIB: Introduce a generic PIO mapping
> method
This adds CONFIG_INDIRECT_PIO, which depends on CONFIG_ARM64. All of
the other changes in this patch are guarded by an #ifdef
CONFIG_INDIRECT_PIO, or is new code (functions/macros) that is only
referenced by that guarded code, making it a no-op for !arm64.

> [PATCH 03/11] UBUNTU: SAUCE: PCI: Remove unused __weak attribute in
> pci_register_io_range()
This patch removes the __weak attribute from a function that has only
one implementation - an obvious no-op, Acked-by the upstream maintainer.

> [PATCH 04/11] UBUNTU: SAUCE: PCI: Add fwnode handler as input param
>  of pci_register_io_range()
This patch adds a new argument to a function and it's callers, but
doesn't make use of that new argument yet, avoiding a functional
change. This is also Acked-by the appropriate upstream maintainers.

> [PATCH 05/11] UBUNTU: SAUCE: PCI: Apply the new generic I/O
> management on PCI IO hosts
Most of the changes here occur in code guarded by #ifdef PCI_IOBASE,
which is only defined on ARM architectures in Ubuntu. Outside of that
guard:
 - pci_register_io_range() has the "err" variable renamed to "ret",
   but on non-arm it obviously still always returns 0.
 - iounmap() uses MMIO_UPPER_LIMIT instead of IO_SPACE_LIMIT. This is
   functionally equivalent on non-arm64 per this hunk of [PATCH 02/11]:
   ----%<----
   #else
   #define MMIO_UPPER_LIMIT IO_SPACE_LIMIT
   #endif /* CONFIG_INDIRECT_PIO */
   ----%<----

> [PATCH 06/11] UBUNTU: SAUCE: OF: Add missing I/O range exception for
> indirect-IO devices
These changes are in openfirmware code, which is only used for the
ARM and POWER architectures. I've regression tested on a ppc64el.
This is Acked-by an openfirmware maintainer.

> [PATCH 07/11] UBUNTU: [Config] CONFIG_HISILICON_LPC=y
This config will be added in the next patch (including earlier in the
sequence for bisecting purposes).

>  [PATCH 08/11] UBUNTU: SAUCE: HISI LPC: Support the LPC host on
>  Hip06/Hip07 with DT bindings
Adds a new driver that will only bind to a hisilicon specific
device-tree node.

> [PATCH 09/11] UBUNTU: SAUCE: ACPI / scan: do not enumerate Indirect
>  IO host children
Adds a new early-exit path to acpi_is_indirect_io_slave that will
only be triggered if a HiSilicon-device specific ACPI table entry is
found - no change in behavior for other systems.

> [PATCH 10/11] UBUNTU: SAUCE: HISI LPC: Add ACPI support
Adds ACPI discovery for the hisi-lpc driver. Changes are all local
to that driver (introduced in [PATCH 08/11]).

> [PATCH 11/11] UBUNTU: SAUCE: MAINTAINERS: Add maintainer for
> HiSilicon LPC driver
No code change.

The following changes since commit 1221ffab3e8e42c17c6c54cf60e037abd76e199a:

  UBUNTU: Ubuntu-4.15.0-10.11 (2018-02-13 11:34:40 -0600)

are available in the Git repository at:

  git://git.launchpad.net/~dannf/ubuntu/+source/linux/+git/linux lpc-bionic-v14

for you to fetch changes up to 1461d0774db6e7d74d564521ec6959b11f23acef:

  UBUNTU: SAUCE: MAINTAINERS: Add maintainer for HiSilicon LPC driver (2018-02-20 17:25:32 -0700)

----------------------------------------------------------------
Gabriele Paoloni (2):
      UBUNTU: SAUCE: PCI: Remove unused __weak attribute in pci_register_io_range()
      UBUNTU: SAUCE: PCI: Add fwnode handler as input param of pci_register_io_range()

John Garry (3):
      UBUNTU: SAUCE: ACPI / scan: do not enumerate Indirect IO host children
      UBUNTU: SAUCE: HISI LPC: Add ACPI support
      UBUNTU: SAUCE: MAINTAINERS: Add maintainer for HiSilicon LPC driver

Zhichang Yuan (4):
      UBUNTU: SAUCE: LIB: Introduce a generic PIO mapping method
      UBUNTU: SAUCE: PCI: Apply the new generic I/O management on PCI IO hosts
      UBUNTU: SAUCE: OF: Add missing I/O range exception for indirect-IO devices
      UBUNTU: SAUCE: HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings

dann frazier (2):
      UBUNTU: [Config] CONFIG_INDIRECT_PIO=y
      UBUNTU: [Config] CONFIG_HISILICON_LPC=y

 .../arm/hisilicon/hisilicon-low-pin-count.txt      |  33 ++
 MAINTAINERS                                        |   7 +
 debian.master/config/config.common.ubuntu          |   2 +
 drivers/acpi/pci_root.c                            |   8 +-
 drivers/acpi/scan.c                                |  14 +
 drivers/bus/Kconfig                                |   8 +
 drivers/bus/Makefile                               |   1 +
 drivers/bus/hisi_lpc.c                             | 646 +++++++++++++++++++++
 drivers/of/address.c                               |  96 ++-
 drivers/pci/pci.c                                  |  95 +--
 include/asm-generic/io.h                           |   4 +-
 include/linux/logic_pio.h                          | 131 +++++
 include/linux/pci.h                                |   3 +-
 lib/Kconfig                                        |  15 +
 lib/Makefile                                       |   2 +
 lib/logic_pio.c                                    | 285 +++++++++
 16 files changed, 1252 insertions(+), 98 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hisilicon-low-pin-count.txt
 create mode 100644 drivers/bus/hisi_lpc.c
 create mode 100644 include/linux/logic_pio.h
 create mode 100644 lib/logic_pio.c




More information about the kernel-team mailing list