c45b53fc6c12db5b5ee3e32885062a08512a3f68
[openwrt/staging/florian.git] / target / linux / adm5120 / files / include / asm-mips / mach-adm5120 / adm5120_board.h
1 /*
2 * ADM5120 board definitions
3 *
4 * Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 *
10 */
11
12 #ifndef _ASM_MIPS_MACH_ADM5120_BOARD_H
13 #define _ASM_MIPS_MACH_ADM5120_BOARD_H
14
15 #include <linux/init.h>
16 #include <linux/list.h>
17
18 #define ADM5120_BOARD_NAMELEN 64
19
20 struct adm5120_board {
21 unsigned long mach_type;
22 char name[ADM5120_BOARD_NAMELEN];
23
24 void (*board_setup)(void);
25 struct list_head list;
26 };
27
28 extern void adm5120_board_register(struct adm5120_board *) __init;
29
30 #define ADM5120_BOARD(_type, _name, _setup) \
31 static struct adm5120_board adm5120_board_##_type __initdata = { \
32 .mach_type = _type, \
33 .name = _name, \
34 .board_setup = _setup, \
35 }; \
36 \
37 static __init int adm5120_board_##_type##_register(void) \
38 { \
39 adm5120_board_register(&adm5120_board_##_type); \
40 return 0; \
41 } \
42 pure_initcall(adm5120_board_##_type##_register)
43
44 #endif /* _ASM_MIPS_MACH_ADM5120_BOARD_H */