summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-06-28 02:26:41 -0500
committerJason Liu <jason.hui.liu@nxp.com>2017-11-03 02:36:58 +0800
commit13c8925c078b57d5340c557d2f5c1b8feb477fae (patch)
tree276b2cb6283f3c3d82f7de0f9b66ef5260c24071 /board
parent7928d06ee3de241020fa058e9bd8aad53512f02a (diff)
MLK-15297 imx8mq_evk: Change to not static link the DDR PHY FW
To avoid violating GPL license, we can't static link the DDR PHY FW into uboot binary, so change to attach the FW images with u-boot binary. Remove the codes and link scripts for static linking the FW in sections. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/imx8mq_evk/Makefile2
-rw-r--r--board/freescale/imx8mq_evk/ddr/helper.c11
-rw-r--r--board/freescale/imx8mq_evk/ddr/imem.S4
3 files changed, 5 insertions, 12 deletions
diff --git a/board/freescale/imx8mq_evk/Makefile b/board/freescale/imx8mq_evk/Makefile
index bfb110c3b6..273b60a296 100644
--- a/board/freescale/imx8mq_evk/Makefile
+++ b/board/freescale/imx8mq_evk/Makefile
@@ -8,5 +8,5 @@ obj-y += imx8m_evk.o
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
-obj-y += ddr/lpddr4_pub_train_0608_simple.o ddr/train1d.o ddr/helper.o ddr/imem.o
+obj-y += ddr/lpddr4_pub_train_0608_simple.o ddr/train1d.o ddr/helper.o
endif
diff --git a/board/freescale/imx8mq_evk/ddr/helper.c b/board/freescale/imx8mq_evk/ddr/helper.c
index 63eebed7a7..83bc69659c 100644
--- a/board/freescale/imx8mq_evk/ddr/helper.c
+++ b/board/freescale/imx8mq_evk/ddr/helper.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <asm/io.h>
#include <asm/arch/ddr_memory_map.h>
+#include <asm/sections.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -20,18 +21,14 @@ DECLARE_GLOBAL_DATA_PTR;
#define DMEM_OFFSET_ADDR 0x00054000
#define DDR_TRAIN_CODE_BASE_ADDR IP2APB_DDRPHY_IPS_BASE_ADDR(0)
-char __firmware_imem_start[0] __attribute__((section(".__firmware_imem_start")));
-char __firmware_imem_end[0] __attribute__((section(".__firmware_imem_end")));
-char __firmware_dmem_start[0] __attribute__((section(".__firmware_dmem_start")));
-char __firmware_dmem_end[0] __attribute__((section(".__firmware_dmem_end")));
+/* We need PHY iMEM PHY is 32KB padded */
void ddr4_load_train_code(void)
{
u32 tmp32, i;
u32 error = 0;
unsigned long pr_to32, pr_from32;
- unsigned long imem_start = (unsigned long)&__firmware_imem_start;
- unsigned long dmem_start = (unsigned long)&__firmware_dmem_start;
-
+ unsigned long imem_start = (unsigned long)&_end;
+ unsigned long dmem_start = imem_start + IMEM_LEN;
pr_from32 = imem_start;
pr_to32 = DDR_TRAIN_CODE_BASE_ADDR + 4 * IMEM_OFFSET_ADDR;
diff --git a/board/freescale/imx8mq_evk/ddr/imem.S b/board/freescale/imx8mq_evk/ddr/imem.S
deleted file mode 100644
index da57b36b5e..0000000000
--- a/board/freescale/imx8mq_evk/ddr/imem.S
+++ /dev/null
@@ -1,4 +0,0 @@
-.section .firmware_imem,#alloc
- .incbin "lpddr4_pmu_train_imem.bin"
-.section .firmware_dmem,#alloc
- .incbin "lpddr4_pmu_train_dmem.bin"