From 49822442edd910efdf12eb8070a9c9cc7c48037d Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 16 Jul 2019 13:09:47 +0200 Subject: [PATCH 01/11] ARM: bcm283x mbox: Fix send status register Before we can send a message to the mailbox we have to check that there is space to do so. Therefore we poll the status register. But up to now the wrong status register, the one of mailbox 0, was checked. Fix this by polling the status regiser of mailbox 1. Signed-off-by: Fabian Vogt Acked-by: Stephen Warren [mb: rename registers and update commit message] Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/include/mach/mbox.h | 7 +++++-- arch/arm/mach-bcm283x/mbox.c | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index e3a893e49c..f892803558 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -46,9 +46,12 @@ struct bcm2835_mbox_regs { u32 read; u32 rsvd0[5]; - u32 status; - u32 config; + u32 mail0_status; + u32 mail0_config; u32 write; + u32 rsvd1[5]; + u32 mail1_status; + u32 mail1_config; }; #define BCM2835_MBOX_STATUS_WR_FULL 0x80000000 diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c index 1642ebd103..3c67f68c17 100644 --- a/arch/arm/mach-bcm283x/mbox.c +++ b/arch/arm/mach-bcm283x/mbox.c @@ -27,7 +27,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) /* Drain any stale responses */ for (;;) { - val = readl(®s->status); + val = readl(®s->mail0_status); if (val & BCM2835_MBOX_STATUS_RD_EMPTY) break; if (get_timer(0) >= endtime) { @@ -40,7 +40,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) /* Wait for space to send */ for (;;) { - val = readl(®s->status); + val = readl(®s->mail1_status); if (!(val & BCM2835_MBOX_STATUS_WR_FULL)) break; if (get_timer(0) >= endtime) { @@ -58,7 +58,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) /* Wait for the response */ for (;;) { - val = readl(®s->status); + val = readl(®s->mail0_status); if (!(val & BCM2835_MBOX_STATUS_RD_EMPTY)) break; if (get_timer(0) >= endtime) { From b1125802a524641ad1ac803b4a617756d26f007d Mon Sep 17 00:00:00 2001 From: Raul Benet Date: Thu, 13 Jun 2019 14:59:57 +0100 Subject: [PATCH 02/11] mmc: bcm2835-host: Fix wait_transfer_complete Function bcm_2835_wait_transfer_complete() is not waiting long enough. The previous code was claiming to wait for ~1 seconds, but as it depends on register reads it's time actually varies. Some cards require wait times of up to ~56 ms to perform the command 'saveenv' on an EXT4 partition. Re-implement the loop exit condition to use get_timer() which allows to specify the wait time in more reliable manner. Set the maximum wait time to the originally intended 1 second. Signed-off by: Raul Benet Signed-off-by: Matthias Brugger --- drivers/mmc/bcm2835_sdhost.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c index 1ce019af57..7f70acaf39 100644 --- a/drivers/mmc/bcm2835_sdhost.c +++ b/drivers/mmc/bcm2835_sdhost.c @@ -234,7 +234,7 @@ static void bcm2835_reset_internal(struct bcm2835_host *host) static int bcm2835_wait_transfer_complete(struct bcm2835_host *host) { - int timediff = 0; + ulong tstart_ms = get_timer(0); while (1) { u32 edm, fsm; @@ -254,11 +254,13 @@ static int bcm2835_wait_transfer_complete(struct bcm2835_host *host) break; } - /* Error out after 100000 register reads (~1s) */ - if (timediff++ == 100000) { + /* Error out after ~1s */ + ulong tlapse_ms = get_timer(tstart_ms); + if ( tlapse_ms > 1000 /* ms */ ) { + dev_err(host->dev, - "wait_transfer_complete - still waiting after %d retries\n", - timediff); + "wait_transfer_complete - still waiting after %lu ms\n", + tlapse_ms); bcm2835_dumpregs(host); return -ETIMEDOUT; } From 659f4fe3c62a92f6514a652eb555b6a90038782d Mon Sep 17 00:00:00 2001 From: "Bonnans, Laurent" Date: Wed, 31 Jul 2019 11:59:41 +0000 Subject: [PATCH 03/11] rpi: increase SYS_BOOTM_LEN to 64M on ARM64 On AArch64, kernel images are not self-decompressing and easily exceed the 8MB limit. Signed-off-by: Laurent Bonnans Signed-off-by: Matthias Brugger --- include/configs/rpi.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 8473cecd94..77d2d5458a 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -55,6 +55,10 @@ #define CONFIG_SYS_MEMTEST_END 0x00200000 #define CONFIG_LOADADDR 0x00200000 +#ifdef CONFIG_ARM64 +#define CONFIG_SYS_BOOTM_LEN SZ_64M +#endif + /* Devices */ /* GPIO */ #define CONFIG_BCM2835_GPIO From 193279d784e2ca2225815803b9a63f1ce3c7389d Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:04 +0100 Subject: [PATCH 04/11] RPI: Add defconfigs for rpi4 (32/64) This defines a minimum defconfig for each of the two Raspberry Pi 4 variants. One notable difference is that we don't have a embedded dt for this board given that the fw supplies us with one which we can reuse. Furthermore, the ram size is not queryable through mbox interface as the maximum reported size is 1G. The fw patches the dt with the right memory configuration and uboot uses it as it is. We avoid u-boot touching this configuration by making sure CONFIG_ARCH_FIXUP_FDT_MEMORY is deactivated. Signed-off-by: Andrei Gherzan Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 33 +++++++++++++++++++++++++++++++++ configs/rpi_4_defconfig | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 configs/rpi_4_32b_defconfig create mode 100644 configs/rpi_4_defconfig diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig new file mode 100644 index 0000000000..a31a617a5f --- /dev/null +++ b/configs/rpi_4_32b_defconfig @@ -0,0 +1,33 @@ +CONFIG_ARM=y +CONFIG_ARCH_BCM283X=y +CONFIG_SYS_TEXT_BASE=0x00008000 +CONFIG_TARGET_RPI_4_32B=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set +CONFIG_OF_BOARD=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_MISC_INIT_R=y +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_SYS_PROMPT="U-Boot> " +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_FS_UUID=y +CONFIG_ENV_FAT_INTERFACE="mmc" +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_DM_KEYBOARD=y +CONFIG_DM_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_BCM2835=y +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_GENERIC is not set +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_DM_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_CONSOLE_SCROLL_LINES=10 +CONFIG_PHYS_TO_BUS=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig new file mode 100644 index 0000000000..da8c960a2a --- /dev/null +++ b/configs/rpi_4_defconfig @@ -0,0 +1,33 @@ +CONFIG_ARM=y +CONFIG_ARCH_BCM283X=y +CONFIG_SYS_TEXT_BASE=0x00080000 +CONFIG_TARGET_RPI_4=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set +CONFIG_OF_BOARD=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_MISC_INIT_R=y +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_SYS_PROMPT="U-Boot> " +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_FS_UUID=y +CONFIG_ENV_FAT_INTERFACE="mmc" +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_DM_KEYBOARD=y +CONFIG_DM_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_BCM2835=y +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_GENERIC is not set +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_DM_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_CONSOLE_SCROLL_LINES=10 +CONFIG_PHYS_TO_BUS=y +CONFIG_OF_LIBFDT_OVERLAY=y From 1cfac5204c5f4128072878653c6e36336f5cd488 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Wed, 24 Jul 2019 15:39:05 +0100 Subject: [PATCH 05/11] ARM: bcm283x: Add BCM283x_BASE define 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 Signed-off-by: Andrei Gherzan --- 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 + endmenu diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index f892803558..1e4718d83d 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -37,11 +37,7 @@ /* Raw mailbox HW */ -#ifndef CONFIG_BCM2835 -#define BCM2835_MBOX_PHYSADDR 0x3f00b880 -#else -#define BCM2835_MBOX_PHYSADDR 0x2000b880 -#endif +#define BCM2835_MBOX_PHYSADDR (CONFIG_BCM283x_BASE + 0x0000b880) struct bcm2835_mbox_regs { u32 read; diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h index 5cb6ec3340..b443c379d8 100644 --- a/arch/arm/mach-bcm283x/include/mach/sdhci.h +++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h @@ -6,11 +6,7 @@ #ifndef _BCM2835_SDHCI_H_ #define _BCM2835_SDHCI_H_ -#ifndef CONFIG_BCM2835 -#define BCM2835_SDHCI_BASE 0x3f300000 -#else -#define BCM2835_SDHCI_BASE 0x20300000 -#endif +#define BCM2835_SDHCI_BASE (CONFIG_BCM283x_BASE + 0x00300000) int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq); diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h index 56b0c356bb..014355e759 100644 --- a/arch/arm/mach-bcm283x/include/mach/timer.h +++ b/arch/arm/mach-bcm283x/include/mach/timer.h @@ -6,11 +6,7 @@ #ifndef _BCM2835_TIMER_H #define _BCM2835_TIMER_H -#ifndef CONFIG_BCM2835 -#define BCM2835_TIMER_PHYSADDR 0x3f003000 -#else -#define BCM2835_TIMER_PHYSADDR 0x20003000 -#endif +#define BCM2835_TIMER_PHYSADDR (CONFIG_BCM283x_BASE + 0x00003000) #define BCM2835_TIMER_CS_M3 (1 << 3) #define BCM2835_TIMER_CS_M2 (1 << 2) diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h index 99c88e5df7..8292b3cf1f 100644 --- a/arch/arm/mach-bcm283x/include/mach/wdog.h +++ b/arch/arm/mach-bcm283x/include/mach/wdog.h @@ -6,11 +6,7 @@ #ifndef _BCM2835_WDOG_H #define _BCM2835_WDOG_H -#ifndef CONFIG_BCM2835 -#define BCM2835_WDOG_PHYSADDR 0x3f100000 -#else -#define BCM2835_WDOG_PHYSADDR 0x20100000 -#endif +#define BCM2835_WDOG_PHYSADDR (CONFIG_BCM283x_BASE + 0x00100000) struct bcm2835_wdog_regs { u32 unknown0[7]; From c6bcf05fcd61fce1092b7fca945982a65d0c723b Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:06 +0100 Subject: [PATCH 06/11] ARM: bcm283x: Define configs for RaspberryPi 4 Define two target configs for Raspberry Pi 4 (32 and 64bit) and the corresponding BCM2838* configs. Be aware of the current limitation in firmware which requires an explicit configuration to force the arm in 64bit mode when the respective target is used. Signed-off-by: Andrei Gherzan [mb: rename BCM2838 -> BCM2711] Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index 8e69914a83..b08275f598 100644 --- a/arch/arm/mach-bcm283x/Kconfig +++ b/arch/arm/mach-bcm283x/Kconfig @@ -26,6 +26,23 @@ config BCM2837_64B select BCM2837 select ARM64 +config BCM2711 + bool "Broadcom BCM2711 SoC support" + depends on ARCH_BCM283X + +config BCM2711_32B + bool "Broadcom BCM2711 SoC 32-bit support" + depends on ARCH_BCM283X + select BCM2711 + select ARMV7_LPAE + select CPU_V7A + +config BCM2711_64B + bool "Broadcom BCM2711 SoC 64-bit support" + depends on ARCH_BCM283X + select BCM2711 + select ARM64 + menu "Broadcom BCM283X family" depends on ARCH_BCM283X @@ -127,6 +144,50 @@ config TARGET_RPI_3 This option creates a build targeting the ARMv8/AArch64 ISA. select BCM2837_64B +config TARGET_RPI_4_32B + bool "Raspberry Pi 4 32-bit build" + help + Support for all BCM2711-based Raspberry Pi variants, such as + the RPi 4 model B, in AArch32 (32-bit) mode. + + This option assumes the VideoCore firmware is configured to use the + mini UART (rather than PL011) for the serial console. This is the + default on the RPi 4. To enable the UART console, the following non- + default option must be present in config.txt: enable_uart=1. This is + required for U-Boot to operate correctly, even if you only care + about the HDMI/usbkbd console. + + Due to hardware incompatibilities, this can't be used with + BCM283/5/6/7. + + This option creates a build targeting the ARMv7/AArch32 ISA. + select BCM2711_32B + +config TARGET_RPI_4 + bool "Raspberry Pi 4 64-bit build" + help + Support for all BCM2711-based Raspberry Pi variants, such as + the RPi 4 model B, in AArch64 (64-bit) mode. + + This option assumes the VideoCore firmware is configured to use the + mini UART (rather than PL011) for the serial console. This is the + default on the RPi 4. To enable the UART console, the following non- + default option must be present in config.txt: enable_uart=1. This is + required for U-Boot to operate correctly, even if you only care + about the HDMI/usbkbd console. + + Due to hardware incompatibilities, this can't be used with + BCM283/5/6/7. + + Also, due to a bug in firmware, switching to 64bit mode doesn't + happen automatically based on the kernel's image filename. See + https://github.com/raspberrypi/firmware/issues/1193 for more details. + Until that is resolved, the configuration (config.txt) needs to + explicitly set: arm_64bit=1. + + This option creates a build targeting the ARMv8/AArch64 ISA. + select BCM2711_64B + endchoice config SYS_BOARD @@ -145,5 +206,6 @@ config BCM283x_BASE hex default "0x20000000" if BCM2835 default "0x3f000000" if BCM2836 || BCM2837 + default "0xfe000000" if BCM2711 endmenu From 32a84c9e02674a594229e739836ebc38939b52a5 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:07 +0100 Subject: [PATCH 07/11] RPI: Add entry for Raspberry Pi 4 model B The Raspebrry Pi 4 uses the new revision code scheme as documented by the foundation. This change adds an entry for this board as well. Signed-off-by: Andrei Gherzan Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 7a6ca8f759..b57df21f26 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { DTB_DIR "bcm2837-rpi-cm3.dtb", false, }, + [0x11] = { + "4 Model B", + DTB_DIR "bcm2711-rpi-4-b.dtb", + true, + }, }; static const struct rpi_model rpi_models_old_scheme[] = { From 76bce8c2ad7ee7b89c9bd1e4678e2868153acb95 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:08 +0100 Subject: [PATCH 08/11] ARM: bcm283x: Include definition for additional emmc clock This clock has a different mbox ID so have this included in the relevant header file. Signed-off-by: Andrei Gherzan Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/include/mach/mbox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index 1e4718d83d..0b6c2543d5 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -233,6 +233,7 @@ struct bcm2835_mbox_tag_set_power_state { #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 #define BCM2835_MBOX_CLOCK_ID_PWM 10 +#define BCM2835_MBOX_CLOCK_ID_EMMC2 12 struct bcm2835_mbox_tag_get_clock_rate { struct bcm2835_mbox_tag_hdr tag_hdr; From e0e3c7dadac4fa45f91c31299045cb7ada94f495 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Wed, 24 Jul 2019 15:39:09 +0100 Subject: [PATCH 09/11] mmc: bcm283x: Add support for bcm2711 device in bcm2835_sdhci The bcm2711 has two emmc controllers. The difference is the clocks they use. Add support for the second emmc controller. Signed-off-by: Matthias Brugger Signed-off-by: Andrei Gherzan --- drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index bf3304c4dc..bc9ee95fd5 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev) fdt_addr_t base; int emmc_freq; int ret; + int clock_id = (int)dev_get_driver_data(dev); base = devfdt_get_addr(dev); if (base == FDT_ADDR_T_NONE) return -EINVAL; - ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC); + ret = bcm2835_get_mmc_clock(clock_id); if (ret < 0) { debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret); return ret; @@ -230,7 +231,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev) } static const struct udevice_id bcm2835_sdhci_match[] = { - { .compatible = "brcm,bcm2835-sdhci" }, + { + .compatible = "brcm,bcm2835-sdhci", + .data = BCM2835_MBOX_CLOCK_ID_EMMC + }, + { + .compatible = "brcm,bcm2711-emmc2", + .data = BCM2835_MBOX_CLOCK_ID_EMMC2 + }, { /* sentinel */ } }; From c796140ff363c0a5c8914e94c984791b55746268 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:10 +0100 Subject: [PATCH 10/11] RPI: Add memory map for bcm2711 Define the memory map for the BCM2711 based on the dt configuration available in the Raspberry Pi kernel fork. Signed-off-by: Andrei Gherzan [mb: BCM2838 -> BCM2711] Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index b57df21f26..fa57d50c95 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -249,7 +249,8 @@ static uint32_t rev_type; static const struct rpi_model *model; #ifdef CONFIG_ARM64 -static struct mm_region bcm2837_mem_map[] = { +#ifndef CONFIG_BCM2711 +static struct mm_region bcm283x_mem_map[] = { { .virt = 0x00000000UL, .phys = 0x00000000UL, @@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { 0, } }; - -struct mm_region *mem_map = bcm2837_mem_map; +#else +static struct mm_region bcm283x_mem_map[] = { + { + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 0xfe000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + .virt = 0xfe000000UL, + .phys = 0xfe000000UL, + .size = 0x01800000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + /* List terminator */ + 0, + } +}; +#endif +struct mm_region *mem_map = bcm283x_mem_map; #endif int dram_init(void) From e0351b242a9bf60dd6abdfd44104bb702e7000a0 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 24 Jul 2019 15:39:11 +0100 Subject: [PATCH 11/11] git-mailrc: Add rpi and bcm283x maintainer Add entries for bcm283x and rpi prefix. Signed-off-by: Andrei Gherzan [mb: add commit message] Signed-off-by: Matthias Brugger --- doc/git-mailrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/git-mailrc b/doc/git-mailrc index a63b76befc..1d36f5845a 100644 --- a/doc/git-mailrc +++ b/doc/git-mailrc @@ -35,6 +35,7 @@ alias mariosix Mario Six alias masahiro Masahiro Yamada alias mateusz Mateusz Kulikowski alias maxime Maxime Ripard +alias mbrugger Matthias Brugger alias monstr Michal Simek alias prom Minkyu Kang alias ptomsich Philipp Tomsich @@ -74,6 +75,9 @@ alias uniphier uboot, masahiro alias zynq uboot, monstr alias rockchip uboot, sjg, kevery, ptomsich +alias bcm283x uboot, mbrugger +alias rpi uboot, mbrugger + alias m68k uboot, alisonwang, angelo_ts alias coldfire m68k