]> git.baikalelectronics.ru Git - kernel.git/commit
of: address: Work around missing device_type property in pcie nodes
authorMarc Zyngier <maz@kernel.org>
Wed, 19 Aug 2020 09:42:55 +0000 (10:42 +0100)
committerRob Herring <robh@kernel.org>
Wed, 19 Aug 2020 22:30:57 +0000 (16:30 -0600)
commitb8efd8cadcd44e91f9b0cd60cdb4d9e1c3de6176
tree5081d53dd1688e4a6349a6d43949db0f888ea748
parente18b48843f8b099ac42b4facf05b0b6cc7b37a0c
of: address: Work around missing device_type property in pcie nodes

Recent changes to the DT PCI bus parsing made it mandatory for
device tree nodes describing a PCI controller to have the
'device_type = "pci"' property for the node to be matched.

Although this follows the letter of the specification, it
breaks existing device-trees that have been working fine
for years.  Rockchip rk3399-based systems are a prime example
of such collateral damage, and have stopped discovering their
PCI bus.

In order to paper over it, let's add a workaround to the code
matching the device type, and accept as PCI any node that is
named "pcie",

A warning will hopefully nudge the user into updating their
DT to a fixed version if they can, but the incentive is
obviously pretty small.

Fixes: 62bddd2482b9 ("of_address: Add bus type match for pci ranges parser")
Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200819094255.474565-1-maz@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c