public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Pete Batard <pete@akeo.ie>, devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org,
	samer.el-haj-mahmoud@arm.com, andrey.warkentin@gmail.com
Subject: Re: [edk2-platforms][PATCH 1/5] Silicon/Bcm283x: Clean up Bcm2836.h header
Date: Wed, 27 Nov 2019 15:47:26 +0100	[thread overview]
Message-ID: <6832e7c5-5aa7-04e4-0ed6-91165ae900e8@redhat.com> (raw)
In-Reply-To: <20191127123706.4604-2-pete@akeo.ie>

On 11/27/19 1:37 PM, Pete Batard wrote:
> Add missing RNG registers,

This is one change.

> prefer reusing shorter define's
> instead of PCDs and clean up spacing.

This is another change.

Why suddenly go back to fixed PERIPHERAL block base address?

> 
> Signed-off-by: Pete Batard <pete@akeo.ie>
> ---
>   Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 23 ++++++++++++--------
>   1 file changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h
> index 72c8e9dc4b14..744c7ac3b9f4 100644
> --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h
> +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h
> @@ -24,8 +24,7 @@
>   
>   /* watchdog constants */
>   #define BCM2836_WDOG_OFFSET                                 0x00100000
> -#define BCM2836_WDOG_BASE_ADDRESS                           (FixedPcdGet64 (PcdBcm283xRegistersAddress) \
> -                                                            + BCM2836_WDOG_OFFSET)
> +#define BCM2836_WDOG_BASE_ADDRESS                           (BCM2836_SOC_REGISTERS + BCM2836_WDOG_OFFSET)
>   #define BCM2836_WDOG_PASSWORD                               0x5a000000
>   #define BCM2836_WDOG_RSTC_OFFSET                            0x0000001c
>   #define BCM2836_WDOG_WDOG_OFFSET                            0x00000024
> @@ -34,8 +33,7 @@
>   
>   /* mailbox interface constants */
>   #define BCM2836_MBOX_OFFSET                                 0x0000b880
> -#define BCM2836_MBOX_BASE_ADDRESS                           (FixedPcdGet64 (PcdBcm283xRegistersAddress) \
> -                                                            + BCM2836_MBOX_OFFSET)
> +#define BCM2836_MBOX_BASE_ADDRESS                           (BCM2836_SOC_REGISTERS + BCM2836_MBOX_OFFSET)
>   #define BCM2836_MBOX_READ_OFFSET                            0x00000000
>   #define BCM2836_MBOX_STATUS_OFFSET                          0x00000018
>   #define BCM2836_MBOX_CONFIG_OFFSET                          0x0000001c
> @@ -51,12 +49,19 @@
>   #define BCM2836_INTC_TIMER_PENDING_OFFSET                   0x00000060
>   
>   /* random number generator */
> -#define RNG_BASE_ADDRESS   (BCM2836_SOC_REGISTERS + 0x00104000)
> +#define BCM2836_RNG_OFFSET                                  0x00104000
> +#define RNG_BASE_ADDRESS                                    (BCM2836_SOC_REGISTERS + BCM2836_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                                            (RNG_BASE_ADDRESS + 0x0)
> +#define RNG_STATUS                                          (RNG_BASE_ADDRESS + 0x4)
> +#define RNG_DATA                                            (RNG_BASE_ADDRESS + 0x8)
> +#define RNG_BIT_COUNT                                       (RNG_BASE_ADDRESS + 0xc)
> +#define RNG_BIT_COUNT_THRESHOLD                             (RNG_BASE_ADDRESS + 0x10)
> +#define RNG_INT_STATUS                                      (RNG_BASE_ADDRESS + 0x18)
> +#define RNG_INT_ENABLE                                      (RNG_BASE_ADDRESS + 0x1c)
> +#define RNG_FIFO_DATA                                       (RNG_BASE_ADDRESS + 0x20)
> +#define RNG_FIFO_COUNT                                      (RNG_BASE_ADDRESS + 0x24)
>   
> -#define RNG_CTRL_ENABLE    0x1
> +#define RNG_CTRL_ENABLE                                     0x1
>   
>   #endif /*__BCM2836_H__ */
> 


  parent reply	other threads:[~2019-11-27 14:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 12:37 [edk2-platforms][PATCH 0/5] Further RPi4 support groundwork Pete Batard
2019-11-27 12:37 ` [edk2-platforms][PATCH 1/5] Silicon/Bcm283x: Clean up Bcm2836.h header Pete Batard
2019-11-27 12:48   ` Ard Biesheuvel
2019-11-27 12:56     ` Pete Batard
2019-11-27 13:00       ` Ard Biesheuvel
2019-11-27 13:09         ` Pete Batard
2019-11-27 13:17           ` Ard Biesheuvel
2019-11-27 13:21             ` Pete Batard
2019-11-27 14:47   ` Philippe Mathieu-Daudé [this message]
2019-11-27 14:59     ` [edk2-devel] " Pete Batard
2019-11-27 15:18       ` Philippe Mathieu-Daudé
2019-11-27 12:37 ` [edk2-platforms][PATCH 2/5] Silicon/Bcm283x: Add FIFO mode for RNG Pete Batard
2019-11-27 12:44   ` Ard Biesheuvel
2019-11-27 12:47     ` Pete Batard
2019-11-27 12:37 ` [edk2-platforms][PATCH 3/5] Platform/RPi/MmcDxe: Factorize SCR call and clean up MMC init Pete Batard
2019-11-27 12:37 ` [edk2-platforms][PATCH 4/5] Platform/RPi/MmcDxe: Improve MMC driver stability Pete Batard
2019-11-27 12:37 ` [edk2-platforms][PATCH 5/5] Platform/RPi: Set SD routing according to model Pete Batard
2019-11-27 15:24   ` Philippe Mathieu-Daudé
2019-11-27 16:33     ` Pete Batard
2019-11-27 17:04       ` Leif Lindholm
2019-11-27 17:17         ` Philippe Mathieu-Daudé

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=6832e7c5-5aa7-04e4-0ed6-91165ae900e8@redhat.com \
    --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