aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/amazon/patches-2.6.30/160-cfi-swap.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2009-11-28 22:17:37 +0000
committerHauke Mehrtens <hauke@openwrt.org>2009-11-28 22:17:37 +0000
commitb1d12c1feb88218b3d60dc61a16380ee09be90a2 (patch)
treef9c0860e6341d2d8c2f4c8f529bf96a6caddc0f5 /target/linux/amazon/patches-2.6.30/160-cfi-swap.patch
parentd4f45a44bd71cd5845b53a33097b0ad8d8a5c474 (diff)
downloadupstream-b1d12c1feb88218b3d60dc61a16380ee09be90a2.tar.gz
upstream-b1d12c1feb88218b3d60dc61a16380ee09be90a2.tar.bz2
upstream-b1d12c1feb88218b3d60dc61a16380ee09be90a2.zip
[amazon] Add kernel 2.6.30 support
The device is booting and Ethernet is working, but nothing more was tested. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18589 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/amazon/patches-2.6.30/160-cfi-swap.patch')
-rw-r--r--target/linux/amazon/patches-2.6.30/160-cfi-swap.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/amazon/patches-2.6.30/160-cfi-swap.patch b/target/linux/amazon/patches-2.6.30/160-cfi-swap.patch
new file mode 100644
index 0000000000..4809fccd8d
--- /dev/null
+++ b/target/linux/amazon/patches-2.6.30/160-cfi-swap.patch
@@ -0,0 +1,56 @@
+--- a/drivers/mtd/chips/cfi_cmdset_0002.c
++++ b/drivers/mtd/chips/cfi_cmdset_0002.c
+@@ -1090,6 +1090,9 @@ static int __xipram do_write_oneword(str
+ int retry_cnt = 0;
+
+ adr += chip->start;
++#ifdef CONFIG_AMAZON
++ adr ^= 2;
++#endif
+
+ spin_lock(chip->mutex);
+ ret = get_chip(map, chip, adr, FL_WRITING);
+@@ -1372,7 +1375,11 @@ static int __xipram do_write_buffer(stru
+ z = 0;
+ while(z < words * map_bankwidth(map)) {
+ datum = map_word_load(map, buf);
++#ifdef CONFIG_AMAZON
++ map_write(map, datum, (adr + z) ^ 0x2);
++#else
+ map_write(map, datum, adr + z);
++#endif
+
+ z += map_bankwidth(map);
+ buf += map_bankwidth(map);
+@@ -1617,6 +1624,9 @@ static int __xipram do_erase_oneblock(st
+ int ret = 0;
+
+ adr += chip->start;
++#ifdef CONFIG_AMAZON
++ adr ^= 2;
++#endif
+
+ spin_lock(chip->mutex);
+ ret = get_chip(map, chip, adr, FL_ERASING);
+@@ -1745,6 +1755,10 @@ static int do_atmel_lock(struct map_info
+ struct cfi_private *cfi = map->fldrv_priv;
+ int ret;
+
++#ifdef CONFIG_AMAZON
++ adr ^= 2;
++#endif
++
+ spin_lock(chip->mutex);
+ ret = get_chip(map, chip, adr + chip->start, FL_LOCKING);
+ if (ret)
+@@ -1781,6 +1795,10 @@ static int do_atmel_unlock(struct map_in
+ struct cfi_private *cfi = map->fldrv_priv;
+ int ret;
+
++#ifdef CONFIG_AMAZON
++ adr ^= 2;
++#endif
++
+ spin_lock(chip->mutex);
+ ret = get_chip(map, chip, adr + chip->start, FL_UNLOCKING);
+ if (ret)