Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / include / uapi / asm / setup.h
1 /*
2 * linux/include/asm/setup.h
3 *
4 * Copyright (C) 1997-1999 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 * Structure passed to kernel to tell it about the
11 * hardware it's running on. See Documentation/arm/Setup
12 * for more info.
13 */
14 #ifndef _UAPI__ASMARM_SETUP_H
15 #define _UAPI__ASMARM_SETUP_H
16
17 #include <linux/types.h>
18 #include <mach/dfo_boot.h>
19 #include <mach/mt_devinfo.h>
20
21 #define COMMAND_LINE_SIZE 1024
22
23 /* The list ends with an ATAG_NONE node. */
24 #define ATAG_NONE 0x00000000
25
26 struct tag_header {
27 __u32 size;
28 __u32 tag;
29 };
30
31 /* The list must start with an ATAG_CORE node */
32 #define ATAG_CORE 0x54410001
33
34 struct tag_core {
35 __u32 flags; /* bit 0 = read-only */
36 __u32 pagesize;
37 __u32 rootdev;
38 };
39
40 /* it is allowed to have multiple ATAG_MEM nodes */
41 #define ATAG_MEM 0x54410002
42
43 struct tag_mem32 {
44 __u32 size;
45 __u32 start; /* physical start address */
46 };
47
48 /* it is allowed to have multiple ATAG_MEM nodes */
49 #define ATAG_MEM64 0x54420002
50
51 struct tag_mem64 {
52 __u64 size;
53 __u64 start; /* physical start address */
54 };
55
56 /* VGA text type displays */
57 #define ATAG_VIDEOTEXT 0x54410003
58
59 struct tag_videotext {
60 __u8 x;
61 __u8 y;
62 __u16 video_page;
63 __u8 video_mode;
64 __u8 video_cols;
65 __u16 video_ega_bx;
66 __u8 video_lines;
67 __u8 video_isvga;
68 __u16 video_points;
69 };
70
71 /* describes how the ramdisk will be used in kernel */
72 #define ATAG_RAMDISK 0x54410004
73
74 struct tag_ramdisk {
75 __u32 flags; /* bit 0 = load, bit 1 = prompt */
76 __u32 size; /* decompressed ramdisk size in _kilo_ bytes */
77 __u32 start; /* starting block of floppy-based RAM disk image */
78 };
79
80 /* describes where the compressed ramdisk image lives (virtual address) */
81 /*
82 * this one accidentally used virtual addresses - as such,
83 * it's deprecated.
84 */
85 #define ATAG_INITRD 0x54410005
86
87 /* describes where the compressed ramdisk image lives (physical address) */
88 #define ATAG_INITRD2 0x54420005
89
90 struct tag_initrd {
91 __u32 start; /* physical start address */
92 __u32 size; /* size of compressed ramdisk image in bytes */
93 };
94
95 /* board serial number. "64 bits should be enough for everybody" */
96 #define ATAG_SERIAL 0x54410006
97
98 struct tag_serialnr {
99 __u32 low;
100 __u32 high;
101 };
102
103 /* board revision */
104 #define ATAG_REVISION 0x54410007
105
106 struct tag_revision {
107 __u32 rev;
108 };
109
110 /* initial values for vesafb-type framebuffers. see struct screen_info
111 * in include/linux/tty.h
112 */
113 #define ATAG_VIDEOLFB 0x54410008
114
115 struct tag_videolfb {
116 __u16 lfb_width;
117 __u16 lfb_height;
118 __u16 lfb_depth;
119 __u16 lfb_linelength;
120 __u32 lfb_base;
121 __u32 lfb_size;
122 __u8 red_size;
123 __u8 red_pos;
124 __u8 green_size;
125 __u8 green_pos;
126 __u8 blue_size;
127 __u8 blue_pos;
128 __u8 rsvd_size;
129 __u8 rsvd_pos;
130 };
131
132 /* command line: \0 terminated string */
133 #define ATAG_CMDLINE 0x54410009
134
135 struct tag_cmdline {
136 char cmdline[1]; /* this is the minimum size */
137 };
138
139 /* acorn RiscPC specific information */
140 #define ATAG_ACORN 0x41000101
141
142 struct tag_acorn {
143 __u32 memc_control_reg;
144 __u32 vram_pages;
145 __u8 sounddefault;
146 __u8 adfsdrives;
147 };
148
149 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
150 #define ATAG_MEMCLK 0x41000402
151
152 struct tag_memclk {
153 __u32 fmemclk;
154 };
155
156 /* boot information */
157 #define ATAG_BOOT 0x41000802
158
159 struct tag_boot {
160 u32 bootmode;
161 };
162
163 /*META com port information*/
164 #define ATAG_META_COM 0x41000803
165
166 struct tag_meta_com {
167 u32 meta_com_type; /* identify meta via uart or usb */
168 u32 meta_com_id; /* multiple meta need to know com port id */
169 };
170
171
172 /* MDINFO */
173 #define ATAG_MDINFO_DATA 0x41000806
174 struct tag_mdinfo_data{
175 u8 md_type[4];
176 };
177
178 #define ATAG_TEE_DATA 0x41000808
179
180 /* general memory descriptor */
181 typedef struct {
182 u64 start;
183 u64 size;
184 } mem_desc_t;
185
186 /* mblock is used by CPU */
187 typedef struct {
188 u64 start;
189 u64 size;
190 u32 rank; /* rank the mblock belongs to */
191 } mblock_t;
192
193 typedef struct {
194 u32 mblock_num;
195 mblock_t mblock[4];
196 } mblock_info_t;
197
198 typedef struct {
199 u32 rank_num;
200 mem_desc_t rank_info[4];
201 } dram_info_t;
202
203 struct tag {
204 struct tag_header hdr;
205 union {
206 struct tag_core core;
207 struct tag_mem32 mem;
208 struct tag_mem64 mem64;
209 struct tag_videotext videotext;
210 struct tag_ramdisk ramdisk;
211 struct tag_initrd initrd;
212 struct tag_serialnr serialnr;
213 struct tag_revision revision;
214 struct tag_videolfb videolfb;
215 struct tag_cmdline cmdline;
216
217 /*
218 * Acorn specific
219 */
220 struct tag_acorn acorn;
221
222 /*
223 * DC21285 specific
224 */
225 struct tag_memclk memclk;
226 struct tag_boot boot;
227 struct tag_meta_com meta_com;
228 struct tag_devinfo_data devinfo_data;
229 tag_dfo_boot dfo_data;
230 struct tag_mdinfo_data mdinfo_data;
231 mem_desc_t tee_reserved_mem;
232 #if 0
233 #ifdef PT_ABTC_ATAG
234 struct tag_pt_info tag_pt_info;
235 #endif
236 #ifdef NAND_ABTC_ATAG
237 struct tag_nand_number tag_nand_number;
238 flashdev_info_t gen_FlashTable_p;
239 #endif
240 #endif
241 } u;
242 };
243
244 struct tagtable {
245 __u32 tag;
246 int (*parse)(const struct tag *);
247 };
248
249 #define tag_member_present(tag,member) \
250 ((unsigned long)(&((struct tag *)0L)->member + 1) \
251 <= (tag)->hdr.size * 4)
252
253 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
254 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
255
256 #define for_each_tag(t,base) \
257 for (t = base; t->hdr.size; t = tag_next(t))
258
259
260 #endif /* _UAPI__ASMARM_SETUP_H */