2 * Copyright (c) 2001 Maciej W. Rozycki
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #include <linux/ioport.h>
11 #include <linux/mtd/mtd.h>
13 /* MS02-NV iomem register offsets. */
14 #define MS02NV_CSR 0x400000 /* control & status register */
16 /* MS02-NV memory offsets. */
17 #define MS02NV_DIAG 0x0003f8 /* diagnostic status */
18 #define MS02NV_MAGIC 0x0003fc /* MS02-NV magic ID */
19 #define MS02NV_RAM 0x000400 /* general-purpose RAM start */
21 /* MS02-NV diagnostic status constants. */
22 #define MS02NV_DIAG_SIZE_MASK 0xf0 /* RAM size mask */
23 #define MS02NV_DIAG_SIZE_SHIFT 0x10 /* RAM size shift (left) */
25 /* MS02-NV general constants. */
26 #define MS02NV_ID 0x03021966 /* MS02-NV magic ID value */
27 #define MS02NV_SLOT_SIZE 0x800000 /* size of the address space
28 decoded by the module */
30 typedef volatile u32 ms02nv_uint;
32 struct ms02nv_private {
33 struct mtd_info *next;
35 struct resource *module;
36 struct resource *diag_ram;
37 struct resource *user_ram;