[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/7] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 4/7] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree |
Date: |
Fri, 4 Aug 2023 12:29:52 -0300 |
From: BALATON Zoltan <balaton@eik.bme.hu>
The board firmware handles this correctly following the Open Firmware
standard which we missed. This fixes 64 bit BARs when using VOF.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-ID: <20230721221320.1311E7456AB@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/ppc/pegasos2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
index 6475acfbed..075367d94d 100644
--- a/hw/ppc/pegasos2.c
+++ b/hw/ppc/pegasos2.c
@@ -781,7 +781,11 @@ static void add_pci_device(PCIBus *bus, PCIDevice *d, void
*opaque)
if (d->io_regions[i].type & PCI_BASE_ADDRESS_SPACE_IO) {
cells[j] |= cpu_to_be32(1 << 24);
} else {
- cells[j] |= cpu_to_be32(2 << 24);
+ if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ cells[j] |= cpu_to_be32(3 << 24);
+ } else {
+ cells[j] |= cpu_to_be32(2 << 24);
+ }
if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_PREFETCH) {
cells[j] |= cpu_to_be32(4 << 28);
}
--
2.41.0
- [PULL 0/7] ppc queue, Daniel Henrique Barboza, 2023/08/04
- [PULL 1/7] ppc/pegasos2: Fix reset state of USB functions, Daniel Henrique Barboza, 2023/08/04
- [PULL 2/7] ppc/pegasos2: Fix reg property of ROM BARs, Daniel Henrique Barboza, 2023/08/04
- [PULL 3/7] ppc/pegasos2: Fix naming of device tree nodes, Daniel Henrique Barboza, 2023/08/04
- [PULL 7/7] target/ppc: Fix VRMA page size for ISA v3.0, Daniel Henrique Barboza, 2023/08/04
- [PULL 4/7] ppc/pegasos2: Fix reg property of 64 bit BARs in device tree,
Daniel Henrique Barboza <=
- [PULL 5/7] target/ppc: Implement ASDR register for ISA v3.0 for HPT, Daniel Henrique Barboza, 2023/08/04
- [PULL 6/7] target/ppc: Fix pending HDEC when entering PM state, Daniel Henrique Barboza, 2023/08/04
- Re: [PULL 0/7] ppc queue, Richard Henderson, 2023/08/04
- Re: [PULL 0/7] ppc queue, Michael Tokarev, 2023/08/05