summaryrefslogtreecommitdiff
path: root/include/configs/pcm052.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD \(3ADEV\) <albert.aribaud@3adev.fr>2016-09-26 09:08:08 +0200
committerStefano Babic <sbabic@denx.de>2016-10-06 09:22:11 +0200
commit27192d16eb3dacfedfb507f60a325b482bbf317f (patch)
treef29000ef5c1503413a66fc82f8fcd85e7a75ebb1 /include/configs/pcm052.h
parenta7e5f7f3e5d2458090d8528a5a892a56911a11ce (diff)
pcm052: add new BK4r1 target based on PCM052 SoM
Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Diffstat (limited to 'include/configs/pcm052.h')
-rw-r--r--include/configs/pcm052.h45
1 files changed, 39 insertions, 6 deletions
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 32f958a6b2..0372e4376b 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -52,7 +52,12 @@
#define CONFIG_CMD_MTDPARTS
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
+
+#ifndef MTDIDS_DEFAULT
#define MTDIDS_DEFAULT "nand0=NAND"
+#endif
+
+#ifndef MTDPARTS_DEFAULT
#define MTDPARTS_DEFAULT "mtdparts=NAND:640k(bootloader)"\
",128k(env1)"\
",128k(env2)"\
@@ -61,6 +66,8 @@
",-(root)"
#endif
+#endif
+
#define CONFIG_MMC
#define CONFIG_FSL_ESDHC
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
@@ -85,7 +92,6 @@
/* QSPI Configs*/
#ifdef CONFIG_FSL_QSPI
-#define CONFIG_SPI_FLASH
#define FSL_QSPI_FLASH_SIZE (1 << 24)
#define FSL_QSPI_FLASH_NUM 2
#define CONFIG_SYS_FSL_QSPI_LE
@@ -115,8 +121,31 @@
#define CONFIG_SYS_TEXT_BASE 0x3f408000
#define CONFIG_BOARD_SIZE_LIMIT 524288
-#define CONFIG_BOOTCOMMAND "run bootcmd_sd"
+/* if no target-specific extra environment settings were defined by the
+ target, define an empty one */
+#ifndef PCM052_EXTRA_ENV_SETTINGS
+#define PCM052_EXTRA_ENV_SETTINGS
+#endif
+
+/* if no target-specific boot command was defined by the target,
+ define an empty one */
+#ifndef PCM052_BOOTCOMMAND
+#define PCM052_BOOTCOMMAND
+#endif
+
+/* if no target-specific extra environment settings were defined by the
+ target, define an empty one */
+#ifndef PCM052_NET_INIT
+#define PCM052_NET_INIT
+#endif
+
+/* boot command, including the target-defined one if any */
+#define CONFIG_BOOTCOMMAND PCM052_BOOTCOMMAND "run bootcmd_nand"
+
+/* Extra env settings (including the target-defined ones if any) */
#define CONFIG_EXTRA_ENV_SETTINGS \
+ PCM052_EXTRA_ENV_SETTINGS \
+ "autoload=no\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
"blimg_file=u-boot.vyb\0" \
@@ -163,7 +192,8 @@
"nand read ${kernel_addr} kernel; " \
"nand read ${ram_addr} root; " \
"bootz ${kernel_addr} ${ram_addr} ${fdt_addr}\0" \
- "update_bootloader_from_tftp=if tftp ${blimg_addr} "\
+ "update_bootloader_from_tftp=" PCM052_NET_INIT \
+ "if tftp ${blimg_addr} "\
"${tftpdir}${blimg_file}; then " \
"mtdparts default; " \
"nand erase.part bootloader; " \
@@ -176,7 +206,8 @@
"if fatload mmc 0:2 ${fdt_addr} ${fdt_file}; then " \
"nand erase.part dtb; " \
"nand write ${fdt_addr} dtb ${filesize}; fi\0" \
- "update_kernel_from_tftp=if tftp ${fdt_addr} ${tftpdir}${fdt_file}; " \
+ "update_kernel_from_tftp=" PCM052_NET_INIT \
+ "if tftp ${fdt_addr} ${tftpdir}${fdt_file}; " \
"then setenv fdtsize ${filesize}; " \
"if tftp ${kernel_addr} ${tftpdir}${kernel_file}; then " \
"mtdparts default; " \
@@ -184,13 +215,15 @@
"nand write ${fdt_addr} dtb ${fdtsize}; " \
"nand erase.part kernel; " \
"nand write ${kernel_addr} kernel ${filesize}; fi; fi\0" \
- "update_rootfs_from_tftp=if tftp ${sys_addr} ${tftpdir}${filesys}; " \
+ "update_rootfs_from_tftp=" PCM052_NET_INIT \
+ "if tftp ${sys_addr} ${tftpdir}${filesys}; " \
"then mtdparts default; " \
"nand erase.part root; " \
"ubi part root; " \
"ubi create rootfs; " \
"ubi write ${sys_addr} rootfs ${filesize}; fi\0" \
- "update_ramdisk_from_tftp=if tftp ${ram_addr} ${tftpdir}${ram_file}; " \
+ "update_ramdisk_from_tftp=" PCM052_NET_INIT \
+ "if tftp ${ram_addr} ${tftpdir}${ram_file}; " \
"then mtdparts default; " \
"nand erase.part root; " \
"nand write ${ram_addr} root ${filesize}; fi\0"