From patchwork Tue Nov 6 06:19:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 1702971 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4AD90DF2A2 for ; Tue, 6 Nov 2012 05:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111Ab2KFFVy (ORCPT ); Tue, 6 Nov 2012 00:21:54 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:60078 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751254Ab2KFFVw (ORCPT ); Tue, 6 Nov 2012 00:21:52 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qA65LpQ7031869 for ; Mon, 5 Nov 2012 23:21:51 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA65Lpua016125 for ; Mon, 5 Nov 2012 23:21:51 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 5 Nov 2012 23:21:51 -0600 Received: from localhost (dexx0075479.dextra-mty.naucm.ext.ti.com [10.87.228.135]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id qA65LpPu017548; Mon, 5 Nov 2012 23:21:51 -0600 From: Ricardo Neri To: CC: , , , , Ricardo Neri Subject: [PATCH v3 6/7] OMAPDSS: HDMI: Add op to get audio DMA port address offset Date: Tue, 6 Nov 2012 00:19:16 -0600 Message-ID: <1352182757-1216-7-git-send-email-ricardo.neri@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1352182757-1216-1-git-send-email-ricardo.neri@ti.com> References: <1352182757-1216-1-git-send-email-ricardo.neri@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org It could be possible that the DMA port differs accross diferent HDMI IPs. Thus, add an IP-specific function to obtain the address offset and size of the DMA data port. Signed-off-by: Ricardo Neri --- drivers/video/omap2/dss/dss_features.c | 1 + drivers/video/omap2/dss/ti_hdmi.h | 3 +++ drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 9 +++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 3e8287c..8dcecbc 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c @@ -820,6 +820,7 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { .audio_start = ti_hdmi_4xxx_audio_start, .audio_stop = ti_hdmi_4xxx_audio_stop, .audio_config = ti_hdmi_4xxx_audio_config, + .audio_get_dma_port = ti_hdmi_4xxx_audio_get_dma_port, #endif }; diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h index b046c20..216aa70 100644 --- a/drivers/video/omap2/dss/ti_hdmi.h +++ b/drivers/video/omap2/dss/ti_hdmi.h @@ -102,6 +102,8 @@ struct ti_hdmi_ip_ops { int (*audio_config)(struct hdmi_ip_data *ip_data, struct omap_dss_audio *audio); + + int (*audio_get_dma_port)(u32 *offset, u32 *size); #endif }; @@ -183,5 +185,6 @@ int ti_hdmi_4xxx_audio_start(struct hdmi_ip_data *ip_data); void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data); int ti_hdmi_4xxx_audio_config(struct hdmi_ip_data *ip_data, struct omap_dss_audio *audio); +int ti_hdmi_4xxx_audio_get_dma_port(u32 *offset, u32 *size); #endif #endif diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index a6efff2..e18b222 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c @@ -1418,4 +1418,13 @@ void ti_hdmi_4xxx_audio_stop(struct hdmi_ip_data *ip_data) REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_AUDIO_CTRL, false, 30, 30); } + +int ti_hdmi_4xxx_audio_get_dma_port(u32 *offset, u32 *size) +{ + if (!offset || !size) + return -EINVAL; + *offset = HDMI_WP_AUDIO_DATA; + *size = 4; + return 0; +} #endif