e63611912a8397968a0da916d49b0e4e1f03e5ff
[openwrt/svn-archive/archive.git] / target / linux / adm5120-2.6 / files / include / asm-mips / mach-adm5120 / adm5120_platform.h
1 /*
2 * $Id$
3 *
4 * ADM5120 specific platform definitions
5 *
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
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_PLATFORM_H_
26 #define _ADM5120_PLATFORM_H_
27
28 #include <linux/mtd/mtd.h>
29 #include <linux/mtd/map.h>
30 #include <linux/mtd/partitions.h>
31
32 struct adm5120_flash_platform_data {
33 void (*set_vpp)(struct map_info *, int);
34 void (*switch_bank)(unsigned);
35 #ifdef CONFIG_MTD_PARTITIONS
36 unsigned int nr_parts;
37 struct mtd_partition *parts;
38 #endif
39 };
40
41 struct adm5120_nand_platform_data {
42 /* TODO : not yet implemented */
43 };
44
45 struct adm5120_switch_platform_data {
46 /* TODO: not yet implemented */
47 };
48
49 struct adm5120_pci_irq {
50 u8 slot;
51 u8 func;
52 u8 pin;
53 unsigned irq;
54 };
55
56 struct adm5120_pci_platform_data {
57 unsigned int nr_irqs;
58 struct adm5120_pci_irq *irqs;
59 };
60
61 extern struct adm5120_flash_platform_data adm5120_flash0_data;
62 extern struct adm5120_flash_platform_data adm5120_flash1_data;
63 extern struct adm5120_nand_platform_data adm5120_nand_data;
64 extern struct adm5120_pci_platform_data adm5120_pci_data;
65 extern struct adm5120_switch_platform_data adm5120_switch_data;
66
67 extern struct platform_device adm5120_flash0_device;
68 extern struct platform_device adm5120_flash1_device;
69 extern struct platform_device adm5120_nand_device;
70 extern struct platform_device adm5120_usbc_device;
71 extern struct platform_device adm5120_pci_device;
72 extern struct platform_device adm5120_switch_device;
73
74 #endif /* _ADM5120_PLATFORM_H_ */