aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf548/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf548/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c96
1 files changed, 71 insertions, 25 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index d37d6653c4bc..14860f04d1bd 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -32,6 +32,7 @@
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/mtd/mtd.h> 33#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
35#include <linux/mtd/physmap.h>
35#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 37#include <linux/spi/flash.h>
37#include <linux/irq.h> 38#include <linux/irq.h>
@@ -206,23 +207,6 @@ static struct platform_device smsc911x_device = {
206}; 207};
207#endif 208#endif
208 209
209#if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
210static struct resource bf54x_hcd_resources[] = {
211 {
212 .start = 0xFFC03C00,
213 .end = 0xFFC040FF,
214 .flags = IORESOURCE_MEM,
215 },
216};
217
218static struct platform_device bf54x_hcd = {
219 .name = "bf54x-hcd",
220 .id = 0,
221 .num_resources = ARRAY_SIZE(bf54x_hcd_resources),
222 .resource = bf54x_hcd_resources,
223};
224#endif
225
226#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 210#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
227static struct resource musb_resources[] = { 211static struct resource musb_resources[] = {
228 [0] = { 212 [0] = {
@@ -243,14 +227,14 @@ static struct resource musb_resources[] = {
243}; 227};
244 228
245static struct musb_hdrc_platform_data musb_plat = { 229static struct musb_hdrc_platform_data musb_plat = {
246#ifdef CONFIG_USB_MUSB_OTG 230#if defined(CONFIG_USB_MUSB_OTG)
247 .mode = MUSB_OTG, 231 .mode = MUSB_OTG,
248#elif CONFIG_USB_MUSB_HDRC_HCD 232#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
249 .mode = MUSB_HOST, 233 .mode = MUSB_HOST,
250#elif CONFIG_USB_GADGET_MUSB_HDRC 234#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
251 .mode = MUSB_PERIPHERAL, 235 .mode = MUSB_PERIPHERAL,
252#endif 236#endif
253 .multipoint = 1, 237 .multipoint = 0,
254}; 238};
255 239
256static u64 musb_dmamask = ~(u32)0; 240static u64 musb_dmamask = ~(u32)0;
@@ -344,6 +328,44 @@ static struct platform_device bf54x_sdh_device = {
344}; 328};
345#endif 329#endif
346 330
331static struct mtd_partition ezkit_partitions[] = {
332 {
333 .name = "Bootloader",
334 .size = 0x20000,
335 .offset = 0,
336 }, {
337 .name = "Kernel",
338 .size = 0xE0000,
339 .offset = MTDPART_OFS_APPEND,
340 }, {
341 .name = "RootFS",
342 .size = MTDPART_SIZ_FULL,
343 .offset = MTDPART_OFS_APPEND,
344 }
345};
346
347static struct physmap_flash_data ezkit_flash_data = {
348 .width = 2,
349 .parts = ezkit_partitions,
350 .nr_parts = ARRAY_SIZE(ezkit_partitions),
351};
352
353static struct resource ezkit_flash_resource = {
354 .start = 0x20000000,
355 .end = 0x20ffffff,
356 .flags = IORESOURCE_MEM,
357};
358
359static struct platform_device ezkit_flash_device = {
360 .name = "physmap-flash",
361 .id = 0,
362 .dev = {
363 .platform_data = &ezkit_flash_data,
364 },
365 .num_resources = 1,
366 .resource = &ezkit_flash_resource,
367};
368
347#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 369#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
348/* all SPI peripherals info goes here */ 370/* all SPI peripherals info goes here */
349#if defined(CONFIG_MTD_M25P80) \ 371#if defined(CONFIG_MTD_M25P80) \
@@ -531,6 +553,29 @@ static struct platform_device i2c_bfin_twi1_device = {
531#endif 553#endif
532#endif 554#endif
533 555
556#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
557#include <linux/gpio_keys.h>
558
559static struct gpio_keys_button bfin_gpio_keys_table[] = {
560 {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
561 {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
562 {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
563 {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
564};
565
566static struct gpio_keys_platform_data bfin_gpio_keys_data = {
567 .buttons = bfin_gpio_keys_table,
568 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
569};
570
571static struct platform_device bfin_device_gpiokeys = {
572 .name = "gpio-keys",
573 .dev = {
574 .platform_data = &bfin_gpio_keys_data,
575 },
576};
577#endif
578
534static struct platform_device *ezkit_devices[] __initdata = { 579static struct platform_device *ezkit_devices[] __initdata = {
535#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 580#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
536 &rtc_device, 581 &rtc_device,
@@ -548,10 +593,6 @@ static struct platform_device *ezkit_devices[] __initdata = {
548 &smsc911x_device, 593 &smsc911x_device,
549#endif 594#endif
550 595
551#if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE)
552 &bf54x_hcd,
553#endif
554
555#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 596#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
556 &musb_device, 597 &musb_device,
557#endif 598#endif
@@ -583,6 +624,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
583 &i2c_bfin_twi1_device, 624 &i2c_bfin_twi1_device,
584#endif 625#endif
585#endif 626#endif
627
628#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
629 &bfin_device_gpiokeys,
630#endif
631 &ezkit_flash_device,
586}; 632};
587 633
588static int __init stamp_init(void) 634static int __init stamp_init(void)