Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 __ASMARM_SETUP_H | |
15 | #define __ASMARM_SETUP_H | |
16 | ||
cb8db5d4 | 17 | #include <uapi/asm/setup.h> |
7d1362c0 | 18 | |
7d1362c0 | 19 | |
b91d8a12 | 20 | #define __tag __used __attribute__((__section__(".taglist.init"))) |
7d1362c0 | 21 | #define __tagtable(tag, fn) \ |
c1f2d999 | 22 | static const struct tagtable __tagtable_##fn __tag = { tag, fn } |
7d1362c0 | 23 | |
1da177e4 LT |
24 | /* |
25 | * Memory map description | |
26 | */ | |
958cab0f | 27 | #define NR_BANKS CONFIG_ARM_NR_BANKS |
1da177e4 | 28 | |
456335e2 | 29 | struct membank { |
f60892d3 | 30 | phys_addr_t start; |
a5d5f7da | 31 | phys_addr_t size; |
be370302 | 32 | unsigned int highmem; |
456335e2 RK |
33 | }; |
34 | ||
1da177e4 LT |
35 | struct meminfo { |
36 | int nr_banks; | |
456335e2 | 37 | struct membank bank[NR_BANKS]; |
1da177e4 LT |
38 | }; |
39 | ||
4b5f32ce NP |
40 | extern struct meminfo meminfo; |
41 | ||
be370302 RK |
42 | #define for_each_bank(iter,mi) \ |
43 | for (iter = 0; iter < (mi)->nr_banks; iter++) | |
d2a38ef9 RK |
44 | |
45 | #define bank_pfn_start(bank) __phys_to_pfn((bank)->start) | |
46 | #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size) | |
47 | #define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT) | |
48 | #define bank_phys_start(bank) (bank)->start | |
49 | #define bank_phys_end(bank) ((bank)->start + (bank)->size) | |
50 | #define bank_phys_size(bank) (bank)->size | |
51 | ||
a5d5f7da | 52 | extern int arm_add_memory(phys_addr_t start, phys_addr_t size); |
93c02ab4 GL |
53 | extern void early_print(const char *str, ...); |
54 | extern void dump_machine_table(void); | |
9eb8f674 | 55 | |
1da177e4 | 56 | #endif |