Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344639
b: refs/heads/master
c: a915d4c
h: refs/heads/master
i:
  344637: 5519051
  344635: 61e3227
  344631: 777e5e2
  344623: 1cc3c99
  344607: 8b5cb89
  344575: 578532e
v: v3
  • Loading branch information
Tomi Valkeinen committed Nov 16, 2012
1 parent f427601 commit e4669a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 63 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c90929020986d12577570139ed6b787367823ade
refs/heads/master: a915d4ca24b814daee9cddbc42cd41f59fe4fa8f
62 changes: 0 additions & 62 deletions trunk/drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
static struct {
struct mutex lock;
struct platform_device *pdev;
#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
struct platform_device *audio_pdev;
#endif

struct hdmi_ip_data ip_data;

Expand Down Expand Up @@ -825,54 +822,6 @@ static void hdmi_put_clocks(void)
}

#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
static int hdmi_probe_audio(struct platform_device *pdev)
{
struct resource *res;
struct platform_device *aud_pdev;
u32 port_offset, port_size;
struct resource aud_res[2] = {
DEFINE_RES_MEM(-1, -1),
DEFINE_RES_DMA(-1),
};

res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0);
if (!res) {
DSSERR("can't get IORESOURCE_MEM HDMI\n");
return -EINVAL;
}

/*
* Pass DMA audio port to audio drivers.
* Audio drivers should not ioremap it.
*/
hdmi.ip_data.ops->audio_get_dma_port(&port_offset, &port_size);

aud_res[0].start = res->start + port_offset;
aud_res[0].end = aud_res[0].start + port_size - 1;

res = platform_get_resource(hdmi.pdev, IORESOURCE_DMA, 0);
if (!res) {
DSSERR("can't get IORESOURCE_DMA HDMI\n");
return -EINVAL;
}

/* Pass the audio DMA request resource to audio drivers. */
aud_res[1].start = res->start;

/* create platform device for HDMI audio driver */
aud_pdev = platform_device_register_simple("omap_hdmi_audio",
pdev->id, aud_res,
ARRAY_SIZE(aud_res));
if (IS_ERR(aud_pdev)) {
DSSERR("Can't instantiate hdmi-audio\n");
return -ENODEV;
}

hdmi.audio_pdev = aud_pdev;

return 0;
}

int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts)
{
u32 deep_color;
Expand Down Expand Up @@ -1153,12 +1102,6 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)

hdmi_probe_pdata(pdev);

#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
r = hdmi_probe_audio(pdev);
if (r)
DSSWARN("could not create platform device for audio");
#endif

return 0;

err_panel_init:
Expand All @@ -1175,11 +1118,6 @@ static int __exit hdmi_remove_child(struct device *dev, void *data)

static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
{
#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
if (hdmi.audio_pdev != NULL)
platform_device_unregister(hdmi.audio_pdev);
#endif

device_for_each_child(&pdev->dev, NULL, hdmi_remove_child);

dss_unregister_child_devices(&pdev->dev);
Expand Down

0 comments on commit e4669a8

Please sign in to comment.