]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/of/address.c
UBUNTU: SAUCE: OF: Add missing I/O range exception for indirect-IO devices
authorzhichang.yuan <yuanzhichang@hisilicon.com>
Mon, 13 Mar 2017 02:42:39 +0000 (10:42 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:46 +0000 (07:33 -0500)
commitaac940dccc6fbf7bd089688bd293ea3500f113ab
tree6483d4e5a4defbd60df79719a9468f4c67b52175
parent90a4bbef14728a6f5cda0154a6613f2389a3336f
UBUNTU: SAUCE: OF: Add missing I/O range exception for indirect-IO devices

BugLink: http://bugs.launchpad.net/bugs/1677319
There are some special ISA/LPC devices that work on a specific I/O range where
it is not correct to specify a 'ranges' property in DTS parent node as cpu
addresses translated from DTS node are only for memory space on some
architectures, such as Arm64. Without the parent 'ranges' property, current
of_translate_address() return an error.
Here we add special handlings for this case.
During the OF address translation, some checkings will be perfromed to
identify whether the device node is registered as indirect-IO. If yes, the I/O
translation will be done in a different way from that one of PCI MMIO.
In this way, the I/O 'reg' property of the special ISA/LPC devices will be
parsed correctly.

Signed-off-by: zhichang.yuan <yuanzhichang@hisilicon.com>
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de> #earlier draft
Acked-by: Rob Herring <robh@kernel.org>
(v7 submission)
Reference: https://www.spinics.net/lists/arm-kernel/msg568090.html
[dannf: Add missing #include <linux/libio.h>]
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/of/address.c