Path: blob/master/arch/unicore32/include/asm/memblock.h
10818 views
/*1* linux/arch/unicore32/include/asm/memblock.h2*3* Code specific to PKUnity SoC and UniCore ISA4*5* Copyright (C) 2001-2010 GUAN Xue-tao6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*/1112#ifndef __UNICORE_MEMBLOCK_H__13#define __UNICORE_MEMBLOCK_H__1415/*16* Memory map description17*/18# define NR_BANKS 81920struct membank {21unsigned long start;22unsigned long size;23unsigned int highmem;24};2526struct meminfo {27int nr_banks;28struct membank bank[NR_BANKS];29};3031extern struct meminfo meminfo;3233#define for_each_bank(iter, mi) \34for (iter = 0; iter < (mi)->nr_banks; iter++)3536#define bank_pfn_start(bank) __phys_to_pfn((bank)->start)37#define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)38#define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)39#define bank_phys_start(bank) ((bank)->start)40#define bank_phys_end(bank) ((bank)->start + (bank)->size)41#define bank_phys_size(bank) ((bank)->size)4243extern void uc32_memblock_init(struct meminfo *);4445#endif464748