diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 17 | ||||
-rw-r--r-- | arch/arm/dts/armada-cp110-master.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/dts/armada-cp110-slave.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/Kconfig | 67 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/mbox.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/timer.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/wdog.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/mbox.c | 6 | ||||
-rw-r--r-- | arch/sh/cpu/u-boot.lds | 1 | ||||
-rw-r--r-- | arch/sh/dts/Makefile | 12 | ||||
-rw-r--r-- | arch/sh/dts/sh7751-r2dplus.dts | 26 | ||||
-rw-r--r-- | arch/sh/include/asm/config.h | 4 | ||||
-rw-r--r-- | arch/sh/lib/start.S | 14 |
15 files changed, 139 insertions, 43 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index f4ada57909..141e48bc43 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -137,6 +137,7 @@ config SANDBOX config SH bool "SuperH architecture" select HAVE_PRIVATE_LIBGCC + select SUPPORT_OF_CONTROL config X86 bool "x86 architecture" diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 42d31fdab0..54d03ae622 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -245,14 +245,6 @@ config FSL_LSCH3 config NXP_LSCH3_2 bool -config FSL_MC_ENET - bool "Management Complex network" - depends on ARCH_LS2080A || ARCH_LS1088A || ARCH_LX2160A - default y - select RESV_RAM - help - Enable Management Complex (MC) network - menu "Layerscape architecture" depends on FSL_LSCH2 || FSL_LSCH3 @@ -593,15 +585,6 @@ config SYS_FSL_HAS_RGMII bool depends on SYS_FSL_EC1 || SYS_FSL_EC2 - -config SYS_MC_RSV_MEM_ALIGN - hex "Management Complex reserved memory alignment" - depends on RESV_RAM - default 0x20000000 if ARCH_LS2080A || ARCH_LS1088A || ARCH_LX2160A - help - Reserved memory needs to be aligned for MC to use. Default value - is 512MB. - config SPL_LDSCRIPT default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A diff --git a/arch/arm/dts/armada-cp110-master.dtsi b/arch/arm/dts/armada-cp110-master.dtsi index 551d00d774..e4c17e9f4b 100644 --- a/arch/arm/dts/armada-cp110-master.dtsi +++ b/arch/arm/dts/armada-cp110-master.dtsi @@ -96,6 +96,7 @@ #size-cells = <0>; compatible = "marvell,orion-mdio"; reg = <0x12a200 0x10>; + device-name = "cpm-mdio"; }; cpm_syscon0: system-controller@440000 { diff --git a/arch/arm/dts/armada-cp110-slave.dtsi b/arch/arm/dts/armada-cp110-slave.dtsi index 2ea9004f1d..2fbd7b5514 100644 --- a/arch/arm/dts/armada-cp110-slave.dtsi +++ b/arch/arm/dts/armada-cp110-slave.dtsi @@ -96,6 +96,7 @@ #size-cells = <0>; compatible = "marvell,orion-mdio"; reg = <0x12a200 0x10>; + device-name = "cps-mdio"; }; cps_syscon0: system-controller@440000 { diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index 3eb5a9a897..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 @@ -141,4 +202,10 @@ config SYS_SOC config SYS_CONFIG_NAME default "rpi" +config BCM283x_BASE + hex + default "0x20000000" if BCM2835 + default "0x3f000000" if BCM2836 || BCM2837 + default "0xfe000000" if BCM2711 + endmenu diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index e3a893e49c..0b6c2543d5 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -37,18 +37,17 @@ /* 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; 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 @@ -234,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; 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]; 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) { diff --git a/arch/sh/cpu/u-boot.lds b/arch/sh/cpu/u-boot.lds index 7b225a6bd9..47302da252 100644 --- a/arch/sh/cpu/u-boot.lds +++ b/arch/sh/cpu/u-boot.lds @@ -75,6 +75,7 @@ SECTIONS PROVIDE (__init_end = .); PROVIDE (reloc_dst_end = .); + PROVIDE (_end = .); PROVIDE (bss_start = .); PROVIDE (__bss_start = .); diff --git a/arch/sh/dts/Makefile b/arch/sh/dts/Makefile new file mode 100644 index 0000000000..e423bfd566 --- /dev/null +++ b/arch/sh/dts/Makefile @@ -0,0 +1,12 @@ +dtb-y += sh7751-r2dplus.dtb + +targets += $(dtb-y) + +# Add any required device tree compiler flags here +DTC_FLAGS += + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb *_HS diff --git a/arch/sh/dts/sh7751-r2dplus.dts b/arch/sh/dts/sh7751-r2dplus.dts new file mode 100644 index 0000000000..ecaf0772d8 --- /dev/null +++ b/arch/sh/dts/sh7751-r2dplus.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the SH7751 R2Dplus + * + * Copyright (C) 2019 Marek Vasut <marek.vasut@gmail.com> + */ + +/dts-v1/; +/ { + model = "R2D"; + compatible = "renesas,r2d", "renesas,sh7751"; + + pci@fe200000 { + compatible = "renesas,pci-sh7751"; + device_type = "pci"; + reg = <0 0xfe200000 0 0x1000>; + status = "okay"; + + bus-range = <0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges = <0x01000000 0 0xfe240000 0 0xfe240000 0 0x00040000 + 0x02000000 0 0xfd000000 0 0xfd000000 0 0x01000000>; + }; +}; diff --git a/arch/sh/include/asm/config.h b/arch/sh/include/asm/config.h index df38c82abc..e1cd322152 100644 --- a/arch/sh/include/asm/config.h +++ b/arch/sh/include/asm/config.h @@ -8,9 +8,11 @@ #include <asm/processor.h> +#define CONFIG_LMB + /* Timer */ #define CONFIG_SYS_TIMER_COUNTS_DOWN -#define CONFIG_SYS_TIMER_COUNTER (TMU_BASE + 0x8) /* TCNT0 */ +#define CONFIG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */ #define CONFIG_SYS_TIMER_RATE (CONFIG_SYS_CLK_FREQ / 4) #endif diff --git a/arch/sh/lib/start.S b/arch/sh/lib/start.S index f5350b9064..f9f26d3779 100644 --- a/arch/sh/lib/start.S +++ b/arch/sh/lib/start.S @@ -22,6 +22,17 @@ _start: mov.l ._reloc_dst, r4 add #(_start-1b), r5 mov.l ._reloc_dst_end, r6 +#ifdef CONFIG_OF_SEPARATE + mov.l ._reloc_size, r0 + add r5, r0 + add #4, r0 + mov.l @r0, r0 + swap.b r0, r0 + swap.w r0, r0 + swap.b r0, r0 + add #4, r0 + add r0, r6 +#endif 2: mov.l @r5+, r1 mov.l r1, @r4 @@ -29,6 +40,7 @@ _start: cmp/hs r6, r4 bf 2b +#ifndef CONFIG_OF_SEPARATE mov.l ._bss_start, r4 mov.l ._bss_end, r5 mov #0, r1 @@ -37,6 +49,7 @@ _start: add #4, r4 cmp/hs r5, r4 bf 3b +#endif mov.l ._gd_init, r13 /* global data */ mov.l ._stack_init, r15 /* stack */ @@ -53,6 +66,7 @@ loop: ._lowlevel_init: .long (lowlevel_init - (100b + 4)) ._reloc_dst: .long _start ._reloc_dst_end: .long reloc_dst_end +._reloc_size: .long (_end - _start) ._bss_start: .long bss_start ._bss_end: .long bss_end ._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE) |