Skip to contentSkip to conversation

soc: Avoid parked_reg and parked_bank

PATCH In review Laxman Dewangan 2 participants 3 messages May 2, 2016 – May 3, 2016 1 message not in the archive Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 soc: Avoid parked_reg and parked_bank

NVIDIA's Tegra210 support the park bit to make pinmux configuration enable/disable. If parked bit is 1 then configuration does not apply and if it is 0 then pinmux configuration applies. This is to support to avoid any glitch in pinmux configurations.

The parked bit is part of mux register and mux bank and hence it is not required to have member for the parked_reg and parked bank very similar to other bit field of the same register.

Remove the need of the parked register and parked bank and get whether parked function supported or not by parked_bit.

This is to make the parked bit handling same as other fields of mux registers.

---
 configs/tegra114.soc            | 1 -
 configs/tegra124.soc            | 1 -
 configs/tegra210.soc            | 1 -
 configs/tegra30.soc             | 1 -
 soc-to-kernel-pinctrl-driver.py | 8 +++-----
 tegra_pmx_soc_parser.py         | 1 -
 6 files changed, 3 insertions(+), 10 deletions(-)
configs/tegra114.soc +0 -1
index dd47072..a70bdf9 100644
@@ -25,7 +25,6 @@ soc_pins_have_schmitt = False
 soc_drv_reg_base = 0x868
 soc_einput_b = 5
 soc_odrain_b = 6
-soc_parked_bank = 0
 soc_parked_bit = 0
 
 gpios = (
configs/tegra124.soc +0 -1
index 6e8762c..1012c7c 100644
@@ -27,7 +27,6 @@ soc_drv_reg_base = 0x868
 soc_mipipadctrl_reg_base = 0x820
 soc_einput_b = 5
 soc_odrain_b = 6
-soc_parked_bank = 0
 soc_parked_bit = 0
 
 gpios = (
configs/tegra210.soc +0 -1
index 25e4618..970802b 100644
@@ -22,7 +22,6 @@ soc_pins_have_schmitt = True
 soc_drv_reg_base = 0x8d4
 soc_einput_b = 6
 soc_odrain_b = 11
-soc_parked_bank = 1
 soc_parked_bit = 5
 
 gpios = (
configs/tegra30.soc +0 -1
index ff57b45..28073c1 100644
@@ -22,7 +22,6 @@ soc_pins_have_schmitt = False
 soc_drv_reg_base = 0x868
 soc_einput_b = 5
 soc_odrain_b = 6
-soc_parked_bank = 0
 soc_parked_bit = 0
 
 gpios = (
soc-to-kernel-pinctrl-driver.py +3 -5
index 3f69a46..f5851f5 100755
@@ -261,13 +261,11 @@ s += '''\
 
 if soc.soc_pins_all_have_parked:
     s += '''\
-		.parked_reg = PINGROUP_REG(r),
-		.parked_bank = %s,
 		.parked_bit = %s,
-''' % (soc.soc_parked_bank, soc.soc_parked_bit)
+''' % (soc.soc_parked_bit)
 else:
     s+= '''\
-		.parked_reg = -1,
+		.parked_bit = -1,
 '''
 
 if soc.soc_pins_have_hsm:
@@ -369,7 +367,7 @@ s += '''\
 		.rcv_sel_bit = -1,
 		.drv_reg = DRV_PINGROUP_REG(r),
 		.drv_bank = 0,
-		.parked_reg = -1,
+		.parked_bit = -1,
 		.hsm_bit = %(hsm_bit_val)s,
 		.schmitt_bit = %(schmitt_bit_val)s,
 		.lpmd_bit = %(lpmd_bit_val)s,
tegra_pmx_soc_parser.py +0 -1
index a258f8a..891a68f 100644
@@ -163,7 +163,6 @@ class Soc(TopLevelParsedObj):
             ('soc_mipipadctrl_reg_base', 0),
             ('soc_einput_b', None),
             ('soc_odrain_b', None),
-            ('soc_parked_bank', None),
             ('soc_parked_bit', None),
         )
         TopLevelParsedObj.__init__(self, name, copy_attrs, data)
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 soc: Get rid of .remove callback

In reply to a message not in the archive

Pinctrl driver uses the devm_pinctrl_register and hence it is not required to generate code for .remove callback.

Remove the need of .remove callback.

---
 soc-to-kernel-pinctrl-driver.py | 1 -
 1 file changed, 1 deletion(-)
soc-to-kernel-pinctrl-driver.py +0 -1
index f5851f5..65e4c60 100755
@@ -643,7 +643,6 @@ static struct platform_driver %(soc)s_pinctrl_driver = {
 		.of_match_table = %(soc)s_pinctrl_of_match,
 	},
 	.probe = %(soc)s_pinctrl_probe,
-	.remove = tegra_pinctrl_remove,
 };
 module_platform_driver(%(soc)s_pinctrl_driver);
 
Signature · 1 line
2.1.4
#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · Laxman Dewangan

NVIDIA's Tegra210 support the park bit to make pinmux configuration enable/disable. If parked bit is 1 then configuration does not apply and if it is 0 then pinmux configuration applies. This is to support to avoid any glitch in pinmux configurations.

The parked bit is part of mux register and mux bank and hence it is not required to have member for the parked_reg and parked bank very similar to other bit field of the same register.

Quoted 5 lines

Remove the need of the parked register and parked bank and get whether parked function supported or not by parked_bit.

This is to make the parked bit handling same as other fields of mux registers.

I've applied the series.