~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/blackfin/mach-bf527/boards/ezkit.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <asm/portmux.h>
27
27
#include <asm/dpmc.h>
28
28
#include <linux/spi/ad7877.h>
 
29
#include <asm/bfin_sport.h>
29
30
 
30
31
/*
31
32
 * Name the Board for the /proc/cpuinfo
526
527
};
527
528
#endif
528
529
 
 
530
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
 
531
        defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
 
532
 
 
533
static const u16 bfin_snd_pin[][7] = {
 
534
        {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
 
535
                P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0, 0},
 
536
        {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
 
537
                P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_TFS, 0},
 
538
};
 
539
 
 
540
static struct bfin_snd_platform_data bfin_snd_data[] = {
 
541
        {
 
542
                .pin_req = &bfin_snd_pin[0][0],
 
543
        },
 
544
        {
 
545
                .pin_req = &bfin_snd_pin[1][0],
 
546
        },
 
547
};
 
548
 
 
549
#define BFIN_SND_RES(x) \
 
550
        [x] = { \
 
551
                { \
 
552
                        .start = SPORT##x##_TCR1, \
 
553
                        .end = SPORT##x##_TCR1, \
 
554
                        .flags = IORESOURCE_MEM \
 
555
                }, \
 
556
                { \
 
557
                        .start = CH_SPORT##x##_RX, \
 
558
                        .end = CH_SPORT##x##_RX, \
 
559
                        .flags = IORESOURCE_DMA, \
 
560
                }, \
 
561
                { \
 
562
                        .start = CH_SPORT##x##_TX, \
 
563
                        .end = CH_SPORT##x##_TX, \
 
564
                        .flags = IORESOURCE_DMA, \
 
565
                }, \
 
566
                { \
 
567
                        .start = IRQ_SPORT##x##_ERROR, \
 
568
                        .end = IRQ_SPORT##x##_ERROR, \
 
569
                        .flags = IORESOURCE_IRQ, \
 
570
                } \
 
571
        }
 
572
 
 
573
static struct resource bfin_snd_resources[][4] = {
 
574
        BFIN_SND_RES(0),
 
575
        BFIN_SND_RES(1),
 
576
};
 
577
 
 
578
static struct platform_device bfin_pcm = {
 
579
        .name = "bfin-pcm-audio",
 
580
        .id = -1,
 
581
};
 
582
#endif
 
583
 
529
584
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
530
585
static struct platform_device bfin_i2s = {
531
586
        .name = "bfin-i2s",
532
587
        .id = CONFIG_SND_BF5XX_SPORT_NUM,
533
 
        /* TODO: add platform data here */
 
588
        .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
 
589
        .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
 
590
        .dev = {
 
591
                .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
 
592
        },
534
593
};
535
594
#endif
536
595
 
538
597
static struct platform_device bfin_tdm = {
539
598
        .name = "bfin-tdm",
540
599
        .id = CONFIG_SND_BF5XX_SPORT_NUM,
541
 
        /* TODO: add platform data here */
 
600
        .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
 
601
        .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
 
602
        .dev = {
 
603
                .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
 
604
        },
542
605
};
543
606
#endif
544
607
 
583
646
                .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
584
647
                .bus_num = 0,
585
648
                .chip_select = 4,
 
649
                .platform_data = "ad1836",
586
650
                .controller_data = &ad1836_spi_chip_info,
 
651
                .mode = SPI_MODE_3,
587
652
        },
588
653
#endif
589
654
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
1211
1276
        &ezkit_flash_device,
1212
1277
#endif
1213
1278
 
 
1279
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
 
1280
        defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
 
1281
        &bfin_pcm,
 
1282
#endif
 
1283
 
1214
1284
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1215
1285
        &bfin_i2s,
1216
1286
#endif