diff options
author | Lizhi Hou <lizhi.hou@amd.com> | 2023-08-15 10:20:00 -0700 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-08-22 14:56:10 -0500 |
commit | 26409dd045892904b059dc411403e9c8ce7543ca (patch) | |
tree | 2eaccdffab9fe454d5642dbe92371009e785ade9 /drivers/of/unittest-data | |
parent | 47284862bfc7fd5672e731e827f43f26bdbd155c (diff) | |
download | linux-stable-26409dd045892904b059dc411403e9c8ce7543ca.tar.gz linux-stable-26409dd045892904b059dc411403e9c8ce7543ca.tar.bz2 linux-stable-26409dd045892904b059dc411403e9c8ce7543ca.zip |
of: unittest: Add pci_dt_testdrv pci driver
pci_dt_testdrv is bound to QEMU PCI Test Device. It reads
overlay_pci_node fdt fragment and apply it to Test Device. Then it
calls of_platform_default_populate() to populate the platform
devices.
Tested-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/1692120000-46900-6-git-send-email-lizhi.hou@amd.com
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest-data')
-rw-r--r-- | drivers/of/unittest-data/Makefile | 3 | ||||
-rw-r--r-- | drivers/of/unittest-data/overlay_pci_node.dtso | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile index ea5f4da68e23..1aa875088159 100644 --- a/drivers/of/unittest-data/Makefile +++ b/drivers/of/unittest-data/Makefile @@ -32,7 +32,8 @@ obj-$(CONFIG_OF_OVERLAY) += overlay.dtbo.o \ overlay_gpio_02b.dtbo.o \ overlay_gpio_03.dtbo.o \ overlay_gpio_04a.dtbo.o \ - overlay_gpio_04b.dtbo.o + overlay_gpio_04b.dtbo.o \ + overlay_pci_node.dtbo.o # enable creation of __symbols__ node DTC_FLAGS_overlay += -@ diff --git a/drivers/of/unittest-data/overlay_pci_node.dtso b/drivers/of/unittest-data/overlay_pci_node.dtso new file mode 100644 index 000000000000..c05e52e9e44a --- /dev/null +++ b/drivers/of/unittest-data/overlay_pci_node.dtso @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/ { + fragment@0 { + target-path=""; + __overlay__ { + #address-cells = <3>; + #size-cells = <2>; + pci-ep-bus@0 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x0 0x0 0x1000>; + reg = <0 0 0 0 0>; + unittest-pci@100 { + compatible = "unittest-pci"; + reg = <0x100 0x200>; + }; + }; + }; + }; +}; |