more debug output
[linux-2.4.git] / include / asm-cris / axisflashmap.h
1 #ifndef __ASM_AXISFLASHMAP_H
2 #define __ASM_AXISFLASHMAP_H
3
4 /* Bootblock parameters are stored at 0xc000 and has the FLASH_BOOT_MAGIC 
5  * as start, it ends with 0xFFFFFFFF */
6 #define FLASH_BOOT_MAGIC 0xbeefcace
7 #define BOOTPARAM_OFFSET 0xc000
8 /* apps/bootblocktool is used to read and write the parameters,
9  * and it has nothing to do with the partition table. 
10  */
11
12
13 /* the partitiontable consists of some "jump over" code, a head and
14  * then the actual entries.
15  * tools/mkptable is used to generate the ptable. 
16  */
17
18 /* The partition table starts with code to "jump over" it.  The ba
19    instruction and delay-slot is modified elsewhere (for example the
20    mkptable script); don't change this to fill the delay-slot.  */
21 #define PARTITIONTABLE_CODE_START { \
22  0x0f, 0x05, /* nop 0 */\
23  0x25, 0xf0, /* di  2 */\
24  0xed, 0xff  /* ba  4 */ }
25
26 /* The actual offset depend on the number of entries */
27 #define PARTITIONTABLE_CODE_END { \
28  0x00, 0x00, /* ba offset 6 */\
29  0x0f, 0x05  /* nop 8 */}
30
31 #define PARTITION_TABLE_OFFSET 10
32 #define PARTITION_TABLE_MAGIC 0xbeef /* Not a good magic */
33
34 /* The partitiontable_head is located at offset +10: */
35 struct partitiontable_head {
36         __u16 magic; /* PARTITION_TABLE_MAGIC */ 
37         __u16 size;  /* Length of ptable block (not header) */
38         __u32 checksum; /* simple longword sum */
39 };
40
41 /* And followed by partition table entries */
42 struct partitiontable_entry {
43         __u32 offset;   /* Offset is relative to the sector the ptable is in */
44         __u32 size;
45         __u32 checksum; /* simple longword sum */
46         __u16 type;
47         __u16 flags;   /* bit 0: ro/rw = 1/0 */
48         __u32 future0; /* 16 bytes reserved for future use */
49         __u32 future1;
50         __u32 future2;
51         __u32 future3;
52 };
53 /* ended by an end marker: */
54 #define PARTITIONTABLE_END_MARKER 0xFFFFFFFF
55 #define PARTITIONTABLE_END_MARKER_SIZE 4
56
57 /*#define PARTITION_TYPE_RESCUE 0x0000?*/  /* Not used, maybe it should? */
58 #define PARTITION_TYPE_PARAM  0x0001
59 #define PARTITION_TYPE_KERNEL 0x0002
60 #define PARTITION_TYPE_JFFS   0x0003
61
62 /* The master mtd for the entire flash. */
63 extern struct mtd_info* axisflash_mtd;
64
65 #endif