aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/mvebu
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-11-19 04:39:54 -0500
committerJason Cooper <jason@lakedaemon.net>2012-11-23 21:57:19 -0500
commit63ace077b427a86464da34855d35addfa308e807 (patch)
treee34171da6dd1e1a973de7438de6cbe9683bdd90f /drivers/pinctrl/mvebu
parent78f9f3b12c6a25a668c43f026f42596c88d6d0bd (diff)
pinctrl: mvebu: Fix dove_audio1_ctrl_set function
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> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/pinctrl/mvebu')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-dove.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 34693f60d39c..40c9c3eecd94 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,
234 unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE); 234 unsigned long gmpp = readl(DOVE_MPP_GENERAL_VIRT_BASE);
235 unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2); 235 unsigned long gcfg2 = readl(DOVE_GLOBAL_CONFIG_2);
236 236
237 /*
238 * clear all audio1 related bits before configure
239 */
240 gcfg2 &= ~DOVE_TWSI_OPTION3_GPIO;
241 gmpp &= ~DOVE_AU1_SPDIFO_GPIO_EN;
242 sspc1 &= ~DOVE_SSP_ON_AU1;
243 mpp4 &= ~DOVE_AU1_GPIO_SEL;
244
237 if (config & BIT(0)) 245 if (config & BIT(0))
238 gcfg2 |= DOVE_TWSI_OPTION3_GPIO; 246 gcfg2 |= DOVE_TWSI_OPTION3_GPIO;
239 if (config & BIT(1)) 247 if (config & BIT(1))