[adm5120] new experimental driver for the CF slot on the RouterBOARD 153
[openwrt.git] / target / linux / adm5120 / files / include / asm-mips / mach-adm5120 / adm5120_board.h
1 /*
2 * $Id$
3 *
4 * ADM5120 board definitions
5 *
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25 #ifndef _ADM5120_BOARD_H_
26 #define _ADM5120_BOARD_H_
27
28 #include <linux/init.h>
29 #include <linux/list.h>
30
31 #define ADM5120_BOARD_NAMELEN 64
32
33 struct adm5120_board {
34 unsigned long mach_type;
35 char name[ADM5120_BOARD_NAMELEN];
36
37 void (*board_setup)(void);
38 void (*board_reset)(void);
39
40 unsigned int eth_num_ports;
41 unsigned char *eth_vlans;
42 unsigned int num_devices;
43 struct platform_device **devices;
44 unsigned int pci_nr_irqs;
45 struct adm5120_pci_irq *pci_irq_map;
46
47 struct list_head list;
48 };
49
50 extern void adm5120_board_register(struct adm5120_board *) __init;
51
52 #define ADM5120_BOARD_START(_type, _name) \
53 static struct adm5120_board adm5120_board_##_type __initdata; \
54 \
55 static __init int adm5120_board_##_type##_register(void) \
56 { \
57 adm5120_board_register(&adm5120_board_##_type); \
58 return 0; \
59 } \
60 pure_initcall(adm5120_board_##_type##_register); \
61 \
62 static struct adm5120_board adm5120_board_##_type __initdata = { \
63 .mach_type = MACH_ADM5120_##_type, \
64 .name = _name,
65
66 #define ADM5120_BOARD_END \
67 };
68
69 #endif /* _ADM5120_BOARD_H_ */
This page took 0.050665 seconds and 5 git commands to generate.