aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/setup.h
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 23:40:38 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:46 -0500
commit7d1362c0d05b8543807ab403ac8ce813cab41fa4 (patch)
tree78f4f97229af02e4a8e3d1851b003b296db6dcda /include/asm-arm/setup.h
parentf46ba2235feab5e686b1234c328a0577cde86e21 (diff)
[PATCH] cleanup asm/setup.h userspace visibility
Make the contents of the userspace asm/setup.h header consistent on all architectures: - export setup.h to userspace on all architectures - export only COMMAND_LINE_SIZE to userspace - frv: move COMMAND_LINE_SIZE from param.h - i386: remove duplicate COMMAND_LINE_SIZE from param.h - arm: - export ATAGs to userspace - change u8/u16/u32 to __u8/__u16/__u32 Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-arm/setup.h')
-rw-r--r--include/asm-arm/setup.h104
1 files changed, 55 insertions, 49 deletions
diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h
index aa4b5782f0c9..e5407392afca 100644
--- a/include/asm-arm/setup.h
+++ b/include/asm-arm/setup.h
@@ -14,55 +14,57 @@
14#ifndef __ASMARM_SETUP_H 14#ifndef __ASMARM_SETUP_H
15#define __ASMARM_SETUP_H 15#define __ASMARM_SETUP_H
16 16
17#include <asm/types.h>
18
17#define COMMAND_LINE_SIZE 1024 19#define COMMAND_LINE_SIZE 1024
18 20
19/* The list ends with an ATAG_NONE node. */ 21/* The list ends with an ATAG_NONE node. */
20#define ATAG_NONE 0x00000000 22#define ATAG_NONE 0x00000000
21 23
22struct tag_header { 24struct tag_header {
23 u32 size; 25 __u32 size;
24 u32 tag; 26 __u32 tag;
25}; 27};
26 28
27/* The list must start with an ATAG_CORE node */ 29/* The list must start with an ATAG_CORE node */
28#define ATAG_CORE 0x54410001 30#define ATAG_CORE 0x54410001
29 31
30struct tag_core { 32struct tag_core {
31 u32 flags; /* bit 0 = read-only */ 33 __u32 flags; /* bit 0 = read-only */
32 u32 pagesize; 34 __u32 pagesize;
33 u32 rootdev; 35 __u32 rootdev;
34}; 36};
35 37
36/* it is allowed to have multiple ATAG_MEM nodes */ 38/* it is allowed to have multiple ATAG_MEM nodes */
37#define ATAG_MEM 0x54410002 39#define ATAG_MEM 0x54410002
38 40
39struct tag_mem32 { 41struct tag_mem32 {
40 u32 size; 42 __u32 size;
41 u32 start; /* physical start address */ 43 __u32 start; /* physical start address */
42}; 44};
43 45
44/* VGA text type displays */ 46/* VGA text type displays */
45#define ATAG_VIDEOTEXT 0x54410003 47#define ATAG_VIDEOTEXT 0x54410003
46 48
47struct tag_videotext { 49struct tag_videotext {
48 u8 x; 50 __u8 x;
49 u8 y; 51 __u8 y;
50 u16 video_page; 52 __u16 video_page;
51 u8 video_mode; 53 __u8 video_mode;
52 u8 video_cols; 54 __u8 video_cols;
53 u16 video_ega_bx; 55 __u16 video_ega_bx;
54 u8 video_lines; 56 __u8 video_lines;
55 u8 video_isvga; 57 __u8 video_isvga;
56 u16 video_points; 58 __u16 video_points;
57}; 59};
58 60
59/* describes how the ramdisk will be used in kernel */ 61/* describes how the ramdisk will be used in kernel */
60#define ATAG_RAMDISK 0x54410004 62#define ATAG_RAMDISK 0x54410004
61 63
62struct tag_ramdisk { 64struct tag_ramdisk {
63 u32 flags; /* bit 0 = load, bit 1 = prompt */ 65 __u32 flags; /* bit 0 = load, bit 1 = prompt */
64 u32 size; /* decompressed ramdisk size in _kilo_ bytes */ 66 __u32 size; /* decompressed ramdisk size in _kilo_ bytes */
65 u32 start; /* starting block of floppy-based RAM disk image */ 67 __u32 start; /* starting block of floppy-based RAM disk image */
66}; 68};
67 69
68/* describes where the compressed ramdisk image lives (virtual address) */ 70/* describes where the compressed ramdisk image lives (virtual address) */
@@ -76,23 +78,23 @@ struct tag_ramdisk {
76#define ATAG_INITRD2 0x54420005 78#define ATAG_INITRD2 0x54420005
77 79
78struct tag_initrd { 80struct tag_initrd {
79 u32 start; /* physical start address */ 81 __u32 start; /* physical start address */
80 u32 size; /* size of compressed ramdisk image in bytes */ 82 __u32 size; /* size of compressed ramdisk image in bytes */
81}; 83};
82 84
83/* board serial number. "64 bits should be enough for everybody" */ 85/* board serial number. "64 bits should be enough for everybody" */
84#define ATAG_SERIAL 0x54410006 86#define ATAG_SERIAL 0x54410006
85 87
86struct tag_serialnr { 88struct tag_serialnr {
87 u32 low; 89 __u32 low;
88 u32 high; 90 __u32 high;
89}; 91};
90 92
91/* board revision */ 93/* board revision */
92#define ATAG_REVISION 0x54410007 94#define ATAG_REVISION 0x54410007
93 95
94struct tag_revision { 96struct tag_revision {
95 u32 rev; 97 __u32 rev;
96}; 98};
97 99
98/* initial values for vesafb-type framebuffers. see struct screen_info 100/* initial values for vesafb-type framebuffers. see struct screen_info
@@ -101,20 +103,20 @@ struct tag_revision {
101#define ATAG_VIDEOLFB 0x54410008 103#define ATAG_VIDEOLFB 0x54410008
102 104
103struct tag_videolfb { 105struct tag_videolfb {
104 u16 lfb_width; 106 __u16 lfb_width;
105 u16 lfb_height; 107 __u16 lfb_height;
106 u16 lfb_depth; 108 __u16 lfb_depth;
107 u16 lfb_linelength; 109 __u16 lfb_linelength;
108 u32 lfb_base; 110 __u32 lfb_base;
109 u32 lfb_size; 111 __u32 lfb_size;
110 u8 red_size; 112 __u8 red_size;
111 u8 red_pos; 113 __u8 red_pos;
112 u8 green_size; 114 __u8 green_size;
113 u8 green_pos; 115 __u8 green_pos;
114 u8 blue_size; 116 __u8 blue_size;
115 u8 blue_pos; 117 __u8 blue_pos;
116 u8 rsvd_size; 118 __u8 rsvd_size;
117 u8 rsvd_pos; 119 __u8 rsvd_pos;
118}; 120};
119 121
120/* command line: \0 terminated string */ 122/* command line: \0 terminated string */
@@ -128,17 +130,17 @@ struct tag_cmdline {
128#define ATAG_ACORN 0x41000101 130#define ATAG_ACORN 0x41000101
129 131
130struct tag_acorn { 132struct tag_acorn {
131 u32 memc_control_reg; 133 __u32 memc_control_reg;
132 u32 vram_pages; 134 __u32 vram_pages;
133 u8 sounddefault; 135 __u8 sounddefault;
134 u8 adfsdrives; 136 __u8 adfsdrives;
135}; 137};
136 138
137/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ 139/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
138#define ATAG_MEMCLK 0x41000402 140#define ATAG_MEMCLK 0x41000402
139 141
140struct tag_memclk { 142struct tag_memclk {
141 u32 fmemclk; 143 __u32 fmemclk;
142}; 144};
143 145
144struct tag { 146struct tag {
@@ -167,24 +169,26 @@ struct tag {
167}; 169};
168 170
169struct tagtable { 171struct tagtable {
170 u32 tag; 172 __u32 tag;
171 int (*parse)(const struct tag *); 173 int (*parse)(const struct tag *);
172}; 174};
173 175
174#define __tag __attribute_used__ __attribute__((__section__(".taglist.init")))
175#define __tagtable(tag, fn) \
176static struct tagtable __tagtable_##fn __tag = { tag, fn }
177
178#define tag_member_present(tag,member) \ 176#define tag_member_present(tag,member) \
179 ((unsigned long)(&((struct tag *)0L)->member + 1) \ 177 ((unsigned long)(&((struct tag *)0L)->member + 1) \
180 <= (tag)->hdr.size * 4) 178 <= (tag)->hdr.size * 4)
181 179
182#define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size)) 180#define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
183#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) 181#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
184 182
185#define for_each_tag(t,base) \ 183#define for_each_tag(t,base) \
186 for (t = base; t->hdr.size; t = tag_next(t)) 184 for (t = base; t->hdr.size; t = tag_next(t))
187 185
186#ifdef __KERNEL__
187
188#define __tag __attribute_used__ __attribute__((__section__(".taglist.init")))
189#define __tagtable(tag, fn) \
190static struct tagtable __tagtable_##fn __tag = { tag, fn }
191
188/* 192/*
189 * Memory map description 193 * Memory map description
190 */ 194 */
@@ -217,4 +221,6 @@ struct early_params {
217static struct early_params __early_##fn __attribute_used__ \ 221static struct early_params __early_##fn __attribute_used__ \
218__attribute__((__section__(".early_param.init"))) = { name, fn } 222__attribute__((__section__(".early_param.init"))) = { name, fn }
219 223
224#endif /* __KERNEL__ */
225
220#endif 226#endif