From nobody Mon Feb 9 23:16:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+51526+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51526+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1575287727; cv=none; d=zohomail.com; s=zohoarc; b=ZXSoR40KZs1j1de1aHD9TAqOk1KzbsMMhUArwkc2RdA5/iIP0vURW/Mw6XGa25fU9YXdzFYVqikaZUIQsp5ZDmjEmW3AcSteEYNhfRVmWwq1qxRTdVlJ145Kw/rvSE4uIYkMfXbvud/UggmKLDlmQh01ooknSlLfypWPMipMvLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575287727; 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=IvcA8kVqoiO2zCD+wHMcm/MLDUTjaiUbcMvRrxfHCSY=; b=J3OKA2pUOyTJKt2JG3Q8uGg5LwlRevLg5mfiNa9zxjbKlBW2ua7DnU6D9dyLMi18STi5ZPkI3RPfLw1e8bWe7ObxQr1xI7FpF7srUOG3JcLBaxD/2HwVpgq2O9/gTC1/HclAuxq8v/1NySP7UAv8bj03aJL4rw//Nhs1w+AHurE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51526+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575287727392568.7141579956442; Mon, 2 Dec 2019 03:55:27 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id gJo5YY1788612x3eBCgfd3tJ; Mon, 02 Dec 2019 03:55:26 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web09.29.1575287725545926280 for ; Mon, 02 Dec 2019 03:55:25 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id q10so7706493wrm.11 for ; Mon, 02 Dec 2019 03:55:25 -0800 (PST) X-Gm-Message-State: h0qlzXMJIJIzxQILvUznjy03x1787277AA= X-Google-Smtp-Source: APXvYqx15XswcQ7oLKw8N2+bi376dmxVbqT4nQePK5qR77kV7kTw2DIOf72zcLXbjWkxYqRkubqCqQ== X-Received: by 2002:adf:b193:: with SMTP id q19mr21173111wra.78.1575287723684; Mon, 02 Dec 2019 03:55:23 -0800 (PST) X-Received: from localhost.localdomain ([84.203.45.230]) by smtp.gmail.com with ESMTPSA id p10sm8500291wmi.15.2019.12.02.03.55.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Dec 2019 03:55:22 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 2/3] Silicon/Broadcom/Bcm283x: Move Bcm2835 RNG defines to their own header Date: Mon, 2 Dec 2019 11:55:05 +0000 Message-Id: <20191202115506.4068-3-pete@akeo.ie> In-Reply-To: <20191202115506.4068-1-pete@akeo.ie> References: <20191202115506.4068-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=1575287726; bh=REFZbANNsUQBJfrz7mftAH0kdM5j0C86o07O/jihpkU=; h=Cc:Date:From:Reply-To:Subject:To; b=KaZIUUCXN1d9aUovvqmCFCMMdAhWawVO3wklQSMx5xC+zXgl8P7nlrZdO3Bt2P7G0nH k4888qAGkVm2f71gbs2GkkqV/+1mpSsVt71FUl/sciX1059BkPAEft+mR5X8TSNPKRLDA AXnybW3xK/r/P9BwVWLiO9yl+k+mKi+cKo4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" While the Bcm2835 and Bcm2838 RNG appear to share the same register layout, we prefer moving the RNG specific defines into their own header in case this assertion doesn't hold true with future RNG drivers. Also, this should make it clearer to see which specific elements apply to which SoC implementation. Signed-off-by: Pete Batard Reviewed-by: Philippe Mathieu-Daude --- Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c | 2 +- Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2835Rng.h | 22 ++++++= ++++++++++++++ Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 9 ------= -- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c= b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c index ea86f9b3877e..84d194ea8472 100644 --- a/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c +++ b/Silicon/Broadcom/Bcm283x/Drivers/Bcm2835RngDxe/Bcm2835RngDxe.c @@ -14,7 +14,7 @@ #include #include =20 -#include +#include =20 #include =20 diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2835Rng.h= b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2835Rng.h new file mode 100644 index 000000000000..817c91cb24c1 --- /dev/null +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2835Rng.h @@ -0,0 +1,22 @@ +/** @file + * + * Copyright (c) 2019, Pete Batard . + * + * SPDX-License-Identifier: BSD-2-Clause-Patent + * + **/ + +#ifndef BCM2835_RNG_H__ +#define BCM2835_RNG_H__ + +#define BCM2835_RNG_OFFSET 0x00104000 +#define RNG_BASE_ADDRESS ((FixedPcdGet64 (PcdBcm283xReg= istersAddress)) \ + + BCM2835_RNG_OFFSET) + +#define RNG_CTRL (RNG_BASE_ADDRESS + 0x0) +#define RNG_STATUS (RNG_BASE_ADDRESS + 0x4) +#define RNG_DATA (RNG_BASE_ADDRESS + 0x8) + +#define RNG_CTRL_ENABLE 0x1 + +#endif /* BCM2835_RNG_H__ */ diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/= Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h index 72c8e9dc4b14..02107086d439 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h @@ -50,13 +50,4 @@ #define BCM2836_INTC_TIMER_CONTROL_OFFSET 0x00000040 #define BCM2836_INTC_TIMER_PENDING_OFFSET 0x00000060 =20 -/* random number generator */ -#define RNG_BASE_ADDRESS (BCM2836_SOC_REGISTERS + 0x00104000) - -#define RNG_CTRL (RNG_BASE_ADDRESS + 0x0) -#define RNG_STATUS (RNG_BASE_ADDRESS + 0x4) -#define RNG_DATA (RNG_BASE_ADDRESS + 0x8) - -#define RNG_CTRL_ENABLE 0x1 - #endif /*__BCM2836_H__ */ --=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 (#51526): https://edk2.groups.io/g/devel/message/51526 Mute This Topic: https://groups.io/mt/64721567/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-