diff options
Diffstat (limited to 'include/asm-arm/mach/arch.h')
-rw-r--r-- | include/asm-arm/mach/arch.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h new file mode 100644 index 000000000000..3a32e929ec8c --- /dev/null +++ b/include/asm-arm/mach/arch.h | |||
@@ -0,0 +1,92 @@ | |||
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 | struct sys_timer; | ||
16 | |||
17 | struct machine_desc { | ||
18 | /* | ||
19 | * Note! The first five elements are used | ||
20 | * by assembler code in head-armv.S | ||
21 | */ | ||
22 | unsigned int nr; /* architecture number */ | ||
23 | unsigned int phys_ram; /* start of physical ram */ | ||
24 | unsigned int phys_io; /* start of physical io */ | ||
25 | unsigned int io_pg_offst; /* byte offset for io | ||
26 | * page tabe entry */ | ||
27 | |||
28 | const char *name; /* architecture name */ | ||
29 | unsigned int param_offset; /* parameter page */ | ||
30 | |||
31 | unsigned int video_start; /* start of video RAM */ | ||
32 | unsigned int video_end; /* end of video RAM */ | ||
33 | |||
34 | unsigned int reserve_lp0 :1; /* never has lp0 */ | ||
35 | unsigned int reserve_lp1 :1; /* never has lp1 */ | ||
36 | unsigned int reserve_lp2 :1; /* never has lp2 */ | ||
37 | unsigned int soft_reboot :1; /* soft reboot */ | ||
38 | void (*fixup)(struct machine_desc *, | ||
39 | struct tag *, char **, | ||
40 | struct meminfo *); | ||
41 | void (*map_io)(void);/* IO mapping function */ | ||
42 | void (*init_irq)(void); | ||
43 | struct sys_timer *timer; /* system tick timer */ | ||
44 | void (*init_machine)(void); | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * Set of macros to define architecture features. This is built into | ||
49 | * a table by the linker. | ||
50 | */ | ||
51 | #define MACHINE_START(_type,_name) \ | ||
52 | const struct machine_desc __mach_desc_##_type \ | ||
53 | __attribute__((__section__(".arch.info"))) = { \ | ||
54 | .nr = MACH_TYPE_##_type, \ | ||
55 | .name = _name, | ||
56 | |||
57 | #define MAINTAINER(n) | ||
58 | |||
59 | #define BOOT_MEM(_pram,_pio,_vio) \ | ||
60 | .phys_ram = _pram, \ | ||
61 | .phys_io = _pio, \ | ||
62 | .io_pg_offst = ((_vio)>>18)&0xfffc, | ||
63 | |||
64 | #define BOOT_PARAMS(_params) \ | ||
65 | .param_offset = _params, | ||
66 | |||
67 | #define VIDEO(_start,_end) \ | ||
68 | .video_start = _start, \ | ||
69 | .video_end = _end, | ||
70 | |||
71 | #define DISABLE_PARPORT(_n) \ | ||
72 | .reserve_lp##_n = 1, | ||
73 | |||
74 | #define SOFT_REBOOT \ | ||
75 | .soft_reboot = 1, | ||
76 | |||
77 | #define FIXUP(_func) \ | ||
78 | .fixup = _func, | ||
79 | |||
80 | #define MAPIO(_func) \ | ||
81 | .map_io = _func, | ||
82 | |||
83 | #define INITIRQ(_func) \ | ||
84 | .init_irq = _func, | ||
85 | |||
86 | #define INIT_MACHINE(_func) \ | ||
87 | .init_machine = _func, | ||
88 | |||
89 | #define MACHINE_END \ | ||
90 | }; | ||
91 | |||
92 | #endif | ||