MTD: Add support for the CPCI405 board
PATCH 1/1 MTD: Add support for the CPCI405 board
This patch adds MTD support for the NOR flash on CPCI405 boards.
These boards may have different flash chips installed. Some of them are detected by the cfi probing. Others need the jedec_probe support. The patch also adds support for SST39VF3201 chips in jedec_probe.c
The patch is tested with all available flash combinations against the recent mtd-2.6.git repository.
Regards
Matthias
drivers/mtd/chips/jedec_probe.c +17 -0
@@ -147,6 +147,7 @@ #define SST29LE512 0x003d#define SST39LF800 0x2781#define SST39LF160 0x2782#define SST39VF1601 0x234b +#define SST39VF3201 0x235b#define SST39LF512 0x00D4#define SST39LF010 0x00D5#define SST39LF020 0x00D6
@@ -1483,6 +1484,22 @@ static const struct amd_flash_info jedec } }, { + .mfr_id = MANUFACTURER_SST, /* should be CFI */ + .dev_id = SST39VF3201, + .name = "SST 39VF3201", + .uaddr = { + [0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ + [1 ] = MTD_UADDR_0x5555_0x2AAA/* x16 */ + }, + .DevSize = SIZE_4MiB, + .CmdSet = P_ID_AMD_STD, + .NumEraseRegions= 2, + .regions = { +ERASEINFO (0x1000 ,512 ), + ERASEINFO(0x1000,512) + } + + }, { .mfr_id = MANUFACTURER_ST, /* FIXME - CFI device? */ .dev_id = M29W800DT, .name = "ST M29W800DT",
drivers/mtd/maps/Kconfig +8 -0
@@ -323,6 +323,14 @@ config MTD_WALNUT Walnut board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. +config MTD_CPCI405 + tristate "Flash devices mapped on esd CPCI405" + depends on MTD_JEDECPROBE && CPCI405 + help + This enables access routines for the flash chips on the esd + CPCI405 board. If you have this board and would like to use the + flash chips on it, say 'Y'. + config MTD_EBONY tristate "Flash devices mapped on IBM 440GP Ebony" depends on MTD_JEDECPROBE && EBONY
drivers/mtd/maps/Makefile +1 -0
@@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_OCOTEA) += ocotea.o obj-$(CONFIG_MTD_BEECH) += beech-mtd.o obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o obj-$(CONFIG_MTD_WALNUT) += walnut.o +obj-$(CONFIG_MTD_CPCI405) += cpci405-mtd.o obj-$(CONFIG_MTD_H720X) += h720x-flash.o obj-$(CONFIG_MTD_SBC8240) += sbc8240.o obj-$(CONFIG_MTD_NOR_TOTO) += omap-toto-flash.o
drivers/mtd/maps/cpci405-mtd.c new file +142 -0
142 lines not on this page · raw message
Quoted 5 lines · Matthias Fuchs
This patch adds MTD support for the NOR flash on CPCI405 boards.
These boards may have different flash chips installed. Some of them are detected by the cfi probing. Others need the
jedec_probesupport. The patch also adds support for SST39VF3201 chips injedec_probe.c
Please could you send the SST39VF3201 support separately?
I want to stop adding map drivers -- any reason you can't use physmap? Either with a platform_device, or preferably by extending it to use an of_device too, since this is a PPC platform.
Signature · 1 line
dwmw2
Hi,
Quoted 1 line · David Woodhouse
Please could you send the SST39VF3201 support separately?
See below.
Quoted 2 lines
I want to stop adding map drivers -- any reason you can't use physmap?
No special reason. Just by habit.
Quoted 2 lines
Either with a
platform_device, or preferably by extending it to use anof_devicetoo, since this is a PPC platform.
Ok, I will take a look at that. Probably cloning katana_setup_mtd() from the katana board will be just fine.
Regards
Matthias
---
(quoted diff) +0 -0
b/drivers/mtd/chips/jedec_probe.c
index 517ea33..f99f73e 100644
drivers/mtd/chips/jedec_probe.c +17 -0
@@ -147,6 +147,7 @@ #define SST29LE512 0x003d#define SST39LF800 0x2781#define SST39LF160 0x2782#define SST39VF1601 0x234b +#define SST39VF3201 0x235b#define SST39LF512 0x00D4#define SST39LF010 0x00D5#define SST39LF020 0x00D6
@@ -1483,6 +1484,22 @@ static const struct amd_flash_info jedec } }, { + .mfr_id = MANUFACTURER_SST, /* should be CFI */ + .dev_id = SST39VF3201, + .name = "SST 39VF3201", + .uaddr = { + [0] = MTD_UADDR_0x5555_0x2AAA, /* x8 */ + [1 ] = MTD_UADDR_0x5555_0x2AAA/* x16 */ + }, + .DevSize = SIZE_4MiB, + .CmdSet = P_ID_AMD_STD, + .NumEraseRegions= 2, + .regions = { +ERASEINFO (0x1000 ,512 ), + ERASEINFO(0x1000,512) + } + + }, { .mfr_id = MANUFACTURER_ST, /* FIXME - CFI
device? */
.dev_id = M29W800DT,
.name = "ST M29W800DT",