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
Subject: Re: [edk2-platforms][PATCH v2 1/7] Silicon/Bcm283x: Add UART constants for PL011 and miniUART
Date: Thu, 19 Dec 2019 14:27:30 +0100	[thread overview]
Message-ID: <617f1b75-563d-55d9-c562-6d169d511be3@redhat.com> (raw)
In-Reply-To: <20191219121434.2856-2-pete@akeo.ie>

On 12/19/19 1:14 PM, Pete Batard wrote:
> This adds offset, base address, interrupt and register-space length
> for the 2 UARTs that the Bcm283x SoC provides.
> 
> To be consistent, we simplify the two other existing base address
> definitions to a more legible equivalent since there is no point
> in explicit refs to FixedPcdGet64 (PcdBcm283xRegistersAddress).
> 
> Signed-off-by: Pete Batard <pete@akeo.ie>
> ---
>   Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 17 +++++++++++++----
>   1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h
> index 02107086d439..dd9a698f7218 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)

Good!

>   #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
> @@ -50,4 +48,15 @@
>   #define BCM2836_INTC_TIMER_CONTROL_OFFSET                   0x00000040
>   #define BCM2836_INTC_TIMER_PENDING_OFFSET                   0x00000060
>   
> +/* uart constants */
> +#define BCM2836_PL011_UART_OFFSET                           0x00201000
> +#define BCM2836_PL011_UART_BASE_ADDRESS                     (BCM2836_SOC_REGISTERS + BCM2836_PL011_UART_OFFSET)
> +#define BCM2836_PL011_UART_LENGTH                           0x00001000
> +#define BCM2836_PL011_UART_INTERRUPT                        0x99

Hmm 96 + 29 = 0x7D, 96 + 57 = 0x99. OK.
Maybe we can later add a definition for this '96'.

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

> +
> +#define BCM2836_MINI_UART_OFFSET                            0x00215000
> +#define BCM2836_MINI_UART_BASE_ADDRESS                      (BCM2836_SOC_REGISTERS + BCM2836_MINI_UART_OFFSET)
> +#define BCM2836_MINI_UART_LENGTH                            0x00000070
> +#define BCM2836_MINI_UART_INTERRUPT                         0x7D
> +
>   #endif /*__BCM2836_H__ */
> 


  reply	other threads:[~2019-12-19 13:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 12:14 [edk2-platforms][PATCH v2 0/7] Platform/RPi4: ACPI improvements Pete Batard
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 1/7] Silicon/Bcm283x: Add UART constants for PL011 and miniUART Pete Batard
2019-12-19 13:27   ` Philippe Mathieu-Daudé [this message]
2019-12-19 13:32     ` Ard Biesheuvel
2019-12-19 14:11       ` Philippe Mathieu-Daudé
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 2/7] Platform/RPi4: Clean up ACPI definitions Pete Batard
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 3/7] Platform/RPi4: Improve FADT ACPI table generation Pete Batard
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 4/7] Platform/RPi4: Improve SPCR and DBG2 " Pete Batard
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 5/7] Platform/RPi4: Add switch to select between PL011 and miniUART Pete Batard
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 6/7] Platform/RPi4: Add XHCI ACPI table Pete Batard
2019-12-19 13:12   ` Ard Biesheuvel
2019-12-19 13:32     ` Pete Batard
2019-12-19 13:33       ` Ard Biesheuvel
2019-12-19 12:14 ` [edk2-platforms][PATCH v2 7/7] Platform/RPi4: Add ACPI basic mode build option Pete Batard
2019-12-19 16:55 ` [edk2-platforms][PATCH v2 0/7] Platform/RPi4: ACPI improvements Ard Biesheuvel
2019-12-19 17:20   ` Pete Batard

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=617f1b75-563d-55d9-c562-6d169d511be3@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