diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra30.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-tegra30.c | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra30.c b/drivers/pinctrl/pinctrl-tegra30.c index 41d24f5c285..6492adaa057 100644 --- a/drivers/pinctrl/pinctrl-tegra30.c +++ b/drivers/pinctrl/pinctrl-tegra30.c @@ -2108,8 +2108,10 @@ static struct tegra_function tegra30_functions[] = { #define DRV_PINGROUP_REG_A 0x868 /* bank 0 */ #define PINGROUP_REG_A 0x3000 /* bank 1 */ -#define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_A) -#define PINGROUP_REG_N(r) -1 +#define PINGROUP_REG(r) ((r) - PINGROUP_REG_A) + +#define PINGROUP_BIT_Y(b) (b) +#define PINGROUP_BIT_N(b) (-1) #define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior) \ { \ @@ -2123,34 +2125,24 @@ static struct tegra_function tegra30_functions[] = { TEGRA_MUX_##f3, \ }, \ .func_safe = TEGRA_MUX_##f_safe, \ - .mux_reg = PINGROUP_REG_Y(r), \ + .mux_reg = PINGROUP_REG(r), \ .mux_bank = 1, \ .mux_bit = 0, \ - .pupd_reg = PINGROUP_REG_Y(r), \ + .pupd_reg = PINGROUP_REG(r), \ .pupd_bank = 1, \ .pupd_bit = 2, \ - .tri_reg = PINGROUP_REG_Y(r), \ + .tri_reg = PINGROUP_REG(r), \ .tri_bank = 1, \ .tri_bit = 4, \ - .einput_reg = PINGROUP_REG_Y(r), \ - .einput_bank = 1, \ - .einput_bit = 5, \ - .odrain_reg = PINGROUP_REG_##od(r), \ - .odrain_bank = 1, \ - .odrain_bit = 6, \ - .lock_reg = PINGROUP_REG_Y(r), \ - .lock_bank = 1, \ - .lock_bit = 7, \ - .ioreset_reg = PINGROUP_REG_##ior(r), \ - .ioreset_bank = 1, \ - .ioreset_bit = 8, \ - .rcv_sel_reg = -1, \ + .einput_bit = PINGROUP_BIT_Y(5), \ + .odrain_bit = PINGROUP_BIT_##od(6), \ + .lock_bit = PINGROUP_BIT_Y(7), \ + .ioreset_bit = PINGROUP_BIT_##ior(8), \ + .rcv_sel_bit = -1, \ .drv_reg = -1, \ - .drvtype_reg = -1, \ } -#define DRV_PINGROUP_REG_Y(r) ((r) - DRV_PINGROUP_REG_A) -#define DRV_PINGROUP_REG_N(r) -1 +#define DRV_PINGROUP_REG(r) ((r) - DRV_PINGROUP_REG_A) #define DRV_PINGROUP(pg_name, r, hsm_b, schmitt_b, lpmd_b, \ drvdn_b, drvdn_w, drvup_b, drvup_w, \ @@ -2162,12 +2154,12 @@ static struct tegra_function tegra30_functions[] = { .mux_reg = -1, \ .pupd_reg = -1, \ .tri_reg = -1, \ - .einput_reg = -1, \ - .odrain_reg = -1, \ - .lock_reg = -1, \ - .ioreset_reg = -1, \ - .rcv_sel_reg = -1, \ - .drv_reg = DRV_PINGROUP_REG_Y(r), \ + .einput_bit = -1, \ + .odrain_bit = -1, \ + .lock_bit = -1, \ + .ioreset_bit = -1, \ + .rcv_sel_bit = -1, \ + .drv_reg = DRV_PINGROUP_REG(r), \ .drv_bank = 0, \ .hsm_bit = hsm_b, \ .schmitt_bit = schmitt_b, \ @@ -2180,7 +2172,7 @@ static struct tegra_function tegra30_functions[] = { .slwr_width = slwr_w, \ .slwf_bit = slwf_b, \ .slwf_width = slwf_w, \ - .drvtype_reg = -1, \ + .drvtype_bit = -1, \ } static const struct tegra_pingroup tegra30_groups[] = { |