blob: ac6851133fe37bf5f27b9d43f0461dedcf1bc1ec [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Russell King4baa9922008-08-02 10:55:55 +01002 * arch/arm/include/asm/mach/arch.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASSEMBLY__
12
13struct tag;
14struct meminfo;
15struct sys_timer;
16
17struct machine_desc {
18 /*
Nicolas Pitrea61ea932006-03-20 17:10:01 +000019 * Note! The first four elements are used
Leonid Evdokimov717a54a2008-02-21 13:46:59 +010020 * by assembler code in head.S, head-common.S
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 */
22 unsigned int nr; /* architecture number */
Linus Torvalds1da177e2005-04-16 15:20:36 -070023 unsigned int phys_io; /* start of physical io */
24 unsigned int io_pg_offst; /* byte offset for io
25 * page tabe entry */
26
27 const char *name; /* architecture name */
Russell Kingf9bd6ea2005-07-04 10:43:36 +010028 unsigned long boot_params; /* tagged list */
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Nicolas Pitred71e3eb2010-10-14 22:37:52 -040030 unsigned int nr_irqs; /* number of IRQs */
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 unsigned int video_start; /* start of video RAM */
33 unsigned int video_end; /* end of video RAM */
34
35 unsigned int reserve_lp0 :1; /* never has lp0 */
36 unsigned int reserve_lp1 :1; /* never has lp1 */
37 unsigned int reserve_lp2 :1; /* never has lp2 */
38 unsigned int soft_reboot :1; /* soft reboot */
39 void (*fixup)(struct machine_desc *,
40 struct tag *, char **,
41 struct meminfo *);
Russell King98c672c2010-05-22 18:18:57 +010042 void (*reserve)(void);/* reserve mem blocks */
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 void (*map_io)(void);/* IO mapping function */
44 void (*init_irq)(void);
45 struct sys_timer *timer; /* system tick timer */
46 void (*init_machine)(void);
47};
48
49/*
50 * Set of macros to define architecture features. This is built into
51 * a table by the linker.
52 */
Russell Kingf339ab32005-10-28 14:29:43 +010053#define MACHINE_START(_type,_name) \
54static const struct machine_desc __mach_desc_##_type \
David Rientjesb91d8a12007-05-11 16:18:55 -070055 __used \
Ben Dooks9d0fd1e2005-09-20 16:45:20 +010056 __attribute__((__section__(".arch.info.init"))) = { \
Russell Kingf339ab32005-10-28 14:29:43 +010057 .nr = MACH_TYPE_##_type, \
Linus Torvalds1da177e2005-04-16 15:20:36 -070058 .name = _name,
59
Linus Torvalds1da177e2005-04-16 15:20:36 -070060#define MACHINE_END \
61};
62
63#endif