From patchwork Wed Aug 8 09:11:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1293671 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id E4CAC3FC23 for ; Wed, 8 Aug 2012 09:19:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sz2Ki-00013x-3i; Wed, 08 Aug 2012 09:13:40 +0000 Received: from na3sys009aog125.obsmtp.com ([74.125.149.153]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sz2JV-0000SJ-Ri for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 09:12:27 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKUCItd8tbIhHsJXtoI48PUj2ScB7G6JNX@postini.com; Wed, 08 Aug 2012 02:12:25 PDT Received: by obbta17 with SMTP id ta17so917640obb.36 for ; Wed, 08 Aug 2012 02:12:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=NdHjyZ7oSaq+VgDnnzaIHyRk7lZpkrsq7uLWbC6dm2A=; b=PU+kf9LYBW/WHEe+nL+EfELM/hGOdVizb3pP8tY+OdVz+HgHqBYuVJeVGieuKV2EOk DKIwxszp3TNSBM8BgU6mn7abKb9WZB+5LCiE7nRNlWK70BqgQ8hdyjml0q2RoBY3WoHc 5ebdG8ASwo+mpjBU/v44dFmLMbQnWg9ec4cROP1WtC5FVjHKqx1QRTNiIMdqTl25UPJd /7WMKB+Eo5nltAXqtE8mrnyJZS3/SKyM35zEOZYIOa7XdbviZtWt5IZL7Kj8Dz25ZwRo JpF4W1Dk92LyABTI5cHkso3QssNOcUyp3DeQeSw1u719MiFKrQS4FZDrCfWOIu7lD+5j QkFw== Received: by 10.182.8.6 with SMTP id n6mr29214379oba.39.1344417142777; Wed, 08 Aug 2012 02:12:22 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id cp8sm22099007obc.23.2012.08.08.02.12.19 (version=SSLv3 cipher=OTHER); Wed, 08 Aug 2012 02:12:22 -0700 (PDT) From: Peter Ujfalusi To: Mark Brown , Liam Girdwood , Tony Lindgren Subject: [PATCH 08/11] ARM: OMAP3: Remove callback for McBSP sidetone ICLK workaround Date: Wed, 8 Aug 2012 12:11:38 +0300 Message-Id: <1344417101-5015-9-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1344417101-5015-1-git-send-email-peter.ujfalusi@ti.com> References: <1344417101-5015-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQnAR3Uor7smlhLjWQhJ/hgXzUM+wB5V6HQd5rtIIDiJTsGW8/zCZ9KwPyW9gy79V9LqO5sW X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.153 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: alsa-devel@alsa-project.org, Benoit Cousson , devicetree-discuss@lists.ozlabs.org, Jarkko Nikula , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We can achieve the same result with SIDLEMODE field within McBSP SYSCONFIG register. The ASoC driver has been modified to use this method and we can now remove the workaround using the control module register. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-omap2/mcbsp.c | 26 -------------------------- arch/arm/plat-omap/include/plat/mcbsp.h | 1 - 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index d57a357..996a15f 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c @@ -26,31 +26,6 @@ #include #include -/* - * FIXME: Find a mechanism to enable/disable runtime the McBSP ICLK autoidle. - * Sidetone needs non-gated ICLK and sidetone autoidle is broken. - */ -#include "cm2xxx_3xxx.h" -#include "cm-regbits-34xx.h" - -static int omap3_enable_st_clock(unsigned int id, bool enable) -{ - unsigned int w; - - /* - * Sidetone uses McBSP ICLK - which must not idle when sidetones - * are enabled or sidetones start sounding ugly. - */ - w = omap2_cm_read_mod_reg(OMAP3430_PER_MOD, CM_AUTOIDLE); - if (enable) - w &= ~(1 << (id - 2)); - else - w |= 1 << (id - 2); - omap2_cm_write_mod_reg(w, OMAP3430_PER_MOD, CM_AUTOIDLE); - - return 0; -} - static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) { int id, count = 1; @@ -98,7 +73,6 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) if (oh->dev_attr) { oh_device[1] = omap_hwmod_lookup(( (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); - pdata->enable_st_clock = omap3_enable_st_clock; count++; } pdev = omap_device_build_ss(name, id, oh_device, count, pdata, diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index c78d90b..698ccd8 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h @@ -46,7 +46,6 @@ struct omap_mcbsp_platform_data { /* McBSP platform and instance specific features */ bool has_wakeup; /* Wakeup capability */ bool has_ccr; /* Transceiver has configuration control registers */ - int (*enable_st_clock)(unsigned int, bool); }; /**