linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V6 0/5] LPC: legacy ISA I/O support
@ 2017-01-24  7:05 zhichang.yuan
  2017-01-24  7:05 ` [PATCH V6 1/5] LIB: Indirect ISA/LPC port IO introduced zhichang.yuan
                   ` (4 more replies)
  0 siblings, 5 replies; 37+ messages in thread
From: zhichang.yuan @ 2017-01-24  7:05 UTC (permalink / raw)
  To: catalin.marinas, will.deacon, robh+dt, frowand.list, bhelgaas,
	rafael, mark.rutland, brian.starkey, olof, arnd,
	linux-arm-kernel
  Cc: lorenzo.pieralisi, benh, linux-kernel, linuxarm, devicetree,
	linux-pci, linux-serial, minyard, liviu.dudau, zourongrong,
	john.garry, gabriele.paoloni, zhichang.yuan02, kantyzc, xuwei5,
	zhichang.yuan

This patch supports the IPMI-bt device attached to the Low-Pin-Count interface
implemented on Hisilicon Hip06/Hip07 SoC.
	                -----------
			| LPC host|
	                |         |
	                -----------
	                     |
 	        _____________V_______________LPC
                  |			  |
                  V	                  V
			             ------------
			             |  BT(ipmi)|
			             ------------

When master accesses those peripherals beneath the Hip06 LPC, a specific LPC
driver is needed to make LPC host generate the standard LPC I/O cycles with
the target peripherals'I/O port addresses. But on curent arm64 world, there is
no real I/O accesses. All the I/O operations through in/out pair are based on
MMIO which is not satisfied the I/O mechanism on Hip06 LPC.
To solve this issue and keep the relevant existing peripherals' driver
untouched, this patch set redefines the in/out() pair to support both the IO
operations for Hip06 LPC and the original MMIO. The way specific to Hip06 is
named as indirect-IO in this patchset.

Changes from V5:
  - Made the extio driver more generic and locate in lib/;
  - Supported multiple indirect-IO bus instances;
  - Extended the pci_register_io_range() to support indirect-IO, then dropped
  the I/O reservation used in previous patchset;
  - Reimplemented the ACPI LPC support;
  - Fixed some bugs, including the compile error on other archs, the module
  building failure found by Ming Lei, etc;

Changes from V4:
  - Some revises based on the comments from Bjorn, Rob on V4;
  - Fixed the compile error on some platforms, such as openrisc;

Changes from V3:
  - UART support deferred to a separate patchset; This patchset only support
  ipmi device under LPC;
  - LPC bus I/O range is fixed to 0 ~ (PCIBIOS_MIN_IO - 1), which is separeted
  from PCI/PCIE PIO space;
  - Based on Arnd's remarks, removed the ranges property from Hip06 lpc dts and
  added a new fixup function, of_isa_indirect_io(), to get the I/O address
  directly from LPC dts configurations;
  - Support in(w,l)/out(w,l) for Hip06 lpc I/O;
  - Decouple the header file dependency on the gerenic io.h by defining in/out
  as normal functions in c file;
  - removed unused macro definitions in the LPC driver;

Changes from V2:
  - Support the PIO retrieval from the linux PIO generated by
  pci_address_to_pio. This method replace the 4K PIO reservation in V2;
  - Support the flat-tree earlycon;
  - Some revises based on Arnd's remarks;
  - Make sure the linux PIO range allocated to Hip06 LPC peripherals starts
  from non-ZERO;

Changes from V1:
  - Support the ACPI LPC device;
  - Optimize the dts LPC driver in ISA compatible mode;
  - Reserve the IO range below 4K in avoid the possible conflict with PCI host
  IO ranges;
  - Support the LPC uart and relevant earlycon;


