mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
Some pin control fixes for v6.5, fixes two issues with the
Qualcomm SA8775P platform: - Some minor device tree binding flunky that is nice to iron out but more importantly: - Support the increased interrupt targets mask from 3 to 4 bits, making interrupts with higher (hardware) numbers work. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmTfJLYACgkQQRCzN7AZ XXNFOhAAtkMQZ8bV8DJZbB30aim6jDn/2fmI1NywnNdkfpI5FUvRHr+z4I2FNwUJ rNs1l9aTzxZGOcl/iqI2sJNqr7G+mRrnQZVcEypgtuwteXefSm5FWPQypiIhsG15 0aoF0Ohe2jDf2kl74g67tUc6LJBGcjK4SW8CJUUv9LkjT16BkAnnAttUQch6qKBS 8Txmv/d4XOuuqoSW3yMGfr8NHUmCj+/yNEOso9KiB9R/aHsOjvol1ZLpXlQgQmSG LAzhgcHO+vN4lb8o7n5T3r83YHCUnkB5qy1tTAQWe+jCRgWJRx1x7BHlevJZmshq +GPd6+dYMHGacFq5p22KsvB2Gk1rELGa6iPod6eFJ/9iPuvALgbFOoLh51q7OZM6 5NgJDMwLQuqiDGTovdH3GprdabN3iS99F9eV8MXvZInq6coS7hYH0cTLiz7848rE tdC0q4+nN/+M+BrB5F8h02QByAHJ7Tn4L8NOxuQM/LAUYXfZDPdrqeSctY4tvfQL wgZpCy4942LIK68Hszii9VgpAfffJ21j+OCdso1pnpFepB0kuW/rUBW9GSAxAH+s 0inhegO367JfrIKJDWtepb5xBDf5iIK5nvRtoB0eQWUfm6WqhDHgdUMpIXT70Nhi C0JeElpgp061qidWJRWWpQ1n8iYIPZf7sMyQvxbFWfHxIUcqRmQ= =Rn8a -----END PGP SIGNATURE----- Merge tag 'pinctrl-v6.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Fixes two issues with the Qualcomm SA8775P platform: - Some minor device tree binding flunky that is nice to iron out but more importantly: - Support the increased interrupt targets mask from 3 to 4 bits, making interrupts with higher (hardware) numbers work" * tag 'pinctrl-v6.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: Add intr_target_width field to support increased number of interrupt targets dt-bindings: pinctrl: qcom,sa8775p-tlmm: add gpio function constant
This commit is contained in:
commit
f33fd7eb20
@ -87,7 +87,7 @@ $defs:
|
||||
emac0_mdc, emac0_mdio, emac0_ptp_aux, emac0_ptp_pps, emac1_mcg0,
|
||||
emac1_mcg1, emac1_mcg2, emac1_mcg3, emac1_mdc, emac1_mdio,
|
||||
emac1_ptp_aux, emac1_ptp_pps, gcc_gp1, gcc_gp2, gcc_gp3,
|
||||
gcc_gp4, gcc_gp5, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
|
||||
gcc_gp4, gcc_gp5, gpio, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
|
||||
jitter_bist, mdp0_vsync0, mdp0_vsync1, mdp0_vsync2, mdp0_vsync3,
|
||||
mdp0_vsync4, mdp0_vsync5, mdp0_vsync6, mdp0_vsync7, mdp0_vsync8,
|
||||
mdp1_vsync0, mdp1_vsync1, mdp1_vsync2, mdp1_vsync3, mdp1_vsync4,
|
||||
|
@ -1038,6 +1038,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
|
||||
const struct msm_pingroup *g;
|
||||
u32 intr_target_mask = GENMASK(2, 0);
|
||||
unsigned long flags;
|
||||
bool was_enabled;
|
||||
u32 val;
|
||||
@ -1074,13 +1075,15 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
* With intr_target_use_scm interrupts are routed to
|
||||
* application cpu using scm calls.
|
||||
*/
|
||||
if (g->intr_target_width)
|
||||
intr_target_mask = GENMASK(g->intr_target_width - 1, 0);
|
||||
|
||||
if (pctrl->intr_target_use_scm) {
|
||||
u32 addr = pctrl->phys_base[0] + g->intr_target_reg;
|
||||
int ret;
|
||||
|
||||
qcom_scm_io_readl(addr, &val);
|
||||
|
||||
val &= ~(7 << g->intr_target_bit);
|
||||
val &= ~(intr_target_mask << g->intr_target_bit);
|
||||
val |= g->intr_target_kpss_val << g->intr_target_bit;
|
||||
|
||||
ret = qcom_scm_io_writel(addr, val);
|
||||
@ -1090,7 +1093,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
d->hwirq);
|
||||
} else {
|
||||
val = msm_readl_intr_target(pctrl, g);
|
||||
val &= ~(7 << g->intr_target_bit);
|
||||
val &= ~(intr_target_mask << g->intr_target_bit);
|
||||
val |= g->intr_target_kpss_val << g->intr_target_bit;
|
||||
msm_writel_intr_target(val, pctrl, g);
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ struct pinctrl_pin_desc;
|
||||
* @intr_status_bit: Offset in @intr_status_reg for reading and acking the interrupt
|
||||
* status.
|
||||
* @intr_target_bit: Offset in @intr_target_reg for configuring the interrupt routing.
|
||||
* @intr_target_width: Number of bits used for specifying interrupt routing target.
|
||||
* @intr_target_kpss_val: Value in @intr_target_bit for specifying that the interrupt from
|
||||
* this gpio should get routed to the KPSS processor.
|
||||
* @intr_raw_status_bit: Offset in @intr_cfg_reg for the raw status bit.
|
||||
@ -100,6 +101,7 @@ struct msm_pingroup {
|
||||
unsigned intr_ack_high:1;
|
||||
|
||||
unsigned intr_target_bit:5;
|
||||
unsigned intr_target_width:5;
|
||||
unsigned intr_target_kpss_val:5;
|
||||
unsigned intr_raw_status_bit:5;
|
||||
unsigned intr_polarity_bit:5;
|
||||
|
@ -46,6 +46,7 @@
|
||||
.intr_enable_bit = 0, \
|
||||
.intr_status_bit = 0, \
|
||||
.intr_target_bit = 5, \
|
||||
.intr_target_width = 4, \
|
||||
.intr_target_kpss_val = 3, \
|
||||
.intr_raw_status_bit = 4, \
|
||||
.intr_polarity_bit = 1, \
|
||||
|
Loading…
Reference in New Issue
Block a user