aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c80
1 files changed, 69 insertions, 11 deletions
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9b93e2f95791..5067984a62e7 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -14,6 +14,7 @@
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/delay.h>
17#include <asm/dma.h> 18#include <asm/dma.h>
18#include <asm/bfin5xx_spi.h> 19#include <asm/bfin5xx_spi.h>
19#include <asm/portmux.h> 20#include <asm/portmux.h>
@@ -74,7 +75,7 @@ static struct resource isp1362_hcd_resources[] = {
74 }, { 75 }, {
75 .start = IRQ_PF8, 76 .start = IRQ_PF8,
76 .end = IRQ_PF8, 77 .end = IRQ_PF8,
77 .flags = IORESOURCE_IRQ, 78 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
78 }, 79 },
79}; 80};
80 81
@@ -189,7 +190,7 @@ static struct resource bfin_uart0_resources[] = {
189 }, 190 },
190}; 191};
191 192
192unsigned short bfin_uart0_peripherals[] = { 193static unsigned short bfin_uart0_peripherals[] = {
193 P_UART0_TX, P_UART0_RX, 0 194 P_UART0_TX, P_UART0_RX, 0
194}; 195};
195 196
@@ -246,7 +247,15 @@ static struct mtd_partition ezkit_partitions[] = {
246 .offset = MTDPART_OFS_APPEND, 247 .offset = MTDPART_OFS_APPEND,
247 }, { 248 }, {
248 .name = "file system(nor)", 249 .name = "file system(nor)",
249 .size = MTDPART_SIZ_FULL, 250 .size = 0x800000 - 0x40000 - 0x1C0000 - 0x2000 * 8,
251 .offset = MTDPART_OFS_APPEND,
252 }, {
253 .name = "config(nor)",
254 .size = 0x2000 * 7,
255 .offset = MTDPART_OFS_APPEND,
256 }, {
257 .name = "u-boot env(nor)",
258 .size = 0x2000,
250 .offset = MTDPART_OFS_APPEND, 259 .offset = MTDPART_OFS_APPEND,
251 } 260 }
252}; 261};
@@ -274,8 +283,8 @@ static struct platform_device ezkit_flash_device = {
274}; 283};
275#endif 284#endif
276 285
277#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 286#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
278 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 287 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
279static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 288static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
280 .enable_dma = 0, 289 .enable_dma = 0,
281 .bits_per_word = 16, 290 .bits_per_word = 16,
@@ -328,14 +337,16 @@ static struct platform_device bfin_spi0_device = {
328#endif 337#endif
329 338
330static struct spi_board_info bfin_spi_board_info[] __initdata = { 339static struct spi_board_info bfin_spi_board_info[] __initdata = {
331#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 340#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
332 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 341 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
333 { 342 {
334 .modalias = "ad1836", 343 .modalias = "ad183x",
335 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 344 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
336 .bus_num = 0, 345 .bus_num = 0,
337 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 346 .chip_select = 4,
347 .platform_data = "ad1836", /* only includes chip name for the moment */
338 .controller_data = &ad1836_spi_chip_info, 348 .controller_data = &ad1836_spi_chip_info,
349 .mode = SPI_MODE_3,
339 }, 350 },
340#endif 351#endif
341#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 352#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
@@ -377,8 +388,8 @@ static struct platform_device bfin_device_gpiokeys = {
377#include <linux/i2c-gpio.h> 388#include <linux/i2c-gpio.h>
378 389
379static struct i2c_gpio_platform_data i2c_gpio_data = { 390static struct i2c_gpio_platform_data i2c_gpio_data = {
380 .sda_pin = 1, 391 .sda_pin = GPIO_PF1,
381 .scl_pin = 0, 392 .scl_pin = GPIO_PF0,
382 .sda_is_open_drain = 0, 393 .sda_is_open_drain = 0,
383 .scl_is_open_drain = 0, 394 .scl_is_open_drain = 0,
384 .udelay = 40, 395 .udelay = 40,
@@ -420,6 +431,30 @@ static struct platform_device bfin_dpmc = {
420 }, 431 },
421}; 432};
422 433
434#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
435static struct platform_device bfin_i2s = {
436 .name = "bfin-i2s",
437 .id = CONFIG_SND_BF5XX_SPORT_NUM,
438 /* TODO: add platform data here */
439};
440#endif
441
442#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
443static struct platform_device bfin_tdm = {
444 .name = "bfin-tdm",
445 .id = CONFIG_SND_BF5XX_SPORT_NUM,
446 /* TODO: add platform data here */
447};
448#endif
449
450#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
451static struct platform_device bfin_ac97 = {
452 .name = "bfin-ac97",
453 .id = CONFIG_SND_BF5XX_SPORT_NUM,
454 /* TODO: add platform data here */
455};
456#endif
457
423static struct platform_device *ezkit_devices[] __initdata = { 458static struct platform_device *ezkit_devices[] __initdata = {
424 459
425 &bfin_dpmc, 460 &bfin_dpmc,
@@ -467,6 +502,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
467#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 502#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
468 &ezkit_flash_device, 503 &ezkit_flash_device,
469#endif 504#endif
505
506#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
507 &bfin_i2s,
508#endif
509
510#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
511 &bfin_tdm,
512#endif
513
514#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
515 &bfin_ac97,
516#endif
470}; 517};
471 518
472static int __init ezkit_init(void) 519static int __init ezkit_init(void)
@@ -484,6 +531,17 @@ static int __init ezkit_init(void)
484 SSYNC(); 531 SSYNC();
485#endif 532#endif
486 533
534#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
535 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
536 bfin_write_FIO0_FLAG_S(1 << 15);
537 SSYNC();
538 /*
539 * This initialization lasts for approximately 4500 MCLKs.
540 * MCLK = 12.288MHz
541 */
542 udelay(400);
543#endif
544
487 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 545 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
488 return 0; 546 return 0;
489} 547}