9 #include <linux/kernel.h>
11 #include <linux/module.h>
16 .eccpos = {8, 9, 10, 13, 14, 15},
18 {.offset = 0 , .length = 4},
19 {.offset = 6 , .length = 2},
20 {.offset = 11, .length = 2}
34 {.offset = 3 , .length = 2},
35 {.offset = 6 , .length = 2},
40 static int sm_block_markbad(
struct mtd_info *mtd, loff_t ofs)
47 oob.block_status = 0x0F;
54 ops.oobbuf = (
void *)&oob;
58 ret = mtd_write_oob(mtd, ofs, &ops);
61 "sm_common: can't mark sector at %i as bad\n",
72 {
"SmartMedia 1MiB 5V", 0x6e, 256, 1, 0x1000, 0},
73 {
"SmartMedia 1MiB 3,3V", 0xe8, 256, 1, 0x1000, 0},
74 {
"SmartMedia 1MiB 3,3V", 0xec, 256, 1, 0x1000, 0},
75 {
"SmartMedia 2MiB 3,3V", 0xea, 256, 2, 0x1000, 0},
76 {
"SmartMedia 2MiB 5V", 0x64, 256, 2, 0x1000, 0},
77 {
"SmartMedia 2MiB 3,3V ROM", 0x5d, 512, 2, 0x2000,
NAND_ROM},
78 {
"SmartMedia 4MiB 3,3V", 0xe3, 512, 4, 0x2000, 0},
79 {
"SmartMedia 4MiB 3,3/5V", 0xe5, 512, 4, 0x2000, 0},
80 {
"SmartMedia 4MiB 5V", 0x6b, 512, 4, 0x2000, 0},
81 {
"SmartMedia 4MiB 3,3V ROM", 0xd5, 512, 4, 0x2000,
NAND_ROM},
82 {
"SmartMedia 8MiB 3,3V", 0xe6, 512, 8, 0x2000, 0},
83 {
"SmartMedia 8MiB 3,3V ROM", 0xd6, 512, 8, 0x2000,
NAND_ROM},
84 {
"SmartMedia 16MiB 3,3V", 0x73, 512, 16, 0x4000, 0},
85 {
"SmartMedia 16MiB 3,3V ROM", 0x57, 512, 16, 0x4000,
NAND_ROM},
86 {
"SmartMedia 32MiB 3,3V", 0x75, 512, 32, 0x4000, 0},
87 {
"SmartMedia 32MiB 3,3V ROM", 0x58, 512, 32, 0x4000,
NAND_ROM},
88 {
"SmartMedia 64MiB 3,3V", 0x76, 512, 64, 0x4000, 0},
89 {
"SmartMedia 64MiB 3,3V ROM", 0xd9, 512, 64, 0x4000,
NAND_ROM},
90 {
"SmartMedia 128MiB 3,3V", 0x79, 512, 128, 0x4000, 0},
91 {
"SmartMedia 128MiB 3,3V ROM", 0xda, 512, 128, 0x4000,
NAND_ROM},
92 {
"SmartMedia 256MiB 3,3V", 0x71, 512, 256, 0x4000 },
93 {
"SmartMedia 256MiB 3,3V ROM", 0x5b, 512, 256, 0x4000,
NAND_ROM},
99 {
"xD 16MiB 3,3V", 0x73, 512, 16, 0x4000, 0},
100 {
"xD 32MiB 3,3V", 0x75, 512, 32, 0x4000, 0},
101 {
"xD 64MiB 3,3V", 0x76, 512, 64, 0x4000, 0},
102 {
"xD 128MiB 3,3V", 0x79, 512, 128, 0x4000, 0},
119 nand_smartmedia_flash_ids : nand_xd_flash_ids);
131 chip->
ecc.layout = &nand_oob_sm;
133 chip->
ecc.layout = &nand_oob_sm_small;