x86: tangier: Reserve PCI ECAM in motherboard resources
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 29 Aug 2019 14:04:19 +0000 (17:04 +0300)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 10 Sep 2019 08:19:03 +0000 (16:19 +0800)
Per PCI firmware specification the ACPI has to reserve the memory
which is defined as PCI ECAM.

Fixes: 39665beed6f7 ("x86: tangier: Enable ACPI support for Intel Tangier")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/tangier/acpi.c
arch/x86/include/asm/arch-tangier/acpi/platform.asl
arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
arch/x86/include/asm/arch-tangier/iomap.h [new file with mode: 0644]

index 61b2642aa95d600d2e8d7d84a56c443ace7c5002..362e133cf14858d5f73bbba868fdcf2dccdbfd57 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/mpspec.h>
 #include <asm/tables.h>
 #include <asm/arch/global_nvs.h>
+#include <asm/arch/iomap.h>
 
 void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
                      void *dsdt)
@@ -63,7 +64,7 @@ u32 acpi_fill_mcfg(u32 current)
        /* TODO: Derive parameters from SFI MCFG table */
        current += acpi_create_mcfg_mmconfig
                ((struct acpi_mcfg_mmconfig *)current,
-               0x3f500000, 0x0, 0x0, 0x0);
+               MCFG_BASE_ADDRESS, 0x0, 0x0, 0x0);
 
        return current;
 }
index a75b388c47170bc7320853f737c2ca08804a2678..cf75ca7543c8ccd707d41576436e99ef194cd6c5 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <asm/acpi/statdef.asl>
+#include <asm/arch/iomap.h>
 
 /*
  * The _PTS method (Prepare To Sleep) is called before the OS is
index 1b9d808b7b62d79b876af0fb6caf5ca96153a99b..f73a6b351c526b7a52d2aea6d227e5f25ad2f1f9 100644 (file)
@@ -66,6 +66,23 @@ Device (PCI0)
         Return (MCRS)
     }
 
+    /* Device Resource Consumption */
+    Device (PDRC)
+    {
+        Name (_HID, EISAID("PNP0C02"))
+        Name (_UID, One)
+
+        Name (PDRS, ResourceTemplate()
+        {
+            Memory32Fixed(ReadWrite, MCFG_BASE_ADDRESS, MCFG_BASE_SIZE)
+        })
+
+        Method (_CRS, 0, Serialized)
+        {
+            Return (PDRS)
+        }
+    }
+
     Method (_OSC, 4)
     {
         /* Check for proper GUID */
diff --git a/arch/x86/include/asm/arch-tangier/iomap.h b/arch/x86/include/asm/arch-tangier/iomap.h
new file mode 100644 (file)
index 0000000..b0fc03e
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Copyright (c) 2019 Intel Corporation */
+
+#ifndef _TANGIER_IOMAP_H
+#define _TANGIER_IOMAP_H
+
+#define MCFG_BASE_ADDRESS      0x3f500000
+#define MCFG_BASE_SIZE         0x00100000
+
+#endif /* _TANGIER_IOMAP_H */