From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com
Subject: [edk2-platforms][PATCH 8/8] Platform/RPi: Replace DW2_USB_BASE_ADDRESS define with a PCD
Date: Thu, 14 Nov 2019 16:07:40 +0000 [thread overview]
Message-ID: <20191114160740.10072-9-pete@akeo.ie> (raw)
In-Reply-To: <20191114160740.10072-1-pete@akeo.ie>
From: Samer El-Haj-Mahmoud <samer@elhajmahmoud.com>
Replace DW2_USB_BASE_ADDRESS with PcdDw2UsbBaseAddress. This is
needed in preparation for adding Raspberry Pi 4 support.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf | 1 +
Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h | 4 ++--
Platform/RaspberryPi/RPi3/RPi3.dsc | 1 +
Platform/RaspberryPi/RaspberryPi.dec | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf
index 8817f20622d6..dc50f955f2fb 100644
--- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf
+++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.inf
@@ -54,6 +54,7 @@ [Protocols]
[FixedPcd]
gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress
+ gRaspberryPiTokenSpaceGuid.PcdDw2UsbBaseAddress
[Depex]
gRaspberryPiFirmwareProtocolGuid
diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h
index 88fd93934fd3..17daef60f967 100644
--- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h
+++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h
@@ -1,5 +1,6 @@
/** @file
*
+ * Copyright (c) 2019, ARM Limited. All rights reserved.
* Copyright (c) 2017, Andrey Warkentin <andrey.warkentin@gmail.com>
* Copyright (c) 2015-2016, Linaro Limited. All rights reserved.
*
@@ -10,8 +11,7 @@
#ifndef __DWCHW_H__
#define __DWCHW_H__
-#define DW2_USB_BASE_ADDRESS 0x3f980000
-
+#define DW2_USB_BASE_ADDRESS (FixedPcdGet64 (PcdDw2UsbBaseAddress))
#define HSOTG_REG(x) (x)
#define HCCHAR(_ch) HSOTG_REG(0x0500 + 0x20 * (_ch))
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 059549068e02..d7450d857bd5 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -379,6 +379,7 @@ [PcdsFixedAtBuild.common]
gBcm283xTokenSpaceGuid.PcdMboxBaseAddress|0x3f00b880
gBcm283xTokenSpaceGuid.PcdWdogBaseAddress|0x3f100000
gBcm283xTokenSpaceGuid.PcdMmcHs1BaseAddress|0x3f300000
+ gRaspberryPiTokenSpaceGuid.PcdDw2UsbBaseAddress|0x3f980000
## NS16550 compatible UART
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f215040
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index c7e17350544a..aa0c6e826866 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -43,6 +43,7 @@ [PcdsFixedAtBuild.common]
gRaspberryPiTokenSpaceGuid.PcdNvStorageFtwSpareBase|0x0|UINT32|0x00000006
gRaspberryPiTokenSpaceGuid.PcdNvStorageFtwWorkingBase|0x0|UINT32|0x00000007
gRaspberryPiTokenSpaceGuid.PcdExtendedMemoryBase|0x0|UINT32|0x00000008
+ gRaspberryPiTokenSpaceGuid.PcdDw2UsbBaseAddress|0x0|UINT32|0x00000009
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
gRaspberryPiTokenSpaceGuid.PcdCpuClock|0|UINT32|0x0000000d
--
2.21.0.windows.1
prev parent reply other threads:[~2019-11-14 16:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 16:07 [edk2-platforms][PATCH 0/8] Platform/RPi: Early Raspberry Pi 4 groundwork Pete Batard
2019-11-14 16:07 ` [edk2-platforms][PATCH 1/8] Platform/RPi: Add model family detection Pete Batard
2019-11-14 16:36 ` [edk2-devel] " Michael Brown
2019-11-14 16:55 ` Pete Batard
2019-11-18 17:51 ` Leif Lindholm
2019-11-18 17:58 ` Pete Batard
2019-11-18 18:05 ` Leif Lindholm
2019-11-18 18:32 ` Pete Batard
2019-11-19 15:07 ` Ard Biesheuvel
2019-11-19 16:30 ` [edk2-devel] " Pete Batard
2019-11-20 10:27 ` Leif Lindholm
2019-11-20 21:50 ` Pete Batard
2019-11-21 8:55 ` Laszlo Ersek
2019-11-21 9:04 ` Laszlo Ersek
2019-11-21 20:02 ` Pete Batard
2019-11-14 16:07 ` [edk2-platforms][PATCH 2/8] Platform/RPi: Replace Bcm283x SoC base register address with a PCD Pete Batard
2019-11-18 16:48 ` Leif Lindholm
2019-11-18 17:19 ` [edk2-devel] " samer.el-haj-mahmoud
2019-11-18 17:26 ` Leif Lindholm
2019-11-14 16:07 ` [edk2-platforms][PATCH 3/8] Silicon/Broadcom: Add Bcm2711 header Pete Batard
2019-11-18 16:50 ` Leif Lindholm
2019-11-14 16:07 ` [edk2-platforms][PATCH 4/8] Platform/RPi: Read more variables from VideoCore during early init Pete Batard
2019-11-18 17:11 ` Leif Lindholm
2019-11-14 16:07 ` [edk2-platforms][PATCH 5/8] Platform/RPi: Clean up and improve early memory init Pete Batard
2019-11-18 17:20 ` Leif Lindholm
2019-11-18 17:34 ` Pete Batard
2019-11-18 17:38 ` Leif Lindholm
2019-11-18 17:40 ` Pete Batard
2019-11-14 16:07 ` [edk2-platforms][PATCH 6/8] Platform/RPi: Replace Mailbox and Watchdog addresses with PCDs Pete Batard
2019-11-18 11:13 ` Philippe Mathieu-Daudé
2019-11-18 13:32 ` Pete Batard
2019-11-14 16:07 ` [edk2-platforms][PATCH 7/8] Platform/RPi: Replace MMCHS1BASE define with a PCD Pete Batard
2019-11-14 16:07 ` Pete Batard [this message]
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=20191114160740.10072-9-pete@akeo.ie \
--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