On 08/29/18 17:20, Manivannan Sadhasivam wrote:
Hi Saravanan,
On Wed, Aug 29, 2018 at 10:24:09AM +0200, Saravanan Sekar wrote:
Move generic defines common to the Owl family out of S900 driver.
Signed-off-by: Parthiban Nallathambi <pn@xxxxxxx>
Signed-off-by: Saravanan Sekar <sravanhome@xxxxxxxxx>
---
 drivers/pinctrl/actions/pinctrl-owl.h | 131 +++++++++++++++++++++++++++++++
 drivers/pinctrl/actions/pinctrl-s900.c | 139 ++-------------------------------
 2 files changed, 137 insertions(+), 133 deletions(-)
diff --git a/drivers/pinctrl/actions/pinctrl-owl.h b/drivers/pinctrl/actions/pinctrl-owl.h
index a724d1d406d4..31cc33d7c4a5 100644
--- a/drivers/pinctrl/actions/pinctrl-owl.h
+++ b/drivers/pinctrl/actions/pinctrl-owl.h
@@ -15,6 +15,136 @@
 #define OWL_PINCONF_SLEW_SLOW 0
 #define OWL_PINCONF_SLEW_FAST 1
+#define MUX_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .funcs = group_name##_funcs,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .nfuncs = ARRAY_SIZE(group_name##_funcs),ÂÂÂÂÂÂÂ \
+ .mfpctl_reg = MFCTL##reg, \
+ÂÂÂÂÂÂÂ .mfpctl_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .mfpctl_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define DRV_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
+ .mfpctl_reg = -1, \
+ÂÂÂÂÂÂÂ .mfpctl_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .mfpctl_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_reg = PAD_DRV##reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define SR_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
+ .mfpctl_reg = -1, \
+ÂÂÂÂÂÂÂ .mfpctl_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .mfpctl_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .drv_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_reg = PAD_SR##reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .sr_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define FUNCTION(fname)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .name = #fname,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .groups = fname##_groups,ÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .ngroups = ARRAY_SIZE(fname##_groups),ÂÂÂ \
+ÂÂÂ }
+
+/* PAD PULL UP/DOWN CONFIGURES */
+#define PULLCTL_CONF(pull_reg, pull_sft, pull_wdt)ÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .reg = PAD_PULLCTL##pull_reg,ÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .shift = pull_sft,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .width = pull_wdt,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define PAD_PULLCTL_CONF(pad_name, pull_reg, pull_sft, pull_wdt)ÂÂÂ \
+ÂÂÂ struct owl_pullctl pad_name##_pullctl_confÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ = PULLCTL_CONF(pull_reg, pull_sft, pull_wdt)
+
+#define ST_CONF(st_reg, st_sft, st_wdt)ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .reg = PAD_ST##st_reg,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .shift = st_sft,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .width = st_wdt,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define PAD_ST_CONF(pad_name, st_reg, st_sft, st_wdt)ÂÂÂ \
+ÂÂÂ struct owl_st pad_name##_st_confÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ = ST_CONF(st_reg, st_sft, st_wdt)
+
+#define PAD_INFO(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pullctl = NULL,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .st = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define PAD_INFO_ST(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pullctl = NULL,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .st = &name##_st_conf,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define PAD_INFO_PULLCTL(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pullctl = &name##_pullctl_conf,ÂÂÂ \
+ÂÂÂÂÂÂÂ .st = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define PAD_INFO_PULLCTL_ST(name)ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pullctl = &name##_pullctl_conf,ÂÂÂ \
+ÂÂÂÂÂÂÂ .st = &name##_st_conf,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂ }
+
+#define OWL_GPIO_PORT_AÂÂÂÂÂÂÂ 0
+#define OWL_GPIO_PORT_BÂÂÂÂÂÂÂ 1
+#define OWL_GPIO_PORT_CÂÂÂÂÂÂÂ 2
+#define OWL_GPIO_PORT_DÂÂÂÂÂÂÂ 3
+#define OWL_GPIO_PORT_EÂÂÂÂÂÂÂ 4
+#define OWL_GPIO_PORT_FÂÂÂÂÂÂÂ 5
+
+#define OWL_GPIO_PORT(port, base, count, _outen, _inen, _dat, _intc_ctl,\
+ÂÂÂÂÂÂÂÂÂÂÂ _intc_pd, _intc_msk, _intc_type, _share)ÂÂÂ \
+ÂÂÂ [OWL_GPIO_PORT_##port] = {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .offset = base,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .pins = count,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .outen = _outen,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .inen = _inen,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .dat = _dat,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .intc_ctl = _intc_ctl,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .intc_pd = _intc_pd,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .intc_msk = _intc_msk,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .intc_type = _intc_type,ÂÂÂÂÂÂÂÂÂÂÂ \
+ÂÂÂÂÂÂÂ .shared_ctl_offset = _share,ÂÂÂÂÂÂÂÂÂÂÂ \
Above member addition is not related to this patch. What is the purpose
of this? Either move this to a separate commit if it is needed by S700
or justify in this patch itself.
This is introduced for S700 as registers are shared, it is not case in
S900. There is impact on S900 also, which needs another seperate patch
which is unlikely as we cleaning S700 related stuffs here
Btw, this patch is not applying cleanly.
+ÂÂÂ }
+
 enum owl_pinconf_pull {
ÂÂÂÂÂ OWL_PINCONF_PULL_HIZ,
ÂÂÂÂÂ OWL_PINCONF_PULL_DOWN,
@@ -148,6 +278,7 @@ struct owl_gpio_port {
ÂÂÂÂÂ unsigned int intc_pd;
ÂÂÂÂÂ unsigned int intc_msk;
ÂÂÂÂÂ unsigned int intc_type;
+ÂÂÂ u8 shared_ctl_offset;
Same as above.
Regards,
Mani
 };
 /**
diff --git a/drivers/pinctrl/actions/pinctrl-s900.c b/drivers/pinctrl/actions/pinctrl-s900.c
index ea67b14ef93b..0597009d8369 100644
--- a/drivers/pinctrl/actions/pinctrl-s900.c
+++ b/drivers/pinctrl/actions/pinctrl-s900.c
@@ -33,13 +33,6 @@
 #define PAD_SR1 (0x0274)
 #define PAD_SR2 (0x0278)
-#define OWL_GPIO_PORT_AÂÂÂÂÂÂÂ 0
-#define OWL_GPIO_PORT_BÂÂÂÂÂÂÂ 1
-#define OWL_GPIO_PORT_CÂÂÂÂÂÂÂ 2
-#define OWL_GPIO_PORT_DÂÂÂÂÂÂÂ 3
-#define OWL_GPIO_PORT_EÂÂÂÂÂÂÂ 4
-#define OWL_GPIO_PORT_FÂÂÂÂÂÂÂ 5
-
 #define _GPIOA(offset) (offset)
 #define _GPIOB(offset) (32 + (offset))
 #define _GPIOC(offset) (64 + (offset))
@@ -892,55 +885,6 @@ static unsigned int i2c2_sr_pads[]ÂÂÂÂÂÂÂ = { I2C2_SCLK, I2C2_SDATA };
 static unsigned int sensor0_sr_pads[] = { SENSOR0_PCLK,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ SENSOR0_CKOUT };
-#define MUX_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .funcs = group_name##_funcs,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .nfuncs = ARRAY_SIZE(group_name##_funcs),ÂÂÂÂÂÂÂ \
- .mfpctl_reg = MFCTL##reg, \
-ÂÂÂÂÂÂÂ .mfpctl_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .mfpctl_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define DRV_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
- .mfpctl_reg = -1, \
-ÂÂÂÂÂÂÂ .mfpctl_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .mfpctl_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_reg = PAD_DRV##reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define SR_PG(group_name, reg, shift, width)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .name = #group_name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pads = group_name##_pads,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .npads = ARRAY_SIZE(group_name##_pads),ÂÂÂÂÂÂÂÂÂÂÂ \
- .mfpctl_reg = -1, \
-ÂÂÂÂÂÂÂ .mfpctl_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .mfpctl_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_reg = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_shift = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .drv_width = -1,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_reg = PAD_SR##reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_shift = shift,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .sr_width = width,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
 /* Pinctrl groups */
 static const struct owl_pingroup s900_groups[] = {
@@ -1442,13 +1386,6 @@ static const char * const sirq2_groups[] = {
ÂÂÂÂÂ "sirq2_dummy",
 };
-#define FUNCTION(fname)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .name = #fname,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .groups = fname##_groups,ÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .ngroups = ARRAY_SIZE(fname##_groups),ÂÂÂ \
-ÂÂÂ }
-
 static const struct owl_pinmux_func s900_functions[] = {
ÂÂÂÂÂ [S900_MUX_ERAM] = FUNCTION(eram),
ÂÂÂÂÂ [S900_MUX_ETH_RMII] = FUNCTION(eth_rmii),
@@ -1500,28 +1437,6 @@ static const struct owl_pinmux_func s900_functions[] = {
ÂÂÂÂÂ [S900_MUX_SIRQ1] = FUNCTION(sirq1),
ÂÂÂÂÂ [S900_MUX_SIRQ2] = FUNCTION(sirq2)
 };
-/* PAD PULL UP/DOWN CONFIGURES */
-#define PULLCTL_CONF(pull_reg, pull_sft, pull_wdt)ÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .reg = PAD_PULLCTL##pull_reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .shift = pull_sft,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .width = pull_wdt,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define PAD_PULLCTL_CONF(pad_name, pull_reg, pull_sft, pull_wdt)ÂÂÂ \
-ÂÂÂ struct owl_pullctl pad_name##_pullctl_confÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ = PULLCTL_CONF(pull_reg, pull_sft, pull_wdt)
-
-#define ST_CONF(st_reg, st_sft, st_wdt)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .reg = PAD_ST##st_reg,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .shift = st_sft,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .width = st_wdt,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define PAD_ST_CONF(pad_name, st_reg, st_sft, st_wdt)ÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ struct owl_st pad_name##_st_confÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ = ST_CONF(st_reg, st_sft, st_wdt)
 /* PAD_PULLCTL0 */
 static PAD_PULLCTL_CONF(ETH_RXER, 0, 18, 2);
@@ -1639,34 +1554,6 @@ static PAD_ST_CONF(SPI0_SS, 1, 2, 1);
 static PAD_ST_CONF(I2S_BCLK0, 1, 1, 1);
 static PAD_ST_CONF(I2S_MCLK0, 1, 0, 1);
-#define PAD_INFO(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pullctl = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .st = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define PAD_INFO_ST(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pullctl = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .st = &name##_st_conf,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define PAD_INFO_PULLCTL(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pullctl = &name##_pullctl_conf,ÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .st = NULL,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
-#define PAD_INFO_PULLCTL_ST(name)ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pad = name,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pullctl = &name##_pullctl_conf,ÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .st = &name##_st_conf,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
 /* Pad info table */
 static struct owl_padinfo s900_padinfo[NUM_PADS] = {
ÂÂÂÂÂ [ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
@@ -1821,27 +1708,13 @@ static struct owl_padinfo s900_padinfo[NUM_PADS] = {
ÂÂÂÂÂ [SGPIO3] = PAD_INFO_PULLCTL_ST(SGPIO3)
 };
-#define OWL_GPIO_PORT(port, base, count, _outen, _inen, _dat,ÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂÂÂÂÂ _intc_ctl, _intc_pd, _intc_msk, _intc_type)ÂÂÂ \
-ÂÂÂ [OWL_GPIO_PORT_##port] = {ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .offset = base,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .pins = count,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .outen = _outen,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .inen = _inen,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .dat = _dat,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .intc_ctl = _intc_ctl,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .intc_pd = _intc_pd,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .intc_msk = _intc_msk,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂÂÂÂÂ .intc_type = _intc_type,ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ \
-ÂÂÂ }
-
 static const struct owl_gpio_port s900_gpio_ports[] = {
-ÂÂÂ OWL_GPIO_PORT(A, 0x0000, 32, 0x0, 0x4, 0x8, 0x204, 0x208, 0x20C, 0x240),
-ÂÂÂ OWL_GPIO_PORT(B, 0x000C, 32, 0x0, 0x4, 0x8, 0x534, 0x204, 0x208, 0x23C),
-ÂÂÂ OWL_GPIO_PORT(C, 0x0018, 12, 0x0, 0x4, 0x8, 0x52C, 0x200, 0x204, 0x238),
-ÂÂÂ OWL_GPIO_PORT(D, 0x0024, 30, 0x0, 0x4, 0x8, 0x524, 0x1FC, 0x200, 0x234),
-ÂÂÂ OWL_GPIO_PORT(E, 0x0030, 32, 0x0, 0x4, 0x8, 0x51C, 0x1F8, 0x1FC, 0x230),
-ÂÂÂ OWL_GPIO_PORT(F, 0x00F0, 8, 0x0, 0x4, 0x8, 0x460, 0x140, 0x144, 0x178)
+ÂÂÂ OWL_GPIO_PORT(A, 0x0000, 32, 0x0, 0x4, 0x8, 0x204, 0x208, 0x20C, 0x240, 0),
+ÂÂÂ OWL_GPIO_PORT(B, 0x000C, 32, 0x0, 0x4, 0x8, 0x534, 0x204, 0x208, 0x23C, 0),
+ÂÂÂ OWL_GPIO_PORT(C, 0x0018, 12, 0x0, 0x4, 0x8, 0x52C, 0x200, 0x204, 0x238, 0),
+ÂÂÂ OWL_GPIO_PORT(D, 0x0024, 30, 0x0, 0x4, 0x8, 0x524, 0x1FC, 0x200, 0x234, 0),
+ÂÂÂ OWL_GPIO_PORT(E, 0x0030, 32, 0x0, 0x4, 0x8, 0x51C, 0x1F8, 0x1FC, 0x230, 0),
+ÂÂÂ OWL_GPIO_PORT(F, 0x00F0, 8, 0x0, 0x4, 0x8, 0x460, 0x140, 0x144, 0x178, 0)
 };
 static struct owl_pinctrl_soc_data s900_pinctrl_data = {
--
2.14.4