From nobody Mon Feb 9 16:18:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50884+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50884+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1574163512; cv=none; d=zoho.com; s=zohoarc; b=eBJ8aSBIHN7wRzTAZ40uqltHv+lS6/X+oB3TKe1a+au4HTkIV56TASG1xW8nfyvCAXCtpP9RXKXbbZhA2ssjBUVuLGs7qaKr0aJrgc0WjXx0Ai5ScZ0UxdcIC4HXyR+0vFVjANis5ru83kWiiHOrvVbg8TMReMIdt6ipxpJySQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574163512; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ng3Q3RXwwRD/L/xZIuI39c1aLXS6/29KuJ2sd84OPU8=; b=Ry0JJCHYOyFz6kYS9436xpdn7vv1U2Piyro3swozUwFIQ3PmFaf22dBgukg6izlMpkN0o8HLi+fEH5AzJOzN4+zAkkTxwiq/NpDarfGytaxOYGFhLzwuwpJApHapJHJ8pTlRJMJsCT7MDKDdDvgHl2SYAmVzzsMfv2IZNryL/m0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50884+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1574163512818360.3667068053214; Tue, 19 Nov 2019 03:38:32 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Tue, 19 Nov 2019 03:38:31 -0800 X-Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web10.10145.1574163510573493545 for ; Tue, 19 Nov 2019 03:38:31 -0800 X-Received: by mail-wr1-f42.google.com with SMTP id a15so23410975wrf.9 for ; Tue, 19 Nov 2019 03:38:30 -0800 (PST) X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= X-Google-Smtp-Source: APXvYqyAu3xE1frE+pqOQcrOjS+VzHh1/DQct4L4L65uyR3aic4jA9ikYR9Dob2/wQ6j1+odpynpvg== X-Received: by 2002:a05:6000:10c5:: with SMTP id b5mr38519976wrx.121.1574163508806; Tue, 19 Nov 2019 03:38:28 -0800 (PST) X-Received: from localhost.localdomain ([84.203.67.47]) by smtp.gmail.com with ESMTPSA id j66sm2608273wma.19.2019.11.19.03.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2019 03:38:28 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com, samer.el-haj-mahmoud@arm.com Subject: [edk2-devel] [edk2-platforms][PATCH v2 4/7] Platform/RPi: Use offsets for Bcm238x SoC register addresses Date: Tue, 19 Nov 2019 11:38:06 +0000 Message-Id: <20191119113809.2472-5-pete@akeo.ie> In-Reply-To: <20191119113809.2472-1-pete@akeo.ie> References: <20191119113809.2472-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1574163511; bh=10fsWX2wgLnFYYR3kvoCKk2IiPlipRB/wdFTO3T0uDU=; h=Cc:Date:From:Reply-To:Subject:To; b=BW2wlku4DAJ1R+a0lmn01r/7NGbNS1/eiSS9jeLAO1qxUwuoAr3rkx/iz1NygLJbDFS XYKlseY8vVERzt8b4o8pjLiJLzP+r9HHnfMp4/YE2aJqr1V7shbWjBvRU8dIx7/zqqGwu 50Ethd9MksIoSwk4bRRDcBYVehkwUBr821I= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Samer El-Haj-Mahmoud Remove hardcoded base addresses for Mailbox, Watchdog, SDIO and DW2 USB and use an offset indexed on PcdBcm283xRegistersAddress instead. This is needed in preparation for adding Raspberry Pi 4 support. Signed-off-by: Pete Batard Reviewed-by: Philippe Mathieu-Daude --- Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h | 4 +++- Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 8 ++++++= -- Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h b/Platform/R= aspberryPi/Drivers/DwUsbHostDxe/DwcHw.h index 88fd93934fd3..ddbf69a1d608 100644 --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h @@ -10,7 +10,9 @@ #ifndef __DWCHW_H__ #define __DWCHW_H__ =20 -#define DW2_USB_BASE_ADDRESS 0x3f980000 +#define DW2_USB_OFFSET 0x00980000 +#define DW2_USB_BASE_ADDRESS (FixedPcdGet64 (PcdBcm283xRegister= sAddress) \ + + DW2_USB_OFFSET) =20 #define HSOTG_REG(x) (x) =20 diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/= Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h index 8bd68c234bfd..72c8e9dc4b14 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h @@ -23,7 +23,9 @@ #define BCM2836_DMA_DEVICE_OFFSET 0xc0000000 =20 /* watchdog constants */ -#define BCM2836_WDOG_BASE_ADDRESS 0x3f100000 +#define BCM2836_WDOG_OFFSET 0x00100000 +#define BCM2836_WDOG_BASE_ADDRESS (FixedPcdGet64= (PcdBcm283xRegistersAddress) \ + + BCM2836_WDOG= _OFFSET) #define BCM2836_WDOG_PASSWORD 0x5a000000 #define BCM2836_WDOG_RSTC_OFFSET 0x0000001c #define BCM2836_WDOG_WDOG_OFFSET 0x00000024 @@ -31,7 +33,9 @@ #define BCM2836_WDOG_RSTC_WRCFG_FULL_RESET 0x00000020 =20 /* mailbox interface constants */ -#define BCM2836_MBOX_BASE_ADDRESS 0x3f00b880 +#define BCM2836_MBOX_OFFSET 0x0000b880 +#define BCM2836_MBOX_BASE_ADDRESS (FixedPcdGet64= (PcdBcm283xRegistersAddress) \ + + BCM2836_MBOX= _OFFSET) #define BCM2836_MBOX_READ_OFFSET 0x00000000 #define BCM2836_MBOX_STATUS_OFFSET 0x00000018 #define BCM2836_MBOX_CONFIG_OFFSET 0x0000001c diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.= h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h index fb0d02904156..708a1d7a4f47 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h @@ -10,7 +10,9 @@ #define __BCM2836_SDIO_H__ =20 //MMC/SD/SDIO1 register definitions. -#define MMCHS1BASE 0x3F300000 +#define MMCHS1_OFFSET 0x00300000 +#define MMCHS1BASE (FixedPcdGet64 (PcdBcm283xRegistersAddress) \ + + MMCHS1_OFFSET) =20 #define MMCHS_BLK (MMCHS1BASE + 0x4) #define BLEN_512BYTES (0x200UL << 0) --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#50884): https://edk2.groups.io/g/devel/message/50884 Mute This Topic: https://groups.io/mt/60553575/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-