Patchwork linux-2.6.24: add support for AMIC flashes (e.g. A29L160AT)

login
register
mail settings
Submitter Steffen Sledz
Date March 10, 2011, 5:46 p.m.
Message ID <1299779187-17515-1-git-send-email-sledz@dresearch.de>
Download mbox | patch
Permalink /patch/1255/
State Accepted
Headers show

Comments

Steffen Sledz - March 10, 2011, 5:46 p.m.
Similar patch is on its way to the mainline kernel:
http://thread.gmane.org/gmane.linux.kernel/1111144

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 recipes/linux/linux-2.6.24/cfi-amic.patch |   22 ++++++++++++++++++++++
 recipes/linux/linux_2.6.24.bb             |    3 ++-
 2 files changed, 24 insertions(+), 1 deletions(-)
 create mode 100644 recipes/linux/linux-2.6.24/cfi-amic.patch

Patch

diff --git a/recipes/linux/linux-2.6.24/cfi-amic.patch b/recipes/linux/linux-2.6.24/cfi-amic.patch
new file mode 100644
index 0000000..feb673f
--- /dev/null
+++ b/recipes/linux/linux-2.6.24/cfi-amic.patch
@@ -0,0 +1,22 @@ 
+diff -Nurd linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c
+--- linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c	2011-03-10 17:05:22.868634509 +0100
++++ linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c	2011-03-10 17:06:58.723636256 +0100
+@@ -219,6 +219,7 @@
+ static struct cfi_fixup cfi_fixup_table[] = {
+ #ifdef AMD_BOOTLOC_BUG
+ 	{ CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL },
++	{ CFI_MFR_AMIC, CFI_ID_ANY, fixup_amd_bootblock, NULL },
+ #endif
+ 	{ CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, },
+ 	{ CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, },
+diff -Nurd linux-2.6.24.orig//include/linux/mtd/cfi.h linux-2.6.24/include/linux/mtd/cfi.h
+--- linux-2.6.24.orig//include/linux/mtd/cfi.h	2011-03-10 17:05:19.584884614 +0100
++++ linux-2.6.24/include/linux/mtd/cfi.h	2011-03-10 17:08:03.886636402 +0100
+@@ -485,6 +485,7 @@
+ #define CFI_ID_ANY  0xffff
+ 
+ #define CFI_MFR_AMD 0x0001
++#define CFI_MFR_AMIC 0x0037
+ #define CFI_MFR_ATMEL 0x001F
+ #define CFI_MFR_ST  0x0020 	/* STMicroelectronics */
+ 
diff --git a/recipes/linux/linux_2.6.24.bb b/recipes/linux/linux_2.6.24.bb
index d03d2b7..5c05593 100644
--- a/recipes/linux/linux_2.6.24.bb
+++ b/recipes/linux/linux_2.6.24.bb
@@ -11,13 +11,14 @@  DEFAULT_PREFERENCE_hipox = "1"
 DEFAULT_PREFERENCE_cs-e9302 = "1"
 DEFAULT_PREFERENCE_smartq5 = "1"
 
-PR = "r35"
+PR = "r36"
 
 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2;name=kernel \
            ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.7.bz2;apply=yes;name=stablepatch \
            file://squashfs-lzma-2.6.24.patch \
            file://ubifs-v2.6.24.patch \
            file://ubifs-v2.6.24-silent-get-sb.patch \
+           file://cfi-amic.patch \
            file://defconfig"
 
 # Moved away temporarely until committed properly (work in progress).