summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2013-08-21 16:57:03 +0800
committerJason Liu <r64343@freescale.com>2013-08-22 06:17:51 +0800
commit125dc3d657a1e6d1821123361f6c7238f2653d1d (patch)
tree8a7c3fba056bc1ad3ebc7286c6d14441eea9d598
parent792e66de4672e8d9e40e54b168b1b0ee50ac5d3d (diff)
downloadu-boot-imx-125dc3d657a1e6d1821123361f6c7238f2653d1d.zip
u-boot-imx-125dc3d657a1e6d1821123361f6c7238f2653d1d.tar.gz
u-boot-imx-125dc3d657a1e6d1821123361f6c7238f2653d1d.tar.bz2
ENGR00275348-11 imx6slevk: add the plugin mode support
This patch add the plugin mode support for imx6slevk board. In order to enable the plugin mode, please turn on the CONFIG_USE_PLUGIN in the include/configs/mx6slevk.h Signed-off-by: Jason Liu <r64343@freescale.com>
-rw-r--r--board/freescale/mx6slevk/Makefile5
-rw-r--r--board/freescale/mx6slevk/imximage.cfg8
-rw-r--r--board/freescale/mx6slevk/plugin.S201
-rw-r--r--include/configs/mx6slevk.h3
4 files changed, 217 insertions, 0 deletions
diff --git a/board/freescale/mx6slevk/Makefile b/board/freescale/mx6slevk/Makefile
index 43af351..4914867 100644
--- a/board/freescale/mx6slevk/Makefile
+++ b/board/freescale/mx6slevk/Makefile
@@ -15,9 +15,14 @@ COBJS := mx6slevk.o
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
+all: $(LIB) plugin.bin
+
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+plugin.bin: plugin.o
+ $(OBJCOPY) -O binary --gap-fill 0xff $< $@
+
#########################################################################
# defines $(obj).depend target
diff --git a/board/freescale/mx6slevk/imximage.cfg b/board/freescale/mx6slevk/imximage.cfg
index df39a16..69eb41b 100644
--- a/board/freescale/mx6slevk/imximage.cfg
+++ b/board/freescale/mx6slevk/imximage.cfg
@@ -12,6 +12,9 @@
* The syntax is taken as close as possible with the kwbimage
*/
+#define __ASSEMBLY__
+#include <config.h>
+
/* image version */
IMAGE_VERSION 2
@@ -23,6 +26,10 @@ IMAGE_VERSION 2
BOOT_FROM sd
+#ifdef CONFIG_USE_PLUGIN
+/*PLUGIN plugin-binary-file IRAM_FREE_START_ADDR*/
+PLUGIN board/freescale/mx6slevk/plugin.bin 0x00907000
+#else
/*
* Device Configuration Data (DCD)
*
@@ -116,3 +123,4 @@ DATA 4 0x021b08b8 0x00000800
DATA 4 0x021b0004 0x00025564
DATA 4 0x021b0404 0x00011006
DATA 4 0x021b001c 0x00000000
+#endif
diff --git a/board/freescale/mx6slevk/plugin.S b/board/freescale/mx6slevk/plugin.S
new file mode 100644
index 0000000..f49d978
--- /dev/null
+++ b/board/freescale/mx6slevk/plugin.S
@@ -0,0 +1,201 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <config.h>
+
+#define ROM_API_TABLE_BASE_ADDR 0xC0
+#define ROM_API_HWCNFG_SETUP_OFFSET 0x08
+
+/* DDR script */
+.macro imx6slevk_ddr_setting
+ ldr r0, =CCM_BASE_ADDR
+ ldr r1, =0x00260324
+ str r1, [r0, #0x018]
+
+ ldr r0, =IOMUXC_BASE_ADDR
+ ldr r1, =0x00020000
+ str r1, [r0, #0x5c0]
+ ldr r1, =0x00000000
+ str r1, [r0, #0x5b4]
+
+ ldr r1, =0x00000028
+ str r1, [r0, #0x338]
+
+ ldr r1, =0x00000030
+ str r1, [r0, #0x300]
+ str r1, [r0, #0x31c]
+ str r1, [r0, #0x320]
+
+ ldr r1, =0x00000000
+ str r1, [r0, #0x32c]
+
+ ldr r1, =0x00000030
+ str r1, [r0, #0x5ac]
+ str r1, [r0, #0x5c8]
+
+ ldr r1, =0x00020000
+ str r1, [r0, #0x5b0]
+
+ ldr r1, =0x00003030
+ str r1, [r0, #0x344]
+ str r1, [r0, #0x348]
+ str r1, [r0, #0x34c]
+ str r1, [r0, #0x350]
+
+ ldr r1, =0x00080000
+ str r1, [r0, #0x5d0]
+
+ ldr r1, =0x00000030
+ str r1, [r0, #0x5c4]
+ str r1, [r0, #0x5cc]
+ str r1, [r0, #0x5d4]
+ str r1, [r0, #0x5d8]
+
+ str r1, [r0, #0x30c]
+ str r1, [r0, #0x310]
+ str r1, [r0, #0x314]
+ str r1, [r0, #0x318]
+
+ ldr r0, =MMDC_P0_BASE_ADDR
+ ldr r2, =0x00008000
+ str r2, [r0, #0x01c]
+
+ ldr r2, =0x1b4700c7
+ str r2, [r0, #0x85c]
+
+ ldr r2, =0xa1390003
+ str r2, [r0, #0x800]
+
+ ldr r2, =0x00300000
+ str r2, [r0, #0x890]
+
+ ldr r2, =0x00000800
+ str r2, [r0, #0x8b8]
+
+ ldr r2, =0x33333333
+ str r2, [r0, #0x81c]
+ str r2, [r0, #0x820]
+ str r2, [r0, #0x824]
+ str r2, [r0, #0x828]
+ str r2, [r0, #0x82c]
+ str r2, [r0, #0x830]
+ str r2, [r0, #0x834]
+ str r2, [r0, #0x838]
+
+ ldr r2, =0x4241444a
+ str r2, [r0, #0x848]
+
+ ldr r2, =0x3030312b
+ str r2, [r0, #0x850]
+
+ ldr r2, =0x20000000
+ str r2, [r0, #0x83c]
+
+ ldr r2, =0x00000000
+ str r2, [r0, #0x840]
+
+ ldr r2, =0x00000800
+ str r2, [r0, #0x8b8]
+
+ ldr r2, =0x33374133
+ str r2, [r0, #0x00c]
+
+ ldr r2, =0x00020024
+ str r2, [r0, #0x004]
+
+ ldr r2, =0x00100A82
+ str r2, [r0, #0x010]
+ ldr r2, =0x00000093
+ str r2, [r0, #0x014]
+ ldr r2, =0x00001688
+ str r2, [r0, #0x018]
+ ldr r2, =0x0F9F26D2
+ str r2, [r0, #0x02c]
+
+ ldr r2, =0x0000020E
+ str r2, [r0, #0x030]
+ ldr r2, =0x00190778
+ str r2, [r0, #0x038]
+ ldr r2, =0x00000000
+ str r2, [r0, #0x008]
+ ldr r2, =0x0000004F
+ str r2, [r0, #0x040]
+ ldr r2, =0xC3110000
+ str r2, [r0, #0x000]
+
+ ldr r2, =0x003F8030
+ str r2, [r0, #0x01c]
+ ldr r2, =0xFF0A8030
+ str r2, [r0, #0x01c]
+ ldr r2, =0x82018030
+ str r2, [r0, #0x01c]
+ ldr r2, =0x04028030
+ str r2, [r0, #0x01c]
+ ldr r2, =0x02038030
+ str r2, [r0, #0x01c]
+ ldr r2, =0xFF0A8038
+ str r2, [r0, #0x01c]
+ ldr r2, =0x82018038
+ str r2, [r0, #0x01c]
+ ldr r2, =0x04028038
+ str r2, [r0, #0x01c]
+ ldr r2, =0x02038038
+ str r2, [r0, #0x01c]
+
+ ldr r2, =0xa1310003
+ str r2, [r0, #0x800]
+
+ ldr r2, =0x00001800
+ str r2, [r0, #0x020]
+
+ ldr r2, =0x00000000
+ str r2, [r0, #0x818]
+
+ ldr r2, =0x00000800
+ str r2, [r0, #0x8b8]
+
+ ldr r2, =0x00025564
+ str r2, [r0, #0x004]
+
+ ldr r2, =0x00011006
+ str r2, [r0, #0x404]
+
+ ldr r2, =0x00000000
+ str r2, [r0, #0x01c]
+.endm
+.macro imx6_clock_gating
+ ldr r0, =CCM_BASE_ADDR
+ ldr r1, =0xffffffff
+ str r1, [r0, #0x068]
+ str r1, [r0, #0x06c]
+ str r1, [r0, #0x070]
+ str r1, [r0, #0x074]
+ str r1, [r0, #0x078]
+ str r1, [r0, #0x07c]
+ str r1, [r0, #0x080]
+ str r1, [r0, #0x084]
+.endm
+
+.macro imx6_qos_setting
+.endm
+
+.macro imx6_ddr_setting
+ imx6slevk_ddr_setting
+.endm
+
+/* include the common plugin code here */
+#include <asm/arch/mx6_plugin.S>
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h
index 0a649eb..ef11afe 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -23,6 +23,9 @@
#define CONFIG_SYS_PL310_BASE 0x00A02000
#define CONFIG_SYS_CACHELINE_SIZE 32
+/* uncomment for PLUGIN mode support */
+/* #define CONFIG_USE_PLUGIN */
+
#define MACH_TYPE_MX6SLEVK 4307
#define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK