4 * ADM5120 specific platform 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_PLATFORM_H_
16 #define _ADM5120_PLATFORM_H_
18 #include <linux/device.h>
19 #include <linux/platform_device.h>
21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/map.h>
23 #include <linux/mtd/partitions.h>
24 #include <linux/mtd/nand.h>
26 #include <linux/amba/bus.h>
27 #include <linux/amba/serial.h>
29 struct adm5120_flash_platform_data
{
30 void (*set_vpp
)(struct map_info
*, int);
31 void (*switch_bank
)(unsigned);
33 #ifdef CONFIG_MTD_PARTITIONS
34 unsigned int nr_parts
;
35 struct mtd_partition
*parts
;
39 struct adm5120_switch_platform_data
{
40 /* TODO: not yet implemented */
43 struct adm5120_pci_irq
{
50 #define PCIIRQ(s,f,p,i) {.slot = (s), .func = (f), .pin = (p), .irq = (i)}
53 extern void adm5120_pci_set_irq_map(unsigned int nr_irqs
,
54 struct adm5120_pci_irq
*map
) __init
;
56 static inline void adm5120_pci_set_irq_map(unsigned int nr_irqs
,
57 struct adm5120_pci_irq
*map
)
62 extern struct adm5120_flash_platform_data adm5120_flash0_data
;
63 extern struct adm5120_flash_platform_data adm5120_flash1_data
;
64 extern struct platform_nand_data adm5120_nand_data
;
65 extern struct adm5120_switch_platform_data adm5120_switch_data
;
66 extern struct amba_pl010_data adm5120_uart0_data
;
67 extern struct amba_pl010_data adm5120_uart1_data
;
69 extern struct platform_device adm5120_flash0_device
;
70 extern struct platform_device adm5120_flash1_device
;
71 extern struct platform_device adm5120_nand_device
;
72 extern struct platform_device adm5120_hcd_device
;
73 extern struct platform_device adm5120_switch_device
;
74 extern struct amba_device adm5120_uart0_device
;
75 extern struct amba_device adm5120_uart1_device
;
77 extern void adm5120_uart_set_mctrl(struct amba_device
*dev
, void __iomem
*base
,
80 extern void adm5120_nand_cmd_ctrl(struct mtd_info
*mtd
, int cmd
,
82 extern int adm5120_nand_ready(struct mtd_info
*mtd
);
84 #endif /* _ADM5120_PLATFORM_H_ */