VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / asm-arm / mach / arch.h
1 /*
2  *  linux/include/asm-arm/mach/arch.h
3  *
4  *  Copyright (C) 2000 Russell King
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 #ifndef __ASSEMBLY__
12
13 struct tag;
14 struct meminfo;
15
16 struct machine_desc {
17         /*
18          * Note! The first four elements are used
19          * by assembler code in head-armv.S
20          */
21         unsigned int            nr;             /* architecture number  */
22         unsigned int            phys_ram;       /* start of physical ram */
23         unsigned int            phys_io;        /* start of physical io */
24         unsigned int            io_pg_offst;    /* byte offset for io 
25                                                  * page tabe entry      */
26
27         const char              *name;          /* architecture name    */
28         unsigned int            param_offset;   /* parameter page       */
29
30         unsigned int            video_start;    /* start of video RAM   */
31         unsigned int            video_end;      /* end of video RAM     */
32
33         unsigned int            reserve_lp0 :1; /* never has lp0        */
34         unsigned int            reserve_lp1 :1; /* never has lp1        */
35         unsigned int            reserve_lp2 :1; /* never has lp2        */
36         unsigned int            soft_reboot :1; /* soft reboot          */
37         void                    (*fixup)(struct machine_desc *,
38                                          struct tag *, char **,
39                                          struct meminfo *);
40         void                    (*map_io)(void);/* IO mapping function  */
41         void                    (*init_irq)(void);
42         void                    (*init_time)(void);
43         void                    (*init_machine)(void);
44 };
45
46 /*
47  * Set of macros to define architecture features.  This is built into
48  * a table by the linker.
49  */
50 #define MACHINE_START(_type,_name)              \
51 const struct machine_desc __mach_desc_##_type   \
52  __attribute__((__section__(".arch.info"))) = { \
53         .nr             = MACH_TYPE_##_type,    \
54         .name           = _name,
55
56 #define MAINTAINER(n)
57
58 #define BOOT_MEM(_pram,_pio,_vio)               \
59         .phys_ram       = _pram,                \
60         .phys_io        = _pio,                 \
61         .io_pg_offst    = ((_vio)>>18)&0xfffc,
62
63 #define BOOT_PARAMS(_params)                    \
64         .param_offset   = _params,
65
66 #define VIDEO(_start,_end)                      \
67         .video_start    = _start,               \
68         .video_end      = _end,
69
70 #define DISABLE_PARPORT(_n)                     \
71         .reserve_lp##_n = 1,
72
73 #define SOFT_REBOOT                             \
74         .soft_reboot    = 1,
75
76 #define FIXUP(_func)                            \
77         .fixup          = _func,
78
79 #define MAPIO(_func)                            \
80         .map_io         = _func,
81
82 #define INITIRQ(_func)                          \
83         .init_irq       = _func,
84
85 #define INITTIME(_func)                         \
86         .init_time      = _func,
87
88 #define INIT_MACHINE(_func)                     \
89         .init_machine   = _func,
90
91 #define MACHINE_END                             \
92 };
93
94 #endif