8 #include <linux/module.h>
9 #include <linux/types.h>
10 #include <linux/kernel.h>
17 #include <linux/pci.h>
20 #define NAME "scx200_docflash"
27 static unsigned size = 0x1000000;
28 static unsigned width = 8;
29 static char *flashtype =
"cfi_probe";
42 .name =
"NatSemi SCx200 DOCCS Flash",
49 .name =
"DOCCS Boot kernel",
54 .name =
"DOCCS Low BIOS",
59 .name =
"DOCCS File system",
64 .name =
"DOCCS High BIOS",
69 #define NUM_PARTITIONS ARRAY_SIZE(partition_info)
71 static struct map_info scx200_docflash_map = {
72 .name =
"NatSemi SCx200 DOCCS Flash",
75 static int __init init_scx200_docflash(
void)
105 || (ctrl & 0x07000000) != 0x07000000
106 || (ctrl & 0x0007ffff) == 0)
109 size = ((ctrl&0x1fff)<<13) + (1<<13);
111 for (u =
size; u > 1; u >>= 1)
130 for (u = size; u > 1; u >>= 1)
144 0xc0000000, 0xffffffff,
150 ctrl = 0x07000000 | ((size-1) >> 13);
179 if (!scx200_docflash_map.
virt) {
193 if (size < mymtd->size)
205 static void __exit cleanup_scx200_docflash(
void)
211 if (scx200_docflash_map.
virt) {