[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1429254898-32743-6-git-send-email-tomasz.nowicki@linaro.org>
Date: Fri, 17 Apr 2015 09:14:54 +0200
From: Tomasz Nowicki <tomasz.nowicki@...aro.org>
To: bhelgaas@...gle.com, wangyijing@...wei.com, arnd@...db.de,
hanjun.guo@...aro.org, Liviu.Dudau@....com, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, rjw@...ysocki.net,
al.stone@...aro.org, lorenzo.pieralisi@....com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-pci@...r.kernel.org,
linux-acpi@...r.kernel.org, linaro-acpi@...ts.linaro.org,
Tomasz Nowicki <tomasz.nowicki@...aro.org>
Subject: [PATCH v5 5/9] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization.
First function acpi_mcfg_check_entry() does not apply any quirks by default.
Last two functions are required by ACPI subsystem to make PCI config
space accessible. Generic code assume to do nothing for early init call but
late init call does as follow:
- parse MCFG table and add regions to ECAM resource list
- map regions
- add regions to iomem_resource
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@...aro.org>
---
drivers/acpi/mcfg.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/acpi/mcfg.c b/drivers/acpi/mcfg.c
index a9338df9..787defe 100644
--- a/drivers/acpi/mcfg.c
+++ b/drivers/acpi/mcfg.c
@@ -55,3 +55,29 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
return 0;
}
+
+int __init __weak acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
+ struct acpi_mcfg_allocation *cfg)
+{
+ return 0;
+}
+
+void __init __weak pci_mmcfg_early_init(void)
+{
+
+}
+
+void __init __weak pci_mmcfg_late_init(void)
+{
+ struct pci_mmcfg_region *cfg;
+
+ acpi_table_parse(ACPI_SIG_MCFG, acpi_parse_mcfg);
+
+ if (list_empty(&pci_mmcfg_list))
+ return;
+ if (!pci_mmcfg_arch_init())
+ free_all_mmcfg();
+
+ list_for_each_entry(cfg, &pci_mmcfg_list, list)
+ insert_resource(&iomem_resource, &cfg->res);
+}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists