summaryrefslogtreecommitdiffstats
path: root/board/freescale
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-01-30 07:22:12 -0500
committerTom Rini <trini@konsulko.com>2019-01-30 07:22:12 -0500
commit748ad078eefea2ee5a3c8e53ca46e9e93c2fc7f1 (patch)
tree0067011f4422174e2834136f83ebe417dfa260d7 /board/freescale
parent1b35c90836e5660a37ed33581f06ebb0b36b01ad (diff)
parent6d69e535116ba9d6d3b8e4dc57cf3543301b59df (diff)
downloadu-boot-748ad078eefea2ee5a3c8e53ca46e9e93c2fc7f1.tar.gz
u-boot-748ad078eefea2ee5a3c8e53ca46e9e93c2fc7f1.tar.xz
u-boot-748ad078eefea2ee5a3c8e53ca46e9e93c2fc7f1.zip
Merge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imx
For 2019.04
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/imx8mq_evk/README1
-rw-r--r--board/freescale/imx8qxp_mek/Makefile1
-rw-r--r--board/freescale/imx8qxp_mek/README8
-rw-r--r--board/freescale/imx8qxp_mek/imximage.cfg4
-rw-r--r--board/freescale/imx8qxp_mek/spl.c75
5 files changed, 82 insertions, 7 deletions
diff --git a/board/freescale/imx8mq_evk/README b/board/freescale/imx8mq_evk/README
index 07dbfb01fe..1da6eaf242 100644
--- a/board/freescale/imx8mq_evk/README
+++ b/board/freescale/imx8mq_evk/README
@@ -23,7 +23,6 @@ $ cp firmware-imx-7.9/firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srcte
Build U-Boot
====================
-$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-poky-linux-
$ make imx8mq_evk_defconfig
$ make flash.bin
diff --git a/board/freescale/imx8qxp_mek/Makefile b/board/freescale/imx8qxp_mek/Makefile
index f9ee8aeff3..acaadcd84a 100644
--- a/board/freescale/imx8qxp_mek/Makefile
+++ b/board/freescale/imx8qxp_mek/Makefile
@@ -5,3 +5,4 @@
#
obj-y += imx8qxp_mek.o
+obj-$(CONFIG_SPL_BUILD) += spl.o
diff --git a/board/freescale/imx8qxp_mek/README b/board/freescale/imx8qxp_mek/README
index e91e193d11..f32290e3a2 100644
--- a/board/freescale/imx8qxp_mek/README
+++ b/board/freescale/imx8qxp_mek/README
@@ -39,16 +39,18 @@ $ cp imx-sc-firmware-0.7/mx8qx-mek-scfw-tcm.bin .
Build U-Boot
============
-
+$ export ATF_LOAD_ADDR=0x80000000
+$ export BL33_LOAD_ADDR=0x80020000
$ make imx8qxp_mek_defconfig
-$ make
+$ make flash.bin
+$ dd if=u-boot.itb of=flash.bin bs=512 seek=528
Flash the binary into the SD card
=================================
Burn the flash.bin binary to SD card offset 32KB:
-$ sudo dd if=u-boot-dtb.imx of=/dev/sd[x] bs=1024 seek=32
+$ sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=32
Boot
====
diff --git a/board/freescale/imx8qxp_mek/imximage.cfg b/board/freescale/imx8qxp_mek/imximage.cfg
index bbffb1a88f..259a1646bf 100644
--- a/board/freescale/imx8qxp_mek/imximage.cfg
+++ b/board/freescale/imx8qxp_mek/imximage.cfg
@@ -19,6 +19,4 @@ CONTAINER
/* Add scfw image with exec attribute */
IMAGE SCU mx8qx-mek-scfw-tcm.bin
/* Add ATF image with exec attribute */
-IMAGE A35 bl31.bin 0x80000000
-/* Add U-Boot image with load attribute */
-DATA A35 u-boot-dtb.bin 0x80020000
+IMAGE A35 spl/u-boot-spl.bin 0x00100000
diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c
new file mode 100644
index 0000000000..95ce9f37e8
--- /dev/null
+++ b/board/freescale/imx8qxp_mek/spl.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2018 NXP
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <spl.h>
+#include <dm/uclass.h>
+#include <dm/device.h>
+#include <dm/uclass-internal.h>
+#include <dm/device-internal.h>
+#include <dm/lists.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void spl_board_init(void)
+{
+ struct udevice *dev;
+ int offset;
+
+ uclass_find_first_device(UCLASS_MISC, &dev);
+
+ for (; dev; uclass_find_next_device(&dev)) {
+ if (device_probe(dev))
+ continue;
+ }
+
+ offset = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "nxp,imx8-pd");
+ while (offset != -FDT_ERR_NOTFOUND) {
+ lists_bind_fdt(gd->dm_root, offset_to_ofnode(offset),
+ NULL, true);
+ offset = fdt_node_offset_by_compatible(gd->fdt_blob, offset,
+ "nxp,imx8-pd");
+ }
+
+ uclass_find_first_device(UCLASS_POWER_DOMAIN, &dev);
+
+ for (; dev; uclass_find_next_device(&dev)) {
+ if (device_probe(dev))
+ continue;
+ }
+
+ arch_cpu_init();
+
+ board_early_init_f();
+
+ timer_init();
+
+ preloader_console_init();
+
+ puts("Normal Boot\n");
+}
+
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+ /* Just empty function now - can't decide what to choose */
+ debug("%s: %s\n", __func__, name);
+
+ return 0;
+}
+#endif
+
+void board_init_f(ulong dummy)
+{
+ /* Clear global data */
+ memset((void *)gd, 0, sizeof(gd_t));
+
+ /* Clear the BSS. */
+ memset(__bss_start, 0, __bss_end - __bss_start);
+
+ board_init_r(NULL, 0);
+}