setup.h 1.4 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 *  linux/include/asm/setup.h
 *
 *  Copyright (C) 1997-1999 Russell King
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *  Structure passed to kernel to tell it about the
 *  hardware it's running on.  See Documentation/arm/Setup
 *  for more info.
 */
#ifndef __ASMARM_SETUP_H
#define __ASMARM_SETUP_H

17
#include <uapi/asm/setup.h>
18 19


D
David Rientjes 已提交
20
#define __tag __used __attribute__((__section__(".taglist.init")))
21
#define __tagtable(tag, fn) \
R
Russell King 已提交
22
static const struct tagtable __tagtable_##fn __tag = { tag, fn }
23

L
Linus Torvalds 已提交
24 25 26
/*
 * Memory map description
 */
27
#define NR_BANKS	CONFIG_ARM_NR_BANKS
L
Linus Torvalds 已提交
28

29
struct membank {
30
	phys_addr_t start;
31
	phys_addr_t size;
R
Russell King 已提交
32
	unsigned int highmem;
33 34
};

L
Linus Torvalds 已提交
35 36
struct meminfo {
	int nr_banks;
37
	struct membank bank[NR_BANKS];
L
Linus Torvalds 已提交
38 39
};

40 41
extern struct meminfo meminfo;

R
Russell King 已提交
42 43
#define for_each_bank(iter,mi)				\
	for (iter = 0; iter < (mi)->nr_banks; iter++)
44 45 46 47 48 49 50 51

#define bank_pfn_start(bank)	__phys_to_pfn((bank)->start)
#define bank_pfn_end(bank)	__phys_to_pfn((bank)->start + (bank)->size)
#define bank_pfn_size(bank)	((bank)->size >> PAGE_SHIFT)
#define bank_phys_start(bank)	(bank)->start
#define bank_phys_end(bank)	((bank)->start + (bank)->size)
#define bank_phys_size(bank)	(bank)->size

52
extern int arm_add_memory(phys_addr_t start, phys_addr_t size);
53 54
extern void early_print(const char *str, ...);
extern void dump_machine_table(void);
G
Grant Likely 已提交
55

L
Linus Torvalds 已提交
56
#endif