diff options
author | Wojciech Macek <wma@FreeBSD.org> | 2018-07-10 09:49:27 +0000 |
---|---|---|
committer | Wojciech Macek <wma@FreeBSD.org> | 2018-07-10 09:49:27 +0000 |
commit | ad90dbb84216bfb2f45205cf277b516d304efad5 (patch) | |
tree | ec6a4313bd4d15dfac2fddfb9d34eeb63dc983e9 /sys/dev/pci | |
parent | 65c3a353e6dc5c3026979ee2caa11c3c424830b4 (diff) | |
download | src-ad90dbb84216bfb2f45205cf277b516d304efad5.tar.gz src-ad90dbb84216bfb2f45205cf277b516d304efad5.zip |
Fix build broken by r336130
Add ifdef's to compile parts of pci_host_generic only on armv8
Notes
Notes:
svn path=/head/; revision=336166
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/pci_host_generic.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 54710da6979a..14fa16e6c768 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -99,6 +99,8 @@ static int generic_pcie_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); static int generic_pcie_write_ivar(device_t dev, device_t child, int index, uintptr_t value); + +#if defined(__aarch64__) static void pci_host_generic_apply_quirks(device_t); static void thunderx2_ahci_bar_quirk(device_t); @@ -114,6 +116,7 @@ struct pci_host_generic_block_entry pci_host_generic_blocked[] = {CPU_IMPL_CAVIUM, CPU_PART_THUNDERX2, 0, 0, 0x80, 0x10}, {0, 0, 0, 0, 0, 0} }; +#endif int pci_host_generic_core_attach(device_t dev) @@ -168,11 +171,14 @@ pci_host_generic_core_attach(device_t dev) return (error); } +#if defined(__aarch64__) pci_host_generic_apply_quirks(dev); +#endif return (0); } +#if defined(__aarch64__) static void pci_host_generic_apply_quirks(device_t dev) { @@ -191,6 +197,7 @@ pci_host_generic_apply_quirks(device_t dev) quirk++; } } +#endif static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, @@ -201,12 +208,15 @@ generic_pcie_read_config(device_t dev, u_int bus, u_int slot, bus_space_tag_t t; uint64_t offset; uint32_t data; +#if defined(__aarch64__) struct pci_host_generic_block_entry *block; +#endif if ((bus > PCI_BUSMAX) || (slot > PCI_SLOTMAX) || (func > PCI_FUNCMAX) || (reg > PCIE_REGMAX)) return (~0U); +#if defined(__aarch64__) block = pci_host_generic_blocked; while (1) { if (block->impl == 0) @@ -219,6 +229,7 @@ generic_pcie_read_config(device_t dev, u_int bus, u_int slot, block++; } +#endif sc = device_get_softc(dev); @@ -462,6 +473,7 @@ static device_method_t generic_pcie_methods[] = { DEFINE_CLASS_0(pcib, generic_pcie_core_driver, generic_pcie_methods, sizeof(struct generic_pcie_core_softc)); +#if defined(__aarch64__) static void thunderx2_ahci_bar_quirk(device_t dev) { @@ -478,3 +490,4 @@ static void thunderx2_ahci_bar_quirk(device_t dev) PCIB_WRITE_CONFIG(dev, 0, 16, 1, 0x1c, 0x40, 4); } } +#endif |