aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-16 02:32:26 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-16 02:32:26 -0500
commita915d4ca24b814daee9cddbc42cd41f59fe4fa8f (patch)
tree416849ce325afe9cd7f642e996073b2a0baff639
parentc90929020986d12577570139ed6b787367823ade (diff)
Revert "OMAPDSS: HDMI: Create platform device for audio support"
This reverts commit 14840b9a83c6a56629db2ba0ec247503e975f143. The commit breaks audio, and a new version will be applied later. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/hdmi.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 49f104e7d1d0..24a2eefb7e8c 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -60,9 +60,6 @@
60static struct { 60static struct {
61 struct mutex lock; 61 struct mutex lock;
62 struct platform_device *pdev; 62 struct platform_device *pdev;
63#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
64 struct platform_device *audio_pdev;
65#endif
66 63
67 struct hdmi_ip_data ip_data; 64 struct hdmi_ip_data ip_data;
68 65
@@ -825,54 +822,6 @@ static void hdmi_put_clocks(void)
825} 822}
826 823
827#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) 824#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
828static int hdmi_probe_audio(struct platform_device *pdev)
829{
830 struct resource *res;
831 struct platform_device *aud_pdev;
832 u32 port_offset, port_size;
833 struct resource aud_res[2] = {
834 DEFINE_RES_MEM(-1, -1),
835 DEFINE_RES_DMA(-1),
836 };
837
838 res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0);
839 if (!res) {
840 DSSERR("can't get IORESOURCE_MEM HDMI\n");
841 return -EINVAL;
842 }
843
844 /*
845 * Pass DMA audio port to audio drivers.
846 * Audio drivers should not ioremap it.
847 */
848 hdmi.ip_data.ops->audio_get_dma_port(&port_offset, &port_size);
849
850 aud_res[0].start = res->start + port_offset;
851 aud_res[0].end = aud_res[0].start + port_size - 1;
852
853 res = platform_get_resource(hdmi.pdev, IORESOURCE_DMA, 0);
854 if (!res) {
855 DSSERR("can't get IORESOURCE_DMA HDMI\n");
856 return -EINVAL;
857 }
858
859 /* Pass the audio DMA request resource to audio drivers. */
860 aud_res[1].start = res->start;
861
862 /* create platform device for HDMI audio driver */
863 aud_pdev = platform_device_register_simple("omap_hdmi_audio",
864 pdev->id, aud_res,
865 ARRAY_SIZE(aud_res));
866 if (IS_ERR(aud_pdev)) {
867 DSSERR("Can't instantiate hdmi-audio\n");
868 return -ENODEV;
869 }
870
871 hdmi.audio_pdev = aud_pdev;
872
873 return 0;
874}
875
876int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts) 825int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts)
877{ 826{
878 u32 deep_color; 827 u32 deep_color;
@@ -1153,12 +1102,6 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
1153 1102
1154 hdmi_probe_pdata(pdev); 1103 hdmi_probe_pdata(pdev);
1155 1104
1156#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
1157 r = hdmi_probe_audio(pdev);
1158 if (r)
1159 DSSWARN("could not create platform device for audio");
1160#endif
1161
1162 return 0; 1105 return 0;
1163 1106
1164err_panel_init: 1107err_panel_init:
@@ -1175,11 +1118,6 @@ static int __exit hdmi_remove_child(struct device *dev, void *data)
1175 1118
1176static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) 1119static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
1177{ 1120{
1178#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
1179 if (hdmi.audio_pdev != NULL)
1180 platform_device_unregister(hdmi.audio_pdev);
1181#endif
1182
1183 device_for_each_child(&pdev->dev, NULL, hdmi_remove_child); 1121 device_for_each_child(&pdev->dev, NULL, hdmi_remove_child);
1184 1122
1185 dss_unregister_child_devices(&pdev->dev); 1123 dss_unregister_child_devices(&pdev->dev);