The RB513 CF driver is now a module, enable it by default for the RB1xx profile.
[openwrt.git] / target / linux / adm5120 / 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 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_PLATFORM_H_
26 #define _ADM5120_PLATFORM_H_
27
28 #include <linux/device.h>
29 #include <linux/platform_device.h>
30
31 #include <linux/mtd/mtd.h>
32 #include <linux/mtd/map.h>
33 #include <linux/mtd/partitions.h>
34 #include <linux/mtd/nand.h>
35
36 #include <linux/amba/bus.h>
37 #include <linux/amba/serial.h>
38
39 struct adm5120_flash_platform_data {
40 void (*set_vpp)(struct map_info *, int);
41 void (*switch_bank)(unsigned);
42 #ifdef CONFIG_MTD_PARTITIONS
43 unsigned int nr_parts;
44 struct mtd_partition *parts;
45 #endif
46 };
47
48 struct adm5120_switch_platform_data {
49 /* TODO: not yet implemented */
50 };
51
52 struct adm5120_pci_irq {
53 u8 slot;
54 u8 func;
55 u8 pin;
56 unsigned irq;
57 };
58
59 #define PCIIRQ(s,f,p,i) {.slot = (s), .func = (f), .pin = (p), .irq = (i)}
60
61 #ifdef CONFIG_PCI
62 extern void adm5120_pci_set_irq_map(unsigned int nr_irqs,
63 struct adm5120_pci_irq *map) __init;
64 #else
65 static inline void adm5120_pci_set_irq_map(unsigned int nr_irqs,
66 struct adm5120_pci_irq *map)
67 {
68 }
69 #endif
70
71 extern struct adm5120_flash_platform_data adm5120_flash0_data;
72 extern struct adm5120_flash_platform_data adm5120_flash1_data;
73 extern struct platform_nand_data adm5120_nand_data;
74 extern struct adm5120_switch_platform_data adm5120_switch_data;
75 extern struct amba_pl010_data adm5120_uart0_data;
76 extern struct amba_pl010_data adm5120_uart1_data;
77
78 extern struct platform_device adm5120_flash0_device;
79 extern struct platform_device adm5120_flash1_device;
80 extern struct platform_device adm5120_nand_device;
81 extern struct platform_device adm5120_hcd_device;
82 extern struct platform_device adm5120_switch_device;
83 extern struct amba_device adm5120_uart0_device;
84 extern struct amba_device adm5120_uart1_device;
85
86 extern void adm5120_uart_set_mctrl(struct amba_device *dev, void __iomem *base,
87 unsigned int mctrl);
88
89 extern void adm5120_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
90 unsigned int ctrl);
91 extern int adm5120_nand_ready(struct mtd_info *mtd);
92
93 #endif /* _ADM5120_PLATFORM_H_ */
This page took 0.049298 seconds and 5 git commands to generate.