summaryrefslogtreecommitdiff
path: root/polux/linux-2.6.10
diff options
context:
space:
mode:
authorYacine Belkadi2012-02-24 12:06:54 +0100
committerYacine Belkadi2012-06-11 13:39:52 +0200
commit9097fcd601ee072c9d7f6a6c9d4a79d4df363a20 (patch)
treed995575a57c1e4c5f548990e1490e530d36f6896 /polux/linux-2.6.10
parent6698f7a136d6fdabb8385203dd585eb5222294b9 (diff)
polux/linux: adapt the m25p80 flash driver, refs #2964
flash_info.writesize doesn't exist in 2.6.10. The closest thing is oobblock, but it's more of a NAND flash thing.
Diffstat (limited to 'polux/linux-2.6.10')
-rw-r--r--polux/linux-2.6.10/drivers/mtd/devices/m25p80.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/polux/linux-2.6.10/drivers/mtd/devices/m25p80.c b/polux/linux-2.6.10/drivers/mtd/devices/m25p80.c
index 980f3daa37..38fccf85f2 100644
--- a/polux/linux-2.6.10/drivers/mtd/devices/m25p80.c
+++ b/polux/linux-2.6.10/drivers/mtd/devices/m25p80.c
@@ -27,8 +27,8 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
-#ifdef CONFIG_ARCH_SPC300
-#include <asm/arch/hardware/spi.h>
+#ifdef CONFIG_ARCH_MSE500
+#include <asm/arch/spc300/hardware/spi.h>
#endif
@@ -69,7 +69,7 @@
struct m25p {
struct spi_device *spi;
- struct mutex lock;
+ struct semaphore lock;
struct mtd_info mtd;
unsigned partitioned:1;
u8 erase_opcode;
@@ -320,7 +320,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
flash->command[2] = from >> 8;
flash->command[3] = from;
-#ifndef CONFIG_ARCH_SPC300
+#ifndef CONFIG_ARCH_MSE500
spi_sync(flash->spi, &m);
*retlen = m.actual_length - sizeof(flash->command);
@@ -660,7 +660,6 @@ static int __devinit m25p_probe(struct spi_device *spi)
flash->mtd.name = spi->dev.bus_id;
flash->mtd.type = MTD_NORFLASH;
- flash->mtd.writesize = 1;
flash->mtd.flags = MTD_CAP_NORFLASH;
flash->mtd.size = info->sector_size * info->n_sectors;
flash->mtd.erase = m25p80_erase;