From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 2/4] x86: tangier: Reserve PCI ECAM in motherboard resources
Date: Thu, 29 Aug 2019 17:04:19 +0300 [thread overview]
Message-ID: <20190829140421.2830-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20190829140421.2830-1-andriy.shevchenko@linux.intel.com>
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>
---
arch/x86/cpu/tangier/acpi.c | 3 ++-
.../include/asm/arch-tangier/acpi/platform.asl | 1 +
.../asm/arch-tangier/acpi/southcluster.asl | 17 +++++++++++++++++
arch/x86/include/asm/arch-tangier/iomap.h | 10 ++++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 arch/x86/include/asm/arch-tangier/iomap.h
diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c
index 61b2642aa9..362e133cf1 100644
--- a/arch/x86/cpu/tangier/acpi.c
+++ b/arch/x86/cpu/tangier/acpi.c
@@ -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;
}
diff --git a/arch/x86/include/asm/arch-tangier/acpi/platform.asl b/arch/x86/include/asm/arch-tangier/acpi/platform.asl
index a75b388c47..cf75ca7543 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/platform.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/platform.asl
@@ -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
diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index 1b9d808b7b..f73a6b351c 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -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
index 0000000000..b0fc03e015
--- /dev/null
+++ b/arch/x86/include/asm/arch-tangier/iomap.h
@@ -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 */
--
2.23.0.rc1
next prev parent reply other threads:[~2019-08-29 14:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 14:04 [U-Boot] [PATCH v1 1/4] x86: acpi: Annotate struct acpi_table_header with __packed Andy Shevchenko
2019-08-29 14:04 ` Andy Shevchenko [this message]
2019-09-10 8:14 ` [U-Boot] [PATCH v1 2/4] x86: tangier: Reserve PCI ECAM in motherboard resources Bin Meng
2019-09-10 8:21 ` Bin Meng
2019-08-29 14:04 ` [U-Boot] [PATCH v1 3/4] x86: tangier: Fix off-by-one error when preparing CSRT Andy Shevchenko
2019-09-10 8:14 ` Bin Meng
2019-09-10 8:21 ` Bin Meng
2019-08-29 14:04 ` [U-Boot] [PATCH v1 4/4] x86: tangier: Use spaces over TABs in ASL code Andy Shevchenko
2019-09-10 8:14 ` Bin Meng
2019-09-10 8:21 ` Bin Meng
2019-08-29 14:13 ` [U-Boot] [PATCH v1 1/4] x86: acpi: Annotate struct acpi_table_header with __packed Bin Meng
2019-08-29 14:28 ` Andy Shevchenko
2019-09-10 8:14 ` Bin Meng
2019-09-10 8:20 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190829140421.2830-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox