From patchwork Tue May 17 03:14:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 790332 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4H3GBm5020603 for ; Tue, 17 May 2011 03:16:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab1EQDQM (ORCPT ); Mon, 16 May 2011 23:16:12 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:52637 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495Ab1EQDQI (ORCPT ); Mon, 16 May 2011 23:16:08 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4H3G60p002835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 May 2011 22:16:06 -0500 Received: from emcc1.dextra-mty.naucm.ext.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4H3G46G020065; Mon, 16 May 2011 22:16:04 -0500 (CDT) Received: from localhost (dexx0075479.dextra-mty.naucm.ext.ti.com [10.87.228.122]) by emcc1.dextra-mty.naucm.ext.ti.com (8.13.8+Sun/8.13.8) with ESMTP id p4H3G4lq025089; Mon, 16 May 2011 22:16:04 -0500 (CDT) From: Ricardo Neri To: linux-omap@vger.kernel.org, tony@atomide.com, b-cousson@ti.com, paul@pwsan.com Cc: Ricardo Neri Subject: [PATCH 1/2] OMAP4: HDMI: Add OMAP device for HDMI audio CPU DAI Date: Mon, 16 May 2011 22:14:38 -0500 Message-Id: <1305602079-3852-2-git-send-email-ricardo.neri@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1305602079-3852-1-git-send-email-ricardo.neri@ti.com> References: <1305602079-3852-1-git-send-email-ricardo.neri@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 17 May 2011 03:16:13 +0000 (UTC) Add device for HDMI audio. This device uses hwmod data from dss_hdmi. This device is to be used by the ASoC HDMI CPU DAI to obtain base memory address and DMA request number. Signed-off-by: Ricardo Neri --- arch/arm/mach-omap2/devices.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 7b85585..56e2e98 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -313,6 +313,22 @@ OMAP_MCBSP_PLATFORM_DEVICE(5); static void omap_init_audio(void) { + struct omap_hwmod *oh_hdmi; + struct omap_device *od_hdmi; + char *oh_hdmi_name = "dss_hdmi"; + char *dev_hdmi_name = "hdmi-audio-dai"; + + if (cpu_is_omap44xx()) { + oh_hdmi = omap_hwmod_lookup(oh_hdmi_name); + WARN(!oh_hdmi, "%s: could not find omap_hwmod for %s\n", + __func__, oh_hdmi_name); + + od_hdmi = omap_device_build(dev_hdmi_name, -1, oh_hdmi, NULL, 0, + NULL, 0, false); + WARN(IS_ERR(od_hdmi), "%s: could not build omap_device for %s\n", + __func__, dev_hdmi_name); + } + platform_device_register(&omap_mcbsp1); platform_device_register(&omap_mcbsp2); if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) {