arm: mvebu: Allow DB-88F6820-GP to boot Linux
Subsystems (3)
v3 cover arm: mvebu: Allow DB-88F6820-GP to boot Linux
Changes needed to allow the DB-88F6820-GP development board to successfully boot a Linux kernel.
Changes in v3:
- Correct coding-style errors
- Correct config macro style error
- Add acked-by lines
Kevin Smith (3):
arm: mvebu: Update CBAR with SOC regs base mv-common.h: Include support for device trees db-88f6820-gp.h: Load data blobs into lower memory
Stefan Roese (1):
arm: mvebu: Disable L2 cache before enabling d-cache
arch/arm/mach-mvebu/cpu.c | 15 +++++++++++++++ include/configs/db-88f6820-gp.h | 5 +++++ include/configs/mv-common.h | 2 ++ 3 files changed, 22 insertions(+)
Signature · 1 line
2.3.2
PATCH v3 1/4 arm: mvebu: Disable L2 cache before enabling d-cache
From: Stefan Roese <[email protected]>
L2 cache may still be enabled by the BootROM. We need to first disable it before enabling d-cache support.
--- arch/arm/mach-mvebu/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-mvebu/cpu.c +8 -0
@@ -7,6 +7,7 @@#include <common.h> #include <netdev.h> #include <asm/io.h> +#include <asm/pl310.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h>
@@ -240,6 +241,13 @@ int cpu_eth_init(bd_t *bis)#ifndef CONFIG_SYS_DCACHE_OFF void enable_caches (void ) { +struct pl310_regs *const pl310 = + (struct pl310_regs *)CONFIG_SYS_PL310_BASE ; + +/* First disable L2 cache - may still be enable from BootROM */ +if (mvebu_soc_family () ==MVEBU_SOC_A38X ) +clrbits_le32 (&pl310->pl310_ctrl,L2X0_CTRL_EN ); +/* Avoid problem with e.g. neta ethernet driver */ invalidate_dcache_all ();
Signature · 1 line
2.3.2
PATCH v3 2/4 arm: mvebu: Update CBAR with SOC regs base
In reply to Kevin SmithSMP-enabled Linux kernels read the CBAR register in CP15 to find the address of the SCU registers. After remapping internal registers, also update the CBAR so the kernel can find them.
--- arch/arm/mach-mvebu/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/mach-mvebu/cpu.c +7 -0
@@ -161,10 +161,17 @@ static void update_sdram_window_sizes(void) }#ifdef CONFIG_ARCH_CPU_INIT +static void set_cbar (u32 addr) +{ + asm("mcr p15, 4, %0, c15, c0" : :"r" (addr)); +} + +int arch_cpu_init (void ) {/* Linux expects the internal registers to be at 0xf1000000 */ writel (SOC_REGS_PHY_BASE ,INTREG_BASE_ADDR_REG ); +set_cbar (SOC_REGS_PHY_BASE +0xC000 );/* * We need to call mvebu_mbus_probe() before calling
Signature · 1 line
2.3.2
PATCH v3 3/4 mv-common.h: Include support for device trees
In reply to Kevin Smith--- include/configs/mv-common.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/mv-common.h +2 -0
@@ -59,6 +59,8 @@#define CONFIG_BOOTDELAY 3/* default enable autoboot */ #define CONFIG_PREBOOT +#define CONFIG_OF_LIBFDT /* Device tree support */ +/* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is
Signature · 1 line
2.3.2
PATCH v3 3/4 mv-common.h: Include support for device trees
Hi Luka,
Quoted 12 lines · Kevin Smith
Signed-off-by Kevin Smith <[email protected]>Acked-by Stefan Roese <[email protected]>--- include/configs/mv-common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/mv-common.h +0
-0
include/configs/mv-common.h line 66
Quoted 8 lines
include/configs/mv-common.h +2
-0@@ -59,6 +59,8 @@#define CONFIG_BOOTDELAY 3/* default enable autoboot */ #define CONFIG_PREBOOT +#define CONFIG_OF_LIBFDT /* Device tree support */ +/* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is
I just noticed that you didn't add this patch (and "[PATCH v3 4/4] db-88f6820-gp.h: Load data blobs into lower memory") in your last pull request. Could you please queue those 2 patches for your next pull request?
Thanks,
Stefan
PATCH v3 3/4 mv-common.h: Include support for device trees
Hi Stefan,
Quoted 15 lines · Stefan Roese
Quoted 14 lines · Kevin Smith
Signed-off-by Kevin Smith <[email protected]>Acked-by Stefan Roese <[email protected]>--- include/configs/mv-common.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/mv-common.h +0
-0@@ -59,6 +59,8 @@#define CONFIG_BOOTDELAY 3/* default enable autoboot */ #define CONFIG_PREBOOT
Quoted 10 lines
include/configs/mv-common.h line 66
Quoted 6 lines
include/configs/mv-common.h +2
-0+#define CONFIG_OF_LIBFDT /* Device tree support */ +/* * For booting Linux, the board info and command line data * have to be in the first 8 MB of memory, since this is I just noticed that you didn't add this patch (and "[PATCH v3 4/4]
db-88f6820-gp.h: Load data blobs into lower memory") in your last pull request. Could you please queue those 2 patches for your next pull request?
I just sent a pull request for those. I must have missed them for some reason. Thank you for the pointer.
When this gets merged we can start dropping CONFIG_OF_LIBFDT from Marvell boards which include mv-common.h.
Regards,
Luka
PATCH v3 4/4 db-88f6820-gp.h: Load data blobs into lower memory
In reply to Kevin SmithBy default on this platform, u-boot loads data into high memory in the range of 0x7Fxxxxxx, which generates a data abort when the kernel tries to read it. Config the u-boot environment to load the device tree and initrd image into lower memory to make them accessible to the kernel.
--- include/configs/db-88f6820-gp.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/db-88f6820-gp.h +5 -0
@@ -63,6 +63,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST +/* Keep device tree and initrd in lower memory so the kernel can access them */ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_high=0x10000000\0" \ + "initrd_high=0x10000000\0" +/* * mv-common.h should be defined after CMD configs since it used them * to enable certain macros
Signature · 1 line
2.3.2