ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[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 /*
12  * The size of struct machine_desc
13  *   (for assembler code)
14  */
15 #define SIZEOF_MACHINE_DESC     52
16
17 #ifndef __ASSEMBLY__
18
19 struct tag;
20 struct meminfo;
21
22 struct machine_desc {
23         /*
24          * Note! The first four elements are used
25          * by assembler code in head-armv.S
26          */
27         unsigned int            nr;             /* architecture number  */
28         unsigned int            phys_ram;       /* start of physical ram */
29         unsigned int            phys_io;        /* start of physical io */
30         unsigned int            io_pg_offst;    /* byte offset for io 
31                                                  * page tabe entry      */
32
33         const char              *name;          /* architecture name    */
34         unsigned int            param_offset;   /* parameter page       */
35
36         unsigned int            video_start;    /* start of video RAM   */
37         unsigned int            video_end;      /* end of video RAM     */
38
39         unsigned int            reserve_lp0 :1; /* never has lp0        */
40         unsigned int            reserve_lp1 :1; /* never has lp1        */
41         unsigned int            reserve_lp2 :1; /* never has lp2        */
42         unsigned int            soft_reboot :1; /* soft reboot          */
43         void                    (*fixup)(struct machine_desc *,
44                                          struct tag *, char **,
45                                          struct meminfo *);
46         void                    (*map_io)(void);/* IO mapping function  */
47         void                    (*init_irq)(void);
48         void                    (*init_machine)(void);
49 };
50
51 /*
52  * Set of macros to define architecture features.  This is built into
53  * a table by the linker.
54  */
55 #define MACHINE_START(_type,_name)              \
56 const struct machine_desc __mach_desc_##_type   \
57  __attribute__((__section__(".arch.info"))) = { \
58         .nr             = MACH_TYPE_##_type,    \
59         .name           = _name,
60
61 #define MAINTAINER(n)
62
63 #define BOOT_MEM(_pram,_pio,_vio)               \
64         .phys_ram       = _pram,                \
65         .phys_io        = _pio,                 \
66         .io_pg_offst    = ((_vio)>>18)&0xfffc,
67
68 #define BOOT_PARAMS(_params)                    \
69         .param_offset   = _params,
70
71 #define VIDEO(_start,_end)                      \
72         .video_start    = _start,               \
73         .video_end      = _end,
74
75 #define DISABLE_PARPORT(_n)                     \
76         .reserve_lp##_n = 1,
77
78 #define SOFT_REBOOT                             \
79         .soft_reboot    = 1,
80
81 #define FIXUP(_func)                            \
82         .fixup          = _func,
83
84 #define MAPIO(_func)                            \
85         .map_io         = _func,
86
87 #define INITIRQ(_func)                          \
88         .init_irq       = _func,
89
90 #define INIT_MACHINE(_func)                     \
91         .init_machine   = _func,
92
93 #define MACHINE_END                             \
94 };
95
96 #endif