Get socfpga gen5 SPL working again.
Subsystems (3)
v3 cover Get socfpga gen5 SPL working again.
Socfpga gen5 SPL has been broken since moving to DM serial with v2018.07. Also, U-Boot console output has been broken since then. This series fixes this and makes some related small improvements.
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" from socfpga.dtsi to board specific dts files since this can change per board
- added patches 5-7 to boot SPL and U-Boot from fpga OnChip RAM
- dropped Patch 5/6 "serial: ns16550: fix debug uart putc called before init" (this needs a more generic fix)
Changes in v2:
- Improved comment on patch 1
- Removing gd->malloc_base assignment at the end of board_init_f() moved to an extra patch
- don't change printf() to debug() in reset_manager_gen5.c socfpga_bridges_reset() (instead make debug uart handle this)
- make ns16550 debug uart handle putc being called before init
- removed the assignment of gd->malloc_limit from board_init()
Simon Goldschmidt (8):
arm: socfpga: fix SPL on gen5 after moving to DM serial
arm: socfpga: fix device trees to work with DM serial
arm: socfpga: spl_gen5: clean up malloc_base assignment
arm: socfpga: cyclone5: handle debug uart
arm: socfpga: fix U-Boot running from fpga OnChip RAM
arm: socfpga: gen5: combine some init code for SPL and U-Boot
arm: socfpga: fix SPL booting from fpga OnChip RAM
malloc_simple: calloc: don't call memset if malloc failed
arch/arm/dts/socfpga_arria5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts | 5 ++ .../arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de10_nano.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de1_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_is1.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sockit.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socrates.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sr1500.dts | 2 + arch/arm/dts/socfpga_cyclone5_vining_fpga.dts | 5 ++ arch/arm/mach-socfpga/Kconfig | 12 +++++ arch/arm/mach-socfpga/include/mach/misc.h | 4 ++ arch/arm/mach-socfpga/misc_gen5.c | 40 +++++++++------ arch/arm/mach-socfpga/spl_gen5.c | 49 ++++++------------- common/malloc_simple.c | 3 +- include/configs/socfpga_common.h | 13 +++++ 17 files changed, 125 insertions(+), 48 deletions(-)
Signature · 1 line
2.17.1
PATCH v3 1/8 arm: socfpga: fix SPL on gen5 after moving to DM serial
There were NULL pointers dereferenced because DM was used
too early without correct initialization:
- malloc_simple returned NULL when called from preloader_console_init() because gd->malloc_limit was 0
- uclass_add dereferenced gd->uclass_root members which were NULL because dm_init (or one of its relatives) has not been called.
All this is fixed by calling spl_early_init before calling preloader_console_init.
This fixes commit 73172753f4f3 ("ARM: socfpga: Convert to DM serial")
---
Changes in v3: None
Changes in v2:
- Don't remove gd->malloc_base assignment at the end of board_init_f() (moved to an extra patch)
arch/arm/mach-socfpga/spl_gen5.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/mach-socfpga/spl_gen5.c +7 -0
@@ -86,6 +86,7 @@ void board_init_f(ulong dummy)const struct cm_config *cm_default_cfg =cm_get_default_config ();unsigned long sdram_size;unsigned long reg; +int ret;/* * First C code to run. Clear fake OCRAM ECC first as SBE
@@ -152,6 +153,12 @@ void board_init_f(ulong dummy)/* unfreeze / thaw all IO banks */ sys_mgr_frzctrl_thaw_req (); + ret =spl_early_init (); +if (ret) { +debug ("spl_early_init() failed: %d\n" , ret); +hang (); + } +/* enable console uart printing */ preloader_console_init ();
Signature · 1 line
2.17.1
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
In reply to Simon GoldschmidtDevice trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
---
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" from socfpga.dtsi to board specific dts files since this can change per board
Changes in v2: None
arch/arm/dts/socfpga_arria5_socdk.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_de10_nano.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_de1_soc.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_is1.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_socdk.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_sockit.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_socrates.dts | 5 +++++ arch/arm/dts/socfpga_cyclone5_sr1500.dts | 2 ++ arch/arm/dts/socfpga_cyclone5_vining_fpga.dts | 5 +++++ 11 files changed, 52 insertions(+)
arch/arm/dts/socfpga_arria5_socdk.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; memory {
@@ -99,3 +100,7 @@ cdns,tslch-ns = <4>; }; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -56,3 +57,7 @@ disable-over-current; status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -75,3 +76,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_de10_nano.dts +5 -0
@@ -13,6 +13,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -65,3 +66,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_de1_soc.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -63,3 +64,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_is1.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; memory {
@@ -102,3 +103,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_socdk.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; memory {
@@ -113,3 +114,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_sockit.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -93,3 +94,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_socrates.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -84,3 +85,7 @@ disable-over-current; status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
arch/arm/dts/socfpga_cyclone5_sr1500.dts +2 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -67,6 +68,7 @@ &uart0 { status = "okay"; + u-boot,dm-pre-reloc; }; &usb1 {
arch/arm/dts/socfpga_cyclone5_vining_fpga.dts +5 -0
@@ -11,6 +11,7 @@ chosen { bootargs = "console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; }; aliases {
@@ -108,3 +109,7 @@ &usb1 { status = "okay"; }; + +&uart0 { + u-boot,dm-pre-reloc; +};
Signature · 1 line
2.17.1
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 10 lines · Simon Goldschmidt
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per board
Why are these not in socfpga-u-boot.dtsi ? We have the mechanism to grab CONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsi automatically so that we don't have to modify the files we sync in from upstream.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/6a1ecea5/attachment.sig>
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 10 lines · Tom Rini
Quoted 7 lines · Simon Goldschmidt
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync in from upstream.
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on these boards.
Simon
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 20 lines · Simon Goldschmidt
Quoted 10 lines · Tom Rini
Quoted 7 lines · Simon Goldschmidt
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync in from upstream.
Quoted 5 lines
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on these boards.
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 {
u-boot,dm-pre-reloc;
};once to arch/arm/dts/socfpga-u-boot.dtsi rather than for every board.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/6f8bde14/attachment.sig>
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 27 lines · Tom Rini
Quoted 20 lines · Simon Goldschmidt
Quoted 10 lines · Tom Rini
Quoted 7 lines · Simon Goldschmidt
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync in from upstream.Quoted 5 lines
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on these boards.
Quoted 8 lines
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };once to
arch/arm/dts/socfpga-u-boot.dtsirather than for every board.
Pulling the U-Boot specific crap would be most welcome, but it could be a separate patch.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 35 lines · Marek Vasut
Quoted 34 lines · Tom Rini
Quoted 20 lines · Simon Goldschmidt
Quoted 10 lines · Tom Rini
Quoted 7 lines · Simon Goldschmidt
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync in from upstream.Quoted 5 lines
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on these boards.
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };
Quoted 4 lines
Quoted 1 line
once to
arch/arm/dts/socfpga-u-boot.dtsirather than for every board.Pulling the U-Boot specific crap would be most welcome, but it could be a separate patch.
So you want to add stuff now and pull it out later? That seems counter intuitive, but sure, you're the custodian here. When do you plan to do the clean-up, for v2018.11?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/2e3a6869/attachment.sig>
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Tom Rini <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:33:
Quoted 38 lines · Marek Vasut
Quoted 13 lines · Tom Rini
Quoted 12 lines · Simon Goldschmidt
Quoted 11 lines · Tom Rini
Quoted 10 lines · Simon Goldschmidt
Quoted 8 lines
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync infrom
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
upstream.
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on
these boards.
Quoted 8 lines
Quoted 8 lines
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
once to
arch/arm/dts/socfpga-u-boot.dtsirather than for every board.Pulling the U-Boot specific crap would be most welcome, but it could be a separate patch.
So you want to add stuff now and pull it out later? That seems counter intuitive, but sure, you're the custodian here. When do you plan to do the clean-up, for v2018.11?
Can we do this in one step with syncing up to the latest Linux device trees?
Simon
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 45 lines · Simon Goldschmidt
Tom Rini <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:33:
Quoted 43 lines · Marek Vasut
Quoted 13 lines · Tom Rini
Quoted 12 lines · Simon Goldschmidt
Quoted 11 lines · Tom Rini
Quoted 10 lines · Simon Goldschmidt
Quoted 8 lines
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync infrom
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
upstream.
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on
these boards.
Quoted 12 lines
Quoted 9 lines
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };once to
arch/arm/dts/socfpga-u-boot.dtsirather than for every board.Pulling the U-Boot specific crap would be most welcome, but it could be a separate patch.
Quoted 6 lines
Quoted 4 lines
So you want to add stuff now and pull it out later? That seems counter intuitive, but sure, you're the custodian here. When do you plan to do the clean-up, for v2018.11?
Can we do this in one step with syncing up to the latest Linux device trees?
I honestly don't understand the hesitation to not introduce more change than is required now. But, I will defer. I do want to know when people plan to fix this however, as that feels like a reasonable compromise to me.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/5d1889bf/attachment.sig>
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
Quoted 51 lines · Tom Rini
Quoted 50 lines · Simon Goldschmidt
Tom Rini <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:33:
Quoted 47 lines · Marek Vasut
Quoted 13 lines · Tom Rini
Quoted 12 lines · Simon Goldschmidt
Quoted 11 lines · Tom Rini
Quoted 10 lines · Simon Goldschmidt
Quoted 8 lines
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <[email protected]>---
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per boardWhy are these not in
socfpga-u-boot.dtsi? We have the mechanism to grabCONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we sync infrom
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
upstream.
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might make sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on
these boards.
Quoted 8 lines
Quoted 8 lines
Well, I think given that you're adding these changes right now, they should be added to the correct file so that they aren't lost on re-sync later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };Quoted 4 lines
Quoted 1 line
once to
arch/arm/dts/socfpga-u-boot.dtsirather than for every board.Pulling the U-Boot specific crap would be most welcome, but it could be a separate patch.
So you want to add stuff now and pull it out later? That seems counter intuitive, but sure, you're the custodian here. When do you plan to do the clean-up, for v2018.11?
Quoted 6 lines
Quoted 1 line
Can we do this in one step with syncing up to the latest Linux device trees?
I honestly don't understand the hesitation to not introduce more change than is required now. But, I will defer. I do want to know when people plan to fix this however, as that feels like a reasonable compromise to me.
I presume Simon will stick around, so I'm happy to cut him some slack ...
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 2/8 arm: socfpga: fix device trees to work with DM serial
In reply to Tom RiniTom Rini <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:41:
Quoted 62 lines · Simon Goldschmidt
Quoted 6 lines
Tom Rini <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:33:
Quoted 4 lines · Marek Vasut
Quoted 3 lines · Tom Rini
Quoted 2 lines · Simon Goldschmidt
Quoted 1 line
On Mon, Aug 13, 2018 at 3:17 PM Tom Rini <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On Mon, Aug 13, 2018 at 09:33:45AM +0200, Simon Goldschmidt
Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Device trees need to have the serial console device available before relocation and require a stdout-path in chosen at least for SPL to have a console.
Signed-off-by Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
---
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsitoboard
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
specific dts files since this can change per board
Why are these not in
socfpga-u-boot.dtsi? We have themechanism to
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
grab
CONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR-u-boot.dtsiautomatically so that we don't have to modify the files we syncin
Quoted 5 lines
Quoted 5 lines
from
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
upstream.
Ehrm, I don't know, really. The DTS files for socfpga already have many U-Boot specifics and are quite different to Linux. It might
make
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
sense to sync them, but do we really have to do this for 2018.09?
Keep in mind that this series exists to fix that 2018.07 broke on
these boards.
Quoted 2 lines
Quoted 2 lines
Well, I think given that you're adding these changes right now,
they
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
should be added to the correct file so that they aren't lost on
re-sync
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
later. It would be adding:
&uart0 { u-boot,dm-pre-reloc; };once to
arch/arm/dts/socfpga-u-boot.dtsirather than for everyboard.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Pulling the U-Boot specific crap would be most welcome, but it could
be
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
a separate patch.
So you want to add stuff now and pull it out later? That seems counter intuitive, but sure, you're the custodian here. When do you plan to do the clean-up, for v2018.11?
Quoted 8 lines
Quoted 1 line
Can we do this in one step with syncing up to the latest Linux device
trees?
I honestly don't understand the hesitation to not introduce more change than is required now. But, I will defer. I do want to know when people plan to fix this however, as that feels like a reasonable compromise to me.
It's holiday season here so I can't say I'll be available all the time until the 2018.09 release. That's why I don't want to do changes I can't thoroughly test right now.
I might try the sync in September. It should not be too much work, but I can only test one of the boards (the SoCrates).
Simom
PATCH v3 3/8 arm: socfpga: spl_gen5: clean up malloc_base assignment
In reply to Simon GoldschmidtFrom: Simon Goldschmidt <[email protected]>
In spl_gen5's board_init_f(), gd->malloc_base is manually assigned at the end of the function to point to sdram. This code is outdated as by now, the heap is switched to sdram by the common function spl_relocate_stack_gd() if the appropriate defines are set.
As it was, the value assigned manually was directly overwritten by this common code, so remove the manual assignment.
---
Changes in v3: None
Changes in v2:
- this patch is new in v2 of the series (extracted from PATCH v1 1/6)
arch/arm/mach-socfpga/spl_gen5.c | 3 --- 1 file changed, 3 deletions(-)
arch/arm/mach-socfpga/spl_gen5.c +0 -3
@@ -184,7 +184,4 @@ void board_init_f(ulong dummy) }socfpga_bridges_reset (1 ); - -/* Configure simple malloc base pointer into RAM. */ - gd->malloc_base =CONFIG_SYS_TEXT_BASE + (1024 *1024 ); }
Signature · 1 line
2.17.1
PATCH v3 4/8 arm: socfpga: cyclone5: handle debug uart
In reply to Simon GoldschmidtIf CONFIG_DEBUG_UART is enabled, correctly initialize the debug uart before console is initialized to debug early boot problems in SPL.
---
Changes in v3: None
Changes in v2:
- don't change printf() to debug() in reset_manager_gen5.c socfpga_bridges_reset()
arch/arm/mach-socfpga/spl_gen5.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-socfpga/spl_gen5.c +6 -0
@@ -20,6 +20,7 @@#include <asm/arch/scu.h> #include <asm/arch/nic301.h> #include <asm/sections.h> +#include <debug_uart.h> #include <fdtdec.h> #include <watchdog.h>
@@ -153,6 +154,11 @@ void board_init_f(ulong dummy)/* unfreeze / thaw all IO banks */ sys_mgr_frzctrl_thaw_req (); +#ifdef CONFIG_DEBUG_UART +socfpga_per_reset (SOCFPGA_RESET (UART0 ),0 ); +debug_uart_init (); +#endif + ret =spl_early_init ();if (ret) {debug ("spl_early_init() failed: %d\n" , ret);
Signature · 1 line
2.17.1
PATCH v3 5/8 arm: socfpga: fix U-Boot running from fpga OnChip RAM
In reply to Simon Goldschmidtgd->env_addr points to pre-relocation address even after relocation. This leads to an abort in env_callback_init when loading the environment.
Fix this by enabling CONFIG_SYS_EXTRA_ENV_RELOC.
---
Changes in v3: this patch is new in v3
Changes in v2: None
include/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/configs/socfpga_common.h +8 -0
@@ -284,6 +284,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into +* FPGA OnChip RAM after relocation +*/ +#define CONFIG_SYS_EXTRA_ENV_RELOC +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE/* start of monitor */ +#endif +/* Extra Environment */ #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.17.1
PATCH v3 5/8 arm: socfpga: fix U-Boot running from fpga OnChip RAM
Quoted 5 lines · Simon Goldschmidt
gd->env_addrpoints to pre-relocation address even after relocation. This leads to an abort inenv_callback_initwhen loading the environment.Fix this by enabling
CONFIG_SYS_EXTRA_ENV_RELOC.
Doesn't this apply to gen10 too ?
Quoted 29 lines
Signed-off-by Simon Goldschmidt <[email protected]>---
Changes in v3: this patch is new in v3
Changes in v2: Noneinclude/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)include/configs/socfpga_common.h +8
-0@@ -284,6 +284,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into +* FPGA OnChip RAM after relocation +*/ +#define CONFIG_SYS_EXTRA_ENV_RELOC +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE/* start of monitor */ +#endif +/* Extra Environment */ #ifndef CONFIG_SPL_BUILD
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 5/8 arm: socfpga: fix U-Boot running from fpga OnChip RAM
Marek Vasut <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:29:
Quoted 9 lines · Simon Goldschmidt
Quoted 5 lines
gd->env_addrpoints to pre-relocation address even after relocation. This leads to an abort inenv_callback_initwhen loading the environment.Fix this by enabling
CONFIG_SYS_EXTRA_ENV_RELOC.Doesn't this apply to gen10 too ?
Ehrm, I really don't know. As I don't know gen10, I didn't want to break it.
I could try to check the sources, but without knowing the architecture details and having a board to test, I might break things...
Quoted 37 lines
Review
Quoted 10 lines
Signed-off-by Simon Goldschmidt <[email protected]>---
Changes in v3: this patch is new in v3
Changes in v2: Noneinclude/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)(quoted diff) +0
-0
b/include/configs/socfpga_common.hinclude/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 292
Quoted 13 lines
index
8ebf6b85fe..2fb207c86a100644include/configs/socfpga_common.h +6
-0@@ -284,6 +284,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into +* FPGA OnChip RAM after relocation +*/ +#define CONFIG_SYS_EXTRA_ENV_RELOC +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE/* start of monitor */
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 297
Quoted 6 lines
include/configs/socfpga_common.h +2
-0+#endif +/* Extra Environment */ #ifndef CONFIG_SPL_BUILD --
Best regards,
Marek Vasut
PATCH v3 5/8 arm: socfpga: fix U-Boot running from fpga OnChip RAM
Quoted 12 lines · Simon Goldschmidt
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 13. Aug. 2018, 15:29:
On 08/13/2018 09:33 AM, Simon Goldschmidt wrote:
>gd->env_addrpoints to pre-relocation address even after > relocation. This leads to an abort inenv_callback_init> when loading the environment.
>
> Fix this by enablingCONFIG_SYS_EXTRA_ENV_RELOC.
Quoted 7 lines
Doesn't this apply to gen10 too ?
Ehrm, I really don't know. As I don't know gen10, I didn't want to break it.
I could try to check the sources, but without knowing the architecture details and having a board to test, I might break things...
I'll probably be able to intercept that breakage, so just send a V4 with that ifdef removed.
Quoted 39 lines
Quoted 1 line
Signed-off-by Simon Goldschmidt <[email protected]<mailto:[email protected]>> > --- > > Changes in v3: this patch is new in v3 > Changes in v2: None > > include/configs/socfpga_common.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h > index 8ebf6b85fe..2fb207c86a 100644 > --- a/include/configs/socfpga_common.h > +++ b/include/configs/socfpga_common.h > @@ -284,6 +284,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void); > #define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START > #endif > > +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 > +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into > + * FPGA OnChip RAM after relocation > + */ > +#define CONFIG_SYS_EXTRA_ENV_RELOC > +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ > +#endif > + > /* Extra Environment */ > #ifndef CONFIG_SPL_BUILD > > -- Best regards, Marek Vasut
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 6/8 arm: socfpga: gen5: combine some init code for SPL and U-Boot
In reply to Simon GoldschmidtSome of the code for low level system initialization in SPL's board_init_f() and U-Boot's arch_early_init_r() is the same, so let's combine it into a single function called from both.
---
Changes in v3: this patch is new in v3
Changes in v2: None
arch/arm/mach-socfpga/include/mach/misc.h | 4 +++ arch/arm/mach-socfpga/misc_gen5.c | 33 +++++++++++++---------- arch/arm/mach-socfpga/spl_gen5.c | 30 +-------------------- 3 files changed, 24 insertions(+), 43 deletions(-)
arch/arm/mach-socfpga/include/mach/misc.h +4 -0
@@ -27,6 +27,10 @@ unsigned int shared_uart_com_port(const void *blob);unsigned int uart_com_port (const void *blob);#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +void socfpga_init_bus_mapping (void ); +#endif +void do_bridge_reset (int enable);#endif /* _MISC_H_ */
arch/arm/mach-socfpga/misc_gen5.c +19 -14
@@ -175,6 +175,24 @@ static void socfpga_nic301_slave_ns(void)writel (0x1 , &nic301_regs->sdrdata); } +void socfpga_init_bus_mapping (void ) +{ +socfpga_bridges_reset (1 ); + +socfpga_nic301_slave_ns (); + +/* +* Private components security: +* U-Boot : configure private timer, global timer and cpu component +* access as non secure for kernel stage (as required by Linux) +*/ +setbits_le32 (&scu_regs->sacr,0xfff ); + +/* Configure the L2 controller to make SDRAM start at 0 */ +writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ +writel (0x1 , &pl310->pl310_addr_filter_start); +} +static u32 iswgrp_handoff[8 ];int arch_early_init_r (void )
@@ -193,20 +211,7 @@ int arch_early_init_r(void)for (i =0 ; i <8 ; i++)/* Cache initial SW setting regs */ iswgrp_handoff[i] =readl (&sysmgr_regs->iswgrp_handoff[i]); -socfpga_bridges_reset (1 ); - -socfpga_nic301_slave_ns (); - -/* -* Private components security: -* U-Boot : configure private timer, global timer and cpu component -* access as non secure for kernel stage (as required by Linux) -*/ -setbits_le32 (&scu_regs->sacr,0xfff ); - -/* Configure the L2 controller to make SDRAM start at 0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ -writel (0x1 , &pl310->pl310_addr_filter_start); +socfpga_init_bus_mapping ();/* Add device descriptor to FPGA device table */ socfpga_fpga_add ();
arch/arm/mach-socfpga/spl_gen5.c +1 -29
@@ -5,7 +5,6 @@#include <common.h> #include <asm/io.h> -#include <asm/pl310.h> #include <asm/u-boot.h> #include <asm/utils.h> #include <image.h>
@@ -17,8 +16,6 @@#include <asm/arch/misc.h> #include <asm/arch/scan_manager.h> #include <asm/arch/sdram.h> -#include <asm/arch/scu.h> -#include <asm/arch/nic301.h> #include <asm/sections.h> #include <debug_uart.h> #include <fdtdec.h>
@@ -26,12 +23,6 @@DECLARE_GLOBAL_DATA_PTR ; -static struct pl310_regs *const pl310 = - (struct pl310_regs *)CONFIG_SYS_PL310_BASE ; -static struct scu_registers *scu_regs = - (struct scu_registers *)SOCFPGA_MPUSCU_ADDRESS ; -static struct nic301_registers *nic301_regs = - (struct nic301_registers *)SOCFPGA_L3REGS_ADDRESS ;static const struct socfpga_system_manager *sysmgr_regs = (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS ;
@@ -72,16 +63,6 @@ u32 spl_boot_mode(const u32 boot_device) }#endif -static void socfpga_nic301_slave_ns (void ) -{ -writel (0x1 , &nic301_regs->lwhps2fpgaregs); -writel (0x1 , &nic301_regs->hps2fpgaregs); -writel (0x1 , &nic301_regs->acp); -writel (0x1 , &nic301_regs->rom); -writel (0x1 , &nic301_regs->ocram); -writel (0x1 , &nic301_regs->sdrdata); -} -void board_init_f (ulong dummy) {const struct cm_config *cm_default_cfg =cm_get_default_config ();
@@ -103,14 +84,7 @@ void board_init_f(ulong dummy)memset (__bss_start,0 , __bss_end - __bss_start); -socfpga_nic301_slave_ns (); - -/* Configure ARM MPU SNSAC register. */ -setbits_le32 (&scu_regs->sacr,0xfff ); - -/* Remap SDRAM to 0x0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ -writel (0x1 , &pl310->pl310_addr_filter_start); +socfpga_init_bus_mapping ();debug ("Freezing all I/O banks\n" );/* freeze all IO banks */
@@ -118,8 +92,6 @@ void board_init_f(ulong dummy)/* Put everything into reset but L4WD0. */ socfpga_per_reset_all (); -/* Put FPGA bridges into reset too. */ -socfpga_bridges_reset (1 );socfpga_per_reset (SOCFPGA_RESET (SDR ),0 );socfpga_per_reset (SOCFPGA_RESET (UART0 ),0 );
Signature · 1 line
2.17.1
PATCH v3 6/8 arm: socfpga: gen5: combine some init code for SPL and U-Boot
Quoted 35 lines · Simon Goldschmidt
Some of the code for low level system initialization in SPL's
board_init_f()and U-Boot'sarch_early_init_r()is the same, so let's combine it into a single function called from both.Signed-off-by Simon Goldschmidt <[email protected]>---
Changes in v3: this patch is new in v3
Changes in v2: Nonearch/arm/mach-socfpga/include/mach/misc.h | 4 +++ arch/arm/mach-socfpga/misc_gen5.c | 33 +++++++++++++---------- arch/arm/mach-socfpga/spl_gen5.c | 30 +-------------------- 3 files changed, 24 insertions(+), 43 deletions(-)arch/arm/mach-socfpga/include/mach/misc.h +4
-0@@ -27,6 +27,10 @@ unsigned int shared_uart_com_port(const void *blob);unsigned int uart_com_port (const void *blob);#endif +#ifdef CONFIG_TARGET_SOCFPGA_GEN5 +void socfpga_init_bus_mapping (void ); +#endif +void do_bridge_reset (int enable);#endif /* _MISC_H_ */ arch/arm/mach-socfpga/misc_gen5.c +0
-0
arch/arm/mach-socfpga/misc_gen5.c static void socfpga_nic301_slave_ns(void) · line 178
Quoted 4 lines
arch/arm/mach-socfpga/misc_gen5.c +1
-0@@ -175,6 +175,24 @@ static void socfpga_nic301_slave_ns(void)writel (0x1 , &nic301_regs->sdrdata); } +void socfpga_init_bus_mapping (void )
Should be called something like socfpga_something_remap_something(), since it configures the mapping of the first 1 MiB of RAM . otherwise OK
arch/arm/mach-socfpga/misc_gen5.c static void socfpga_nic301_slave_ns(void) · line 180
Quoted 2 lines
arch/arm/mach-socfpga/misc_gen5.c +2
-0+{ +socfpga_bridges_reset (1 );
Drop this from the function, this has nothing to do with the remap settings.
Quoted 116 lines
arch/arm/mach-socfpga/misc_gen5.c +15
-14+socfpga_nic301_slave_ns (); + +/* +* Private components security: +* U-Boot : configure private timer, global timer and cpu component +* access as non secure for kernel stage (as required by Linux) +*/ +setbits_le32 (&scu_regs->sacr,0xfff ); + +/* Configure the L2 controller to make SDRAM start at 0 */ +writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ +writel (0x1 , &pl310->pl310_addr_filter_start); +} +static u32 iswgrp_handoff[8 ];int arch_early_init_r (void )@@ -193,20 +211,7 @@ int arch_early_init_r(void)for (i =0 ; i <8 ; i++)/* Cache initial SW setting regs */ iswgrp_handoff[i] =readl (&sysmgr_regs->iswgrp_handoff[i]); -socfpga_bridges_reset (1 ); - -socfpga_nic301_slave_ns (); - -/* -* Private components security: -* U-Boot : configure private timer, global timer and cpu component -* access as non secure for kernel stage (as required by Linux) -*/ -setbits_le32 (&scu_regs->sacr,0xfff ); - -/* Configure the L2 controller to make SDRAM start at 0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ -writel (0x1 , &pl310->pl310_addr_filter_start); +socfpga_init_bus_mapping ();/* Add device descriptor to FPGA device table */ socfpga_fpga_add ();arch/arm/mach-socfpga/spl_gen5.c +1
-29@@ -5,7 +5,6 @@#include <common.h> #include <asm/io.h> -#include <asm/pl310.h> #include <asm/u-boot.h> #include <asm/utils.h> #include <image.h> @@ -17,8 +16,6 @@#include <asm/arch/misc.h> #include <asm/arch/scan_manager.h> #include <asm/arch/sdram.h> -#include <asm/arch/scu.h> -#include <asm/arch/nic301.h> #include <asm/sections.h> #include <debug_uart.h> #include <fdtdec.h> @@ -26,12 +23,6 @@DECLARE_GLOBAL_DATA_PTR ; -static struct pl310_regs *const pl310 = - (struct pl310_regs *)CONFIG_SYS_PL310_BASE ; -static struct scu_registers *scu_regs = - (struct scu_registers *)SOCFPGA_MPUSCU_ADDRESS ; -static struct nic301_registers *nic301_regs = - (struct nic301_registers *)SOCFPGA_L3REGS_ADDRESS ;static const struct socfpga_system_manager *sysmgr_regs = (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS ;@@ -72,16 +63,6 @@ u32 spl_boot_mode(const u32 boot_device) }#endif -static void socfpga_nic301_slave_ns (void ) -{ -writel (0x1 , &nic301_regs->lwhps2fpgaregs); -writel (0x1 , &nic301_regs->hps2fpgaregs); -writel (0x1 , &nic301_regs->acp); -writel (0x1 , &nic301_regs->rom); -writel (0x1 , &nic301_regs->ocram); -writel (0x1 , &nic301_regs->sdrdata); -} -void board_init_f (ulong dummy) {const struct cm_config *cm_default_cfg =cm_get_default_config ();@@ -103,14 +84,7 @@ void board_init_f(ulong dummy)memset (__bss_start,0 , __bss_end - __bss_start); -socfpga_nic301_slave_ns (); - -/* Configure ARM MPU SNSAC register. */ -setbits_le32 (&scu_regs->sacr,0xfff ); - -/* Remap SDRAM to 0x0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ -writel (0x1 , &pl310->pl310_addr_filter_start); +socfpga_init_bus_mapping ();debug ("Freezing all I/O banks\n" );/* freeze all IO banks */ @@ -118,8 +92,6 @@ void board_init_f(ulong dummy)/* Put everything into reset but L4WD0. */ socfpga_per_reset_all (); -/* Put FPGA bridges into reset too. */ -socfpga_bridges_reset (1 );socfpga_per_reset (SOCFPGA_RESET (SDR ),0 );socfpga_per_reset (SOCFPGA_RESET (UART0 ),0 );
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 7/8 arm: socfpga: fix SPL booting from fpga OnChip RAM
In reply to Simon GoldschmidtTo boot from fpga OnChip RAM, some changes are required in SPL to ensure the code is linked to the correct address (in contrast to QSPI and MMC boot, FPGA boot executes SPL in place instead of copying it to SRAM) and that fpga OnChip RAM stays accessible while SPL runs (don't disable fpga bridges).
This adds a new config option (CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA) for socfpga gen5 boards.
---
Changes in v3: this patch is new in v3
Changes in v2: None
arch/arm/mach-socfpga/Kconfig | 12 ++++++++++++ arch/arm/mach-socfpga/misc_gen5.c | 11 +++++++++-- arch/arm/mach-socfpga/spl_gen5.c | 3 ++- include/configs/socfpga_common.h | 5 +++++ 4 files changed, 28 insertions(+), 3 deletions(-)
arch/arm/mach-socfpga/Kconfig +12 -0
@@ -132,3 +132,15 @@ config SYS_CONFIG_NAME default "socfpga_vining_fpga" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA endif + +if TARGET_SOCFPGA_GEN5 + +config SPL_SOCFPGA_BOOT_FROM_FPGA + bool "Allow booting SPL from FPGA OnChip RAM" + default n + help + Boot from FPGA: this changes the linker address for SPL code to run + from FPGA OnChip memory instead of SRAM and ensures FPGA OnChip RAM + stays accessible while SPL runs. + +endif
arch/arm/mach-socfpga/misc_gen5.c +9 -2
@@ -177,7 +177,8 @@ static void socfpga_nic301_slave_ns(void)void socfpga_init_bus_mapping (void ) { -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 );socfpga_nic301_slave_ns ();
@@ -189,7 +190,13 @@ void socfpga_init_bus_mapping(void)setbits_le32 (&scu_regs->sacr,0xfff );/* Configure the L2 controller to make SDRAM start at 0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ +if (CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) { +/* remap.mpuzero, keep fpga bridge enabled */ +writel (0x9 , &nic301_regs->remap); + }else { +/* remap.mpuzero */ +writel (0x1 , &nic301_regs->remap); + }writel (0x1 , &pl310->pl310_addr_filter_start); }
arch/arm/mach-socfpga/spl_gen5.c +2 -1
@@ -161,5 +161,6 @@ void board_init_f(ulong dummy)hang (); } -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 ); }
include/configs/socfpga_common.h +5 -0
@@ -239,7 +239,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* 0xFFEz_zzzz ...... Malloc area (grows up to top) * 0xFFE3_FFFF ...... End of SRAM (top) */ +#if CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA +/* SPL executed from FPGA */ +#define CONFIG_SPL_TEXT_BASE 0xC0000000 +#else #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR +#endif #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10 )
Signature · 1 line
2.17.1
PATCH v3 7/8 arm: socfpga: fix SPL booting from fpga OnChip RAM
Quoted 10 lines · Simon Goldschmidt
To boot from fpga OnChip RAM, some changes are required in SPL to ensure the code is linked to the correct address (in contrast to QSPI and MMC boot, FPGA boot executes SPL in place instead of copying it to SRAM) and that fpga OnChip RAM stays accessible while SPL runs (don't disable fpga bridges).
This adds a new config option (
CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA) for socfpga gen5 boards.Signed-off-by Simon Goldschmidt <[email protected]>
I wonder if you can somehow detect that you're booting from FPGA , using BSEL readout maybe, but then I guess you have a problem with the link address ... hrm.
Quoted 16 lines
---
Changes in v3: this patch is new in v3
Changes in v2: Nonearch/arm/mach-socfpga/Kconfig | 12 ++++++++++++ arch/arm/mach-socfpga/misc_gen5.c | 11 +++++++++-- arch/arm/mach-socfpga/spl_gen5.c | 3 ++- include/configs/socfpga_common.h | 5 +++++ 4 files changed, 28 insertions(+), 3 deletions(-)arch/arm/mach-socfpga/Kconfig +0
-0
arch/arm/mach-socfpga/Kconfig config SYS_CONFIG_NAME · line 139
Quoted 8 lines
arch/arm/mach-socfpga/Kconfig +5
-0@@ -132,3 +132,15 @@ config SYS_CONFIG_NAME default "socfpga_vining_fpga" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA endif + +if TARGET_SOCFPGA_GEN5 + +config SPL_SOCFPGA_BOOT_FROM_FPGA + bool "Allow booting SPL from FPGA OnChip RAM"
If you converted SPL_TEXT_BASE to Kconfig , then selecting this could flip it to correct value. Can you do that ?
Quoted 66 lines
arch/arm/mach-socfpga/Kconfig +7
-0+ default n + help + Boot from FPGA: this changes the linker address for SPL code to run + from FPGA OnChip memory instead of SRAM and ensures FPGA OnChip RAM + stays accessible while SPL runs. + +endifarch/arm/mach-socfpga/misc_gen5.c +9
-2@@ -177,7 +177,8 @@ static void socfpga_nic301_slave_ns(void)void socfpga_init_bus_mapping (void ) { -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 );socfpga_nic301_slave_ns ();@@ -189,7 +190,13 @@ void socfpga_init_bus_mapping(void)setbits_le32 (&scu_regs->sacr,0xfff );/* Configure the L2 controller to make SDRAM start at 0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ +if (CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) { +/* remap.mpuzero, keep fpga bridge enabled */ +writel (0x9 , &nic301_regs->remap); + }else { +/* remap.mpuzero */ +writel (0x1 , &nic301_regs->remap); + }writel (0x1 , &pl310->pl310_addr_filter_start); }arch/arm/mach-socfpga/spl_gen5.c +2
-1@@ -161,5 +161,6 @@ void board_init_f(ulong dummy)hang (); } -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 ); }include/configs/socfpga_common.h +5
-0@@ -239,7 +239,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* 0xFFEz_zzzz ...... Malloc area (grows up to top) * 0xFFE3_FFFF ...... End of SRAM (top) */ +#if CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA +/* SPL executed from FPGA */ +#define CONFIG_SPL_TEXT_BASE 0xC0000000 +#else #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR +#endif #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10 )
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 7/8 arm: socfpga: fix SPL booting from fpga OnChip RAM
Marek Vasut <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:29:
Quoted 7 lines · Simon Goldschmidt
Quoted 6 lines
To boot from fpga OnChip RAM, some changes are required in SPL to ensure the code is linked to the correct address (in contrast to QSPI and MMC boot, FPGA boot executes SPL in place instead of copying it to SRAM) and that fpga OnChip RAM stays accessible while SPL runs (don't disable fpga bridges).
Quoted 9 lines
Quoted 4 lines
This adds a new config option (
CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA) for socfpga gen5 boards.Signed-off-by Simon Goldschmidt <[email protected]>I wonder if you can somehow detect that you're booting from FPGA , using BSEL readout maybe, but then I guess you have a problem with the link address ... hrm.
I was trying that, but we need to fix the linker address anyway, so...
Quoted 19 lines
Quoted 5 lines
---
Changes in v3: this patch is new in v3
Changes in v2: NoneReview
Quoted 7 lines
arch/arm/mach-socfpga/Kconfig | 12 ++++++++++++ arch/arm/mach-socfpga/misc_gen5.c | 11 +++++++++-- arch/arm/mach-socfpga/spl_gen5.c | 3 ++- include/configs/socfpga_common.h | 5 +++++ 4 files changed, 28 insertions(+), 3 deletions(-)(quoted diff) +0
-0b/arch/arm/mach-socfpga/Kconfig
Quoted 6 lines
index
5c1df2cf1f..a909395aac100644arch/arm/mach-socfpga/Kconfig +0
-0@@ -132,3 +132,15 @@ config SYS_CONFIG_NAME default "socfpga_vining_fpga" if TARGET_SOCFPGA_SAMTEC_VINING_FPGA
Quoted 10 lines
arch/arm/mach-socfpga/Kconfig config SYS_CONFIG_NAME · line 139
Quoted 6 lines
arch/arm/mach-socfpga/Kconfig +5
-0endif + +if TARGET_SOCFPGA_GEN5 + +config SPL_SOCFPGA_BOOT_FROM_FPGA + bool "Allow booting SPL from FPGA OnChip RAM"If you converted
SPL_TEXT_BASEtoKconfig, then selecting this could flip it to correct value. Can you do that ?
Sure, I'll try that.
Quoted 77 lines
arch/arm/mach-socfpga/Kconfig config SYS_CONFIG_NAME
Quoted 3 lines
arch/arm/mach-socfpga/Kconfig +3
-0+ default n + help + Boot from FPGA: this changes the linker address for SPL code torun
arch/arm/mach-socfpga/Kconfig config SYS_CONFIG_NAME · line 143
Quoted 1 line
arch/arm/mach-socfpga/Kconfig +1
-0+ from FPGA OnChip memory instead of SRAM and ensures FPGA OnChipRAM
Review
Quoted 4 lines
arch/arm/mach-socfpga/Kconfig +3
-0+ stays accessible while SPL runs. + +endif(quoted diff) +0
-0
b/arch/arm/mach-socfpga/misc_gen5.cReview
Quoted 29 lines
index
32af1a9084..00df16d0b1100644arch/arm/mach-socfpga/misc_gen5.c +9
-2@@ -177,7 +177,8 @@ static void socfpga_nic301_slave_ns(void)void socfpga_init_bus_mapping (void ) { -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 );socfpga_nic301_slave_ns ();@@ -189,7 +190,13 @@ void socfpga_init_bus_mapping(void)setbits_le32 (&scu_regs->sacr,0xfff );/* Configure the L2 controller to make SDRAM start at 0 */ -writel (0x1 , &nic301_regs->remap);/* remap.mpuzero */ +if (CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) { +/* remap.mpuzero, keep fpga bridge enabled */ +writel (0x9 , &nic301_regs->remap); + }else { +/* remap.mpuzero */ +writel (0x1 , &nic301_regs->remap); + }writel (0x1 , &pl310->pl310_addr_filter_start); }(quoted diff) +0
-0
b/arch/arm/mach-socfpga/spl_gen5.cReview
Quoted 12 lines
index
631905fbee..1a16c46915100644arch/arm/mach-socfpga/spl_gen5.c +2
-1@@ -161,5 +161,6 @@ void board_init_f(ulong dummy)hang (); } -socfpga_bridges_reset (1 ); +if (!CONFIG_IS_ENABLED (SOCFPGA_BOOT_FROM_FPGA )) +socfpga_bridges_reset (1 ); }(quoted diff) +0
-0
b/include/configs/socfpga_common.hQuoted 7 lines
index
2fb207c86a..3cdde0f926100644include/configs/socfpga_common.h +0
-0@@ -239,7 +239,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* 0xFFEz_zzzz ...... Malloc area (grows up to top) * 0xFFE3_FFFF ...... End of SRAM (top) include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 250
Quoted 10 lines
include/configs/socfpga_common.h +5
-0*/ +#if CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA +/* SPL executed from FPGA */ +#define CONFIG_SPL_TEXT_BASE 0xC0000000 +#else #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR +#endif #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10 )--
Best regards,
Marek Vasut
PATCH v3 7/8 arm: socfpga: fix SPL booting from fpga OnChip RAM
Quoted 18 lines · Simon Goldschmidt
Marek Vasut <marex at denx.de <mailto:[email protected]>> schrieb am Mo., 13. Aug. 2018, 15:29:
On 08/13/2018 09:33 AM, Simon Goldschmidt wrote:
> To boot from fpga OnChip RAM, some changes are required in SPL > to ensure the code is linked to the correct address (in contrast > to QSPI and MMC boot, FPGA boot executes SPL in place instead of > copying it to SRAM) and that fpga OnChip RAM stays accessible while > SPL runs (don't disable fpga bridges).
>
> This adds a new config option (CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA) > for socfpga gen5 boards.
>
> Signed-off-by: Simon Goldschmidt <[email protected] <mailto:[email protected]>>
Quoted 6 lines
I wonder if you can somehow detect that you're booting from FPGA , using BSEL readout maybe, but then I guess you have a problem with the link address ... hrm.
I was trying that, but we need to fix the linker address anyway, so...
Right
Quoted 27 lines
Quoted 5 lines
---
Changes in v3: this patch is new in v3
Changes in v2: NoneReview
Quoted 7 lines
arch/arm/mach-socfpga/Kconfig | 12 ++++++++++++
arch/arm/mach-socfpga/misc_gen5.c| 11 +++++++++-- arch/arm/mach-socfpga/spl_gen5.c | 3 ++- include/configs/socfpga_common.h | 5 +++++4 files changed, 28 insertions(+), 3 deletions(-)(quoted diff) +0
-0b/arch/arm/mach-socfpga/Kconfig
> index5c1df2cf1f..a909395aac100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -132,3 +132,15 @@ configSYS_CONFIG_NAME> default "socfpga_vining_fpga" ifTARGET_SOCFPGA_SAMTEC_VINING_FPGA
>
> endif
> +
> +ifTARGET_SOCFPGA_GEN5
> +
> +configSPL_SOCFPGA_BOOT_FROM_FPGA
> + bool "Allow booting SPL from FPGA OnChip RAM"
Quoted 5 lines
If you converted
SPL_TEXT_BASEtoKconfig, then selecting this could flip it to correct value. Can you do that ?Sure, I'll try that.
Look at tools/moveconfig.py
Quoted 77 lines
Quoted 3 lines
+ default n
+ help
+ Boot from FPGA: this changes the linker address for SPLcode to run > + from FPGA OnChip memory instead of SRAM and ensures FPGA OnChip RAM > + stays accessible while SPL runs. > + > +endif > diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c > index 32af1a9084..00df16d0b1 100644 > --- a/arch/arm/mach-socfpga/misc_gen5.c > +++ b/arch/arm/mach-socfpga/misc_gen5.c > @@ -177,7 +177,8 @@ static void socfpga_nic301_slave_ns(void) > > void socfpga_init_bus_mapping(void) > { > - socfpga_bridges_reset(1); > + if (!CONFIG_IS_ENABLED(SOCFPGA_BOOT_FROM_FPGA)) > + socfpga_bridges_reset(1); > > socfpga_nic301_slave_ns(); > > @@ -189,7 +190,13 @@ void socfpga_init_bus_mapping(void) > setbits_le32(&scu_regs->sacr, 0xfff); > > /* Configure the L2 controller to make SDRAM start at 0 */ > - writel(0x1, &nic301_regs->remap); /* remap.mpuzero */ > + if (CONFIG_IS_ENABLED(SOCFPGA_BOOT_FROM_FPGA)) { > + /* remap.mpuzero, keep fpga bridge enabled */ > + writel(0x9, &nic301_regs->remap); > + } else { > + /* remap.mpuzero */ > + writel(0x1, &nic301_regs->remap); > + } > writel(0x1, &pl310->pl310_addr_filter_start); > } > > diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c > index 631905fbee..1a16c46915 100644 > --- a/arch/arm/mach-socfpga/spl_gen5.c > +++ b/arch/arm/mach-socfpga/spl_gen5.c > @@ -161,5 +161,6 @@ void board_init_f(ulong dummy) > hang(); > } > > - socfpga_bridges_reset(1); > + if (!CONFIG_IS_ENABLED(SOCFPGA_BOOT_FROM_FPGA)) > + socfpga_bridges_reset(1); > } > diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h > index 2fb207c86a..3cdde0f926 100644 > --- a/include/configs/socfpga_common.h > +++ b/include/configs/socfpga_common.h > @@ -239,7 +239,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void); > * 0xFFEz_zzzz ...... Malloc area (grows up to top) > * 0xFFE3_FFFF ...... End of SRAM (top) > */ > +#if CONFIG_SPL_SOCFPGA_BOOT_FROM_FPGA > +/* SPL executed from FPGA */ > +#define CONFIG_SPL_TEXT_BASE 0xC0000000 > +#else > #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR > +#endif > #define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE > > #if defined(CONFIG_TARGET_SOCFPGA_ARRIA10) > -- Best regards, Marek Vasut
Signature · 2 lines
Best regards, Marek Vasut
PATCH v3 8/8 malloc_simple: calloc: don't call memset if malloc failed
In reply to Simon Goldschmidtmalloc_simple() can return 0 if out of memory. Don't call memset from calloc() in this case but rely on the caller checking the return value.
---
Changes in v3: None
Changes in v2: None
common/malloc_simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
common/malloc_simple.c +2 -1
@@ -57,7 +57,8 @@ void *calloc(size_t nmemb, size_t elem_size)void *ptr; ptr =malloc (size); -memset (ptr,'\0' , size); +if (ptr) +memset (ptr,'\0' , size);return ptr; }
Signature · 1 line
2.17.1
v3 cover Get socfpga gen5 SPL working again.
In reply to Simon GoldschmidtQuoted 40 lines · Simon Goldschmidt
Socfpga gen5 SPL has been broken since moving to DM serial with v2018.07. Also, U-Boot console output has been broken since then. This series fixes this and makes some related small improvements.
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per board
- added patches 5-7 to boot SPL and U-Boot from fpga OnChip RAM
- dropped Patch 5/6 "serial: ns16550: fix debug uart putc called before init" (this needs a more generic fix)Changes in v2:
- Improved comment on patch 1
- Removinggd->malloc_baseassignment at the end ofboard_init_f()moved to an extra patch
- don't changeprintf()todebug()inreset_manager_gen5.csocfpga_bridges_reset()(instead make debug uart handle this)
- make ns16550 debug uart handle putc being called before init
- removed the assignment ofgd->malloc_limitfromboard_init()Simon Goldschmidt (8):
arm: socfpga: fix SPL on gen5 after moving to DM serial
arm: socfpga: fix device trees to work with DM serial
arm: socfpga:spl_gen5: clean upmalloc_baseassignment
arm: socfpga: cyclone5: handle debug uart
arm: socfpga: fix U-Boot running from fpga OnChip RAM
arm: socfpga: gen5: combine some init code for SPL and U-Boot
arm: socfpga: fix SPL booting from fpga OnChip RAM
malloc_simple: calloc: don't call memset if malloc failedarch/arm/dts/socfpga_arria5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts | 5 ++ .../arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de10_nano.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de1_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_is1.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sockit.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socrates.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sr1500.dts | 2 +
Quoted 9 lines
arch/arm/dts/socfpga_cyclone5_vining_fpga.dts | 5 ++ arch/arm/mach-socfpga/Kconfig | 12 +++++ arch/arm/mach-socfpga/include/mach/misc.h | 4 ++ arch/arm/mach-socfpga/misc_gen5.c | 40 +++++++++------ arch/arm/mach-socfpga/spl_gen5.c | 49 ++++++------------- common/malloc_simple.c | 3 +- include/configs/socfpga_common.h | 13 +++++ 17 files changed, 125 insertions(+), 48 deletions(-)
I applied some of this to u-boot-socfpga/master , so you dont have to repost those.
Signature · 2 lines
Best regards, Marek Vasut
v3 cover Get socfpga gen5 SPL working again.
Marek Vasut <[email protected]> schrieb am Mo., 13. Aug. 2018, 15:29:
Quoted 50 lines · Simon Goldschmidt
Quoted 40 lines
Socfpga gen5 SPL has been broken since moving to DM serial with v2018.07. Also, U-Boot console output has been broken since then. This series fixes this and makes some related small improvements.
Changes in v3:
- moved uart0's "u-boot,dm-pre-reloc;" fromsocfpga.dtsito board specific dts files since this can change per board
- added patches 5-7 to boot SPL and U-Boot from fpga OnChip RAM
- dropped Patch 5/6 "serial: ns16550: fix debug uart putc called before init" (this needs a more generic fix)Changes in v2:
- Improved comment on patch 1
- Removinggd->malloc_baseassignment at the end ofboard_init_f()moved to an extra patch
- don't changeprintf()todebug()inreset_manager_gen5.csocfpga_bridges_reset()(instead make debug uart handle this)
- make ns16550 debug uart handle putc being called before init
- removed the assignment ofgd->malloc_limitfromboard_init()Simon Goldschmidt (8):
arm: socfpga: fix SPL on gen5 after moving to DM serial
arm: socfpga: fix device trees to work with DM serial
arm: socfpga:spl_gen5: clean upmalloc_baseassignment
arm: socfpga: cyclone5: handle debug uart
arm: socfpga: fix U-Boot running from fpga OnChip RAM
arm: socfpga: gen5: combine some init code for SPL and U-Boot
arm: socfpga: fix SPL booting from fpga OnChip RAM
malloc_simple: calloc: don't call memset if malloc failedarch/arm/dts/socfpga_arria5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts | 5 ++ .../arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de10_nano.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_de1_soc.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_is1.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socdk.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sockit.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_socrates.dts | 5 ++ arch/arm/dts/socfpga_cyclone5_sr1500.dts | 2 +Quoted 9 lines
arch/arm/dts/socfpga_cyclone5_vining_fpga.dts | 5 ++ arch/arm/mach-socfpga/Kconfig | 12 +++++ arch/arm/mach-socfpga/include/mach/misc.h | 4 ++ arch/arm/mach-socfpga/misc_gen5.c | 40 +++++++++------ arch/arm/mach-socfpga/spl_gen5.c | 49 ++++++------------- common/malloc_simple.c | 3 +- include/configs/socfpga_common.h | 13 +++++ 17 files changed, 125 insertions(+), 48 deletions(-)
Quoted 3 lines
I applied some of this to u-boot-socfpga/master , so you dont have to repost those.
Ok, thanks!
Simon