From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Subject: [PATCH edk2-platforms 1/3] Silicon/SynQuacer/AcpiTables: don't use PCD for PL011 base
Date: Wed, 26 Dec 2018 14:25:28 +0100 [thread overview]
Message-ID: <20181226132530.8445-2-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20181226132530.8445-1-ard.biesheuvel@linaro.org>
Instead of using the generic PcdSerialRegisterBase PCD for generating
the DSDT object for the PL011 UART, add PL011 base and size #defines
to the memory map header file, and use those instead. This will allow
us to switch to a different UART for DEBUG and/or serial console output
in a future patch.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 1 -
Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h | 4 ++++
Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl | 2 +-
Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc | 3 ++-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
index afee50df5c63..6fbdf4d67a88 100644
--- a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
+++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
@@ -59,7 +59,6 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
gSynQuacerTokenSpaceGuid.PcdNetsecEepromBase
gSynQuacerTokenSpaceGuid.PcdNetsecPhyAddress
diff --git a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
index fff760477488..28d4afabd2c8 100644
--- a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
+++ b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h
@@ -72,4 +72,8 @@
#define SYNQUACER_MMIO_TIMER_CTL_BASE 0x2A810000
#define SYNQUACER_MMIO_TIMER_CNT_BASE0 0x2A830000
+// PL011 UART
+#define SYNQUACER_UART0_BASE 0x2A400000
+#define SYNQUACER_UART0_SIZE SIZE_4KB
+
#endif
diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
index 7c7677f1fea0..ddb456d1dc70 100644
--- a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
+++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
@@ -137,7 +137,7 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR",
Name (_HID, "ARMH0011")
Name (_UID, Zero)
Name (_CRS, ResourceTemplate () {
- Memory32Fixed (ReadWrite, FixedPcdGet32 (PcdSerialRegisterBase), 0x1000)
+ Memory32Fixed (ReadWrite, SYNQUACER_UART0_BASE, SYNQUACER_UART0_SIZE)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 95 }
})
}
diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc b/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc
index 699e79e1bf59..c549a9781c8c 100644
--- a/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc
+++ b/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc
@@ -19,6 +19,7 @@
#include <IndustryStandard/Acpi61.h>
#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
+#include <Platform/MemoryMap.h>
#include "AcpiTables.h"
@@ -47,7 +48,7 @@ STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr = {
32,
0,
EFI_ACPI_5_1_DWORD,
- FixedPcdGet32 (PcdSerialRegisterBase)
+ SYNQUACER_UART0_BASE
},
//
// InterruptType
--
2.19.2
next prev parent reply other threads:[~2018-12-26 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-26 13:25 [PATCH edk2-platforms 0/3] synquacer multi-uart support Ard Biesheuvel
2018-12-26 13:25 ` Ard Biesheuvel [this message]
2018-12-26 13:25 ` [PATCH edk2-platforms 2/3] Silicon/SynQuacer/AcpiTables: expose second UART to the OS Ard Biesheuvel
2018-12-26 13:25 ` [PATCH edk2-platforms 3/3] Silicon/SynQuacer: add support for DEBUG output on second UART Ard Biesheuvel
2019-01-11 17:58 ` Leif Lindholm
2019-01-12 18:18 ` Mark Kettenis
2019-01-14 23:18 ` Ard Biesheuvel
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-list 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=20181226132530.8445-2-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/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