diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 13:45:37 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 13:46:45 -0500 |
commit | 2764fb4244cc1bc08df3667924ca4a972e90ac70 (patch) | |
tree | bbc6badee832ab8699ae32dff62ce8cc70fc6a3f /drivers/mtd/nand/sm_common.c | |
parent | 93edbad69b0491d794c2ec86bcc65c69eac676e3 (diff) |
mtd: nand: Add SmartMedia device table to sm_common module
(and remove the CONFIG_MTD_NAND_SMARTMEDIA option which isn't going to be
used now that we're doing it this way)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/sm_common.c')
-rw-r--r-- | drivers/mtd/nand/sm_common.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c index f52bb3949275..aae0b9acd7ae 100644 --- a/drivers/mtd/nand/sm_common.c +++ b/drivers/mtd/nand/sm_common.c | |||
@@ -67,15 +67,51 @@ static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | static struct nand_flash_dev nand_smartmedia_flash_ids[] = { | ||
71 | |||
72 | /* SmartMedia */ | ||
73 | {"SmartMedia 1MiB 5V", 0x6e, 256, 1, 0x1000, 0}, | ||
74 | {"SmartMedia 1MiB 3,3V", 0xe8, 256, 1, 0x1000, 0}, | ||
75 | {"SmartMedia 1MiB 3,3V", 0xec, 256, 1, 0x1000, 0}, | ||
76 | {"SmartMedia 2MiB 3,3V", 0xea, 256, 2, 0x1000, 0}, | ||
77 | {"SmartMedia 2MiB 5V", 0x64, 256, 2, 0x1000, 0}, | ||
78 | {"SmartMedia 2MiB 3,3V ROM", 0x5d, 512, 2, 0x2000, NAND_ROM}, | ||
79 | {"SmartMedia 4MiB 3,3V", 0xe3, 512, 4, 0x2000, 0}, | ||
80 | {"SmartMedia 4MiB 3,3/5V", 0xe5, 512, 4, 0x2000, 0}, | ||
81 | {"SmartMedia 4MiB 5V", 0x6b, 512, 4, 0x2000, 0}, | ||
82 | {"SmartMedia 4MiB 3,3V ROM", 0xd5, 512, 4, 0x2000, NAND_ROM}, | ||
83 | {"SmartMedia 8MiB 3,3V", 0xe6, 512, 8, 0x2000, 0}, | ||
84 | {"SmartMedia 8MiB 3,3V ROM", 0xd6, 512, 8, 0x2000, NAND_ROM}, | ||
85 | |||
86 | #define XD_TYPEM (NAND_NO_AUTOINCR | NAND_BROKEN_XD) | ||
87 | /* xD / SmartMedia */ | ||
88 | {"SmartMedia/xD 16MiB 3,3V", 0x73, 512, 16, 0x4000, 0}, | ||
89 | {"SmartMedia 16MiB 3,3V ROM", 0x57, 512, 16, 0x4000, NAND_ROM}, | ||
90 | {"SmartMedia/xD 32MiB 3,3V", 0x75, 512, 32, 0x4000, 0}, | ||
91 | {"SmartMedia 32MiB 3,3V ROM", 0x58, 512, 32, 0x4000, NAND_ROM}, | ||
92 | {"SmartMedia/xD 64MiB 3,3V", 0x76, 512, 64, 0x4000, 0}, | ||
93 | {"SmartMedia 64MiB 3,3V ROM", 0xd9, 512, 64, 0x4000, NAND_ROM}, | ||
94 | {"SmartMedia/xD 128MiB 3,3V", 0x79, 512, 128, 0x4000, 0}, | ||
95 | {"SmartMedia 128MiB 3,3V ROM", 0xda, 512, 128, 0x4000, NAND_ROM}, | ||
96 | {"SmartMedia/xD 256MiB 3,3V", 0x71, 512, 256, 0x4000, XD_TYPEM}, | ||
97 | {"SmartMedia 256MiB 3,3V ROM", 0x5b, 512, 256, 0x4000, NAND_ROM}, | ||
98 | |||
99 | /* xD only */ | ||
100 | {"xD 512MiB 3,3V", 0xDC, 512, 512, 0x4000, XD_TYPEM}, | ||
101 | {"xD 1GiB 3,3V", 0xD3, 512, 1024, 0x4000, XD_TYPEM}, | ||
102 | {"xD 2GiB 3,3V", 0xD5, 512, 2048, 0x4000, XD_TYPEM}, | ||
103 | {NULL,} | ||
104 | }; | ||
105 | |||
70 | int sm_register_device(struct mtd_info *mtd) | 106 | int sm_register_device(struct mtd_info *mtd) |
71 | { | 107 | { |
72 | struct nand_chip *chip = (struct nand_chip *)mtd->priv; | 108 | struct nand_chip *chip = (struct nand_chip *)mtd->priv; |
73 | int ret; | 109 | int ret; |
74 | 110 | ||
75 | chip->options |= NAND_SKIP_BBTSCAN | NAND_SMARTMEDIA; | 111 | chip->options |= NAND_SKIP_BBTSCAN; |
76 | 112 | ||
77 | /* Scan for card properties */ | 113 | /* Scan for card properties */ |
78 | ret = nand_scan_ident(mtd, 1, NULL); | 114 | ret = nand_scan_ident(mtd, 1, nand_smartmedia_flash_ids); |
79 | 115 | ||
80 | if (ret) | 116 | if (ret) |
81 | return ret; | 117 | return ret; |