diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-05-19 13:55:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-05-19 13:55:44 +0200 |
commit | acef9438e94f5960064d650080270549eae27ab7 (patch) | |
tree | d85ab65e01b19fe2a7eaa602feb91b9601c07b41 | |
parent | 1e284880fb5b339bc922faa6cdb7fa4274838578 (diff) | |
parent | e8480332b4fedf5d55c108b8426c6c198cf402a9 (diff) | |
download | barebox-acef9438e94f5960064d650080270549eae27ab7.tar.gz barebox-acef9438e94f5960064d650080270549eae27ab7.tar.xz |
Merge branch 'for-next/rpi'
-rw-r--r-- | Documentation/boards/bcm2835.rst | 6 | ||||
-rw-r--r-- | arch/arm/boards/raspberry-pi/lowlevel.c | 1 | ||||
-rw-r--r-- | arch/arm/boards/raspberry-pi/rpi-common.c | 4 | ||||
-rw-r--r-- | arch/arm/configs/rpi_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/cpu/board-dt-2nd.c | 4 |
5 files changed, 12 insertions, 4 deletions
diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst index 8af6a09c13..0b5299a340 100644 --- a/Documentation/boards/bcm2835.rst +++ b/Documentation/boards/bcm2835.rst @@ -14,10 +14,16 @@ Raspberry Pi - ``images/barebox-raspberry-pi-1.img`` for the BCM2835/ARM1176JZF-S (Raspberry Pi 1, Raspberry Pi Zero) - ``images/barebox-raspberry-pi-2.img`` for the BCM2836/CORTEX-A7 (Raspberry Pi 2) - ``images/barebox-raspberry-pi-3.img`` for the BCM2837/CORTEX-A53 (Raspberry Pi 3) + - ``images/barebox-raspberry-pi-cm3.img`` for the BCM2837/CORTEX-A53 (Raspberry Pi CM3) Copy the respective image for your model to your SD card and name it ``barebox.img``. + Alternatively, ``images/barebox-dt-2nd.img`` can be used as single bootloader for all + supported 32-bit boards. In this case the device tree supplied by the video core + is directly used by barebox to probe. The device trees in ``arch/arm/dts/*.dtb`` + will need to be renamed for alignment with the naming scheme expected by the videocore. + 4. Create a text file ``config.txt`` on the SD card with the following content:: kernel=barebox.img diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c index e9314fb27b..7b9809b86c 100644 --- a/arch/arm/boards/raspberry-pi/lowlevel.c +++ b/arch/arm/boards/raspberry-pi/lowlevel.c @@ -40,7 +40,6 @@ static void copy_vc_fdt(void *dest, void *src, unsigned long max_size) #define rpi_stack_top(memsize) \ arm_mem_stack_top(BCM2835_SDRAM_BASE, BCM2835_SDRAM_BASE + memsize - VIDEOCORE_FDT_SZ) -/* Must be inline since stack isn't setup yet. */ static inline void start_raspberry_pi(unsigned long memsize, void *fdt, void *vc_fdt) { diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index c287b414c6..41ef7d1677 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -328,10 +328,8 @@ static void rpi_vc_fdt(void) return; } - if (magic != FDT_MAGIC) { - pr_err("videocore fdt saved in pbl has invalid magic\n"); + if (magic != FDT_MAGIC) return; - } size = be32_to_cpu(oftree->totalsize); if (write_file("/vc.dtb", saved_vc_fdt, size)) { diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig index b823a9a3d0..e0e1497481 100644 --- a/arch/arm/configs/rpi_defconfig +++ b/arch/arm/configs/rpi_defconfig @@ -3,6 +3,7 @@ CONFIG_MACH_RPI=y CONFIG_MACH_RPI2=y CONFIG_MACH_RPI3=y CONFIG_MACH_RPI_CM3=y +CONFIG_BOARD_ARM_GENERIC_DT=y CONFIG_AEABI=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_UNWIND=y diff --git a/arch/arm/cpu/board-dt-2nd.c b/arch/arm/cpu/board-dt-2nd.c index 0731aecd1a..6f4a6f26a8 100644 --- a/arch/arm/cpu/board-dt-2nd.c +++ b/arch/arm/cpu/board-dt-2nd.c @@ -21,6 +21,8 @@ void dt_2nd_aarch64(void *fdt) /* entry point already set up stack */ + arm_cpu_lowlevel_init(); + relocate_to_current_adr(); setup_c(); @@ -50,6 +52,8 @@ ENTRY_FUNCTION(start_dt_2nd, r0, r1, r2) { unsigned long image_start = (unsigned long)_text + global_variable_offset(); + arm_cpu_lowlevel_init(); + arm_setup_stack(image_start); relocate_to_current_adr(); |