diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base')
-rw-r--r-- | package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base b/package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base new file mode 100644 index 0000000..c037a86 --- /dev/null +++ b/package/boot/uboot-lantiq/patches/.svn/text-base/0008-sf-eon-add-support-for-4-byte-address-mode.patch.svn-base @@ -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; + } |