summaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-01-22 12:55:01 +0000
committerLuka Perkov <luka@openwrt.org>2013-01-22 12:55:01 +0000
commit2245726371cf10fa383303cc73500d83d8e246f9 (patch)
tree9c3522c5a280b4c3948162da7b6d972ad6378894 /package/boot/uboot-lantiq/patches/0008-sf-eon-add-support-for-4-byte-address-mode.patch
parentbab482b93f6ad07e471a86a3b9a19d7e15b85059 (diff)
downloadmaster-31e0f0ae-2245726371cf10fa383303cc73500d83d8e246f9.tar.gz
master-31e0f0ae-2245726371cf10fa383303cc73500d83d8e246f9.tar.bz2
master-31e0f0ae-2245726371cf10fa383303cc73500d83d8e246f9.zip
uboot-lantiq: upgrade to 2013.01
SVN-Revision: 35292
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.patch43
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;
+ }