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)
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},
540
static struct bfin_snd_platform_data bfin_snd_data[] = {
542
.pin_req = &bfin_snd_pin[0][0],
545
.pin_req = &bfin_snd_pin[1][0],
549
#define BFIN_SND_RES(x) \
552
.start = SPORT##x##_TCR1, \
553
.end = SPORT##x##_TCR1, \
554
.flags = IORESOURCE_MEM \
557
.start = CH_SPORT##x##_RX, \
558
.end = CH_SPORT##x##_RX, \
559
.flags = IORESOURCE_DMA, \
562
.start = CH_SPORT##x##_TX, \
563
.end = CH_SPORT##x##_TX, \
564
.flags = IORESOURCE_DMA, \
567
.start = IRQ_SPORT##x##_ERROR, \
568
.end = IRQ_SPORT##x##_ERROR, \
569
.flags = IORESOURCE_IRQ, \
573
static struct resource bfin_snd_resources[][4] = {
578
static struct platform_device bfin_pcm = {
579
.name = "bfin-pcm-audio",
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],
591
.platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
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],
603
.platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],