From b8e8fdff29b100cd1c9b93ead8a482b87ff2730a Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 25 Jun 2019 10:06:05 +0200 Subject: ARM: dts: stm32: Add u-boot, dm-pre-reloc for usart1_pins_a for stm32f769-disco This allow to get console output in SPL for stm32f769-disco. Signed-off-by: Patrice Chotard --- arch/arm/dts/stm32f769-disco-u-boot.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/dts/stm32f769-disco-u-boot.dtsi b/arch/arm/dts/stm32f769-disco-u-boot.dtsi index 53a645dace..209a82c9cf 100644 --- a/arch/arm/dts/stm32f769-disco-u-boot.dtsi +++ b/arch/arm/dts/stm32f769-disco-u-boot.dtsi @@ -152,6 +152,16 @@ slew-rate = <2>; }; }; + + usart1_pins_a: usart1@0 { + u-boot,dm-pre-reloc; + pins1 { + u-boot,dm-pre-reloc; + }; + pins2 { + u-boot,dm-pre-reloc; + }; + }; }; &qspi { -- cgit v1.2.3 From 1d3d87b41aa1bf2e4d048d457eaa31fb8a0c1adb Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 25 Jun 2019 10:06:06 +0200 Subject: ARM: dts: stm32: Remove useless u-boot, dm-pre-reloc in stm32f746-disco-u-boot.dtsi As in stm32f7-u-boot.dtsi these nodes already have "u-bootdm-pre-reloc" property, no need to add them again in stm32f746-disco-u-boot.dtsi. Signed-off-by: Patrice Chotard --- arch/arm/dts/stm32f746-disco-u-boot.dtsi | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/dts/stm32f746-disco-u-boot.dtsi b/arch/arm/dts/stm32f746-disco-u-boot.dtsi index ade7285786..d8f9d8dc5f 100644 --- a/arch/arm/dts/stm32f746-disco-u-boot.dtsi +++ b/arch/arm/dts/stm32f746-disco-u-boot.dtsi @@ -78,10 +78,6 @@ }; }; -&clk_hse { - u-boot,dm-pre-reloc; -}; - &fmc { /* Memory configuration from sdram datasheet MT48LC_4M32_B2B5-6A */ bank1: bank@0 { @@ -123,9 +119,7 @@ }; fmc_pins: fmc@0 { - u-boot,dm-pre-reloc; pins { - u-boot,dm-pre-reloc; pinmux = , /* D15 */ , /* D14 */ , /* D13 */ -- cgit v1.2.3 From 36cb793b35333e9a281445313de6db1ca4a6ab3a Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 25 Jun 2019 13:24:03 +0200 Subject: mach-stm32: Fix MPU region size dedicated to SDRAM for STM32F4 The MPU region dedicated for SDRAM for STM32F4 SoCs family was set to 16MB, but STM32F429 Evaluation board have 32MB of SDRAM. When kernel starts, only first 16MB of SDRAM are configured with XN (eXecute Never) bit disabled, whereas kernel is using 32MB. To avoid such situation in the future, extend this MPU region to 512MB as for STM32F7/H7. It fixes the following user land exception on STM32F429 Evaluation board : [ 1.713002] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 1.722605] devtmpfs: mounted [ 1.733057] Freeing unused kernel memory: 72K [ 1.737622] This architecture does not have kernel memory protection. [ 1.744070] Run /sbin/init as init process [ 1.906850] [ 1.906850] Unhandled exception: IPSR = 00000004 LR = fffffffd [ 1.914282] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6 [ 1.921433] Hardware name: STM32 (Device Tree Support) [ 1.926601] PC is at 0x1a00b64 [ 1.929642] LR is at (null) [ 1.932669] pc : [<01a00b64>] lr : [<00000000>] psr: 01000000 [ 1.938993] sp : 01a5cfb0 ip : 00000000 fp : 00000000 [ 1.944269] r10: 01a43b00 r9 : 00000000 r8 : 00000000 [ 1.949564] r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 00000000 [ 1.956168] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 [ 1.962701] xPSR: 01000000 [ 1.965506] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6 [ 1.972658] Hardware name: STM32 (Device Tree Support) [ 1.978132] [<0000c009>] (unwind_backtrace) from [<0000b24f>] (show_stack+0xb/0xc) [ 1.986024] [<0000b24f>] (show_stack) from [<0000b947>] (__invalid_entry+0x4b/0x4c) Signed-off-by: Patrice Chotard --- arch/arm/mach-stm32/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-stm32/soc.c b/arch/arm/mach-stm32/soc.c index 6ae31d3a1f..41338a1a33 100644 --- a/arch/arm/mach-stm32/soc.c +++ b/arch/arm/mach-stm32/soc.c @@ -18,7 +18,7 @@ int arch_cpu_init(void) */ #if defined(CONFIG_STM32F4) { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, - O_I_WB_RD_WR_ALLOC, REGION_16MB }, + O_I_WB_RD_WR_ALLOC, REGION_512MB }, #endif { 0x90000000, REGION_1, XN_DIS, PRIV_RW_USR_RW, -- cgit v1.2.3