]>
Commit | Line | Data |
---|---|---|
fe8c2806 WD |
1 | #ifndef load_kernel_h |
2 | #define load_kernel_h | |
3 | /*------------------------------------------------------------------------- | |
4 | * Filename: load_kernel.h | |
5 | * Version: $Id: load_kernel.h,v 1.3 2002/01/25 01:34:11 nyet Exp $ | |
6 | * Copyright: Copyright (C) 2001, Russ Dill | |
7 | * Author: Russ Dill <Russ.Dill@asu.edu> | |
8 | * Description: header for load kernel modules | |
9 | *-----------------------------------------------------------------------*/ | |
10 | /* | |
11 | * | |
12 | * This program is free software; you can redistribute it and/or modify | |
13 | * it under the terms of the GNU General Public License as published by | |
14 | * the Free Software Foundation; either version 2 of the License, or | |
15 | * (at your option) any later version. | |
16 | * | |
17 | * This program is distributed in the hope that it will be useful, | |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | * GNU General Public License for more details. | |
21 | * | |
22 | * You should have received a copy of the GNU General Public License | |
23 | * along with this program; if not, write to the Free Software | |
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
25 | * | |
26 | */ | |
27 | ||
700a0c64 | 28 | #include <linux/list.h> |
fe8c2806 | 29 | |
700a0c64 WD |
30 | /* mtd device types */ |
31 | #define MTD_DEV_TYPE_NOR 0x0001 | |
32 | #define MTD_DEV_TYPE_NAND 0x0002 | |
33 | #define MTD_DEV_TYPE(type) ((type == MTD_DEV_TYPE_NAND) ? "nand" : "nor") | |
fe8c2806 | 34 | |
700a0c64 WD |
35 | struct mtd_device { |
36 | struct list_head link; | |
37 | struct mtdids *id; /* parent mtd id entry */ | |
38 | u16 num_parts; /* number of partitions on this device */ | |
39 | struct list_head parts; /* partitions */ | |
fe8c2806 WD |
40 | }; |
41 | ||
700a0c64 WD |
42 | struct part_info { |
43 | struct list_head link; | |
44 | char *name; /* partition name */ | |
45 | u8 auto_name; /* set to 1 for generated name */ | |
46 | u32 size; /* total size of the partition */ | |
47 | u32 offset; /* offset within device */ | |
48 | void *jffs2_priv; /* used internaly by jffs2 */ | |
49 | u32 mask_flags; /* kernel MTD mask flags */ | |
50 | struct mtd_device *dev; /* parent device */ | |
51 | }; | |
fe8c2806 | 52 | |
700a0c64 WD |
53 | struct mtdids { |
54 | struct list_head link; | |
55 | u8 type; /* device type */ | |
56 | u8 num; /* device number */ | |
57 | u32 size; /* device size */ | |
58 | char *mtd_id; /* linux kernel device id */ | |
fe8c2806 WD |
59 | }; |
60 | ||
61 | #define ldr_strlen strlen | |
62 | #define ldr_strncmp strncmp | |
63 | #define ldr_memcpy memcpy | |
64 | #define putstr(x) printf("%s", x) | |
65 | #define mmalloc malloc | |
66 | #define UDEBUG printf | |
67 | ||
68 | #define putnstr(str, size) printf("%*.*s", size, size, str) | |
69 | #define ldr_output_string(x) puts(x) | |
70 | #define putLabeledWord(x, y) printf("%s %08x\n", x, (unsigned int)y) | |
71 | #define led_blink(x, y, z, a) | |
72 | ||
73 | #endif /* load_kernel_h */ |