Revert "Revert "pinctrl: tegra: avoid parked_reg and parked_bank""
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 24 May 2016 10:59:43 +0000 (12:59 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 30 May 2016 07:41:45 +0000 (09:41 +0200)
This reverts commit 0d5358330c20d50e52e3e65ff07a5db8007041fc.

drivers/pinctrl/tegra/pinctrl-tegra.c
drivers/pinctrl/tegra/pinctrl-tegra.h
drivers/pinctrl/tegra/pinctrl-tegra114.c
drivers/pinctrl/tegra/pinctrl-tegra124.c
drivers/pinctrl/tegra/pinctrl-tegra20.c
drivers/pinctrl/tegra/pinctrl-tegra210.c
drivers/pinctrl/tegra/pinctrl-tegra30.c

index 6e82b290cb4f70da806939dda9d39d42bff2896e..277622b4b6fb9bb90b4c045e984ca106eb2f4b2f 100644 (file)
@@ -632,11 +632,11 @@ static void tegra_pinctrl_clear_parked_bits(struct tegra_pmx *pmx)
        u32 val;
 
        for (i = 0; i < pmx->soc->ngroups; ++i) {
-               if (pmx->soc->groups[i].parked_reg >= 0) {
-                       g = &pmx->soc->groups[i];
-                       val = pmx_readl(pmx, g->parked_bank, g->parked_reg);
+               g = &pmx->soc->groups[i];
+               if (g->parked_bit >= 0) {
+                       val = pmx_readl(pmx, g->mux_bank, g->mux_reg);
                        val &= ~(1 << g->parked_bit);
-                       pmx_writel(pmx, val, g->parked_bank, g->parked_reg);
+                       pmx_writel(pmx, val, g->mux_bank, g->mux_reg);
                }
        }
 }
index d2ced17382b56ac4dada88fefcbd8cef738bd381..33b17cb1471e56a2f4cb173fe21c196d9a19c7db 100644 (file)
@@ -93,9 +93,7 @@ struct tegra_function {
  * @tri_reg:           Tri-state register offset.
  * @tri_bank:          Tri-state register bank.
  * @tri_bit:           Tri-state register bit.
- * @parked_reg:                Parked register offset. -1 if unsupported.
- * @parked_bank:       Parked register bank. 0 if unsupported.
- * @parked_bit:                Parked register bit. 0 if unsupported.
+ * @parked_bit:                Parked register bit. -1 if unsupported.
  * @einput_bit:                Enable-input register bit.
  * @odrain_bit:                Open-drain register bit.
  * @lock_bit:          Lock register bit.
@@ -138,12 +136,10 @@ struct tegra_pingroup {
        s16 pupd_reg;
        s16 tri_reg;
        s16 drv_reg;
-       s16 parked_reg;
        u32 mux_bank:2;
        u32 pupd_bank:2;
        u32 tri_bank:2;
        u32 drv_bank:2;
-       u32 parked_bank:2;
        s32 mux_bit:6;
        s32 pupd_bit:6;
        s32 tri_bit:6;
index 4851d169f4c7a33c37a6e69bb766b4e8fe84422b..952132ce5ea0ca75e0b270db47811affe4f64e0b 100644 (file)
@@ -1578,7 +1578,7 @@ static struct tegra_function tegra114_functions[] = {
                .lock_bit = 7,                                          \
                .ioreset_bit = PINGROUP_BIT_##ior(8),                   \
                .rcv_sel_bit = PINGROUP_BIT_##rcv_sel(9),               \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .drv_reg = -1,                                          \
        }
 
@@ -1599,7 +1599,7 @@ static struct tegra_function tegra114_functions[] = {
                .rcv_sel_bit = -1,                                      \
                .drv_reg = DRV_PINGROUP_REG(r),                         \
                .drv_bank = 0,                                          \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .hsm_bit = hsm_b,                                       \
                .schmitt_bit = schmitt_b,                               \
                .lpmd_bit = lpmd_b,                                     \
index a0ce723a9482d4efd6937c4cd76f98ca4968a196..bca239e3ae500c389fef9d211e22725800d0216c 100644 (file)
@@ -1747,7 +1747,7 @@ static struct tegra_function tegra124_functions[] = {
                .lock_bit = 7,                                          \
                .ioreset_bit = PINGROUP_BIT_##ior(8),                   \
                .rcv_sel_bit = PINGROUP_BIT_##rcv_sel(9),               \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .drv_reg = -1,                                          \
        }
 
@@ -1768,7 +1768,7 @@ static struct tegra_function tegra124_functions[] = {
                .rcv_sel_bit = -1,                                      \
                .drv_reg = DRV_PINGROUP_REG(r),                         \
                .drv_bank = 0,                                          \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .hsm_bit = hsm_b,                                       \
                .schmitt_bit = schmitt_b,                               \
                .lpmd_bit = lpmd_b,                                     \
index 09bad6980ad1e81292a6b180866511ecab903585..91254d04c64f083b72ee4d95489e2ffd5c741558 100644 (file)
@@ -1994,7 +1994,7 @@ static struct tegra_function tegra20_functions[] = {
                .tri_reg = ((tri_r) - TRISTATE_REG_A),          \
                .tri_bank = 0,                                  \
                .tri_bit = tri_b,                               \
-               .parked_reg = -1,                               \
+               .parked_bit = -1,                               \
                .einput_bit = -1,                               \
                .odrain_bit = -1,                               \
                .lock_bit = -1,                                 \
@@ -2014,7 +2014,7 @@ static struct tegra_function tegra20_functions[] = {
                .pupd_bank = 2,                                 \
                .pupd_bit = pupd_b,                             \
                .drv_reg = -1,                                  \
-               .parked_reg = -1,                               \
+               .parked_bit = -1,                               \
        }
 
 /* Pin groups for drive strength registers (configurable version) */
index 2d856af389ef8a2a6997e0f41baa2a88410097d3..2b70e93da9dbc381fae5addc7842794b487bc988 100644 (file)
@@ -1310,8 +1310,6 @@ static struct tegra_function tegra210_functions[] = {
                .lock_bit = 7,                                          \
                .ioreset_bit = -1,                                      \
                .rcv_sel_bit = PINGROUP_BIT_##e_io_hv(10),              \
-               .parked_reg = PINGROUP_REG(r),                          \
-               .parked_bank = 1,                                       \
                .parked_bit = 5,                                        \
                .hsm_bit = PINGROUP_BIT_##hsm(9),                       \
                .schmitt_bit = 12,                                      \
@@ -1345,7 +1343,7 @@ static struct tegra_function tegra210_functions[] = {
                .rcv_sel_bit = -1,                                      \
                .drv_reg = DRV_PINGROUP_REG(r),                         \
                .drv_bank = 0,                                          \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .hsm_bit = -1,                                          \
                .schmitt_bit = -1,                                      \
                .lpmd_bit = -1,                                         \
index fb7817fea2d942d1a3a2cb98b1d3e3b7a8cddddf..474ac6daf5131605ba477f730ad6ae5ce6e0e3a1 100644 (file)
@@ -2139,7 +2139,7 @@ static struct tegra_function tegra30_functions[] = {
                .lock_bit = 7,                                          \
                .ioreset_bit = PINGROUP_BIT_##ior(8),                   \
                .rcv_sel_bit = -1,                                      \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .drv_reg = -1,                                          \
        }
 
@@ -2160,7 +2160,7 @@ static struct tegra_function tegra30_functions[] = {
                .rcv_sel_bit = -1,                                      \
                .drv_reg = DRV_PINGROUP_REG(r),                         \
                .drv_bank = 0,                                          \
-               .parked_reg = -1,                                       \
+               .parked_bit = -1,                                       \
                .hsm_bit = hsm_b,                                       \
                .schmitt_bit = schmitt_b,                               \
                .lpmd_bit = lpmd_b,                                     \