summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-12-14 03:08:36 +1000
committerNathan Rossi <nathan@nathanrossi.com>2016-12-14 11:37:38 +1000
commitb2da4ccc5db004181b322c1992cac9120954138f (patch)
treee62987b2970f619512b7e383b0d333999922692b /recipes-bsp
parent4885a05b6e78f8dbc99cb341367e3409829d72dd (diff)
downloadmeta-xilinx-b2da4ccc5db004181b322c1992cac9120954138f.tar.gz
u-boot_2016.11: Update appends for 2016.11
Update the appends for the u-boot 2016.11 recipe. Remove unneeded patches, and drop the SPL bitstream patch as it does not apply cleanly (and newer features are available in 2016.11 for FPGA loading from FIT). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot/ARM-zynq-Configure-picozed-to-use-custom-init.patch29
-rw-r--r--recipes-bsp/u-boot/u-boot/configs-zynq-common-Add-uEnv.txt-support.patch66
-rw-r--r--recipes-bsp/u-boot/u-boot/zynq-Add-fpga-support-to-u-boot-SPL.patch130
-rw-r--r--recipes-bsp/u-boot/u-boot_2016.03.bbappend18
-rw-r--r--recipes-bsp/u-boot/u-boot_2016.11.bbappend11
5 files changed, 11 insertions, 243 deletions
diff --git a/recipes-bsp/u-boot/u-boot/ARM-zynq-Configure-picozed-to-use-custom-init.patch b/recipes-bsp/u-boot/u-boot/ARM-zynq-Configure-picozed-to-use-custom-init.patch
deleted file mode 100644
index 051d2fc5..00000000
--- a/recipes-bsp/u-boot/u-boot/ARM-zynq-Configure-picozed-to-use-custom-init.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From f60d8854e743f0ec89c137f49686efaa600d75a3 Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan@nathanrossi.com>
3Date: Thu, 31 Mar 2016 19:35:33 +1000
4Subject: [PATCH] ARM: zynq: Configure picozed to use custom init
5
6Setup the picozed target to use the ZYNQ_CUSTOM_INIT config option so
7that the user can provide a ps7_init for the board.
8
9Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
10Upstream-Status: Not Submitted
11---
12 arch/arm/mach-zynq/Kconfig | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
16index d396a13..3c6960e 100644
17--- a/arch/arm/mach-zynq/Kconfig
18+++ b/arch/arm/mach-zynq/Kconfig
19@@ -20,6 +20,7 @@ config TARGET_ZYNQ_MICROZED
20
21 config TARGET_ZYNQ_PICOZED
22 bool "Zynq PicoZed"
23+ select ZYNQ_CUSTOM_INIT
24
25 config TARGET_ZYNQ_ZC702
26 bool "Zynq ZC702 Board"
27--
282.7.0
29
diff --git a/recipes-bsp/u-boot/u-boot/configs-zynq-common-Add-uEnv.txt-support.patch b/recipes-bsp/u-boot/u-boot/configs-zynq-common-Add-uEnv.txt-support.patch
deleted file mode 100644
index ddc1cddf..00000000
--- a/recipes-bsp/u-boot/u-boot/configs-zynq-common-Add-uEnv.txt-support.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From 4dd0f06c46085cacc607dabbdf288bef6ad67115 Mon Sep 17 00:00:00 2001
2From: Michal Simek <monstr@monstr.eu>
3Date: Fri, 18 Mar 2016 23:43:39 +0100
4Subject: [PATCH] configs: zynq-common: Add uEnv.txt support
5
6preboot macro load the uEnv.txt from mmc 0 when bootmode is mmc. uenvcmd is
7executed after load of uEnv.txt if it is defined in the uEnv.txt env text
8file.
9
10The default importbootenv macro reads the uEnv.txt from mmc.
11
12Additional to this, usb_loadbootenv is added to support loading uEnv.txt
13from usb dev 0.
14
15Upstream-Status: Backport
16
17Signed-off-by: Michal Simek <monstr@monstr.eu>
18Signed-off-by: Jason Wu <jason.wu.misc@gmail.com>
19
20diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
21index 4cb490b..5e3ce95 100644
22--- a/include/configs/zynq-common.h
23+++ b/include/configs/zynq-common.h
24@@ -206,6 +206,9 @@
25 # define CONFIG_ENV_OFFSET 0xE0000
26 #endif
27
28+/* enable preboot to be loaded before CONFIG_BOOTDELAY */
29+#define CONFIG_PREBOOT
30+
31 /* Default environment */
32 #ifndef CONFIG_EXTRA_ENV_SETTINGS
33 #define CONFIG_EXTRA_ENV_SETTINGS \
34@@ -216,6 +219,29 @@
35 "nor_flash_off=0xE2100000\0" \
36 "fdt_high=0x20000000\0" \
37 "initrd_high=0x20000000\0" \
38+ "loadbootenv_addr=0x2000000\0" \
39+ "bootenv=uEnv.txt\0" \
40+ "bootenv_dev=mmc\0" \
41+ "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \
42+ "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \
43+ "env import -t ${loadbootenv_addr} $filesize\0" \
44+ "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \
45+ "setbootenv=if env run bootenv_existence_test; then " \
46+ "if env run loadbootenv; then " \
47+ "env run importbootenv; " \
48+ "fi; " \
49+ "fi; \0" \
50+ "sd_loadbootenv=set bootenv_dev mmc && " \
51+ "run setbootenv \0" \
52+ "usb_loadbootenv=set bootenv_dev usb && usb start && run setbootenv \0" \
53+ "preboot=if test $modeboot = sdboot; then " \
54+ "run sd_loadbootenv; " \
55+ "echo Checking if uenvcmd is set ...; " \
56+ "if test -n $uenvcmd; then " \
57+ "echo Running uenvcmd ...; " \
58+ "run uenvcmd; " \
59+ "fi; " \
60+ "fi; \0" \
61 "norboot=echo Copying FIT from NOR flash to RAM... && " \
62 "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \
63 "bootm ${load_addr}\0" \
64--
651.9.1
66
diff --git a/recipes-bsp/u-boot/u-boot/zynq-Add-fpga-support-to-u-boot-SPL.patch b/recipes-bsp/u-boot/u-boot/zynq-Add-fpga-support-to-u-boot-SPL.patch
deleted file mode 100644
index ab355af8..00000000
--- a/recipes-bsp/u-boot/u-boot/zynq-Add-fpga-support-to-u-boot-SPL.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1From 14c84972b2c0a32664b3b392d18161998cd1200f Mon Sep 17 00:00:00 2001
2From: Michal Simek <michal.simek@xilinx.com>
3Date: Fri, 18 Mar 2016 17:24:48 +0100
4Subject: [PATCH] zynq: Add fpga support to u-boot SPL
5
6Load bitstream in SPL. "bitstream" can be in bit or bin format.
7
8Upstream-Status: Pending
9
10Signed-off-by: Jason Wu <jason.hy.wu@gmail.com>
11Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12
13diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
14index c27a250..181e40f 100644
15--- a/common/spl/spl_mmc.c
16+++ b/common/spl/spl_mmc.c
17@@ -15,6 +15,9 @@
18 #include <errno.h>
19 #include <mmc.h>
20 #include <image.h>
21+#include <fat.h>
22+#include <fpga.h>
23+#include <xilinx.h>
24
25 DECLARE_GLOBAL_DATA_PTR;
26
27@@ -175,6 +178,39 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
28 }
29 #endif
30
31+#ifdef CONFIG_SPL_FPGA_SUPPORT
32+static int mmc_load_fpga_image_fat(struct mmc *mmc)
33+{
34+ int err;
35+ int devnum = 0;
36+ const fpga_desc *const desc = fpga_get_desc(devnum);
37+ xilinx_desc *desc_xilinx = desc->devdesc;
38+
39+ err = spl_load_image_fat(&mmc->block_dev,
40+ CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
41+ CONFIG_SPL_FPGA_LOAD_ARGS_NAME);
42+
43+ if (err) {
44+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
45+ printf("spl: error reading image %s, err - %d\n",
46+ CONFIG_SPL_FPGA_LOAD_ARGS_NAME, err);
47+#endif
48+ return -1;
49+ }
50+
51+ err = fpga_loadbitstream(devnum, (char *)spl_image.load_addr,
52+ desc_xilinx->size, BIT_FULL);
53+ if (err) {
54+ printf("spl: fail to load bitstream, err - %d\n", err);
55+ printf("spl: retry fpga_load\n");
56+ err = fpga_load(devnum, (const void *)spl_image.load_addr,
57+ desc_xilinx->size, BIT_FULL);
58+ }
59+
60+ return err;
61+}
62+#endif
63+
64 #ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
65 int spl_mmc_do_fs_boot(struct mmc *mmc)
66 {
67@@ -288,6 +324,10 @@ int spl_mmc_load_image(u32 boot_device)
68 case MMCSD_MODE_FS:
69 debug("spl: mmc boot mode: fs\n");
70
71+#ifdef CONFIG_SPL_FPGA_SUPPORT
72+ mmc_load_fpga_image_fat(mmc);
73+#endif
74+
75 err = spl_mmc_do_fs_boot(mmc);
76 if (!err)
77 return err;
78diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
79index ef889ea..41d72ce 100644
80--- a/drivers/fpga/zynqpl.c
81+++ b/drivers/fpga/zynqpl.c
82@@ -400,7 +400,7 @@ static int zynq_load(xilinx_desc *desc, const void *buf, size_t bsize,
83 return FPGA_SUCCESS;
84 }
85
86-#if defined(CONFIG_CMD_FPGA_LOADFS)
87+#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD)
88 static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
89 fpga_fs_info *fsinfo)
90 {
91@@ -488,7 +488,7 @@ static int zynq_dump(xilinx_desc *desc, const void *buf, size_t bsize)
92
93 struct xilinx_fpga_op zynq_op = {
94 .load = zynq_load,
95-#if defined(CONFIG_CMD_FPGA_LOADFS)
96+#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD)
97 .loadfs = zynq_loadfs,
98 #endif
99 .dump = zynq_dump,
100diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
101index 0ddbc99..4cb490b 100644
102--- a/include/configs/zynq-common.h
103+++ b/include/configs/zynq-common.h
104@@ -310,6 +310,11 @@
105
106 #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-zynq/u-boot-spl.lds"
107
108+/* FPGA support */
109+#define CONFIG_SPL_FPGA_SUPPORT
110+#define CONFIG_SPL_FPGA_LOAD_ADDR 0x1000000
111+#define CONFIG_SPL_FPGA_LOAD_ARGS_NAME "bitstream"
112+
113 /* MMC support */
114 #ifdef CONFIG_ZYNQ_SDHCI
115 #define CONFIG_SPL_MMC_SUPPORT
116diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
117index 4424284..3c0d937 100644
118--- a/scripts/Makefile.spl
119+++ b/scripts/Makefile.spl
120@@ -58,6 +58,7 @@ libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
121 libs-y += drivers/
122 libs-y += dts/
123 libs-y += fs/
124+libs-$(CONFIG_SPL_FPGA_SUPPORT) += drivers/fpga/
125 libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
126 libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
127 libs-$(CONFIG_SPL_NET_SUPPORT) += net/
128--
1291.9.1
130
diff --git a/recipes-bsp/u-boot/u-boot_2016.03.bbappend b/recipes-bsp/u-boot/u-boot_2016.03.bbappend
deleted file mode 100644
index d132ad61..00000000
--- a/recipes-bsp/u-boot/u-boot_2016.03.bbappend
+++ /dev/null
@@ -1,18 +0,0 @@
1include u-boot-spl-zynq-init.inc
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4SRC_URI_append_picozed-zynq7 = " file://ARM-zynq-Configure-picozed-to-use-custom-init.patch"
5
6SRC_URI_append = " file://zynq-Add-fpga-support-to-u-boot-SPL.patch \
7 file://configs-zynq-common-Add-uEnv.txt-support.patch \
8"
9
10# u-boot 2016.03 has support for these
11HAS_PS7INIT ?= " \
12 zynq_microzed_config \
13 zynq_zed_config \
14 zynq_zc702_config \
15 zynq_zc706_config \
16 zynq_zybo_config \
17 "
18
diff --git a/recipes-bsp/u-boot/u-boot_2016.11.bbappend b/recipes-bsp/u-boot/u-boot_2016.11.bbappend
new file mode 100644
index 00000000..78e5ac6c
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_2016.11.bbappend
@@ -0,0 +1,11 @@
1include u-boot-spl-zynq-init.inc
2
3# u-boot 2016.11 has support for these
4HAS_PS7INIT ?= " \
5 zynq_microzed_config \
6 zynq_zed_config \
7 zynq_zc702_config \
8 zynq_zc706_config \
9 zynq_zybo_config \
10 "
11