ARM: tegra: allow pinmux mux option not to be set by init tables
authorStephen Warren <swarren@nvidia.com>
Tue, 22 Apr 2014 20:37:52 +0000 (14:37 -0600)
committerTom Warren <twarren@nvidia.com>
Tue, 13 May 2014 17:41:31 +0000 (10:41 -0700)
Define enum PMUX_FUNC_DEFAULT, which indicates that a table entry passed
to pinmux_config_pingrp()/pinmux_config_pingrp_table() shouldn't change
the mux option in HW.

For pins that will be used as GPIOs, the mux option is irrelevant, so we
simply don't want to define any mux option in the pinmux initialization
table.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/tegra-common/pinmux-common.c
arch/arm/include/asm/arch-tegra114/pinmux.h
arch/arm/include/asm/arch-tegra124/pinmux.h
arch/arm/include/asm/arch-tegra20/pinmux.h
arch/arm/include/asm/arch-tegra30/pinmux.h

index d62618cd0f618230fd01a85766e949e6a61a1554..6d7a7d907b16164278ed1c2c971263433a223a3f 100644 (file)
@@ -92,6 +92,9 @@ void pinmux_set_func(enum pmux_pingrp pin, enum pmux_func func)
        int i, mux = -1;
        u32 val;
 
+       if (func == PMUX_FUNC_DEFAULT)
+               return;
+
        /* Error check on pin and func */
        assert(pmux_pingrp_isvalid(pin));
        assert(pmux_func_isvalid(func));
index c1cb3ef16b1a3b987de22e68b2f06822cf7aa7bf..b86562ac6dee99fe4f8f22b49a2f6165145a9d17 100644 (file)
@@ -231,6 +231,7 @@ enum pmux_drvgrp {
 };
 
 enum pmux_func {
+       PMUX_FUNC_DEFAULT,
        PMUX_FUNC_BLINK,
        PMUX_FUNC_CEC,
        PMUX_FUNC_CLDVFS,
index c49801c21d072d3e06e9bf0c8275e6d2420c4568..1884935a579edb8c794b080625b55d630afe2eca 100644 (file)
@@ -247,6 +247,7 @@ enum pmux_drvgrp {
 };
 
 enum pmux_func {
+       PMUX_FUNC_DEFAULT,
        PMUX_FUNC_BLINK,
        PMUX_FUNC_CCLA,
        PMUX_FUNC_CEC,
index 11c0104ff3e024681cb45c4561d24ed32687d095..f7bc97fe5f7389cfc947b61537e8b10fe2d335ec 100644 (file)
@@ -166,6 +166,7 @@ enum pmux_pingrp {
  * purely a convenience. The translation is done through a table search.
  */
 enum pmux_func {
+       PMUX_FUNC_DEFAULT,
        PMUX_FUNC_AHB_CLK,
        PMUX_FUNC_APB_CLK,
        PMUX_FUNC_AUDIO_SYNC,
index 6d83061dc1e9a290418e2fa6caa15da00b4819ab..a42e00990f0c1b4537a61448c9c077a36d9e1aa7 100644 (file)
@@ -306,6 +306,7 @@ enum pmux_drvgrp {
 };
 
 enum pmux_func {
+       PMUX_FUNC_DEFAULT,
        PMUX_FUNC_BLINK,
        PMUX_FUNC_CEC,
        PMUX_FUNC_CLK_12M_OUT,