* [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM
@ 2014-01-30 9:40 Sascha Hauer
2014-01-30 9:40 ` [PATCH 2/2] ARM: i.MX: edmqmx6: update defconfig Sascha Hauer
2014-01-30 9:46 ` [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Jan Lübbe
0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2014-01-30 9:40 UTC (permalink / raw)
To: barebox
barebox only recognizes boarddata as dtb if it is inside SDRAM, so
copy the dtb there if necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/dmo-mx6-realq7/lowlevel.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boards/dmo-mx6-realq7/lowlevel.c b/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
index f47575e..7f6168c 100644
--- a/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
+++ b/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <sizes.h>
#include <io.h>
+#include <debug_ll.h>
#include <asm/sections.h>
#include <asm/mmu.h>
#include <asm/barebox-arm-head.h>
@@ -136,26 +137,37 @@ static void sdram_init(void)
writel(0x0000047f, 0x021e80a4);
writel(0x0000c34f, 0x021e80a8);
writel(0x00000001, 0x021e8080);
+ putc_ll('>');
}
extern char __dtb_imx6q_dmo_realq7_start[];
+extern char __dtb_imx6q_dmo_realq7_end[];
ENTRY_FUNCTION(start_imx6_realq7, r0, r1, r2)
{
- uint32_t fdt;
+ unsigned long fdt, sdram = 0x10000000;
arm_cpu_lowlevel_init();
arm_setup_stack(0x00940000 - 8);
+ fdt = (unsigned long)__dtb_imx6q_dmo_realq7_start - get_runtime_offset();
+
if (get_pc() < 0x10000000) {
sdram_init();
mmdc_do_write_level_calibration();
mmdc_do_dqs_calibration();
- }
- fdt = (uint32_t)__dtb_imx6q_dmo_realq7_start - get_runtime_offset();
+ /*
+ * Copy the devicetree blob to sdram so that the barebox code finds it
+ * inside valid SDRAM instead of SRAM.
+ */
+ memcpy((void *)sdram, (void *)fdt,
+ __dtb_imx6q_dmo_realq7_end -
+ __dtb_imx6q_dmo_realq7_start);
+ fdt = sdram;
+ }
- barebox_arm_entry(0x10000000, SZ_2G, fdt);
+ barebox_arm_entry(sdram, SZ_2G, fdt);
}
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: i.MX: edmqmx6: update defconfig
2014-01-30 9:40 [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Sascha Hauer
@ 2014-01-30 9:40 ` Sascha Hauer
2014-01-30 9:46 ` [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Jan Lübbe
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2014-01-30 9:40 UTC (permalink / raw)
To: barebox
on the edmqmx6 barebox is loaded into SRAM, so it must not get
too big. Disable some stuff to make the image fit into SRAM again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/configs/dmo-realq7_defconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/configs/dmo-realq7_defconfig b/arch/arm/configs/dmo-realq7_defconfig
index 501a182..131eddf 100644
--- a/arch/arm/configs/dmo-realq7_defconfig
+++ b/arch/arm/configs/dmo-realq7_defconfig
@@ -1,4 +1,5 @@
CONFIG_ARCH_IMX=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x31000
CONFIG_IMX_MULTI_BOARDS=y
CONFIG_MACH_REALQ7=y
CONFIG_IMX_IIM=y
@@ -8,10 +9,10 @@ CONFIG_CMD_ARM_MMUINFO=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_ARM_UNWIND=y
CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x8fc00000
-CONFIG_MALLOC_SIZE=0x40000000
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
CONFIG_MALLOC_TLSF=y
-CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
CONFIG_LONGHELP=y
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
@@ -67,7 +68,6 @@ CONFIG_CMD_DETECT=y
CONFIG_CMD_WD=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
-CONFIG_NET_NFS=y
CONFIG_NET_PING=y
CONFIG_NET_RESOLV=y
CONFIG_OFDEVICE=y
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM
2014-01-30 9:40 [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Sascha Hauer
2014-01-30 9:40 ` [PATCH 2/2] ARM: i.MX: edmqmx6: update defconfig Sascha Hauer
@ 2014-01-30 9:46 ` Jan Lübbe
2014-01-30 9:48 ` Sascha Hauer
1 sibling, 1 reply; 4+ messages in thread
From: Jan Lübbe @ 2014-01-30 9:46 UTC (permalink / raw)
To: barebox
On Thu, 2014-01-30 at 10:40 +0100, Sascha Hauer wrote:
> @@ -136,26 +137,37 @@ static void sdram_init(void)
> writel(0x0000047f, 0x021e80a4);
> writel(0x0000c34f, 0x021e80a8);
> writel(0x00000001, 0x021e8080);
> + putc_ll('>');
> }
Some leftover debugging. ;)
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM
2014-01-30 9:46 ` [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Jan Lübbe
@ 2014-01-30 9:48 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2014-01-30 9:48 UTC (permalink / raw)
To: Jan Lübbe; +Cc: barebox
On Thu, Jan 30, 2014 at 10:46:23AM +0100, Jan Lübbe wrote:
> On Thu, 2014-01-30 at 10:40 +0100, Sascha Hauer wrote:
> > @@ -136,26 +137,37 @@ static void sdram_init(void)
> > writel(0x0000047f, 0x021e80a4);
> > writel(0x0000c34f, 0x021e80a8);
> > writel(0x00000001, 0x021e8080);
> > + putc_ll('>');
> > }
>
> Some leftover debugging. ;)
Psst, this was intentional ;)
Of course this should have been a separate patch, but giving a sign of
life early when debugging is enabled is a good thing generally.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-30 9:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 9:40 [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Sascha Hauer
2014-01-30 9:40 ` [PATCH 2/2] ARM: i.MX: edmqmx6: update defconfig Sascha Hauer
2014-01-30 9:46 ` [PATCH 1/2] ARM: i.MX: edmqmx6: Copy fdt to SDRAM Jan Lübbe
2014-01-30 9:48 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox