mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-15 10:53:09 +02:00
84e11fcd5a
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19458 3c298f89-4303-0410-b956-a3cf2f4a3e73
57 lines
1.3 KiB
Diff
57 lines
1.3 KiB
Diff
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
|
|
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
|
|
@@ -1079,6 +1079,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);
|
|
@@ -1361,7 +1364,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);
|
|
@@ -1606,6 +1613,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);
|
|
@@ -1734,6 +1744,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)
|
|
@@ -1770,6 +1784,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)
|