ARM64 / ACPI: Introduce PCI stub functions for ACPI
[linux-2.6/btrfs-unstable.git] / arch / arm64 / kernel / pci.c
blob4095379dc069838d99651e91e9a33abd1466619c
1 /*
2 * Code borrowed from powerpc/kernel/pci-common.c
4 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
5 * Copyright (C) 2014 ARM Ltd.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
13 #include <linux/acpi.h>
14 #include <linux/init.h>
15 #include <linux/io.h>
16 #include <linux/kernel.h>
17 #include <linux/mm.h>
18 #include <linux/of_pci.h>
19 #include <linux/of_platform.h>
20 #include <linux/slab.h>
22 #include <asm/pci-bridge.h>
25 * Called after each bus is probed, but before its children are examined
27 void pcibios_fixup_bus(struct pci_bus *bus)
29 /* nothing to do, expected to be removed in the future */
33 * We don't have to worry about legacy ISA devices, so nothing to do here
35 resource_size_t pcibios_align_resource(void *data, const struct resource *res,
36 resource_size_t size, resource_size_t align)
38 return res->start;
42 * Try to assign the IRQ number from DT when adding a new device
44 int pcibios_add_device(struct pci_dev *dev)
46 dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
48 return 0;
52 * raw_pci_read/write - Platform-specific PCI config space access.
54 int raw_pci_read(unsigned int domain, unsigned int bus,
55 unsigned int devfn, int reg, int len, u32 *val)
57 return -ENXIO;
60 int raw_pci_write(unsigned int domain, unsigned int bus,
61 unsigned int devfn, int reg, int len, u32 val)
63 return -ENXIO;
66 #ifdef CONFIG_ACPI
67 /* Root bridge scanning */
68 struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
70 /* TODO: Should be revisited when implementing PCI on ACPI */
71 return NULL;
73 #endif