blob: 3a0893a76a3b23abbb8ecaf4c4c9ce1a528f3bd4 [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 Pitre6451d772010-10-14 22:21:46 -040019 * Note! The first two 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 const char *name; /* architecture name */
Russell Kingf9bd6ea2005-07-04 10:43:36 +010024 unsigned long boot_params; /* tagged list */
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
Nicolas Pitred71e3eb2010-10-14 22:37:52 -040026 unsigned int nr_irqs; /* number of IRQs */
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 unsigned int video_start; /* start of video RAM */
29 unsigned int video_end; /* end of video RAM */
30
31 unsigned int reserve_lp0 :1; /* never has lp0 */
32 unsigned int reserve_lp1 :1; /* never has lp1 */
33 unsigned int reserve_lp2 :1; /* never has lp2 */
34 unsigned int soft_reboot :1; /* soft reboot */
35 void (*fixup)(struct machine_desc *,
36 struct tag *, char **,
37 struct meminfo *);
Russell King98c672c2010-05-22 18:18:57 +010038 void (*reserve)(void);/* reserve mem blocks */
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 void (*map_io)(void);/* IO mapping function */
Russell Kingdec12e62010-12-16 13:49:34 +000040 void (*init_early)(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 void (*init_irq)(void);
42 struct sys_timer *timer; /* system tick timer */
43 void (*init_machine)(void);
eric miao52108642010-12-13 09:42:34 +010044#ifdef CONFIG_MULTI_IRQ_HANDLER
45 void (*handle_irq)(struct pt_regs *);
46#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070047};
48
49/*
Russell King8ff14432010-12-20 10:18:36 +000050 * Current machine - only accessible during boot.
51 */
52extern struct machine_desc *machine_desc;
53
54/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 * Set of macros to define architecture features. This is built into
56 * a table by the linker.
57 */
Russell Kingf339ab32005-10-28 14:29:43 +010058#define MACHINE_START(_type,_name) \
59static const struct machine_desc __mach_desc_##_type \
David Rientjesb91d8a12007-05-11 16:18:55 -070060 __used \
Ben Dooks9d0fd1e2005-09-20 16:45:20 +010061 __attribute__((__section__(".arch.info.init"))) = { \
Russell Kingf339ab32005-10-28 14:29:43 +010062 .nr = MACH_TYPE_##_type, \
Linus Torvalds1da177e2005-04-16 15:20:36 -070063 .name = _name,
64
Linus Torvalds1da177e2005-04-16 15:20:36 -070065#define MACHINE_END \
66};
67
68#endif