v5 thread here: https://lkml.org/lkml/2016/11/7/955
v4 thread here: https://lkml.org/lkml/2016/10/20/149
v3 thread here: https://lkml.org/lkml/2016/9/14/326
v2 thread here: https://lkml.org/lkml/2016/9/7/356
v1 thread here: https://lkml.org/lkml/2015/12/29/154


Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com>
zhichang.yuan (5):
  LIB: Indirect ISA/LPC port IO introduced
  PCI: Adapt pci_register_io_range() for indirect-IO and PCI I/O
    translation
  OF: Add missing I/O range exception for indirect-IO devices
  LPC: Support the device-tree LPC host on Hip06/Hip07
  LPC: Add the ACPI LPC support

 .../arm/hisilicon/hisilicon-low-pin-count.txt      |  33 ++
 MAINTAINERS                                        |   9 +
 arch/arm64/boot/dts/hisilicon/hip06-d03.dts        |   4 +
 arch/arm64/boot/dts/hisilicon/hip06.dtsi           |  14 +
 drivers/acpi/pci_root.c                            |  12 +-
 drivers/bus/Kconfig                                |   8 +
 drivers/bus/Makefile                               |   1 +
 drivers/bus/hisi_lpc.c                             | 625 +++++++++++++++++++++
 drivers/of/address.c                               |  95 +++-
 drivers/pci/pci.c                                  |  44 +-
 include/asm-generic/io.h                           |  50 ++
 include/linux/extio.h                              |  89 +++
 include/linux/io.h                                 |   1 +
 include/linux/pci.h                                |   7 +-
 lib/Kconfig                                        |   8 +
 lib/Makefile                                       |   2 +
 lib/extio.c                                        | 375 +++++++++++++
 17 files changed, 1342 insertions(+), 35 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/extio.h
 create mode 100644 lib/extio.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-02-16  8:59 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24  7:05 [PATCH V6 0/5] LPC: legacy ISA I/O support zhichang.yuan
2017-01-24  7:05 ` [PATCH V6 1/5] LIB: Indirect ISA/LPC port IO introduced zhichang.yuan
2017-01-30 17:12   ` Alexander Graf
2017-01-31 13:32     ` John Garry
2017-01-31 19:37       ` Alexander Graf
2017-02-01 12:29         ` Gabriele Paoloni
2017-02-13 14:17         ` zhichang.yuan
2017-02-14 13:17           ` Alexander Graf
2017-02-13 14:05     ` zhichang.yuan
2017-02-14 13:15       ` Alexander Graf
2017-01-31  0:09   ` Bjorn Helgaas
2017-01-31 13:34     ` John Garry
2017-01-24  7:05 ` [PATCH V6 2/5] PCI: Adapt pci_register_io_range() for indirect-IO and PCI I/O translation zhichang.yuan
2017-01-31  0:10   ` Bjorn Helgaas
2017-01-31 13:39     ` John Garry
2017-01-31  0:15   ` Bjorn Helgaas
2017-02-04 12:59     ` John Garry
2017-02-02 17:36   ` John Garry
2017-02-02 23:00     ` Rafael J. Wysocki
2017-01-24  7:05 ` [PATCH V6 3/5] OF: Add missing I/O range exception for indirect-IO devices zhichang.yuan
2017-01-27 22:03   ` Rob Herring
2017-01-30  8:57     ` John Garry
2017-01-30 10:08       ` Arnd Bergmann
2017-01-24  7:05 ` [PATCH V6 4/5] LPC: Support the device-tree LPC host on Hip06/Hip07 zhichang.yuan
2017-01-27 22:12   ` Rob Herring
2017-01-30 20:08   ` Alexander Graf
2017-01-31 10:07     ` John Garry
2017-01-31 11:03       ` Alexander Graf
2017-01-31 11:49         ` John Garry
2017-01-31 11:51         ` Gabriele Paoloni
2017-02-13 14:39     ` zhichang.yuan
2017-02-14 13:29       ` Alexander Graf
2017-02-15 11:35         ` zhichang.yuan
2017-02-15 11:53           ` Alexander Graf
2017-02-16  8:59             ` zhichang.yuan
2017-01-24  7:05 ` [PATCH V5 5/5] LPC: Add the ACPI LPC support zhichang.yuan
2017-02-04 13:20   ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).