From 27b76ab0671089c47506615a796a261e993896a7 Mon Sep 17 00:00:00 2001 From: James <> Date: Sun, 17 Mar 2013 12:16:37 +0000 Subject: fish --- .../0007-sf-eon-use-16-bit-ID-for-comparison.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/boot/uboot-lantiq/patches/0007-sf-eon-use-16-bit-ID-for-comparison.patch (limited to 'package/boot/uboot-lantiq/patches/0007-sf-eon-use-16-bit-ID-for-comparison.patch') diff --git a/package/boot/uboot-lantiq/patches/0007-sf-eon-use-16-bit-ID-for-comparison.patch b/package/boot/uboot-lantiq/patches/0007-sf-eon-use-16-bit-ID-for-comparison.patch new file mode 100644 index 0000000..6836674 --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0007-sf-eon-use-16-bit-ID-for-comparison.patch @@ -0,0 +1,45 @@ +From d32f45357f0475a2f810752eeb9412fe692e1c0a Mon Sep 17 00:00:00 2001 +From: Daniel Schwierzeck +Date: Wed, 7 Nov 2012 14:09:21 +0100 +Subject: sf: eon: use 16 bit ID for comparison + +Signed-off-by: Daniel Schwierzeck + +--- a/drivers/mtd/spi/eon.c ++++ b/drivers/mtd/spi/eon.c +@@ -11,19 +11,19 @@ + #include "spi_flash_internal.h" + + struct eon_spi_flash_params { +- u8 idcode1; ++ u16 idcode; + u16 nr_sectors; + const char *name; + }; + + static const struct eon_spi_flash_params eon_spi_flash_table[] = { + { +- .idcode1 = 0x16, ++ .idcode = 0x3016, + .nr_sectors = 1024, + .name = "EN25Q32B", + }, + { +- .idcode1 = 0x18, ++ .idcode = 0x3018, + .nr_sectors = 4096, + .name = "EN25Q128", + }, +@@ -33,10 +33,11 @@ int spi_flash_probe_eon(struct spi_flash + { + const struct eon_spi_flash_params *params; + unsigned int i; ++ u16 id = idcode[2] | idcode[1] << 8; + + for (i = 0; i < ARRAY_SIZE(eon_spi_flash_table); ++i) { + params = &eon_spi_flash_table[i]; +- if (params->idcode1 == idcode[2]) ++ if (params->idcode == id) + break; + } + -- cgit v1.2.3