diff options
author | Artem B. Bityuckiy <dedekind@infradead.org> | 2005-07-06 10:43:18 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-07-06 13:40:38 -0400 |
commit | b3539219c9ea20ebf6a5ea3cc534f423a3607c41 (patch) | |
tree | d17c31c0eac0a7290ba5011b59a100fd9e9c9532 /drivers/mtd | |
parent | 6430a8def12edebc1c9c7c2621d33ca0e8653c33 (diff) | |
parent | a18bcb7450840f07a772a45229de4811d930f461 (diff) |
Merge with rsync://fileserver/linux
Update to 2.6.12-rc3
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/afs.c | 16 | ||||
-rw-r--r-- | drivers/mtd/maps/Kconfig | 10 | ||||
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 29 |
3 files changed, 40 insertions, 15 deletions
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c index 801e6c7d0892..7363e101eb0f 100644 --- a/drivers/mtd/afs.c +++ b/drivers/mtd/afs.c | |||
@@ -219,7 +219,7 @@ static int parse_afs_partitions(struct mtd_info *mtd, | |||
219 | */ | 219 | */ |
220 | for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { | 220 | for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { |
221 | struct image_info_struct iis; | 221 | struct image_info_struct iis; |
222 | u_int iis_ptr, img_ptr, size; | 222 | u_int iis_ptr, img_ptr; |
223 | 223 | ||
224 | /* Read the footer. */ | 224 | /* Read the footer. */ |
225 | ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); | 225 | ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); |
@@ -236,21 +236,9 @@ static int parse_afs_partitions(struct mtd_info *mtd, | |||
236 | continue; | 236 | continue; |
237 | 237 | ||
238 | strcpy(str, iis.name); | 238 | strcpy(str, iis.name); |
239 | size = mtd->erasesize + off - img_ptr; | ||
240 | |||
241 | /* | ||
242 | * In order to support JFFS2 partitions on this layout, | ||
243 | * we must lie to MTD about the real size of JFFS2 | ||
244 | * partitions; this ensures that the AFS flash footer | ||
245 | * won't be erased by JFFS2. Please ensure that your | ||
246 | * JFFS2 partitions are given image numbers between | ||
247 | * 1000 and 2000 inclusive. | ||
248 | */ | ||
249 | if (iis.imageNumber >= 1000 && iis.imageNumber < 2000) | ||
250 | size -= mtd->erasesize; | ||
251 | 239 | ||
252 | parts[idx].name = str; | 240 | parts[idx].name = str; |
253 | parts[idx].size = size; | 241 | parts[idx].size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); |
254 | parts[idx].offset = img_ptr; | 242 | parts[idx].offset = img_ptr; |
255 | parts[idx].mask_flags = 0; | 243 | parts[idx].mask_flags = 0; |
256 | 244 | ||
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index ac853d4d1668..44781a83b2e7 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -551,6 +551,16 @@ config MTD_PCMCIA | |||
551 | cards are usually around 4-16MiB in size. This does not include | 551 | cards are usually around 4-16MiB in size. This does not include |
552 | Compact Flash cards which are treated as IDE devices. | 552 | Compact Flash cards which are treated as IDE devices. |
553 | 553 | ||
554 | config MTD_PCMCIA_ANONYMOUS | ||
555 | bool "Use PCMCIA MTD drivers for anonymous PCMCIA cards" | ||
556 | depends on MTD_PCMCIA | ||
557 | default N | ||
558 | help | ||
559 | If this option is enabled, PCMCIA cards which do not report | ||
560 | anything about themselves are assumed to be MTD cards. | ||
561 | |||
562 | If unsure, say N. | ||
563 | |||
554 | config MTD_UCLINUX | 564 | config MTD_UCLINUX |
555 | tristate "Generic uClinux RAM/ROM filesystem support" | 565 | tristate "Generic uClinux RAM/ROM filesystem support" |
556 | depends on MTD_PARTITIONS && !MMU | 566 | depends on MTD_PARTITIONS && !MMU |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index e37b4c1976e5..c2655a817e3d 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -818,6 +818,32 @@ static dev_link_t *pcmciamtd_attach(void) | |||
818 | return link; | 818 | return link; |
819 | } | 819 | } |
820 | 820 | ||
821 | static struct pcmcia_device_id pcmciamtd_ids[] = { | ||
822 | PCMCIA_DEVICE_FUNC_ID(1), | ||
823 | PCMCIA_DEVICE_PROD_ID123("IO DATA", "PCS-2M", "2MB SRAM", 0x547e66dc, 0x1fed36cd, 0x36eadd21), | ||
824 | PCMCIA_DEVICE_PROD_ID12("IBM", "2MB SRAM", 0xb569a6e5, 0x36eadd21), | ||
825 | PCMCIA_DEVICE_PROD_ID12("IBM", "4MB FLASH", 0xb569a6e5, 0x8bc54d2a), | ||
826 | PCMCIA_DEVICE_PROD_ID12("IBM", "8MB FLASH", 0xb569a6e5, 0x6df1be3e), | ||
827 | PCMCIA_DEVICE_PROD_ID12("Intel", "S2E20SW", 0x816cc815, 0xd14c9dcf), | ||
828 | PCMCIA_DEVICE_PROD_ID12("Intel", "S2E8 SW", 0x816cc815, 0xa2d7dedb), | ||
829 | PCMCIA_DEVICE_PROD_ID12("intel", "SERIES2-02 ", 0x40ade711, 0x145cea5c), | ||
830 | PCMCIA_DEVICE_PROD_ID12("intel", "SERIES2-04 ", 0x40ade711, 0x42064dda), | ||
831 | PCMCIA_DEVICE_PROD_ID12("intel", "SERIES2-20 ", 0x40ade711, 0x25ee5cb0), | ||
832 | PCMCIA_DEVICE_PROD_ID12("intel", "VALUE SERIES 100 ", 0x40ade711, 0xdf8506d8), | ||
833 | PCMCIA_DEVICE_PROD_ID12("KINGMAX TECHNOLOGY INC.", "SRAM 256K Bytes", 0x54d0c69c, 0xad12c29c), | ||
834 | PCMCIA_DEVICE_PROD_ID12("Maxtor", "MAXFL MobileMax Flash Memory Card", 0xb68968c8, 0x2dfb47b0), | ||
835 | PCMCIA_DEVICE_PROD_ID12("SEIKO EPSON", "WWB101EN20", 0xf9876baf, 0xad0b207b), | ||
836 | PCMCIA_DEVICE_PROD_ID12("SEIKO EPSON", "WWB513EN20", 0xf9876baf, 0xe8d884ad), | ||
837 | PCMCIA_DEVICE_PROD_ID12("Starfish, Inc.", "REX-3000", 0x05ddca47, 0xe7d67bca), | ||
838 | PCMCIA_DEVICE_PROD_ID12("Starfish, Inc.", "REX-4100", 0x05ddca47, 0x7bc32944), | ||
839 | /* the following was commented out in pcmcia-cs-3.2.7 */ | ||
840 | /* PCMCIA_DEVICE_PROD_ID12("RATOC Systems,Inc.", "SmartMedia ADAPTER PC Card", 0xf4a2fefe, 0x5885b2ae), */ | ||
841 | #ifdef CONFIG_MTD_PCMCIA_ANONYMOUS | ||
842 | { .match_flags = PCMCIA_DEV_ID_MATCH_ANONYMOUS, }, | ||
843 | #endif | ||
844 | PCMCIA_DEVICE_NULL | ||
845 | }; | ||
846 | MODULE_DEVICE_TABLE(pcmcia, pcmciamtd_ids); | ||
821 | 847 | ||
822 | static struct pcmcia_driver pcmciamtd_driver = { | 848 | static struct pcmcia_driver pcmciamtd_driver = { |
823 | .drv = { | 849 | .drv = { |
@@ -825,7 +851,8 @@ static struct pcmcia_driver pcmciamtd_driver = { | |||
825 | }, | 851 | }, |
826 | .attach = pcmciamtd_attach, | 852 | .attach = pcmciamtd_attach, |
827 | .detach = pcmciamtd_detach, | 853 | .detach = pcmciamtd_detach, |
828 | .owner = THIS_MODULE | 854 | .owner = THIS_MODULE, |
855 | .id_table = pcmciamtd_ids, | ||
829 | }; | 856 | }; |
830 | 857 | ||
831 | 858 | ||