summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2010-08-06 07:34:33 +0200
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2010-08-06 07:34:33 +0200
commitd8592c44e4e1ff9f5ea4c3550e571fe5bd1673e3 (patch)
tree12b5a466d632ddd183d5be7f806d6b53b2be3cf0
parent7c376183bb70d404e7a9bb4d31552f80de91927a (diff)
u-boot: calamari: moved to 2010.06 version
all changes are calamari specific moved to 2010.06 version made sure all u-boot variants are build and deployed (for nor/nand/sd/spi) removed the patches that have been merged upstream removed a stale file that was not used: buggy-gcc-really-no-spe.patch added patch to increase sd card timeout Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-rw-r--r--recipes/u-boot/u-boot-git/0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch66
-rw-r--r--recipes/u-boot/u-boot-git/0002-cmd_bootm.c-made-subcommand-array-static.patch26
-rw-r--r--recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch40
-rw-r--r--recipes/u-boot/u-boot-git/0003-cmd_i2c.c-reworked-subcommand-handling.patch109
-rw-r--r--recipes/u-boot/u-boot-git/0004-cmd_i2c.c-sorted-commands-alphabetically.patch48
-rw-r--r--recipes/u-boot/u-boot-git/0005-cmd_i2c.c-added-i2c-read-to-memory-function.patch107
-rw-r--r--recipes/u-boot/u-boot-git/0007-cmd_setexpr-allow-memory-addresses-and-env-vars-in-e.patch89
-rw-r--r--recipes/u-boot/u-boot-git/calamari/buggy-gcc-really-no-spe.patch16
-rw-r--r--recipes/u-boot/u-boot-git/calamari/fsl-esdhc.patch14
-rw-r--r--recipes/u-boot/u-boot_git.bb60
10 files changed, 63 insertions, 512 deletions
diff --git a/recipes/u-boot/u-boot-git/0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch b/recipes/u-boot/u-boot-git/0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch
deleted file mode 100644
index afaee11c5d..0000000000
--- a/recipes/u-boot/u-boot-git/0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 609d8536cd125793fe52b393e854dd7df238c954 Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Wed, 24 Feb 2010 09:23:00 +0100
-Subject: [PATCH 1/5] cmd_i2c.c: reduced subaddress length to 3 bytes
-
-according to some of the comments the subaddress length is 1 or 2, but we are being
-prepared for the case it becomes 3. However the code also accepted 4.
-This repairs this by changing the constand 4 to 3.
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_i2c.c | 10 +++++-----
- 1 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
-index 62cbd33..7531702 100644
---- a/common/cmd_i2c.c
-+++ b/common/cmd_i2c.c
-@@ -193,7 +193,7 @@ int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- for (j = 0; j < 8; j++) {
- if (argv[2][j] == '.') {
- alen = argv[2][j+1] - '0';
-- if (alen > 4) {
-+ if (alen > 3) {
- cmd_usage(cmdtp);
- return 1;
- }
-@@ -287,7 +287,7 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- for (j = 0; j < 8; j++) {
- if (argv[2][j] == '.') {
- alen = argv[2][j+1] - '0';
-- if (alen > 4) {
-+ if (alen > 3) {
- cmd_usage(cmdtp);
- return 1;
- }
-@@ -361,7 +361,7 @@ int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- for (j = 0; j < 8; j++) {
- if (argv[2][j] == '.') {
- alen = argv[2][j+1] - '0';
-- if (alen > 4) {
-+ if (alen > 3) {
- cmd_usage(cmdtp);
- return 1;
- }
-@@ -451,7 +451,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
- for (j = 0; j < 8; j++) {
- if (argv[2][j] == '.') {
- alen = argv[2][j+1] - '0';
-- if (alen > 4) {
-+ if (alen > 3) {
- cmd_usage(cmdtp);
- return 1;
- }
-@@ -607,7 +607,7 @@ int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- for (j = 0; j < 8; j++) {
- if (argv[2][j] == '.') {
- alen = argv[2][j+1] - '0';
-- if (alen > 4) {
-+ if (alen > 3) {
- cmd_usage(cmdtp);
- return 1;
- }
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/0002-cmd_bootm.c-made-subcommand-array-static.patch b/recipes/u-boot/u-boot-git/0002-cmd_bootm.c-made-subcommand-array-static.patch
deleted file mode 100644
index 9bf471e347..0000000000
--- a/recipes/u-boot/u-boot-git/0002-cmd_bootm.c-made-subcommand-array-static.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From bdf849874fdb53e9b58adedec3bb54e19d06792c Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Wed, 24 Feb 2010 10:28:34 +0100
-Subject: [PATCH 2/5] cmd_bootm.c: made subcommand array static
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_bootm.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
-index 23ab0c4..827d542 100644
---- a/common/cmd_bootm.c
-+++ b/common/cmd_bootm.c
-@@ -462,7 +462,7 @@ static int bootm_start_standalone(ulong iflag, int argc, char *argv[])
-
- /* we overload the cmd field with our state machine info instead of a
- * function pointer */
--cmd_tbl_t cmd_bootm_sub[] = {
-+static cmd_tbl_t cmd_bootm_sub[] = {
- U_BOOT_CMD_MKENT(start, 0, 1, (void *)BOOTM_STATE_START, "", ""),
- U_BOOT_CMD_MKENT(loados, 0, 1, (void *)BOOTM_STATE_LOADOS, "", ""),
- #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC)
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch b/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch
deleted file mode 100644
index 1b423b9195..0000000000
--- a/recipes/u-boot/u-boot-git/0002-cmd_itest.c-fix-pointer-dereferencing.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Subject: [PATCH 2/2] cmd_itest.c: fix pointer dereferencing
-Date: Mon, 22 Feb 2010 22:49:06 +0100
-Message-Id: <1266875346-17025-1-git-send-email-fransmeulenbroeks@gmail.com>
-X-Mailer: git-send-email 1.6.4.2
-
-fix pointer dereferencing
-if the size is .b and .w an 8 or 16 bit access is done.
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_itest.c | 9 +++++++--
- 1 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/common/cmd_itest.c b/common/cmd_itest.c
-index 5b301bf..58c5e7b 100644
---- a/common/cmd_itest.c
-+++ b/common/cmd_itest.c
-@@ -66,12 +66,17 @@ op_tbl_t op_table [] = {
-
- static long evalexp(char *s, int w)
- {
-- long l, *p;
-+ long l = 0;
-+ long *p;
-
- /* if the parameter starts with a * then assume is a pointer to the value we want */
- if (s[0] == '*') {
- p = (long *)simple_strtoul(&s[1], NULL, 16);
-- l = *p;
-+ switch (w) {
-+ case 1: return((long)(*(unsigned char *)p));
-+ case 2: return((long)(*(unsigned short *)p));
-+ case 4: return(*p);
-+ }
- } else {
- l = simple_strtoul(s, NULL, 16);
- }
---
-1.6.4.2
-
diff --git a/recipes/u-boot/u-boot-git/0003-cmd_i2c.c-reworked-subcommand-handling.patch b/recipes/u-boot/u-boot-git/0003-cmd_i2c.c-reworked-subcommand-handling.patch
deleted file mode 100644
index d681bc2a98..0000000000
--- a/recipes/u-boot/u-boot-git/0003-cmd_i2c.c-reworked-subcommand-handling.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 75ed15eae925d6e9c8078c8fb013d344d7f3d50f Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Wed, 24 Feb 2010 12:24:34 +0100
-Subject: [PATCH 3/5] cmd_i2c.c: reworked subcommand handling
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_i2c.c | 77 +++++++++++++++++++++++++++++++----------------------
- 1 files changed, 45 insertions(+), 32 deletions(-)
-
-diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
-index 7531702..e54fc20 100644
---- a/common/cmd_i2c.c
-+++ b/common/cmd_i2c.c
-@@ -1242,46 +1242,59 @@ int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
- return ret;
- }
-
--int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-+int do_i2c_mm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
- {
-- /* Strip off leading 'i2c' command argument */
-- argc--;
-- argv++;
-+ return mod_i2c_mem (cmdtp, 1, flag, argc, argv);
-+}
-+
-+int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-+{
-+ return mod_i2c_mem (cmdtp, 0, flag, argc, argv);
-+}
-
-+int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-+{
-+ i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-+ return 0;
-+}
-+
-+static cmd_tbl_t cmd_i2c_sub[] = {
- #if defined(CONFIG_I2C_MUX)
-- if (!strncmp(argv[0], "bu", 2))
-- return do_i2c_add_bus(cmdtp, flag, argc, argv);
-+ U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_add_bus, "", ""),
- #endif /* CONFIG_I2C_MUX */
-- if (!strncmp(argv[0], "sp", 2))
-- return do_i2c_bus_speed(cmdtp, flag, argc, argv);
-+ U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""),
- #if defined(CONFIG_I2C_MULTI_BUS)
-- if (!strncmp(argv[0], "de", 2))
-- return do_i2c_bus_num(cmdtp, flag, argc, argv);
-+ U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""),
- #endif /* CONFIG_I2C_MULTI_BUS */
-- if (!strncmp(argv[0], "md", 2))
-- return do_i2c_md(cmdtp, flag, argc, argv);
-- if (!strncmp(argv[0], "mm", 2))
-- return mod_i2c_mem (cmdtp, 1, flag, argc, argv);
-- if (!strncmp(argv[0], "mw", 2))
-- return do_i2c_mw(cmdtp, flag, argc, argv);
-- if (!strncmp(argv[0], "nm", 2))
-- return mod_i2c_mem (cmdtp, 0, flag, argc, argv);
-- if (!strncmp(argv[0], "cr", 2))
-- return do_i2c_crc(cmdtp, flag, argc, argv);
-- if (!strncmp(argv[0], "pr", 2))
-- return do_i2c_probe(cmdtp, flag, argc, argv);
-- if (!strncmp(argv[0], "re", 2)) {
-- i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-- return 0;
-- }
-- if (!strncmp(argv[0], "lo", 2))
-- return do_i2c_loop(cmdtp, flag, argc, argv);
-+ U_BOOT_CMD_MKENT(loop, 3, 1, do_i2c_loop, "", ""),
-+ U_BOOT_CMD_MKENT(md, 3, 1, do_i2c_md, "", ""),
-+ U_BOOT_CMD_MKENT(mm, 2, 1, do_i2c_mm, "", ""),
-+ U_BOOT_CMD_MKENT(mw, 3, 1, do_i2c_mw, "", ""),
-+ U_BOOT_CMD_MKENT(nm, 2, 1, do_i2c_nm, "", ""),
-+ U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""),
-+ U_BOOT_CMD_MKENT(reset, 0, 1, do_i2c_reset, "", ""),
- #if defined(CONFIG_CMD_SDRAM)
-- if (!strncmp(argv[0], "sd", 2))
-- return do_sdram(cmdtp, flag, argc, argv);
-+ U_BOOT_CMD_MKENT(sdram, 1, 1, do_i2c_sdram, "", ""),
- #endif
-- cmd_usage(cmdtp);
-- return 0;
-+ U_BOOT_CMD_MKENT(speed, 1, 1, do_i2c_bus_speed, "", ""),
-+};
-+
-+int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-+{
-+ cmd_tbl_t *c;
-+
-+ /* Strip off leading 'i2c' command argument */
-+ argc--;
-+ argv++;
-+
-+ c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE(cmd_i2c_sub));
-+
-+ if (c) {
-+ return c->cmd(cmdtp, flag, argc, argv);
-+ } else {
-+ cmd_usage(cmdtp);
-+ return 1;
-+ }
- }
-
- /***************************************************/
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/0004-cmd_i2c.c-sorted-commands-alphabetically.patch b/recipes/u-boot/u-boot-git/0004-cmd_i2c.c-sorted-commands-alphabetically.patch
deleted file mode 100644
index b433d6a582..0000000000
--- a/recipes/u-boot/u-boot-git/0004-cmd_i2c.c-sorted-commands-alphabetically.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 5ed358a930d5bb79510dadf4e22b8ed9f972f454 Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Thu, 25 Feb 2010 09:58:24 +0100
-Subject: [PATCH 4/5] cmd_i2c.c: sorted commands alphabetically
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_i2c.c | 11 +++++------
- 1 files changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
-index e54fc20..b51e3f4 100644
---- a/common/cmd_i2c.c
-+++ b/common/cmd_i2c.c
-@@ -1302,25 +1302,24 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
- U_BOOT_CMD(
- i2c, 6, 1, do_i2c,
- "I2C sub-system",
-- "speed [speed] - show or set I2C bus speed\n"
- #if defined(CONFIG_I2C_MUX)
-- "i2c bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes\n"
-+ "bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes\ni2c "
- #endif /* CONFIG_I2C_MUX */
-+ "crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
- #if defined(CONFIG_I2C_MULTI_BUS)
- "i2c dev [dev] - show or set current I2C bus\n"
- #endif /* CONFIG_I2C_MULTI_BUS */
-+ "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
- "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n"
- "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n"
- "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
- "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
-- "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
- "i2c probe - show devices on the I2C bus\n"
- "i2c reset - re-init the I2C Controller\n"
-- "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device"
- #if defined(CONFIG_CMD_SDRAM)
-- "\n"
-- "i2c sdram chip - print SDRAM configuration information"
-+ "i2c sdram chip - print SDRAM configuration information\n"
- #endif
-+ "i2c speed [speed] - show or set I2C bus speed"
- );
-
- #if defined(CONFIG_I2C_MUX)
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/0005-cmd_i2c.c-added-i2c-read-to-memory-function.patch b/recipes/u-boot/u-boot-git/0005-cmd_i2c.c-added-i2c-read-to-memory-function.patch
deleted file mode 100644
index 01d88548f5..0000000000
--- a/recipes/u-boot/u-boot-git/0005-cmd_i2c.c-added-i2c-read-to-memory-function.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From cac3d6cd05cc89a4c1495f7198218ef2ae8088ec Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Thu, 25 Feb 2010 10:05:37 +0100
-Subject: [PATCH 5/5] cmd_i2c.c: added i2c read to memory function
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
----
- common/cmd_i2c.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 60 insertions(+), 2 deletions(-)
-
-diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
-index b51e3f4..9e7143a 100644
---- a/common/cmd_i2c.c
-+++ b/common/cmd_i2c.c
-@@ -154,6 +154,63 @@ int i2c_set_bus_speed(unsigned int)
- */
- #define DISP_LINE_LEN 16
-
-+/*
-+ * Syntax:
-+ * i2c read {i2c_chip} {devaddr}{.0, .1, .2} {len} {memaddr}
-+ */
-+
-+int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-+{
-+ u_char chip;
-+ uint devaddr, alen, length;
-+ u_char *memaddr;
-+ int j;
-+
-+ if (argc != 5) {
-+ cmd_usage(cmdtp);
-+ return 1;
-+ }
-+
-+ /*
-+ * I2C chip address
-+ */
-+ chip = simple_strtoul(argv[1], NULL, 16);
-+
-+ /*
-+ * I2C data address within the chip. This can be 1 or
-+ * 2 bytes long. Some day it might be 3 bytes long :-).
-+ */
-+ devaddr = simple_strtoul(argv[2], NULL, 16);
-+ alen = 1;
-+ for (j = 0; j < 8; j++) {
-+ if (argv[2][j] == '.') {
-+ alen = argv[2][j+1] - '0';
-+ if (alen > 3) {
-+ cmd_usage(cmdtp);
-+ return 1;
-+ }
-+ break;
-+ } else if (argv[2][j] == '\0')
-+ break;
-+ }
-+
-+ /*
-+ * Length is the number of objects, not number of bytes.
-+ */
-+ length = simple_strtoul(argv[3], NULL, 16);
-+
-+ /*
-+ * memaddr is the address where to store things in memory
-+ */
-+ memaddr = (u_char *)simple_strtoul(argv[4], NULL, 16);
-+
-+ if (i2c_read(chip, devaddr, alen, memaddr, length) != 0) {
-+ puts ("Error reading the chip.\n");
-+ return 1;
-+ }
-+ return 0;
-+}
-+
- int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- {
- u_char chip;
-@@ -1272,6 +1329,7 @@ static cmd_tbl_t cmd_i2c_sub[] = {
- U_BOOT_CMD_MKENT(mw, 3, 1, do_i2c_mw, "", ""),
- U_BOOT_CMD_MKENT(nm, 2, 1, do_i2c_nm, "", ""),
- U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""),
-+ U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, "", ""),
- U_BOOT_CMD_MKENT(reset, 0, 1, do_i2c_reset, "", ""),
- #if defined(CONFIG_CMD_SDRAM)
- U_BOOT_CMD_MKENT(sdram, 1, 1, do_i2c_sdram, "", ""),
-@@ -1315,6 +1373,7 @@ U_BOOT_CMD(
- "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
- "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
- "i2c probe - show devices on the I2C bus\n"
-+ "i2c read chip address[.0, .1, .2] length memaddress - read to memory \n"
- "i2c reset - re-init the I2C Controller\n"
- #if defined(CONFIG_CMD_SDRAM)
- "i2c sdram chip - print SDRAM configuration information\n"
-@@ -1322,8 +1381,7 @@ U_BOOT_CMD(
- "i2c speed [speed] - show or set I2C bus speed"
- );
-
--#if defined(CONFIG_I2C_MUX)
--
-+#if defined(CONFIG_I2C_MUX)
- int i2c_mux_add_device(I2C_MUX_DEVICE *dev)
- {
- I2C_MUX_DEVICE *devtmp = i2c_mux_devices;
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/0007-cmd_setexpr-allow-memory-addresses-and-env-vars-in-e.patch b/recipes/u-boot/u-boot-git/0007-cmd_setexpr-allow-memory-addresses-and-env-vars-in-e.patch
deleted file mode 100644
index 13408657b4..0000000000
--- a/recipes/u-boot/u-boot-git/0007-cmd_setexpr-allow-memory-addresses-and-env-vars-in-e.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 0d685fe90ab92ccb9f15b7d79b1063f5b79b2dd5 Mon Sep 17 00:00:00 2001
-From: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-Date: Thu, 25 Feb 2010 11:05:31 +0100
-Subject: [PATCH 7/7] cmd_setexpr: allow memory addresses and env vars in expressions
-
-This patch add functionality to use memory addresses and environment variables in
-expressions. This increases the power of expressions substantially
-
-It adheres to the standard convemtions: memory addresses can be given in the format
-*address (e.g. *1000), environment variables as $this_var.
-environment variables are not processed recursively but can contain both constants
-and memory addresses.
-
-Rationale for this change is that it allows masking off bits from a byte that is
-obtained by reading data from e.g. i2c.
-
-Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-
----
-
-If recursive environment vars is desired: this can be added easily by changing the
-if statement into a while statement.
-I figured that would be somewhat over the top though (and, unless you take
-special precautions you can run into an endless loop if an env var contains
-its own name.
-If it is desired, please let me know and I happily will add it.
----
- common/cmd_setexpr.c | 31 ++++++++++++++++++++++++++++---
- 1 files changed, 28 insertions(+), 3 deletions(-)
-
-diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c
-index f8b5d4d..a7c6f53 100644
---- a/common/cmd_setexpr.c
-+++ b/common/cmd_setexpr.c
-@@ -28,10 +28,28 @@
- #include <config.h>
- #include <command.h>
-
-+static ulong get_arg(char *s, int w)
-+{
-+ ulong *p;
-+
-+ /* if the parameter starts with a * then assume is a pointer to the value we want */
-+ if (s[0] == '*') {
-+ p = (ulong *)simple_strtoul(&s[1], NULL, 16);
-+ switch (w) {
-+ case 1: return((ulong)(*(uchar *)p));
-+ case 2: return((ulong)(*(ushort *)p));
-+ case 4: return(*p);
-+ }
-+ } else {
-+ return simple_strtoul(s, NULL, 16);
-+ }
-+}
-+
- int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- {
- ulong a, b;
- char buf[16];
-+ int w;
-
- /* Validate arguments */
- if ((argc != 5) || (strlen(argv[3]) != 1)) {
-@@ -39,8 +61,10 @@ int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- return 1;
- }
-
-- a = simple_strtoul(argv[2], NULL, 16);
-- b = simple_strtoul(argv[4], NULL, 16);
-+ w = cmd_get_data_size(argv[0], 4);
-+
-+ a = get_arg(argv[2], w);
-+ b = get_arg(argv[4], w);
-
- switch (argv[3][0]) {
- case '|': sprintf(buf, "%lx", (a | b)); break;
-@@ -64,7 +88,8 @@ int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
- U_BOOT_CMD(
- setexpr, 5, 0, do_setexpr,
- "set environment variable as the result of eval expression",
-- "name value1 <op> value2\n"
-+ "[.b, .w, .l] name value1 <op> value2\n"
- " - set environment variable 'name' to the result of the evaluated\n"
- " express specified by <op>. <op> can be &, |, ^, +, -, *, /, %"
-+ " size argument is only meaningful if value1 and/or value2 are memory addresses"
- );
---
-1.7.0
-
diff --git a/recipes/u-boot/u-boot-git/calamari/buggy-gcc-really-no-spe.patch b/recipes/u-boot/u-boot-git/calamari/buggy-gcc-really-no-spe.patch
deleted file mode 100644
index 1ae2cb9a4b..0000000000
--- a/recipes/u-boot/u-boot-git/calamari/buggy-gcc-really-no-spe.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: git/cpu/mpc85xx/config.mk
-===================================================================
---- git.orig/cpu/mpc85xx/config.mk 2009-10-23 13:15:11.000000000 +0200
-+++ git/cpu/mpc85xx/config.mk 2009-10-23 13:17:27.000000000 +0200
-@@ -24,6 +24,11 @@
- PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
-
- PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
-+
-+# -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
-+# see "[PATCH,rs6000] make -mno-spe work as expected" on
-+# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
-+PLATFORM_CPPFLAGS +=$(call cc-option,-mspe=yes)
- PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe)
-
- # Use default linker script. Board port can override in board/*/config.mk
diff --git a/recipes/u-boot/u-boot-git/calamari/fsl-esdhc.patch b/recipes/u-boot/u-boot-git/calamari/fsl-esdhc.patch
new file mode 100644
index 0000000000..1a9c5a0662
--- /dev/null
+++ b/recipes/u-boot/u-boot-git/calamari/fsl-esdhc.patch
@@ -0,0 +1,14 @@
+t a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
+index a368fe6..f982a69 100644
+--- a/drivers/mmc/fsl_esdhc.c
++++ b/drivers/mmc/fsl_esdhc.c
+@@ -208,7 +208,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
+
+ /* Calculate the timeout period for data transactions */
+ timeout = fls(mmc->tran_speed/10) - 1;
+- timeout -= 13;
++ timeout -= 11;
+
+ if (timeout > 14)
+ timeout = 14;
+
diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb
index e44b8391f1..ed2ee9265b 100644
--- a/recipes/u-boot/u-boot_git.bb
+++ b/recipes/u-boot/u-boot_git.bb
@@ -1,5 +1,5 @@
require u-boot.inc
-PR ="r61"
+PR ="r62"
FILESPATHPKG =. "u-boot-git:"
@@ -76,22 +76,60 @@ SRC_URI_beagleboard = "git://www.denx.de/git/u-boot.git;protocol=git \
SRCREV_beagleboard = "ca6e1c136ddb720c3bb2cc043b99f7f06bc46c55"
PV_beagleboard = "2010.03+${PR}+gitr${SRCREV}"
-SRCREV_calamari = "533cf3a024947aaf74c16573a6d951cd0c3d0a7d"
+SRCREV_calamari = "1f932d68bf8c3bb5fec34dc5c5d654fc8614dd31"
-PV_calamari = "2009.11+${PR}+gitr${SRCREV}"
+PV_calamari = "2010.06+${PR}+gitr${SRCREV}"
SRC_URI_calamari = " \
git://git.denx.de/u-boot-mpc85xx.git;protocol=git \
- file://0002-cmd_itest.c-fix-pointer-dereferencing.patch \
- file://0001-cmd_i2c.c-reduced-subaddress-length-to-3-bytes.patch \
- file://0002-cmd_bootm.c-made-subcommand-array-static.patch \
- file://0003-cmd_i2c.c-reworked-subcommand-handling.patch \
- file://0004-cmd_i2c.c-sorted-commands-alphabetically.patch \
- file://0005-cmd_i2c.c-added-i2c-read-to-memory-function.patch \
- file://0007-cmd_setexpr-allow-memory-addresses-and-env-vars-in-e.patch \
+ file://fsl-esdhc.patch \
"
-UBOOT_MACHINE_calamari = "MPC8536DS_config"
+# calamari has different u-boot versions for nor, nand, sdcard and spiflash
+# build them all
+do_compile_calamari () {
+ unset LDFLAGS
+ unset CFLAGS
+ unset CPPFLAGS
+ oe_runmake MPC8536DS_config
+ oe_runmake all
+ mv u-boot.bin u-boot-nor.bin
+ oe_runmake clean
+ oe_runmake MPC8536DS_NAND_config
+ oe_runmake all
+ mv u-boot.bin u-boot-nand.bin
+ oe_runmake clean
+ oe_runmake MPC8536DS_SDCARD_config
+ oe_runmake all
+ mv u-boot.bin u-boot-sdcard.bin
+ oe_runmake clean
+ oe_runmake MPC8536DS_SPIFLASH_config
+ oe_runmake all
+ mv u-boot.bin u-boot-spiflash.bin
+ oe_runmake tools env
+}
+do_deploy_calamari () {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 ${S}/u-boot-nor.bin ${DEPLOY_DIR_IMAGE}/u-boot-nor.bin
+ install -m 0644 ${S}/u-boot-nand.bin ${DEPLOY_DIR_IMAGE}/u-boot-nand.bin
+ install -m 0644 ${S}/u-boot-sdcard.bin ${DEPLOY_DIR_IMAGE}/u-boot-sdcard.bin
+ install -m 0644 ${S}/u-boot-spiflash.bin ${DEPLOY_DIR_IMAGE}/u-boot-spiflash.bin
+ install -m 0755 tools/mkimage ${STAGING_BINDIR_NATIVE}/uboot-mkimage
+}
+
+do_install_calamari () {
+ install -d ${D}/boot
+ install ${S}/u-boot-nor.bin ${D}/boot/u-boot-nor.bin
+ install ${S}/u-boot-nand.bin ${D}/boot/u-boot-nand.bin
+ install ${S}/u-boot-sdcard.bin ${D}/boot/u-boot-sdcard.bin
+ install ${S}/u-boot-spiflash.bin ${D}/boot/u-boot-spiflash.bin
+ ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+
+ install -d ${D}${base_sbindir}
+ install -d ${D}${sysconfdir}
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+}
SRC_URI_omap3-touchbook = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;protocol=git \
file://fw_env.config \
file://dss2.patch \