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.
9 * $Id: ms02-nv.h,v 1.1 2002/09/13 13:46:55 dwmw2 Exp $
12 #include <linux/ioport.h>
13 #include <linux/mtd/mtd.h>
15 /* MS02-NV iomem register offsets. */
16 #define MS02NV_CSR 0x400000 /* control & status register */
18 /* MS02-NV memory offsets. */
19 #define MS02NV_DIAG 0x0003f8 /* diagnostic status */
20 #define MS02NV_MAGIC 0x0003fc /* MS02-NV magic ID */
21 #define MS02NV_RAM 0x000400 /* general-purpose RAM start */
23 /* MS02-NV diagnostic status constants. */
24 #define MS02NV_DIAG_SIZE_MASK 0xf0 /* RAM size mask */
25 #define MS02NV_DIAG_SIZE_SHIFT 0x10 /* RAM size shift (left) */
27 /* MS02-NV general constants. */
28 #define MS02NV_ID 0x03021966 /* MS02-NV magic ID value */
29 #define MS02NV_SLOT_SIZE 0x800000 /* size of the address space
30 decoded by the module */
32 typedef volatile u32 ms02nv_uint;
34 struct ms02nv_private {
35 struct mtd_info *next;
37 struct resource *module;
38 struct resource *diag_ram;
39 struct resource *user_ram;