Skip to content

Commit 0720208

Browse files
mukeshojha-linuxlinusw
authored andcommitted
pinctrl: qcom: Drop redundant intr_target_reg on modern SoCs
On all Qualcomm TLMM generations from APQ8084 onwards, the interrupt target routing bits are located in the same register as the interrupt configuration bits (intr_cfg_reg). Only five older SoCs — APQ8064, IPQ8064, MDM9615, MSM8660 and MSM8960 — have a genuinely separate interrupt target routing register at a different offset (0x400 + 0x4 * id). Replace MSM_ACCESSOR(intr_target) with a custom accessor that falls back to intr_cfg_reg when intr_target_reg is zero. Apply the same fallback in the SCM path. Drop the now-redundant .intr_target_reg initializer from all SoC drivers where it duplicated intr_cfg_reg, keeping it only in the five drivers where it genuinely differs. Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
1 parent fe8933c commit 0720208

57 files changed

Lines changed: 23 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/pinctrl/qcom/pinctrl-apq8084.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ static const unsigned int sdc2_data_pins[] = { 152 };
343343
.io_reg = 0x1004 + 0x10 * id, \
344344
.intr_cfg_reg = 0x1008 + 0x10 * id, \
345345
.intr_status_reg = 0x100c + 0x10 * id, \
346-
.intr_target_reg = 0x1008 + 0x10 * id, \
347346
.mux_bit = 2, \
348347
.pull_bit = 0, \
349348
.drv_bit = 6, \
@@ -370,7 +369,6 @@ static const unsigned int sdc2_data_pins[] = { 152 };
370369
.io_reg = 0, \
371370
.intr_cfg_reg = 0, \
372371
.intr_status_reg = 0, \
373-
.intr_target_reg = 0, \
374372
.mux_bit = -1, \
375373
.pull_bit = pull, \
376374
.drv_bit = drv, \

drivers/pinctrl/qcom/pinctrl-eliza.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
.io_reg = 0x4 + REG_SIZE * id, \
3535
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3636
.intr_status_reg = 0xc + REG_SIZE * id, \
37-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3837
.mux_bit = 2, \
3938
.pull_bit = 0, \
4039
.drv_bit = 6, \
@@ -64,7 +63,6 @@
6463
.io_reg = 0, \
6564
.intr_cfg_reg = 0, \
6665
.intr_status_reg = 0, \
67-
.intr_target_reg = 0, \
6866
.mux_bit = -1, \
6967
.pull_bit = pull, \
7068
.drv_bit = drv, \
@@ -89,7 +87,6 @@
8987
.io_reg = io, \
9088
.intr_cfg_reg = 0, \
9189
.intr_status_reg = 0, \
92-
.intr_target_reg = 0, \
9390
.mux_bit = -1, \
9491
.pull_bit = 3, \
9592
.drv_bit = 0, \

drivers/pinctrl/qcom/pinctrl-glymur.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
.io_reg = 0x4 + REG_SIZE * id, \
2222
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
2323
.intr_status_reg = 0xc + REG_SIZE * id, \
24-
.intr_target_reg = 0x8 + REG_SIZE * id, \
2524
.mux_bit = 2, \
2625
.pull_bit = 0, \
2726
.drv_bit = 6, \
@@ -64,7 +63,6 @@
6463
.io_reg = 0, \
6564
.intr_cfg_reg = 0, \
6665
.intr_status_reg = 0, \
67-
.intr_target_reg = 0, \
6866
.mux_bit = -1, \
6967
.pull_bit = pull, \
7068
.drv_bit = drv, \
@@ -89,7 +87,6 @@
8987
.io_reg = io, \
9088
.intr_cfg_reg = 0, \
9189
.intr_status_reg = 0, \
92-
.intr_target_reg = 0, \
9390
.mux_bit = -1, \
9491
.pull_bit = 3, \
9592
.drv_bit = 0, \

drivers/pinctrl/qcom/pinctrl-ipq4019.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ DECLARE_QCA_GPIO_PINS(99);
242242
.io_reg = 0x4 + 0x1000 * id, \
243243
.intr_cfg_reg = 0x8 + 0x1000 * id, \
244244
.intr_status_reg = 0xc + 0x1000 * id, \
245-
.intr_target_reg = 0x8 + 0x1000 * id, \
246245
.mux_bit = 2, \
247246
.pull_bit = 0, \
248247
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq5018.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
.io_reg = 0x4 + REG_SIZE * id, \
3333
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3434
.intr_status_reg = 0xc + REG_SIZE * id, \
35-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3635
.mux_bit = 2, \
3736
.pull_bit = 0, \
3837
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq5332.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
.io_reg = 0x4 + REG_SIZE * id, \
3333
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3434
.intr_status_reg = 0xc + REG_SIZE * id, \
35-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3635
.mux_bit = 2, \
3736
.pull_bit = 0, \
3837
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq5424.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
.io_reg = 0x4 + REG_SIZE * id, \
3434
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3535
.intr_status_reg = 0xc + REG_SIZE * id, \
36-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3736
.mux_bit = 2, \
3837
.pull_bit = 0, \
3938
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq6018.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
.io_reg = 0x4 + REG_SIZE * id, \
3333
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3434
.intr_status_reg = 0xc + REG_SIZE * id, \
35-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3635
.mux_bit = 2, \
3736
.pull_bit = 0, \
3837
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq8074.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
.io_reg = 0x4 + REG_SIZE * id, \
3333
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3434
.intr_status_reg = 0xc + REG_SIZE * id, \
35-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3635
.mux_bit = 2, \
3736
.pull_bit = 0, \
3837
.drv_bit = 6, \

drivers/pinctrl/qcom/pinctrl-ipq9574.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
.io_reg = 0x4 + REG_SIZE * id, \
3333
.intr_cfg_reg = 0x8 + REG_SIZE * id, \
3434
.intr_status_reg = 0xc + REG_SIZE * id, \
35-
.intr_target_reg = 0x8 + REG_SIZE * id, \
3635
.mux_bit = 2, \
3736
.pull_bit = 0, \
3837
.drv_bit = 6, \

0 commit comments

Comments
 (0)