aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2007-12-23 22:49:29 -0500
committerBryan Wu <bryan.wu@analog.com>2007-12-23 22:49:29 -0500
commit1089e228737019b9711a6a394eebe25bf46b22d9 (patch)
treede00bd697f15c59dfdd8ef522016fe5b38de0cf5
parent971d5bc4e5c75bfc4466deaff09839cd6f918eca (diff)
[Blackfin] arch: Enable peripheral platform resources on the BF527 EZkit
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c98
1 files changed, 98 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 003e2ac654d8..bc256811a5e3 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -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 {
@@ -718,6 +782,28 @@ static struct platform_device bfin_pata_device = {
718}; 782};
719#endif 783#endif
720 784
785#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
786#include <linux/input.h>
787#include <linux/gpio_keys.h>
788
789static struct gpio_keys_button bfin_gpio_keys_table[] = {
790 {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"},
791 {BTN_1, GPIO_PG13, 1, "gpio-keys: BTN1"},
792};
793
794static struct gpio_keys_platform_data bfin_gpio_keys_data = {
795 .buttons = bfin_gpio_keys_table,
796 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
797};
798
799static struct platform_device bfin_device_gpiokeys = {
800 .name = "gpio-keys",
801 .dev = {
802 .platform_data = &bfin_gpio_keys_data,
803 },
804};
805#endif
806
721static struct platform_device *stamp_devices[] __initdata = { 807static struct platform_device *stamp_devices[] __initdata = {
722#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 808#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
723 &bf5xx_nand_device, 809 &bf5xx_nand_device,
@@ -739,6 +825,10 @@ static struct platform_device *stamp_devices[] __initdata = {
739 &isp1362_hcd_device, 825 &isp1362_hcd_device,
740#endif 826#endif
741 827
828#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
829 &musb_device,
830#endif
831
742#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 832#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
743 &smc91x_device, 833 &smc91x_device,
744#endif 834#endif
@@ -763,6 +853,10 @@ static struct platform_device *stamp_devices[] __initdata = {
763 &bfin_fb_device, 853 &bfin_fb_device,
764#endif 854#endif
765 855
856#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
857 &bf52x_t350mcqb_device,
858#endif
859
766#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 860#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
767 &bfin_fb_adv7393_device, 861 &bfin_fb_adv7393_device,
768#endif 862#endif
@@ -783,6 +877,10 @@ static struct platform_device *stamp_devices[] __initdata = {
783#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 877#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
784 &bfin_pata_device, 878 &bfin_pata_device,
785#endif 879#endif
880
881#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
882 &bfin_device_gpiokeys,
883#endif
786}; 884};
787 885
788static int __init stamp_init(void) 886static int __init stamp_init(void)