diff options
author | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-22 12:55:01 +0000 |
---|---|---|
committer | luka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-22 12:55:01 +0000 |
commit | f4446e8f9e1be2d0b78ef493740b8871e20c8e57 (patch) | |
tree | 44bd3fae7a20040579a8baa390863bafe433a99f /package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch | |
parent | 1e8c389c62b26ad61d7bbecf18e7686ad12a648c (diff) |
uboot-lantiq: upgrade to 2013.01
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35292 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch')
-rw-r--r-- | package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch b/package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch new file mode 100644 index 0000000000..63a21af121 --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0002-sf-handle-CONFIG_MANUAL_RELOC.patch @@ -0,0 +1,46 @@ +From 60e8a35f0efa5a7e5d797a3f239971c84061ef11 Mon Sep 17 00:00:00 2001 +From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> +Date: Tue, 6 Nov 2012 21:39:47 +0100 +Subject: sf: handle CONFIG_MANUAL_RELOC + +Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> + +--- a/drivers/mtd/spi/spi_flash.c ++++ b/drivers/mtd/spi/spi_flash.c +@@ -293,7 +293,7 @@ int spi_flash_cmd_write_status(struct sp + */ + #define IDCODE_CONT_LEN 0 + #define IDCODE_PART_LEN 5 +-static const struct { ++static struct { + const u8 shift; + const u8 idcode; + struct spi_flash *(*probe) (struct spi_slave *spi, u8 *idcode); +@@ -335,6 +335,10 @@ static const struct { + }; + #define IDCODE_LEN (IDCODE_CONT_LEN + IDCODE_PART_LEN) + ++#ifdef CONFIG_NEEDS_MANUAL_RELOC ++DECLARE_GLOBAL_DATA_PTR; ++#endif ++ + struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs, + unsigned int max_hz, unsigned int spi_mode) + { +@@ -342,6 +346,16 @@ struct spi_flash *spi_flash_probe(unsign + struct spi_flash *flash = NULL; + int ret, i, shift; + u8 idcode[IDCODE_LEN], *idp; ++#ifdef CONFIG_NEEDS_MANUAL_RELOC ++ static int relocated; ++ ++ if (!relocated) { ++ for (i = 0; i < ARRAY_SIZE(flashes); i++) ++ flashes[i].probe += gd->reloc_off; ++ ++ relocated = 1; ++ } ++#endif + + spi = spi_setup_slave(bus, cs, max_hz, spi_mode); + if (!spi) { |