U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/8] ARM: bcm283x: Add BCM283x_BASE define
Date: Fri, 30 Aug 2019 16:36:44 +0200	[thread overview]
Message-ID: <da84ef0a-dd03-2aea-87fe-87a788f360d1@gmail.com> (raw)
In-Reply-To: <0a5984bd-0bbc-5775-5ec8-d9efb65a3886@gherzan.ro>



On 26/07/2019 14:43, Andrei Gherzan wrote:
> Hi,
> 
> On 26/07/2019 13.04, Alexander Graf wrote:
>>
>>
>> On 26.07.19 13:55, Matthias Brugger wrote:
>>>
>>>
>>> On 26/07/2019 13:16, Alexander Graf wrote:
>>>>
>>>>
>>>> On 24.07.19 16:39, Andrei Gherzan wrote:
>>>>> From: Matthias Brugger <mbrugger@suse.com>
>>>>>
>>>>> Devices of bcm283x have different base address, depending if they
>>>>> are on
>>>>> bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you
>>>>> want to
>>>>> build and only add the offset in the header files.
>>>>>
>>>>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>>>> Signed-off-by: Andrei Gherzan <andrei@balena.io>
>>>>> ---
>>>>>    arch/arm/mach-bcm283x/Kconfig              | 5 +++++
>>>>>    arch/arm/mach-bcm283x/include/mach/mbox.h  | 6 +-----
>>>>>    arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +-----
>>>>>    arch/arm/mach-bcm283x/include/mach/timer.h | 6 +-----
>>>>>    arch/arm/mach-bcm283x/include/mach/wdog.h  | 6 +-----
>>>>>    5 files changed, 9 insertions(+), 20 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/mach-bcm283x/Kconfig
>>>>> b/arch/arm/mach-bcm283x/Kconfig
>>>>> index 3eb5a9a897..8e69914a83 100644
>>>>> --- a/arch/arm/mach-bcm283x/Kconfig
>>>>> +++ b/arch/arm/mach-bcm283x/Kconfig
>>>>> @@ -141,4 +141,9 @@ config SYS_SOC
>>>>>    config SYS_CONFIG_NAME
>>>>>        default "rpi"
>>>>>    +config BCM283x_BASE
>>>>> +    hex
>>>>> +    default "0x20000000" if BCM2835
>>>>> +    default "0x3f000000" if BCM2836 || BCM2837
>>>>
>>>> How hard would it be to make the base a global variable instead and
>>>> just set it
>>>> early on board init based on the FDT or maybe even CPU core revision
>>>> registers?
>>>
>>> Might be possible. Candidates to implement this are
>>> board_early_init_f or
>>> misc_init_f, I think.
>>>
>>>>
>>>> That would allow us to support RPi3 & 4 with the same U-Boot binary.
>>>
>>> Good point :)
>>
>> Yeah, then you only need to do the memory map dynamically as well and
>> the rest should all be handled by DT :). Which again means you don't
>> need a new config target at all!
> I like that. It will bring a little confusion though when using a rpi3
> defconfig for rpi4. I guess we could just copy it.
> 

I have a working POC of this feature, but it needs more time. I propose to merge
RPi4 support now, so that it can get accepted for v2019.10. Afterwards we can
implement a unified u-boot binary for RPi[34] and maybe even RPi[12] in the future.

If nobody shouts I'll merge this series fixing the two comments I had.
Please let me know if you disagree.

Regards,
Matthias

  reply	other threads:[~2019-08-30 14:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 13:37 [U-Boot] [PATCH 00/16] Raspberry Pi 32/64 support andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 01/16] dts: Create a dtsi for BCM2835/6/7 specific configuration andrei at gherzan.ro
2019-07-16 14:20   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 02/16] dts: Add initial support for bcm2838 andrei at gherzan.ro
2019-07-16 14:21   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 03/16] arm: mach-bcm283x: Define configs for RaspberryPi 4 andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 04/16] arm: mach-bcm283x: Define mbox address for BCM2838 andrei at gherzan.ro
2019-07-16 14:22   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 05/16] rpi: Add rpi_model entry for RaspberryPi 4 andrei at gherzan.ro
2019-07-16 14:31   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 06/16] dt-bindings: Define BCM2838_CLOCK_EMMC2 needed " andrei at gherzan.ro
2019-07-16 14:23   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 07/16] arm: bcm283x: Include definition for additional emmc clock andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 08/16] mmc: bcm2835_sdhci: Add support for bcm2711 device andrei at gherzan.ro
2019-07-16 14:32   ` Matthias Brugger
2019-07-16 13:37 ` [U-Boot] [PATCH 09/16] arm: bcm283x: Define device base addresses for bcm2835 andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 10/16] bcm2835 video: Bail out early if querying video information fails andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 11/16] bcm283x mbox: Correctly wait for space to send andrei at gherzan.ro
2019-07-16 13:37 ` [U-Boot] [PATCH 12/16] config: rpi4: Add defconfig for rpi4-32 andrei at gherzan.ro
2019-07-16 14:25   ` Matthias Brugger
2019-07-16 15:25     ` Peter Robinson
2019-07-16 13:38 ` [U-Boot] [PATCH 13/16] dts: bcm2838-rpi-4-b: Use the emmc2 interface for sdhci andrei at gherzan.ro
2019-07-16 14:26   ` Matthias Brugger
2019-07-16 13:38 ` [U-Boot] [PATCH 14/16] rpi: Add memory map for bcm2838 andrei at gherzan.ro
2019-07-16 13:38 ` [U-Boot] [PATCH 15/16] configs: rpi4: Remove DWC2 and USB_ETHER configs andrei at gherzan.ro
2019-07-16 13:38 ` [U-Boot] [PATCH 16/16] dts: bcm2838-rpi-4-b: Use the emmc2/2811 compatible string for SDHCI andrei at gherzan.ro
2019-07-16 14:17 ` [U-Boot] [PATCH 00/16] Raspberry Pi 32/64 support Matthias Brugger
2019-07-16 19:00   ` Andrei Gherzan
2019-07-24 14:39 ` [U-Boot] [PATCH v2 0/8] " Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 1/8] RPI: Add defconfigs for rpi4 (32/64) Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 2/8] ARM: bcm283x: Add BCM283x_BASE define Andrei Gherzan
2019-07-26 11:16     ` Alexander Graf
     [not found]       ` <8195673b-37aa-9bea-916a-4934836098be@suse.com>
2019-07-26 12:04         ` Alexander Graf
2019-07-26 12:43           ` Andrei Gherzan
2019-08-30 14:36             ` Matthias Brugger [this message]
2019-07-24 14:39   ` [U-Boot] [PATCH v2 3/8] ARM: bcm283x: Define configs for RaspberryPi 4 Andrei Gherzan
2019-07-26 11:00     ` Matthias Brugger
2019-07-24 14:39   ` [U-Boot] [PATCH v2 4/8] RPI: Add entry for Raspberry Pi 4 model B Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 5/8] ARM: bcm283x: Include definition for additional emmc clock Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 6/8] mmc: bcm283x: Add support for bcm2711 device in bcm2835_sdhci Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 7/8] RPI: Add memory map for bcm2838 Andrei Gherzan
2019-07-24 14:39   ` [U-Boot] [PATCH v2 8/8] git-mailrc: Add rpi and bcm283x maintainer Andrei Gherzan
2019-07-26 10:57     ` Matthias Brugger

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-all 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=da84ef0a-dd03-2aea-87fe-87a788f360d1@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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