Loading Documentation/devicetree/bindings/interrupt-controller/qti,mpm.txt +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ Properties: Example: wakegic: wake-gic@7781b8 { compatible = "qcom,mpm-gic", "qcom,mpm-gic-msm8953"; compatible = "qcom,mpm-gic", "qcom,mpm-gic-msm8953", "qcom,mpm-gic-msm8937"; interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>; reg = <0x601d4 0x1000>, <0xb011008 0x4>; /* MSM_APCS_GCC_BASE 4K */ Loading Loading @@ -85,7 +85,7 @@ properties: Example: wakegpio: wake-gpio { compatible = "qcom,mpm-gpio", "qcom,mpm-gpio-msm8953"; compatible = "qcom,mpm-gpio", "qcom,mpm-gpio-msm8953", "qcom,mpm-gpio-msm8937"; interrupt-controller; interrupt-parent = <&tlmm>; #interrupt-cells = <2>; Loading arch/arm64/boot/dts/qcom/msm8937.dtsi +21 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ model = "Qualcomm Technologies, Inc. MSM8937"; compatible = "qcom,msm8937"; qcom,msm-id = <294 0x0>; interrupt-parent = <&intc>; interrupt-parent = <&wakegic>; chosen { bootargs = "sched_enable_hmp=1"; Loading Loading @@ -179,11 +179,31 @@ intc: interrupt-controller@b000000 { compatible = "qcom,msm-qgic2"; interrupt-controller; interrupt-parent = <&intc>; #interrupt-cells = <3>; reg = <0x0b000000 0x1000>, <0x0b002000 0x1000>; }; wakegic: wake-gic { compatible = "qcom,mpm-gic-msm8937", "qcom,mpm-gic"; interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>; reg = <0x601d0 0x1000>, <0xb011008 0x4>; /* MSM_APCS_GCC_BASE 4K */ reg-names = "vmpm", "ipc"; qcom,num-mpm-irqs = <96>; interrupt-controller; interrupt-parent = <&intc>; #interrupt-cells = <3>; }; wakegpio: wake-gpio { compatible = "qcom,mpm-gpio-msm8937", "qcom,mpm-gpio"; interrupt-controller; interrupt-parent = <&tlmm>; #interrupt-cells = <2>; }; timer { compatible = "arm,armv8-timer"; interrupts = <1 2 0xff08>, Loading drivers/irqchip/qcom/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ obj-$(CONFIG_QTI_PDC) += pdc.o obj-$(CONFIG_QTI_PDC_SDM845) += pdc-sdm845.o obj-$(CONFIG_QTI_PDC_SDM670) += pdc-sdm670.o obj-$(CONFIG_QTI_PDC_SDXPOORWILLS) += pdc-sdxpoorwills.o obj-$(CONFIG_QTI_MPM) += mpm.o mpm-8953.o obj-$(CONFIG_QTI_MPM) += mpm.o mpm-8953.o mpm-8937.o drivers/irqchip/qcom/mpm-8937.c 0 → 100644 +74 −0 Original line number Diff line number Diff line /* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "mpm.h" const struct mpm_pin mpm_msm8937_gic_chip_data[] = { {2, 216}, {49, 172}, {53, 104}, {58, 166}, {62, 222}, {-1}, }; const struct mpm_pin mpm_msm8937_gpio_chip_data[] = { {3, 38}, {4, 1}, {5, 5}, {6, 9}, {8, 37}, {9, 36}, {10, 13}, {11, 35}, {12, 17}, {13, 21}, {14, 54}, {15, 34}, {16, 31}, {17, 58}, {18, 28}, {19, 42}, {20, 25}, {21, 12}, {22, 43}, {23, 44}, {24, 45}, {25, 46}, {26, 48}, {27, 65}, {28, 93}, {29, 97}, {30, 63}, {31, 70}, {32, 71}, {33, 72}, {34, 81}, {35, 126}, {36, 90}, {37, 128}, {38, 91}, {39, 41}, {40, 127}, {41, 86}, {50, 67}, {51, 73}, {52, 74}, {53, 62}, {54, 124}, {55, 61}, {56, 130}, {57, 59}, {59, 50}, {-1}, }; drivers/irqchip/qcom/mpm.c +34 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <linux/irq.h> #include <linux/tick.h> #include <linux/irqchip.h> #include <linux/irqchip/arm-gic-v3.h> #include <linux/irqdomain.h> #include <linux/interrupt.h> #include<linux/ktime.h> Loading Loading @@ -296,10 +297,34 @@ static int msm_mpm_gic_chip_translate(struct irq_domain *d, if (is_of_node(fwspec->fwnode)) { if (fwspec->param_count < 3) return -EINVAL; switch (fwspec->param[0]) { case 0: /* SPI */ *hwirq = fwspec->param[1] + 32; break; case 1: /* PPI */ *hwirq = fwspec->param[1] + 16; break; case GIC_IRQ_TYPE_LPI: /* LPI */ *hwirq = fwspec->param[1]; break; default: return -EINVAL; } *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK; return 0; } if (is_fwnode_irqchip(fwspec->fwnode)) { if (fwspec->param_count != 2) return -EINVAL; *hwirq = fwspec->param[0]; *type = fwspec->param[1]; return 0; } return -EINVAL; } Loading Loading @@ -541,6 +566,10 @@ static const struct of_device_id mpm_gic_chip_data_table[] = { .compatible = "qcom,mpm-gic-msm8953", .data = mpm_msm8953_gic_chip_data, }, { .compatible = "qcom,mpm-gic-msm8937", .data = mpm_msm8937_gic_chip_data, }, {} }; Loading @@ -551,6 +580,10 @@ static const struct of_device_id mpm_gpio_chip_data_table[] = { .compatible = "qcom,mpm-gpio-msm8953", .data = mpm_msm8953_gpio_chip_data, }, { .compatible = "qcom,mpm-gpio-msm8937", .data = mpm_msm8937_gpio_chip_data, }, {} }; Loading Loading
Documentation/devicetree/bindings/interrupt-controller/qti,mpm.txt +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ Properties: Example: wakegic: wake-gic@7781b8 { compatible = "qcom,mpm-gic", "qcom,mpm-gic-msm8953"; compatible = "qcom,mpm-gic", "qcom,mpm-gic-msm8953", "qcom,mpm-gic-msm8937"; interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>; reg = <0x601d4 0x1000>, <0xb011008 0x4>; /* MSM_APCS_GCC_BASE 4K */ Loading Loading @@ -85,7 +85,7 @@ properties: Example: wakegpio: wake-gpio { compatible = "qcom,mpm-gpio", "qcom,mpm-gpio-msm8953"; compatible = "qcom,mpm-gpio", "qcom,mpm-gpio-msm8953", "qcom,mpm-gpio-msm8937"; interrupt-controller; interrupt-parent = <&tlmm>; #interrupt-cells = <2>; Loading
arch/arm64/boot/dts/qcom/msm8937.dtsi +21 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ model = "Qualcomm Technologies, Inc. MSM8937"; compatible = "qcom,msm8937"; qcom,msm-id = <294 0x0>; interrupt-parent = <&intc>; interrupt-parent = <&wakegic>; chosen { bootargs = "sched_enable_hmp=1"; Loading Loading @@ -179,11 +179,31 @@ intc: interrupt-controller@b000000 { compatible = "qcom,msm-qgic2"; interrupt-controller; interrupt-parent = <&intc>; #interrupt-cells = <3>; reg = <0x0b000000 0x1000>, <0x0b002000 0x1000>; }; wakegic: wake-gic { compatible = "qcom,mpm-gic-msm8937", "qcom,mpm-gic"; interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>; reg = <0x601d0 0x1000>, <0xb011008 0x4>; /* MSM_APCS_GCC_BASE 4K */ reg-names = "vmpm", "ipc"; qcom,num-mpm-irqs = <96>; interrupt-controller; interrupt-parent = <&intc>; #interrupt-cells = <3>; }; wakegpio: wake-gpio { compatible = "qcom,mpm-gpio-msm8937", "qcom,mpm-gpio"; interrupt-controller; interrupt-parent = <&tlmm>; #interrupt-cells = <2>; }; timer { compatible = "arm,armv8-timer"; interrupts = <1 2 0xff08>, Loading
drivers/irqchip/qcom/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ obj-$(CONFIG_QTI_PDC) += pdc.o obj-$(CONFIG_QTI_PDC_SDM845) += pdc-sdm845.o obj-$(CONFIG_QTI_PDC_SDM670) += pdc-sdm670.o obj-$(CONFIG_QTI_PDC_SDXPOORWILLS) += pdc-sdxpoorwills.o obj-$(CONFIG_QTI_MPM) += mpm.o mpm-8953.o obj-$(CONFIG_QTI_MPM) += mpm.o mpm-8953.o mpm-8937.o
drivers/irqchip/qcom/mpm-8937.c 0 → 100644 +74 −0 Original line number Diff line number Diff line /* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "mpm.h" const struct mpm_pin mpm_msm8937_gic_chip_data[] = { {2, 216}, {49, 172}, {53, 104}, {58, 166}, {62, 222}, {-1}, }; const struct mpm_pin mpm_msm8937_gpio_chip_data[] = { {3, 38}, {4, 1}, {5, 5}, {6, 9}, {8, 37}, {9, 36}, {10, 13}, {11, 35}, {12, 17}, {13, 21}, {14, 54}, {15, 34}, {16, 31}, {17, 58}, {18, 28}, {19, 42}, {20, 25}, {21, 12}, {22, 43}, {23, 44}, {24, 45}, {25, 46}, {26, 48}, {27, 65}, {28, 93}, {29, 97}, {30, 63}, {31, 70}, {32, 71}, {33, 72}, {34, 81}, {35, 126}, {36, 90}, {37, 128}, {38, 91}, {39, 41}, {40, 127}, {41, 86}, {50, 67}, {51, 73}, {52, 74}, {53, 62}, {54, 124}, {55, 61}, {56, 130}, {57, 59}, {59, 50}, {-1}, };
drivers/irqchip/qcom/mpm.c +34 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <linux/irq.h> #include <linux/tick.h> #include <linux/irqchip.h> #include <linux/irqchip/arm-gic-v3.h> #include <linux/irqdomain.h> #include <linux/interrupt.h> #include<linux/ktime.h> Loading Loading @@ -296,10 +297,34 @@ static int msm_mpm_gic_chip_translate(struct irq_domain *d, if (is_of_node(fwspec->fwnode)) { if (fwspec->param_count < 3) return -EINVAL; switch (fwspec->param[0]) { case 0: /* SPI */ *hwirq = fwspec->param[1] + 32; break; case 1: /* PPI */ *hwirq = fwspec->param[1] + 16; break; case GIC_IRQ_TYPE_LPI: /* LPI */ *hwirq = fwspec->param[1]; break; default: return -EINVAL; } *type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK; return 0; } if (is_fwnode_irqchip(fwspec->fwnode)) { if (fwspec->param_count != 2) return -EINVAL; *hwirq = fwspec->param[0]; *type = fwspec->param[1]; return 0; } return -EINVAL; } Loading Loading @@ -541,6 +566,10 @@ static const struct of_device_id mpm_gic_chip_data_table[] = { .compatible = "qcom,mpm-gic-msm8953", .data = mpm_msm8953_gic_chip_data, }, { .compatible = "qcom,mpm-gic-msm8937", .data = mpm_msm8937_gic_chip_data, }, {} }; Loading @@ -551,6 +580,10 @@ static const struct of_device_id mpm_gpio_chip_data_table[] = { .compatible = "qcom,mpm-gpio-msm8953", .data = mpm_msm8953_gpio_chip_data, }, { .compatible = "qcom,mpm-gpio-msm8937", .data = mpm_msm8937_gpio_chip_data, }, {} }; Loading