PM: fix compiler error of PPC dart_iommu
[linux/fpc-iii.git] / include / asm-arm26 / setup.h
blobe8256230647558a0841483c30cc1af8c20986217
1 /*
2 * linux/include/asm/setup.h
4 * Copyright (C) 1997-1999 Russell King
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.
10 * Structure passed to kernel to tell it about the
11 * hardware it's running on. See Documentation/arm/Setup
12 * for more info.
14 #ifndef __ASMARM_SETUP_H
15 #define __ASMARM_SETUP_H
17 #define COMMAND_LINE_SIZE 1024
19 #ifdef __KERNEL__
21 /* The list ends with an ATAG_NONE node. */
22 #define ATAG_NONE 0x00000000
24 struct tag_header {
25 u32 size;
26 u32 tag;
29 /* The list must start with an ATAG_CORE node */
30 #define ATAG_CORE 0x54410001
32 struct tag_core {
33 u32 flags; /* bit 0 = read-only */
34 u32 pagesize;
35 u32 rootdev;
38 /* it is allowed to have multiple ATAG_MEM nodes */
39 #define ATAG_MEM 0x54410002
41 struct tag_mem32 {
42 u32 size;
43 u32 start; /* physical start address */
46 /* VGA text type displays */
47 #define ATAG_VIDEOTEXT 0x54410003
49 struct tag_videotext {
50 u8 x;
51 u8 y;
52 u16 video_page;
53 u8 video_mode;
54 u8 video_cols;
55 u16 video_ega_bx;
56 u8 video_lines;
57 u8 video_isvga;
58 u16 video_points;
61 /* describes how the ramdisk will be used in kernel */
62 #define ATAG_RAMDISK 0x54410004
64 struct tag_ramdisk {
65 u32 flags; /* bit 0 = load, bit 1 = prompt */
66 u32 size; /* decompressed ramdisk size in _kilo_ bytes */
67 u32 start; /* starting block of floppy-based RAM disk image */
70 /* describes where the compressed ramdisk image lives */
72 * this one accidentally used virtual addresses - as such,
73 * it's deprecated.
75 #define ATAG_INITRD 0x54410005
77 /* describes where the compressed ramdisk image lives */
78 #define ATAG_INITRD2 0x54420005
80 struct tag_initrd {
81 u32 start; /* physical start address */
82 u32 size; /* size of compressed ramdisk image in bytes */
85 /* board serial number. "64 bits should be enough for everybody" */
86 #define ATAG_SERIAL 0x54410006
88 struct tag_serialnr {
89 u32 low;
90 u32 high;
93 /* board revision */
94 #define ATAG_REVISION 0x54410007
96 struct tag_revision {
97 u32 rev;
100 /* initial values for vesafb-type framebuffers. see struct screen_info
101 * in include/linux/tty.h
103 #define ATAG_VIDEOLFB 0x54410008
105 struct tag_videolfb {
106 u16 lfb_width;
107 u16 lfb_height;
108 u16 lfb_depth;
109 u16 lfb_linelength;
110 u32 lfb_base;
111 u32 lfb_size;
112 u8 red_size;
113 u8 red_pos;
114 u8 green_size;
115 u8 green_pos;
116 u8 blue_size;
117 u8 blue_pos;
118 u8 rsvd_size;
119 u8 rsvd_pos;
122 /* command line: \0 terminated string */
123 #define ATAG_CMDLINE 0x54410009
125 struct tag_cmdline {
126 char cmdline[1]; /* this is the minimum size */
129 /* acorn RiscPC specific information */
130 #define ATAG_ACORN 0x41000101
132 struct tag_acorn {
133 u32 memc_control_reg;
134 u32 vram_pages;
135 u8 sounddefault;
136 u8 adfsdrives;
139 /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
140 #define ATAG_MEMCLK 0x41000402
142 struct tag_memclk {
143 u32 fmemclk;
146 struct tag {
147 struct tag_header hdr;
148 union {
149 struct tag_core core;
150 struct tag_mem32 mem;
151 struct tag_videotext videotext;
152 struct tag_ramdisk ramdisk;
153 struct tag_initrd initrd;
154 struct tag_serialnr serialnr;
155 struct tag_revision revision;
156 struct tag_videolfb videolfb;
157 struct tag_cmdline cmdline;
160 * Acorn specific
162 struct tag_acorn acorn;
165 * DC21285 specific
167 struct tag_memclk memclk;
168 } u;
171 struct tagtable {
172 u32 tag;
173 int (*parse)(const struct tag *);
176 #define __tag __used __attribute__((__section__(".taglist")))
177 #define __tagtable(tag, fn) \
178 static struct tagtable __tagtable_##fn __tag = { tag, fn }
180 #define tag_member_present(tag,member) \
181 ((unsigned long)(&((struct tag *)0L)->member + 1) \
182 <= (tag)->hdr.size * 4)
184 #define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size))
185 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
187 #define for_each_tag(t,base) \
188 for (t = base; t->hdr.size; t = tag_next(t))
191 * Memory map description
193 #define NR_BANKS 8
195 struct meminfo {
196 int nr_banks;
197 unsigned long end;
198 struct {
199 unsigned long start;
200 unsigned long size;
201 int node;
202 } bank[NR_BANKS];
205 extern struct meminfo meminfo;
207 #endif /* __KERNEL__ */
209 #endif