diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 11 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 12 | ||||
-rw-r--r-- | include/sound/sh_fsi.h | 7 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 25 |
6 files changed, 11 insertions, 67 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 99ef190d0909..4c979039d97e 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -657,14 +657,8 @@ static struct platform_device lcdc_device = { | |||
657 | /* FSI */ | 657 | /* FSI */ |
658 | #define IRQ_FSI evt2irq(0x1840) | 658 | #define IRQ_FSI evt2irq(0x1840) |
659 | static struct sh_fsi_platform_info fsi_info = { | 659 | static struct sh_fsi_platform_info fsi_info = { |
660 | .port_a = { | ||
661 | .flags = SH_FSI_BRS_INV, | ||
662 | }, | ||
663 | .port_b = { | 660 | .port_b = { |
664 | .flags = SH_FSI_BRS_INV | | 661 | .flags = SH_FSI_CLK_CPG | |
665 | SH_FSI_BRM_INV | | ||
666 | SH_FSI_LRS_INV | | ||
667 | SH_FSI_CLK_CPG | | ||
668 | SH_FSI_FMT_SPDIF, | 662 | SH_FSI_FMT_SPDIF, |
669 | }, | 663 | }, |
670 | }; | 664 | }; |
@@ -816,7 +810,8 @@ static struct platform_device lcdc1_device = { | |||
816 | }; | 810 | }; |
817 | 811 | ||
818 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { | 812 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { |
819 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM, | 813 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM | |
814 | SND_SOC_DAIFMT_IB_NF, | ||
820 | }; | 815 | }; |
821 | 816 | ||
822 | static struct asoc_simple_card_info fsi2_hdmi_info = { | 817 | static struct asoc_simple_card_info fsi2_hdmi_info = { |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 2fed62f66045..b5d210b4264c 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -503,7 +503,8 @@ static struct platform_device hdmi_lcdc_device = { | |||
503 | }; | 503 | }; |
504 | 504 | ||
505 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { | 505 | static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = { |
506 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM, | 506 | .cpu_daifmt = SND_SOC_DAIFMT_CBM_CFM | |
507 | SND_SOC_DAIFMT_IB_NF, | ||
507 | }; | 508 | }; |
508 | 509 | ||
509 | static struct asoc_simple_card_info fsi2_hdmi_info = { | 510 | static struct asoc_simple_card_info fsi2_hdmi_info = { |
@@ -858,16 +859,12 @@ static struct platform_device leds_device = { | |||
858 | #define IRQ_FSI evt2irq(0x1840) | 859 | #define IRQ_FSI evt2irq(0x1840) |
859 | static struct sh_fsi_platform_info fsi_info = { | 860 | static struct sh_fsi_platform_info fsi_info = { |
860 | .port_a = { | 861 | .port_a = { |
861 | .flags = SH_FSI_BRS_INV, | ||
862 | .tx_id = SHDMA_SLAVE_FSIA_TX, | 862 | .tx_id = SHDMA_SLAVE_FSIA_TX, |
863 | .rx_id = SHDMA_SLAVE_FSIA_RX, | 863 | .rx_id = SHDMA_SLAVE_FSIA_RX, |
864 | }, | 864 | }, |
865 | .port_b = { | 865 | .port_b = { |
866 | .flags = SH_FSI_BRS_INV | | 866 | .flags = SH_FSI_CLK_CPG | |
867 | SH_FSI_BRM_INV | | 867 | SH_FSI_FMT_SPDIF, |
868 | SH_FSI_LRS_INV | | ||
869 | SH_FSI_CLK_CPG | | ||
870 | SH_FSI_FMT_SPDIF, | ||
871 | } | 868 | } |
872 | }; | 869 | }; |
873 | 870 | ||
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 3fede4556c91..8ebe4c7a766b 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -877,12 +877,6 @@ static struct platform_device camera_devices[] = { | |||
877 | }; | 877 | }; |
878 | 878 | ||
879 | /* FSI */ | 879 | /* FSI */ |
880 | static struct sh_fsi_platform_info fsi_info = { | ||
881 | .port_b = { | ||
882 | .flags = SH_FSI_BRS_INV, | ||
883 | }, | ||
884 | }; | ||
885 | |||
886 | static struct resource fsi_resources[] = { | 880 | static struct resource fsi_resources[] = { |
887 | [0] = { | 881 | [0] = { |
888 | .name = "FSI", | 882 | .name = "FSI", |
@@ -901,15 +895,13 @@ static struct platform_device fsi_device = { | |||
901 | .id = 0, | 895 | .id = 0, |
902 | .num_resources = ARRAY_SIZE(fsi_resources), | 896 | .num_resources = ARRAY_SIZE(fsi_resources), |
903 | .resource = fsi_resources, | 897 | .resource = fsi_resources, |
904 | .dev = { | ||
905 | .platform_data = &fsi_info, | ||
906 | }, | ||
907 | }; | 898 | }; |
908 | 899 | ||
909 | static struct asoc_simple_dai_init_info fsi_da7210_init_info = { | 900 | static struct asoc_simple_dai_init_info fsi_da7210_init_info = { |
910 | .fmt = SND_SOC_DAIFMT_I2S, | 901 | .fmt = SND_SOC_DAIFMT_I2S, |
911 | .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM, | 902 | .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM, |
912 | .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS, | 903 | .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS | |
904 | SND_SOC_DAIFMT_IB_NF, | ||
913 | }; | 905 | }; |
914 | 906 | ||
915 | static struct asoc_simple_card_info fsi_da7210_info = { | 907 | static struct asoc_simple_card_info fsi_da7210_info = { |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 35f6efa3ac0e..975608f5e805 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -279,12 +279,6 @@ static struct platform_device ceu1_device = { | |||
279 | 279 | ||
280 | /* FSI */ | 280 | /* FSI */ |
281 | /* change J20, J21, J22 pin to 1-2 connection to use slave mode */ | 281 | /* change J20, J21, J22 pin to 1-2 connection to use slave mode */ |
282 | static struct sh_fsi_platform_info fsi_info = { | ||
283 | .port_a = { | ||
284 | .flags = SH_FSI_BRS_INV, | ||
285 | }, | ||
286 | }; | ||
287 | |||
288 | static struct resource fsi_resources[] = { | 282 | static struct resource fsi_resources[] = { |
289 | [0] = { | 283 | [0] = { |
290 | .name = "FSI", | 284 | .name = "FSI", |
@@ -303,15 +297,13 @@ static struct platform_device fsi_device = { | |||
303 | .id = 0, | 297 | .id = 0, |
304 | .num_resources = ARRAY_SIZE(fsi_resources), | 298 | .num_resources = ARRAY_SIZE(fsi_resources), |
305 | .resource = fsi_resources, | 299 | .resource = fsi_resources, |
306 | .dev = { | ||
307 | .platform_data = &fsi_info, | ||
308 | }, | ||
309 | }; | 300 | }; |
310 | 301 | ||
311 | static struct asoc_simple_dai_init_info fsi2_ak4642_init_info = { | 302 | static struct asoc_simple_dai_init_info fsi2_ak4642_init_info = { |
312 | .fmt = SND_SOC_DAIFMT_LEFT_J, | 303 | .fmt = SND_SOC_DAIFMT_LEFT_J, |
313 | .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM, | 304 | .codec_daifmt = SND_SOC_DAIFMT_CBM_CFM, |
314 | .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS, | 305 | .cpu_daifmt = SND_SOC_DAIFMT_CBS_CFS | |
306 | SND_SOC_DAIFMT_IB_NF, | ||
315 | .sysclk = 11289600, | 307 | .sysclk = 11289600, |
316 | }; | 308 | }; |
317 | 309 | ||
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index 66285e1e340e..43ac28581920 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h | |||
@@ -29,13 +29,6 @@ | |||
29 | * D: clock selecter if master mode | 29 | * D: clock selecter if master mode |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* A: clock inversion */ | ||
33 | #define SH_FSI_INVERSION_MASK 0x0000000F | ||
34 | #define SH_FSI_LRM_INV (1 << 0) | ||
35 | #define SH_FSI_BRM_INV (1 << 1) | ||
36 | #define SH_FSI_LRS_INV (1 << 2) | ||
37 | #define SH_FSI_BRS_INV (1 << 3) | ||
38 | |||
39 | /* B: format mode */ | 32 | /* B: format mode */ |
40 | #define SH_FSI_FMT_MASK 0x000000F0 | 33 | #define SH_FSI_FMT_MASK 0x000000F0 |
41 | #define SH_FSI_FMT_DAI (0 << 4) | 34 | #define SH_FSI_FMT_DAI (0 << 4) |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 5cb1332e0438..f14c611b38c6 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -251,7 +251,6 @@ struct fsi_clk { | |||
251 | struct fsi_priv { | 251 | struct fsi_priv { |
252 | void __iomem *base; | 252 | void __iomem *base; |
253 | struct fsi_master *master; | 253 | struct fsi_master *master; |
254 | struct sh_fsi_port_info *info; | ||
255 | 254 | ||
256 | struct fsi_stream playback; | 255 | struct fsi_stream playback; |
257 | struct fsi_stream capture; | 256 | struct fsi_stream capture; |
@@ -426,14 +425,6 @@ static struct fsi_priv *fsi_get_priv(struct snd_pcm_substream *substream) | |||
426 | return fsi_get_priv_frm_dai(fsi_get_dai(substream)); | 425 | return fsi_get_priv_frm_dai(fsi_get_dai(substream)); |
427 | } | 426 | } |
428 | 427 | ||
429 | static u32 fsi_get_info_flags(struct fsi_priv *fsi) | ||
430 | { | ||
431 | if (!fsi->info) | ||
432 | return 0; | ||
433 | |||
434 | return fsi->info->flags; | ||
435 | } | ||
436 | |||
437 | static u32 fsi_get_port_shift(struct fsi_priv *fsi, struct fsi_stream *io) | 428 | static u32 fsi_get_port_shift(struct fsi_priv *fsi, struct fsi_stream *io) |
438 | { | 429 | { |
439 | int is_play = fsi_stream_is_play(fsi, io); | 430 | int is_play = fsi_stream_is_play(fsi, io); |
@@ -1543,7 +1534,6 @@ static int fsi_hw_startup(struct fsi_priv *fsi, | |||
1543 | struct fsi_stream *io, | 1534 | struct fsi_stream *io, |
1544 | struct device *dev) | 1535 | struct device *dev) |
1545 | { | 1536 | { |
1546 | u32 flags = fsi_get_info_flags(fsi); | ||
1547 | u32 data = 0; | 1537 | u32 data = 0; |
1548 | 1538 | ||
1549 | /* clock setting */ | 1539 | /* clock setting */ |
@@ -1560,19 +1550,6 @@ static int fsi_hw_startup(struct fsi_priv *fsi, | |||
1560 | data |= (1 << 4); | 1550 | data |= (1 << 4); |
1561 | if (fsi_is_clk_master(fsi)) | 1551 | if (fsi_is_clk_master(fsi)) |
1562 | data <<= 8; | 1552 | data <<= 8; |
1563 | /* FIXME | ||
1564 | * | ||
1565 | * SH_FSI_xxx_INV style will be removed | ||
1566 | */ | ||
1567 | if (SH_FSI_LRM_INV & flags) | ||
1568 | data |= 1 << 12; | ||
1569 | if (SH_FSI_BRM_INV & flags) | ||
1570 | data |= 1 << 8; | ||
1571 | if (SH_FSI_LRS_INV & flags) | ||
1572 | data |= 1 << 4; | ||
1573 | if (SH_FSI_BRS_INV & flags) | ||
1574 | data |= 1 << 0; | ||
1575 | |||
1576 | fsi_reg_write(fsi, CKG2, data); | 1553 | fsi_reg_write(fsi, CKG2, data); |
1577 | 1554 | ||
1578 | /* spdif ? */ | 1555 | /* spdif ? */ |
@@ -1988,7 +1965,6 @@ static int fsi_probe(struct platform_device *pdev) | |||
1988 | fsi = &master->fsia; | 1965 | fsi = &master->fsia; |
1989 | fsi->base = master->base; | 1966 | fsi->base = master->base; |
1990 | fsi->master = master; | 1967 | fsi->master = master; |
1991 | fsi->info = pinfo; | ||
1992 | fsi_port_info_init(fsi, pinfo); | 1968 | fsi_port_info_init(fsi, pinfo); |
1993 | fsi_handler_init(fsi, pinfo); | 1969 | fsi_handler_init(fsi, pinfo); |
1994 | ret = fsi_stream_probe(fsi, &pdev->dev); | 1970 | ret = fsi_stream_probe(fsi, &pdev->dev); |
@@ -2002,7 +1978,6 @@ static int fsi_probe(struct platform_device *pdev) | |||
2002 | fsi = &master->fsib; | 1978 | fsi = &master->fsib; |
2003 | fsi->base = master->base + 0x40; | 1979 | fsi->base = master->base + 0x40; |
2004 | fsi->master = master; | 1980 | fsi->master = master; |
2005 | fsi->info = pinfo; | ||
2006 | fsi_port_info_init(fsi, pinfo); | 1981 | fsi_port_info_init(fsi, pinfo); |
2007 | fsi_handler_init(fsi, pinfo); | 1982 | fsi_handler_init(fsi, pinfo); |
2008 | ret = fsi_stream_probe(fsi, &pdev->dev); | 1983 | ret = fsi_stream_probe(fsi, &pdev->dev); |