diff options
author | Luka Perkov <luka@openwrt.org> | 2013-01-22 12:55:01 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2013-01-22 12:55:01 +0000 |
commit | 75c9be5c1ea4742c863786421e34195570d46b65 (patch) | |
tree | 44bd3fae7a20040579a8baa390863bafe433a99f /package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch | |
parent | 4c8c6257d40fbddea959a9456e5737cb0901f50d (diff) | |
download | master-187ad058-75c9be5c1ea4742c863786421e34195570d46b65.tar.gz master-187ad058-75c9be5c1ea4742c863786421e34195570d46b65.tar.bz2 master-187ad058-75c9be5c1ea4742c863786421e34195570d46b65.zip |
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/0008-sf-eon-add-support-for-4-byte-address-mode.patch')
-rw-r--r-- | package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch b/package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch new file mode 100644 index 0000000000..c037a866dd --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch @@ -0,0 +1,43 @@ +From 37254e3284f61ea495f73a78b7c8efae983781e2 Mon Sep 17 00:00:00 2001 +From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> +Date: Wed, 7 Nov 2012 14:10:07 +0100 +Subject: sf: eon: add support for 4-byte address mode + +Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> + +--- a/drivers/mtd/spi/eon.c ++++ b/drivers/mtd/spi/eon.c +@@ -10,6 +10,8 @@ + + #include "spi_flash_internal.h" + ++#define EN25XX_EN4B 0xb7 /* Enter 4-byte mode */ ++ + struct eon_spi_flash_params { + u16 idcode; + u16 nr_sectors; +@@ -29,6 +31,13 @@ static const struct eon_spi_flash_params + }, + }; + ++static __maybe_unused int eon_set_4byte_mode(struct spi_flash *flash) ++{ ++ struct spi_slave *spi = flash->spi; ++ ++ return spi_flash_cmd(spi, EN25XX_EN4B, NULL, 0); ++} ++ + int spi_flash_probe_eon(struct spi_flash *flash, u8 *idcode) + { + const struct eon_spi_flash_params *params; +@@ -57,5 +66,10 @@ int spi_flash_probe_eon(struct spi_flash + flash->size = 256 * 16 + * params->nr_sectors; + ++#ifdef CONFIG_SPI_FLASH_4BYTE_MODE ++ if (flash->size > (1 << 24)) ++ flash->set_4byte_mode = eon_set_4byte_mode; ++#endif ++ + return 1; + } |