4 * ADM5120 board definitions
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation.
15 #ifndef _ADM5120_BOARD_H_
16 #define _ADM5120_BOARD_H_
18 #include <linux/init.h>
19 #include <linux/list.h>
21 #define ADM5120_BOARD_NAMELEN 64
23 struct adm5120_board {
24 unsigned long mach_type;
25 char name[ADM5120_BOARD_NAMELEN];
27 void (*board_setup)(void);
28 void (*board_reset)(void);
30 unsigned int eth_num_ports;
31 unsigned char *eth_vlans;
32 unsigned int num_devices;
33 struct platform_device **devices;
34 unsigned int pci_nr_irqs;
35 struct adm5120_pci_irq *pci_irq_map;
37 struct list_head list;
40 extern void adm5120_board_register(struct adm5120_board *) __init;
42 #define ADM5120_BOARD_START(_type, _name) \
43 static struct adm5120_board adm5120_board_##_type __initdata; \
45 static __init int adm5120_board_##_type##_register(void) \
47 adm5120_board_register(&adm5120_board_##_type); \
50 pure_initcall(adm5120_board_##_type##_register); \
52 static struct adm5120_board adm5120_board_##_type __initdata = { \
53 .mach_type = MACH_ADM5120_##_type, \
56 #define ADM5120_BOARD_END \
59 #endif /* _ADM5120_BOARD_H_ */