Merge branch 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[linux/fpc-iii.git] / arch / unicore32 / include / asm / memblock.h
bloba8a5d8d0a26ed0d17d1787bd800e3b2bfc6e8e1e
1 /*
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
19 # define NR_BANKS 8
21 struct membank {
22 unsigned long start;
23 unsigned long size;
24 unsigned int highmem;
27 struct meminfo {
28 int nr_banks;
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 *);
46 #endif