diff options
author | Tomasz Nowicki <tn@semihalf.com> | 2016-01-13 12:17:42 +0100 |
---|---|---|
committer | Tomasz Nowicki <tn@semihalf.com> | 2016-01-22 12:18:35 +0100 |
commit | e036c8545d8666cb1737f6afd74e57f55d88b263 (patch) | |
tree | b19d2ff43a10c86775afa65c491619773cf15460 /drivers | |
parent | e9078e59a198cf4de688d294b1f4814a164938e3 (diff) |
pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.
Lets keep RAW ACPI PCI config space accessors empty by default,
since we are note sure if they are necessary accross all archs.
Once we sort this out, we can provide generic version or let
architectures to overwrite, like now x86.
Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/mcfg.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c index 745b83ec2c43..3e1e7be09a50 100644 --- a/drivers/acpi/mcfg.c +++ b/drivers/acpi/mcfg.c @@ -9,9 +9,30 @@ #include <linux/acpi.h> #include <linux/ecam.h> +#include <linux/pci.h> #define PREFIX "MCFG: " +/* + * raw_pci_read/write - raw ACPI PCI config space accessors. + * + * By defauly (__weak) these accessors are empty and should be overwritten + * by architectures which support operations on ACPI PCI_Config regions, + * see osl.c file. + */ + +int __weak raw_pci_read(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + +int __weak raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val) +{ + return PCIBIOS_DEVICE_NOT_FOUND; +} + int __init acpi_parse_mcfg(struct acpi_table_header *header) { struct acpi_table_mcfg *mcfg; |