aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c107
1 files changed, 100 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 003e2ac654d8..f8c411a24af7 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -8,7 +8,7 @@
8 * 8 *
9 * Modified: 9 * Modified:
10 * Copyright 2005 National ICT Australia (NICTA) 10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2007 Analog Devices Inc. 11 * Copyright 2004-2008 Analog Devices Inc.
12 * 12 *
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 * 14 *
@@ -41,6 +41,7 @@
41#include <linux/irq.h> 41#include <linux/irq.h>
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43#include <linux/usb/sl811.h> 43#include <linux/usb/sl811.h>
44#include <linux/usb/musb.h>
44#include <asm/cplb.h> 45#include <asm/cplb.h>
45#include <asm/dma.h> 46#include <asm/dma.h>
46#include <asm/bfin5xx_spi.h> 47#include <asm/bfin5xx_spi.h>
@@ -105,6 +106,69 @@ void __exit bfin_isp1761_exit(void)
105arch_initcall(bfin_isp1761_init); 106arch_initcall(bfin_isp1761_init);
106#endif 107#endif
107 108
109#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
110static struct resource musb_resources[] = {
111 [0] = {
112 .start = 0xffc03800,
113 .end = 0xffc03cff,
114 .flags = IORESOURCE_MEM,
115 },
116 [1] = { /* general IRQ */
117 .start = IRQ_USB_INT0,
118 .end = IRQ_USB_INT0,
119 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
120 },
121 [2] = { /* DMA IRQ */
122 .start = IRQ_USB_DMA,
123 .end = IRQ_USB_DMA,
124 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
125 },
126};
127
128static struct musb_hdrc_platform_data musb_plat = {
129#if defined(CONFIG_USB_MUSB_OTG)
130 .mode = MUSB_OTG,
131#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
132 .mode = MUSB_HOST,
133#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
134 .mode = MUSB_PERIPHERAL,
135#endif
136 .multipoint = 0,
137};
138
139static u64 musb_dmamask = ~(u32)0;
140
141static struct platform_device musb_device = {
142 .name = "musb_hdrc",
143 .id = 0,
144 .dev = {
145 .dma_mask = &musb_dmamask,
146 .coherent_dma_mask = 0xffffffff,
147 .platform_data = &musb_plat,
148 },
149 .num_resources = ARRAY_SIZE(musb_resources),
150 .resource = musb_resources,
151};
152#endif
153
154#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
155
156static struct resource bf52x_t350mcqb_resources[] = {
157 {
158 .start = IRQ_PPI_ERROR,
159 .end = IRQ_PPI_ERROR,
160 .flags = IORESOURCE_IRQ,
161 },
162};
163
164static struct platform_device bf52x_t350mcqb_device = {
165 .name = "bfin-t350mcqb",
166 .id = -1,
167 .num_resources = ARRAY_SIZE(bf52x_t350mcqb_resources),
168 .resource = bf52x_t350mcqb_resources,
169};
170#endif
171
108#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 172#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
109static struct mtd_partition partition_info[] = { 173static struct mtd_partition partition_info[] = {
110 { 174 {
@@ -253,12 +317,7 @@ static struct resource sl811_hcd_resources[] = {
253void sl811_port_power(struct device *dev, int is_on) 317void sl811_port_power(struct device *dev, int is_on)
254{ 318{
255 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); 319 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
256 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS); 320 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
257
258 if (is_on)
259 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
260 else
261 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
262} 321}
263#endif 322#endif
264 323
@@ -718,6 +777,28 @@ static struct platform_device bfin_pata_device = {
718}; 777};
719#endif 778#endif
720 779
780#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
781#include <linux/input.h>
782#include <linux/gpio_keys.h>
783
784static struct gpio_keys_button bfin_gpio_keys_table[] = {
785 {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"},
786 {BTN_1, GPIO_PG13, 1, "gpio-keys: BTN1"},
787};
788
789static struct gpio_keys_platform_data bfin_gpio_keys_data = {
790 .buttons = bfin_gpio_keys_table,
791 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
792};
793
794static struct platform_device bfin_device_gpiokeys = {
795 .name = "gpio-keys",
796 .dev = {
797 .platform_data = &bfin_gpio_keys_data,
798 },
799};
800#endif
801
721static struct platform_device *stamp_devices[] __initdata = { 802static struct platform_device *stamp_devices[] __initdata = {
722#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 803#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
723 &bf5xx_nand_device, 804 &bf5xx_nand_device,
@@ -739,6 +820,10 @@ static struct platform_device *stamp_devices[] __initdata = {
739 &isp1362_hcd_device, 820 &isp1362_hcd_device,
740#endif 821#endif
741 822
823#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
824 &musb_device,
825#endif
826
742#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 827#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
743 &smc91x_device, 828 &smc91x_device,
744#endif 829#endif
@@ -763,6 +848,10 @@ static struct platform_device *stamp_devices[] __initdata = {
763 &bfin_fb_device, 848 &bfin_fb_device,
764#endif 849#endif
765 850
851#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
852 &bf52x_t350mcqb_device,
853#endif
854
766#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 855#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
767 &bfin_fb_adv7393_device, 856 &bfin_fb_adv7393_device,
768#endif 857#endif
@@ -783,6 +872,10 @@ static struct platform_device *stamp_devices[] __initdata = {
783#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 872#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
784 &bfin_pata_device, 873 &bfin_pata_device,
785#endif 874#endif
875
876#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
877 &bfin_device_gpiokeys,
878#endif
786}; 879};
787 880
788static int __init stamp_init(void) 881static int __init stamp_init(void)