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: 1293521 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C3D203FCFC for ; Wed, 8 Aug 2012 09:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964908Ab2HHJMZ (ORCPT ); Wed, 8 Aug 2012 05:12:25 -0400 Received: from na3sys009aog122.obsmtp.com ([74.125.149.147]:58658 "EHLO na3sys009aog122.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757914Ab2HHJMY (ORCPT ); Wed, 8 Aug 2012 05:12:24 -0400 Received: from mail-ob0-f176.google.com ([209.85.214.176]) (using TLSv1) by na3sys009aob122.postini.com ([74.125.148.12]) with SMTP ID DSNKUCItd8tbIhHsJXtoI48PUj2ScB7G6JNX@postini.com; Wed, 08 Aug 2012 02:12:23 PDT Received: by obbtb18 with SMTP id tb18so842398obb.7 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=JY+Srz14/U1vPSqFGeQGYooT3/S+bFB51Ea/FPQarxyFuAnR0J3N/3zTLMCjBHLaQP X3k4dI4L0bGD8/DBjldN53oUAdHFQB5ndjXQnPhyXYtlxWGZbAvcom9hMoLV65N1KGN2 ZsdYwFv1VGR4N+D3kURg8TumOGi4EKBRxAPavAPms8V47yimDIon5aAstBauF94zQj12 HI2NjYSZPBT7wfDDEVUErZJAjJwyJvCV2/uGP4WO5Wp6I4uXagIZF+h7rRqGp9Oa/lJe bQ8DxJ2OTgUB0SxvjJ1fm/yziC4Vo0gHwGBUTnmcCiB8Xu2T5NFZ13p8m830doek667Y NnqA== 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 Cc: Jarkko Nikula , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, Benoit Cousson 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: ALoCoQlE2rUuRrNzWGSkeaZzY8bhgA0zm9CzYm+MJsl5r9gf4Tvpp5db41AxDNuHN6I4yD7jnGO4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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); }; /**