From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web09.6391.1573747687720552123 for ; Thu, 14 Nov 2019 08:08:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=FlWhaWyM; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.66, mailfrom: pete@akeo.ie) Received: by mail-wm1-f66.google.com with SMTP id b17so6530553wmj.2 for ; Thu, 14 Nov 2019 08:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hIjyyZM2CyLiFyiNO6p2VopuZpqbgoSs+UjaBEGvSvg=; b=FlWhaWyMgQrMXoQ0TY/RxFhP2lxaPls608bs/c4EOeb8cH5wrutUT6BO7YXh5sTvuk h/GpyJHCKLKzME3ZwAH9AuS0E4XUw2pE5N1gx9VPQ7cypPPtbZy7sDrHX70kznjJ8oWq 3JToCei9I8vcxzEObLfMXh23Wbln/W54F07vj5YPJcCo5bd2WUKvsLGXqrDfMQr0bX3p HIHa8GGKDI80A6ByrPDODsIzyCx9lGuBigh6r06rge5XHHnX54VpUtku/tP2tZ0p8gdV 91SZzn50cs/I6h7JfcvFi7SQF/kg+Tl881LghM5sc6e8MQgRXS0BlwQPCSUrVpFJt6uH PEmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hIjyyZM2CyLiFyiNO6p2VopuZpqbgoSs+UjaBEGvSvg=; b=VOwF6jZlvJwK2uMCNnAXhqHBtGOhBoXzoFBap7oLTCcMRD1VBXTZ7vvsuiz8ewyVrk 5ntT6QknEKKtfkewDscavySLRNu3yPHU3mRgAkjRsi9sL4BNrXxDxuGl8tGek1hM4oC5 /+AQPS1DRr4UfE9clWovmXLqYXDWZdIykAWiaJIXeySObRnIzzsN7/MreSF+boRCN82u pfsSEJl12GqBMdaxwK6d+satNmwKKdZBqNLerfRpj68jCeyGvTxjuMDmVHjwXzckaijj ypLgdl2HjJxrtFrcA5inkL7qm9Nz+vdfXfRRfHWm/nlDlCBnr7FWIUvzF53FxzTZReP+ AgsQ== X-Gm-Message-State: APjAAAUzKjDfLXfppWBev1MkND7yiHYAcVLOChtR+Lq7FgP+UEQbefzN Dciu2M0LYG8vyLEIytsMkQeDDuP85tY= X-Google-Smtp-Source: APXvYqwIopHUG4/L0eO7DnZWauQNBHYUEO6/6Jl5XVoejkvTRFea0Ft//pJgqhXsTORIPr6ordEo8A== X-Received: by 2002:a1c:5fc4:: with SMTP id t187mr9069284wmb.142.1573747685758; Thu, 14 Nov 2019 08:08:05 -0800 (PST) Return-Path: Received: from localhost.localdomain ([84.203.67.47]) by smtp.gmail.com with ESMTPSA id a16sm6793088wmd.11.2019.11.14.08.08.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 08:08:05 -0800 (PST) From: "Pete Batard" 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 Message-Id: <20191114160740.10072-9-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20191114160740.10072-1-pete@akeo.ie> References: <20191114160740.10072-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Samer El-Haj-Mahmoud Replace DW2_USB_BASE_ADDRESS with PcdDw2UsbBaseAddress. This is needed in preparation for adding Raspberry Pi 4 support. Signed-off-by: Pete Batard --- 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 * 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