2 * linux/arch/unicore32/include/asm/memblock.h
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __UNICORE_MEMBLOCK_H__
14 #define __UNICORE_MEMBLOCK_H__
17 * Memory map description
29 struct membank bank
[NR_BANKS
];
32 extern struct meminfo meminfo
;
34 #define for_each_bank(iter, mi) \
35 for (iter = 0; iter < (mi)->nr_banks; iter++)
37 #define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
38 #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
39 #define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
40 #define bank_phys_start(bank) ((bank)->start)
41 #define bank_phys_end(bank) ((bank)->start + (bank)->size)
42 #define bank_phys_size(bank) ((bank)->size)
44 extern void uc32_memblock_init(struct meminfo
*);