linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] pinctrl: mvebu: Fix dove_audio1_ctrl_set function
Date: Mon, 19 Nov 2012 10:39:54 +0100	[thread overview]
Message-ID: <1353317996-20841-3-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1353317996-20841-1-git-send-email-sebastian.hesselbarth@gmail.com>

From: Axel Lin <axel.lin@ingics.com>

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 <axel.lin@ingics.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Axel Lin <axel.lin@ingics.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at 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))
-- 
1.7.10.4

  parent reply	other threads:[~2012-11-19  9:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  9:39 [PATCH 0/4] Dove pinctrl fixes and DT enabling Sebastian Hesselbarth
2012-11-19  9:39 ` [PATCH 1/4] pinctrl: mvebu: fix iomem pointer for dove pinctrl Sebastian Hesselbarth
2012-11-19  9:48   ` Thomas Petazzoni
2012-11-21 10:00   ` Linus Walleij
2012-11-19  9:39 ` Sebastian Hesselbarth [this message]
2012-11-21 10:00   ` [PATCH 2/4] pinctrl: mvebu: Fix dove_audio1_ctrl_set function Linus Walleij
2012-11-19  9:39 ` [PATCH 3/4] ARM: Dove: Convert to DT GPIO and pinctrl Sebastian Hesselbarth
2012-11-24  2:39   ` Jason Cooper
2012-11-24  7:02     ` Thomas Petazzoni
2012-11-24 15:00       ` Jason Cooper
2012-11-24 18:10         ` Thomas Petazzoni
2012-11-24 18:59           ` Jason Cooper
2012-11-25 10:51             ` Sebastian Hesselbarth
2012-11-25 15:28               ` Jason Cooper
2012-11-26  9:18                 ` [PATCH 1/2] ARM: Dove: Add pinctrl clock to DT Sebastian Hesselbarth
2012-11-26  9:20                   ` [PATCH 2/2] pinctrl: mvebu: make pdma clock on dove mandatory Sebastian Hesselbarth
2012-11-26  9:30                     ` Baruch Siach
2012-11-26 19:16                   ` [PATCH v2 1/2] ARM: Dove: Add pinctrl clock to DT Sebastian Hesselbarth
2012-11-26 19:16                     ` [PATCH v2 2/2] pinctrl: mvebu: make pdma clock on dove mandatory Sebastian Hesselbarth
2013-01-07 16:20                     ` [PATCH v2 1/2] ARM: Dove: Add pinctrl clock to DT Jason Cooper
2012-12-01 17:07                   ` [PATCH " Linus Walleij
2012-12-01 18:13                     ` Jason Cooper
2012-12-01 18:15                       ` Sebastian Hesselbarth
2012-12-01 18:21                         ` Jason Cooper
2012-11-19  9:39 ` [PATCH 4/4] ARM: Dove: Add CuBox pinhog for led Sebastian Hesselbarth
2012-11-21  9:59 ` [PATCH 0/4] Dove pinctrl fixes and DT enabling Linus Walleij
2012-11-21 10:20   ` Sebastian Hesselbarth
2012-11-21 14:45     ` Linus Walleij
2012-11-21 14:59       ` Thomas Petazzoni
2012-11-21 15:52       ` Jason Cooper
2012-11-23  7:49         ` Linus Walleij
2012-11-23 14:13           ` Jason Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353317996-20841-3-git-send-email-sebastian.hesselbarth@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).