1
2
3
4
5
6
7
8
9
10 #ifndef __UNICORE_MEMBLOCK_H__
11 #define __UNICORE_MEMBLOCK_H__
12
13
14
15
16 # define NR_BANKS 8
17
18 struct membank {
19 unsigned long start;
20 unsigned long size;
21 unsigned int highmem;
22 };
23
24 struct meminfo {
25 int nr_banks;
26 struct membank bank[NR_BANKS];
27 };
28
29 extern struct meminfo meminfo;
30
31 #define for_each_bank(iter, mi) \
32 for (iter = 0; iter < (mi)->nr_banks; iter++)
33
34 #define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
35 #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
36 #define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
37 #define bank_phys_start(bank) ((bank)->start)
38 #define bank_phys_end(bank) ((bank)->start + (bank)->size)
39 #define bank_phys_size(bank) ((bank)->size)
40
41 extern void uc32_memblock_init(struct meminfo *);
42
43 #endif