From patchwork Mon Nov 19 09:39:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 1763641 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 2AD393FCDE for ; Mon, 19 Nov 2012 09:42:29 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TaNqI-0000Uh-3Y; Mon, 19 Nov 2012 09:40:38 +0000 Received: from mail-ee0-f49.google.com ([74.125.83.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TaNpt-0000OO-As for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2012 09:40:14 +0000 Received: by mail-ee0-f49.google.com with SMTP id c4so990673eek.36 for ; Mon, 19 Nov 2012 01:40:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=F3qSbqmwzHR2hxEjNZNghtZOqaif6VPnay/7GhOen2Q=; b=ai4w3qgVsJfZw/v4ISTrfWgN1IPL/iVKY8QdQZUbCBnyAbTU6C8Jb9MxtCIFnEJD+E KU8K7fgtoFQ+C1/xjwh1lJ2I4Ed6GaUmIWVFsVzmrqvbgf/KQ+COP3L3PnM5aO1+zyng z9wSdwTHi1jNx3/k3yfNmVC2rK0FGkln/BGvuaUVZXgr2DGtY5KQrObLyuVwNajV039C JOvW5ywb1vp4yMXTewlGTrx8DKLWKh3SueOXWIgDyl5TvsyXIY5JvnflhqIAQ+2pD3TQ Vj6I/gZXbe99nRHhtN9OstjRngQrzSY6oDIkfmy/P0zl8+5Em3IYnfUr7TCbBayq/GuI WpJw== Received: by 10.14.194.136 with SMTP id m8mr22332684een.10.1353318012898; Mon, 19 Nov 2012 01:40:12 -0800 (PST) Received: from nijin.lan (dslc-082-083-245-055.pools.arcor-ip.net. [82.83.245.55]) by mx.google.com with ESMTPS id i1sm23141657eeo.8.2012.11.19.01.40.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 01:40:10 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 2/4] pinctrl: mvebu: Fix dove_audio1_ctrl_set function Date: Mon, 19 Nov 2012 10:39:54 +0100 Message-Id: <1353317996-20841-3-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353317996-20841-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1353317996-20841-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_044013_653103_6F57708E X-CRM114-Status: GOOD ( 12.54 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sebastian.hesselbarth[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Thomas Petazzoni , Andrew Lunn , Russell King , Jason Cooper , Linus Walleij , linux-kernel@vger.kernel.org, Gregory CLEMENT , Axel Lin , 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 From: Axel Lin When setting audio1 pinmux the bits in the corresponding registers are not cleared. This fix first clears all bits and then sets the required bits according to the selected function. Signed-off-by: Axel Lin Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij --- Cc: Russell King Cc: Linus Walleij Cc: Sebastian Hesselbarth Cc: Jason Cooper Cc: Andrew Lunn Cc: Thomas Petazzoni Cc: Gregory CLEMENT Cc: Axel Lin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/pinctrl/mvebu/pinctrl-dove.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 34693f6..40c9c3e 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c @@ -234,6 +234,14 @@ static int dove_audio1_ctrl_set(struct mvebu_mpp_ctrl *ctrl, unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); + /* + * clear all audio1 related bits before configure + */ + gcfg2 &= ~DOVE_TWSI_OPTION3_GPIO; + gmpp &= ~DOVE_AU1_SPDIFO_GPIO_EN; + sspc1 &= ~DOVE_SSP_ON_AU1; + mpp4 &= ~DOVE_AU1_GPIO_SEL; + if (config & BIT(0)) gcfg2 |= DOVE_TWSI_OPTION3_GPIO; if (config & BIT(1))