Commit 75afd029 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mailbox-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox

Pull mailbox updates from Jassi Brar:

 - add CMDQ support for mediatek mt8188

 - mhuv2: fix channel window status

 - qcom: document X1E80100 IPC controller and misc cleanup

 - add Versal bindings to xlnx

 - Convert to platform remove callback returning void

* tag 'mailbox-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (23 commits)
  mailbox: mtk-cmdq: Add CMDQ driver support for mt8188
  mailbox: mtk-cmdq: Sort cmdq platform data by compatible name
  mailbox: mtk-cmdq: Rename gce_plat variable with SoC name postfix
  dt-bindings: mailbox: qcom-ipcc: document the X1E80100 Inter-Processor Communication Controller
  mailbox: zynqmp-ipi: Convert to platform remove callback returning void
  mailbox: tegra-hsp: Convert to platform remove callback returning void
  mailbox: sun6i-msgbox: Convert to platform remove callback returning void
  mailbox: stm32-ipcc: Convert to platform remove callback returning void
  mailbox: qcom-ipcc: Convert to platform remove callback returning void
  mailbox: qcom-apcs-ipc: Convert to platform remove callback returning void
  mailbox: omap: Convert to platform remove callback returning void
  mailbox: mtk-cmdq: Convert to platform remove callback returning void
  mailbox: mailbox-test: Convert to platform remove callback returning void
  mailbox: imx: Convert to platform remove callback returning void
  mailbox: bcm-pdc: Convert to platform remove callback returning void
  mailbox: bcm-flexrm: Convert to platform remove callback returning void
  mailbox: zynqmp-ipi: fix an Excess struct member kernel-doc warning
  dt-bindings: mailbox: add Versal IPI bindings
  dt-bindings: mailbox: zynqmp: extend required list
  mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt
  ...
parents 08df80a3 cd795fb0
...@@ -23,6 +23,24 @@ properties: ...@@ -23,6 +23,24 @@ properties:
- qcom,ipq8074-apcs-apps-global - qcom,ipq8074-apcs-apps-global
- qcom,ipq9574-apcs-apps-global - qcom,ipq9574-apcs-apps-global
- const: qcom,ipq6018-apcs-apps-global - const: qcom,ipq6018-apcs-apps-global
- items:
- enum:
- qcom,qcs404-apcs-apps-global
- const: qcom,msm8916-apcs-kpss-global
- const: syscon
- items:
- enum:
- qcom,msm8976-apcs-kpss-global
- const: qcom,msm8994-apcs-kpss-global
- const: syscon
- items:
- enum:
- qcom,msm8998-apcs-hmss-global
- qcom,sdm660-apcs-hmss-global
- qcom,sm4250-apcs-hmss-global
- qcom,sm6115-apcs-hmss-global
- qcom,sm6125-apcs-hmss-global
- const: qcom,msm8994-apcs-kpss-global
- items: - items:
- enum: - enum:
- qcom,sc7180-apss-shared - qcom,sc7180-apss-shared
...@@ -34,22 +52,14 @@ properties: ...@@ -34,22 +52,14 @@ properties:
- qcom,msm8916-apcs-kpss-global - qcom,msm8916-apcs-kpss-global
- qcom,msm8939-apcs-kpss-global - qcom,msm8939-apcs-kpss-global
- qcom,msm8953-apcs-kpss-global - qcom,msm8953-apcs-kpss-global
- qcom,msm8976-apcs-kpss-global
- qcom,msm8994-apcs-kpss-global - qcom,msm8994-apcs-kpss-global
- qcom,qcs404-apcs-apps-global
- qcom,sdx55-apcs-gcc - qcom,sdx55-apcs-gcc
- const: syscon - const: syscon
- enum: - enum:
- qcom,ipq6018-apcs-apps-global - qcom,ipq6018-apcs-apps-global
- qcom,ipq8074-apcs-apps-global
- qcom,msm8996-apcs-hmss-global - qcom,msm8996-apcs-hmss-global
- qcom,msm8998-apcs-hmss-global
- qcom,qcm2290-apcs-hmss-global - qcom,qcm2290-apcs-hmss-global
- qcom,sdm660-apcs-hmss-global
- qcom,sdm845-apss-shared - qcom,sdm845-apss-shared
- qcom,sm4250-apcs-hmss-global
- qcom,sm6115-apcs-hmss-global
- qcom,sm6125-apcs-hmss-global
reg: reg:
maxItems: 1 maxItems: 1
...@@ -80,20 +90,38 @@ allOf: ...@@ -80,20 +90,38 @@ allOf:
- if: - if:
properties: properties:
compatible: compatible:
enum: contains:
- qcom,msm8916-apcs-kpss-global enum:
- qcom,msm8939-apcs-kpss-global - qcom,msm8916-apcs-kpss-global
- qcom,qcs404-apcs-apps-global then:
properties:
clocks:
items:
- description: primary pll parent of the clock driver
- description: auxiliary parent
clock-names:
items:
- const: pll
- const: aux
- if:
properties:
compatible:
contains:
enum:
- qcom,msm8939-apcs-kpss-global
then: then:
properties: properties:
clocks: clocks:
items: items:
- description: primary pll parent of the clock driver - description: primary pll parent of the clock driver
- description: auxiliary parent - description: auxiliary parent
- description: reference clock
clock-names: clock-names:
items: items:
- const: pll - const: pll
- const: aux - const: aux
- const: ref
- if: - if:
properties: properties:
...@@ -113,6 +141,7 @@ allOf: ...@@ -113,6 +141,7 @@ allOf:
- const: ref - const: ref
- const: pll - const: pll
- const: aux - const: aux
- if: - if:
properties: properties:
compatible: compatible:
...@@ -137,16 +166,10 @@ allOf: ...@@ -137,16 +166,10 @@ allOf:
compatible: compatible:
enum: enum:
- qcom,msm8953-apcs-kpss-global - qcom,msm8953-apcs-kpss-global
- qcom,msm8976-apcs-kpss-global
- qcom,msm8994-apcs-kpss-global - qcom,msm8994-apcs-kpss-global
- qcom,msm8996-apcs-hmss-global - qcom,msm8996-apcs-hmss-global
- qcom,msm8998-apcs-hmss-global
- qcom,qcm2290-apcs-hmss-global - qcom,qcm2290-apcs-hmss-global
- qcom,sdm660-apcs-hmss-global
- qcom,sdm845-apss-shared - qcom,sdm845-apss-shared
- qcom,sm4250-apcs-hmss-global
- qcom,sm6115-apcs-hmss-global
- qcom,sm6125-apcs-hmss-global
then: then:
properties: properties:
clocks: false clocks: false
...@@ -192,7 +215,8 @@ examples: ...@@ -192,7 +215,8 @@ examples:
#define GCC_APSS_AHB_CLK_SRC 1 #define GCC_APSS_AHB_CLK_SRC 1
#define GCC_GPLL0_AO_OUT_MAIN 123 #define GCC_GPLL0_AO_OUT_MAIN 123
apcs: mailbox@b011000 { apcs: mailbox@b011000 {
compatible = "qcom,qcs404-apcs-apps-global", "syscon"; compatible = "qcom,qcs404-apcs-apps-global",
"qcom,msm8916-apcs-kpss-global", "syscon";
reg = <0x0b011000 0x1000>; reg = <0x0b011000 0x1000>;
#mbox-cells = <1>; #mbox-cells = <1>;
clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>; clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
......
...@@ -35,6 +35,7 @@ properties: ...@@ -35,6 +35,7 @@ properties:
- qcom,sm8450-ipcc - qcom,sm8450-ipcc
- qcom,sm8550-ipcc - qcom,sm8550-ipcc
- qcom,sm8650-ipcc - qcom,sm8650-ipcc
- qcom,x1e80100-ipcc
- const: qcom,ipcc - const: qcom,ipcc
reg: reg:
......
...@@ -37,7 +37,9 @@ maintainers: ...@@ -37,7 +37,9 @@ maintainers:
properties: properties:
compatible: compatible:
const: xlnx,zynqmp-ipi-mailbox enum:
- xlnx,zynqmp-ipi-mailbox
- xlnx,versal-ipi-mailbox
method: method:
description: | description: |
...@@ -58,6 +60,12 @@ properties: ...@@ -58,6 +60,12 @@ properties:
'#size-cells': '#size-cells':
const: 2 const: 2
reg:
maxItems: 2
reg-names:
maxItems: 2
xlnx,ipi-id: xlnx,ipi-id:
description: | description: |
Remote Xilinx IPI agent ID of which the mailbox is connected to. Remote Xilinx IPI agent ID of which the mailbox is connected to.
...@@ -76,7 +84,17 @@ patternProperties: ...@@ -76,7 +84,17 @@ patternProperties:
properties: properties:
compatible: compatible:
const: xlnx,zynqmp-ipi-dest-mailbox enum:
- xlnx,zynqmp-ipi-dest-mailbox
- xlnx,versal-ipi-dest-mailbox
reg:
minItems: 1
maxItems: 4
reg-names:
minItems: 1
maxItems: 4
xlnx,ipi-id: xlnx,ipi-id:
description: description:
...@@ -88,23 +106,44 @@ patternProperties: ...@@ -88,23 +106,44 @@ patternProperties:
description: description:
It contains tx(0) or rx(1) channel IPI id number. It contains tx(0) or rx(1) channel IPI id number.
reg: allOf:
maxItems: 4 - if:
properties:
reg-names: compatible:
items: contains:
- const: local_request_region enum:
- const: local_response_region - xlnx,zynqmp-ipi-dest-mailbox
- const: remote_request_region then:
- const: remote_response_region properties:
reg:
maxItems: 4
reg-names:
items:
- const: local_request_region
- const: local_response_region
- const: remote_request_region
- const: remote_response_region
else:
properties:
reg:
minItems: 1
items:
- description: Remote IPI agent control register region
- description: Remote IPI agent optional message buffers
reg-names:
minItems: 1
items:
- const: ctrl
- const: msg
required: required:
- compatible - compatible
- reg - reg
- reg-names - reg-names
- "#mbox-cells" - "#mbox-cells"
- xlnx,ipi-id
additionalProperties: false
required: required:
- compatible - compatible
...@@ -113,6 +152,36 @@ required: ...@@ -113,6 +152,36 @@ required:
- '#size-cells' - '#size-cells'
- xlnx,ipi-id - xlnx,ipi-id
allOf:
- if:
properties:
compatible:
contains:
enum:
- xlnx,zynqmp-ipi-mailbox
then:
properties:
reg: false
reg-names: false
else:
properties:
reg:
items:
- description: Host IPI agent control register region
- description: Host IPI agent optional message buffers
reg-names:
items:
- const: ctrl
- const: msg
required:
- reg
- reg-names
additionalProperties: false
examples: examples:
- | - |
#include<dt-bindings/interrupt-controller/arm-gic.h> #include<dt-bindings/interrupt-controller/arm-gic.h>
...@@ -144,4 +213,41 @@ examples: ...@@ -144,4 +213,41 @@ examples:
}; };
}; };
- |
#include<dt-bindings/interrupt-controller/arm-gic.h>
bus {
#address-cells = <2>;
#size-cells = <2>;
mailbox@ff300000 {
compatible = "xlnx,versal-ipi-mailbox";
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <2>;
#size-cells = <2>;
reg = <0x0 0xff300000 0x0 0x1000>,
<0x0 0xff990000 0x0 0x1ff>;
reg-names = "ctrl", "msg";
xlnx,ipi-id = <0>;
ranges;
/* buffered IPI */
mailbox@ff340000 {
compatible = "xlnx,versal-ipi-dest-mailbox";
reg = <0x0 0xff340000 0x0 0x1000>,
<0x0 0xff990400 0x0 0x1ff>;
reg-names = "ctrl", "msg";
#mbox-cells = <1>;
xlnx,ipi-id = <4>;
};
/* bufferless IPI */
mailbox@ff370000 {
compatible = "xlnx,versal-ipi-dest-mailbox";
reg = <0x0 0xff370000 0x0 0x1000>;
reg-names = "ctrl";
#mbox-cells = <1>;
xlnx,ipi-id = <7>;
};
};
};
... ...
...@@ -553,7 +553,8 @@ static irqreturn_t mhuv2_sender_interrupt(int irq, void *data) ...@@ -553,7 +553,8 @@ static irqreturn_t mhuv2_sender_interrupt(int irq, void *data)
priv = chan->con_priv; priv = chan->con_priv;
if (!IS_PROTOCOL_DOORBELL(priv)) { if (!IS_PROTOCOL_DOORBELL(priv)) {
writel_relaxed(1, &mhu->send->ch_wn[priv->ch_wn_idx + priv->windows - 1].int_clr); for (i = 0; i < priv->windows; i++)
writel_relaxed(1, &mhu->send->ch_wn[priv->ch_wn_idx + i].int_clr);
if (chan->cl) { if (chan->cl) {
mbox_chan_txdone(chan, 0); mbox_chan_txdone(chan, 0);
......
...@@ -1650,7 +1650,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev) ...@@ -1650,7 +1650,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int flexrm_mbox_remove(struct platform_device *pdev) static void flexrm_mbox_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct flexrm_mbox *mbox = platform_get_drvdata(pdev); struct flexrm_mbox *mbox = platform_get_drvdata(pdev);
...@@ -1661,8 +1661,6 @@ static int flexrm_mbox_remove(struct platform_device *pdev) ...@@ -1661,8 +1661,6 @@ static int flexrm_mbox_remove(struct platform_device *pdev)
dma_pool_destroy(mbox->cmpl_pool); dma_pool_destroy(mbox->cmpl_pool);
dma_pool_destroy(mbox->bd_pool); dma_pool_destroy(mbox->bd_pool);
return 0;
} }
static const struct of_device_id flexrm_mbox_of_match[] = { static const struct of_device_id flexrm_mbox_of_match[] = {
...@@ -1677,7 +1675,7 @@ static struct platform_driver flexrm_mbox_driver = { ...@@ -1677,7 +1675,7 @@ static struct platform_driver flexrm_mbox_driver = {
.of_match_table = flexrm_mbox_of_match, .of_match_table = flexrm_mbox_of_match,
}, },
.probe = flexrm_mbox_probe, .probe = flexrm_mbox_probe,
.remove = flexrm_mbox_remove, .remove_new = flexrm_mbox_remove,
}; };
module_platform_driver(flexrm_mbox_driver); module_platform_driver(flexrm_mbox_driver);
......
...@@ -1605,7 +1605,7 @@ static int pdc_probe(struct platform_device *pdev) ...@@ -1605,7 +1605,7 @@ static int pdc_probe(struct platform_device *pdev)
return err; return err;
} }
static int pdc_remove(struct platform_device *pdev) static void pdc_remove(struct platform_device *pdev)
{ {
struct pdc_state *pdcs = platform_get_drvdata(pdev); struct pdc_state *pdcs = platform_get_drvdata(pdev);
...@@ -1617,12 +1617,11 @@ static int pdc_remove(struct platform_device *pdev) ...@@ -1617,12 +1617,11 @@ static int pdc_remove(struct platform_device *pdev)
dma_pool_destroy(pdcs->rx_buf_pool); dma_pool_destroy(pdcs->rx_buf_pool);
dma_pool_destroy(pdcs->ring_pool); dma_pool_destroy(pdcs->ring_pool);
return 0;
} }
static struct platform_driver pdc_mbox_driver = { static struct platform_driver pdc_mbox_driver = {
.probe = pdc_probe, .probe = pdc_probe,
.remove = pdc_remove, .remove_new = pdc_remove,
.driver = { .driver = {
.name = "brcm-iproc-pdc-mbox", .name = "brcm-iproc-pdc-mbox",
.of_match_table = pdc_mbox_of_match, .of_match_table = pdc_mbox_of_match,
......
...@@ -903,13 +903,11 @@ static int imx_mu_probe(struct platform_device *pdev) ...@@ -903,13 +903,11 @@ static int imx_mu_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx_mu_remove(struct platform_device *pdev) static void imx_mu_remove(struct platform_device *pdev)
{ {
struct imx_mu_priv *priv = platform_get_drvdata(pdev); struct imx_mu_priv *priv = platform_get_drvdata(pdev);
pm_runtime_disable(priv->dev); pm_runtime_disable(priv->dev);
return 0;
} }
static const struct imx_mu_dcfg imx_mu_cfg_imx6sx = { static const struct imx_mu_dcfg imx_mu_cfg_imx6sx = {
...@@ -1070,7 +1068,7 @@ static const struct dev_pm_ops imx_mu_pm_ops = { ...@@ -1070,7 +1068,7 @@ static const struct dev_pm_ops imx_mu_pm_ops = {
static struct platform_driver imx_mu_driver = { static struct platform_driver imx_mu_driver = {
.probe = imx_mu_probe, .probe = imx_mu_probe,
.remove = imx_mu_remove, .remove_new = imx_mu_remove,
.driver = { .driver = {
.name = "imx_mu", .name = "imx_mu",
.of_match_table = imx_mu_dt_ids, .of_match_table = imx_mu_dt_ids,
......
...@@ -418,7 +418,7 @@ static int mbox_test_probe(struct platform_device *pdev) ...@@ -418,7 +418,7 @@ static int mbox_test_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int mbox_test_remove(struct platform_device *pdev) static void mbox_test_remove(struct platform_device *pdev)
{ {
struct mbox_test_device *tdev = platform_get_drvdata(pdev); struct mbox_test_device *tdev = platform_get_drvdata(pdev);
...@@ -428,8 +428,6 @@ static int mbox_test_remove(struct platform_device *pdev) ...@@ -428,8 +428,6 @@ static int mbox_test_remove(struct platform_device *pdev)
mbox_free_channel(tdev->tx_channel); mbox_free_channel(tdev->tx_channel);
if (tdev->rx_channel) if (tdev->rx_channel)
mbox_free_channel(tdev->rx_channel); mbox_free_channel(tdev->rx_channel);
return 0;
} }
static const struct of_device_id mbox_test_match[] = { static const struct of_device_id mbox_test_match[] = {
...@@ -444,7 +442,7 @@ static struct platform_driver mbox_test_driver = { ...@@ -444,7 +442,7 @@ static struct platform_driver mbox_test_driver = {
.of_match_table = mbox_test_match, .of_match_table = mbox_test_match,
}, },
.probe = mbox_test_probe, .probe = mbox_test_probe,
.remove = mbox_test_remove, .remove_new = mbox_test_remove,
}; };
module_platform_driver(mbox_test_driver); module_platform_driver(mbox_test_driver);
......
...@@ -367,7 +367,7 @@ static int cmdq_resume(struct device *dev) ...@@ -367,7 +367,7 @@ static int cmdq_resume(struct device *dev)
return 0; return 0;
} }
static int cmdq_remove(struct platform_device *pdev) static void cmdq_remove(struct platform_device *pdev)
{ {
struct cmdq *cmdq = platform_get_drvdata(pdev); struct cmdq *cmdq = platform_get_drvdata(pdev);
...@@ -378,7 +378,6 @@ static int cmdq_remove(struct platform_device *pdev) ...@@ -378,7 +378,6 @@ static int cmdq_remove(struct platform_device *pdev)
cmdq_runtime_suspend(&pdev->dev); cmdq_runtime_suspend(&pdev->dev);
clk_bulk_unprepare(cmdq->pdata->gce_num, cmdq->clocks); clk_bulk_unprepare(cmdq->pdata->gce_num, cmdq->clocks);
return 0;
} }
static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data) static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
...@@ -706,62 +705,70 @@ static const struct dev_pm_ops cmdq_pm_ops = { ...@@ -706,62 +705,70 @@ static const struct dev_pm_ops cmdq_pm_ops = {
cmdq_runtime_resume, NULL) cmdq_runtime_resume, NULL)
}; };
static const struct gce_plat gce_plat_v2 = { static const struct gce_plat gce_plat_mt6779 = {
.thread_nr = 16, .thread_nr = 24,
.shift = 0, .shift = 3,
.control_by_sw = false, .control_by_sw = false,
.gce_num = 1 .gce_num = 1
}; };
static const struct gce_plat gce_plat_v3 = { static const struct gce_plat gce_plat_mt8173 = {
.thread_nr = 24, .thread_nr = 16,
.shift = 0, .shift = 0,
.control_by_sw = false, .control_by_sw = false,
.gce_num = 1 .gce_num = 1
}; };
static const struct gce_plat gce_plat_v4 = { static const struct gce_plat gce_plat_mt8183 = {
.thread_nr = 24, .thread_nr = 24,
.shift = 3, .shift = 0,
.control_by_sw = false, .control_by_sw = false,
.gce_num = 1 .gce_num = 1
}; };
static const struct gce_plat gce_plat_v5 = { static const struct gce_plat gce_plat_mt8186 = {
.thread_nr = 24, .thread_nr = 24,
.shift = 3, .shift = 3,
.control_by_sw = true, .control_by_sw = true,
.sw_ddr_en = true,
.gce_num = 1 .gce_num = 1
}; };
static const struct gce_plat gce_plat_v6 = { static const struct gce_plat gce_plat_mt8188 = {
.thread_nr = 24, .thread_nr = 32,
.shift = 3, .shift = 3,
.control_by_sw = true, .control_by_sw = true,
.gce_num = 2 .gce_num = 2
}; };
static const struct gce_plat gce_plat_v7 = { static const struct gce_plat gce_plat_mt8192 = {
.thread_nr = 24, .thread_nr = 24,
.shift = 3, .shift = 3,
.control_by_sw = true, .control_by_sw = true,
.sw_ddr_en = true,
.gce_num = 1 .gce_num = 1
}; };
static const struct gce_plat gce_plat_mt8195 = {
.thread_nr = 24,
.shift = 3,
.control_by_sw = true,
.gce_num = 2
};
static const struct of_device_id cmdq_of_ids[] = { static const struct of_device_id cmdq_of_ids[] = {
{.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_v2}, {.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
{.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_v3}, {.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
{.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_v7}, {.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_mt8183},
{.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_v4}, {.compatible = "mediatek,mt8186-gce", .data = (void *)&gce_plat_mt8186},
{.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_v5}, {.compatible = "mediatek,mt8188-gce", .data = (void *)&gce_plat_mt8188},
{.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_v6}, {.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192},
{.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195},
{} {}
}; };
static struct platform_driver cmdq_drv = { static struct platform_driver cmdq_drv = {
.probe = cmdq_probe, .probe = cmdq_probe,
.remove = cmdq_remove, .remove_new = cmdq_remove,
.driver = { .driver = {
.name = "mtk_cmdq", .name = "mtk_cmdq",
.pm = &cmdq_pm_ops, .pm = &cmdq_pm_ops,
......
...@@ -865,19 +865,17 @@ static int omap_mbox_probe(struct platform_device *pdev) ...@@ -865,19 +865,17 @@ static int omap_mbox_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int omap_mbox_remove(struct platform_device *pdev) static void omap_mbox_remove(struct platform_device *pdev)
{ {
struct omap_mbox_device *mdev = platform_get_drvdata(pdev); struct omap_mbox_device *mdev = platform_get_drvdata(pdev);
pm_runtime_disable(mdev->dev); pm_runtime_disable(mdev->dev);
omap_mbox_unregister(mdev); omap_mbox_unregister(mdev);
return 0;
} }
static struct platform_driver omap_mbox_driver = { static struct platform_driver omap_mbox_driver = {
.probe = omap_mbox_probe, .probe = omap_mbox_probe,
.remove = omap_mbox_remove, .remove_new = omap_mbox_remove,
.driver = { .driver = {
.name = "omap-mailbox", .name = "omap-mailbox",
.pm = &omap_mbox_pm_ops, .pm = &omap_mbox_pm_ops,
......
...@@ -129,14 +129,12 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) ...@@ -129,14 +129,12 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int qcom_apcs_ipc_remove(struct platform_device *pdev) static void qcom_apcs_ipc_remove(struct platform_device *pdev)
{ {
struct qcom_apcs_ipc *apcs = platform_get_drvdata(pdev); struct qcom_apcs_ipc *apcs = platform_get_drvdata(pdev);
struct platform_device *clk = apcs->clk; struct platform_device *clk = apcs->clk;
platform_device_unregister(clk); platform_device_unregister(clk);
return 0;
} }
/* .data is the offset of the ipc register within the global block */ /* .data is the offset of the ipc register within the global block */
...@@ -145,19 +143,19 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = { ...@@ -145,19 +143,19 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = {
{ .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data }, { .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data },
{ .compatible = "qcom,msm8939-apcs-kpss-global", .data = &msm8916_apcs_data }, { .compatible = "qcom,msm8939-apcs-kpss-global", .data = &msm8916_apcs_data },
{ .compatible = "qcom,msm8953-apcs-kpss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,msm8953-apcs-kpss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,msm8976-apcs-kpss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,msm8994-apcs-kpss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,msm8994-apcs-kpss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,msm8996-apcs-hmss-global", .data = &msm8996_apcs_data }, { .compatible = "qcom,msm8996-apcs-hmss-global", .data = &msm8996_apcs_data },
{ .compatible = "qcom,msm8998-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,qcm2290-apcs-hmss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,qcm2290-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,sdm845-apss-shared", .data = &apps_shared_apcs_data },
{ .compatible = "qcom,sdx55-apcs-gcc", .data = &sdx55_apcs_data },
/* Do not add any more entries using existing driver data */
{ .compatible = "qcom,msm8976-apcs-kpss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,msm8998-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,qcs404-apcs-apps-global", .data = &msm8916_apcs_data }, { .compatible = "qcom,qcs404-apcs-apps-global", .data = &msm8916_apcs_data },
{ .compatible = "qcom,sdm660-apcs-hmss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,sdm660-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,sdm845-apss-shared", .data = &apps_shared_apcs_data },
{ .compatible = "qcom,sm4250-apcs-hmss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,sm4250-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,sm6125-apcs-hmss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,sm6125-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,sm6115-apcs-hmss-global", .data = &msm8994_apcs_data }, { .compatible = "qcom,sm6115-apcs-hmss-global", .data = &msm8994_apcs_data },
{ .compatible = "qcom,sdx55-apcs-gcc", .data = &sdx55_apcs_data },
/* Do not add any more entries using existing driver data */
{ .compatible = "qcom,ipq5332-apcs-apps-global", .data = &ipq6018_apcs_data }, { .compatible = "qcom,ipq5332-apcs-apps-global", .data = &ipq6018_apcs_data },
{ .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data }, { .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data },
{ .compatible = "qcom,sc7180-apss-shared", .data = &apps_shared_apcs_data }, { .compatible = "qcom,sc7180-apss-shared", .data = &apps_shared_apcs_data },
...@@ -169,7 +167,7 @@ MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match); ...@@ -169,7 +167,7 @@ MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match);
static struct platform_driver qcom_apcs_ipc_driver = { static struct platform_driver qcom_apcs_ipc_driver = {
.probe = qcom_apcs_ipc_probe, .probe = qcom_apcs_ipc_probe,
.remove = qcom_apcs_ipc_remove, .remove_new = qcom_apcs_ipc_remove,
.driver = { .driver = {
.name = "qcom_apcs_ipc", .name = "qcom_apcs_ipc",
.of_match_table = qcom_apcs_ipc_of_match, .of_match_table = qcom_apcs_ipc_of_match,
......
...@@ -326,14 +326,12 @@ static int qcom_ipcc_probe(struct platform_device *pdev) ...@@ -326,14 +326,12 @@ static int qcom_ipcc_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int qcom_ipcc_remove(struct platform_device *pdev) static void qcom_ipcc_remove(struct platform_device *pdev)
{ {
struct qcom_ipcc *ipcc = platform_get_drvdata(pdev); struct qcom_ipcc *ipcc = platform_get_drvdata(pdev);
disable_irq_wake(ipcc->irq); disable_irq_wake(ipcc->irq);
irq_domain_remove(ipcc->irq_domain); irq_domain_remove(ipcc->irq_domain);
return 0;
} }
static const struct of_device_id qcom_ipcc_of_match[] = { static const struct of_device_id qcom_ipcc_of_match[] = {
...@@ -348,7 +346,7 @@ static const struct dev_pm_ops qcom_ipcc_dev_pm_ops = { ...@@ -348,7 +346,7 @@ static const struct dev_pm_ops qcom_ipcc_dev_pm_ops = {
static struct platform_driver qcom_ipcc_driver = { static struct platform_driver qcom_ipcc_driver = {
.probe = qcom_ipcc_probe, .probe = qcom_ipcc_probe,
.remove = qcom_ipcc_remove, .remove_new = qcom_ipcc_remove,
.driver = { .driver = {
.name = "qcom-ipcc", .name = "qcom-ipcc",
.of_match_table = qcom_ipcc_of_match, .of_match_table = qcom_ipcc_of_match,
......
...@@ -331,7 +331,7 @@ static int stm32_ipcc_probe(struct platform_device *pdev) ...@@ -331,7 +331,7 @@ static int stm32_ipcc_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int stm32_ipcc_remove(struct platform_device *pdev) static void stm32_ipcc_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -339,8 +339,6 @@ static int stm32_ipcc_remove(struct platform_device *pdev) ...@@ -339,8 +339,6 @@ static int stm32_ipcc_remove(struct platform_device *pdev)
dev_pm_clear_wake_irq(&pdev->dev); dev_pm_clear_wake_irq(&pdev->dev);
device_set_wakeup_capable(dev, false); device_set_wakeup_capable(dev, false);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -381,7 +379,7 @@ static struct platform_driver stm32_ipcc_driver = { ...@@ -381,7 +379,7 @@ static struct platform_driver stm32_ipcc_driver = {
.of_match_table = stm32_ipcc_of_match, .of_match_table = stm32_ipcc_of_match,
}, },
.probe = stm32_ipcc_probe, .probe = stm32_ipcc_probe,
.remove = stm32_ipcc_remove, .remove_new = stm32_ipcc_remove,
}; };
module_platform_driver(stm32_ipcc_driver); module_platform_driver(stm32_ipcc_driver);
......
...@@ -287,15 +287,13 @@ static int sun6i_msgbox_probe(struct platform_device *pdev) ...@@ -287,15 +287,13 @@ static int sun6i_msgbox_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int sun6i_msgbox_remove(struct platform_device *pdev) static void sun6i_msgbox_remove(struct platform_device *pdev)
{ {
struct sun6i_msgbox *mbox = platform_get_drvdata(pdev); struct sun6i_msgbox *mbox = platform_get_drvdata(pdev);
mbox_controller_unregister(&mbox->controller); mbox_controller_unregister(&mbox->controller);
/* See the comment in sun6i_msgbox_probe about the reset line. */ /* See the comment in sun6i_msgbox_probe about the reset line. */
clk_disable_unprepare(mbox->clk); clk_disable_unprepare(mbox->clk);
return 0;
} }
static const struct of_device_id sun6i_msgbox_of_match[] = { static const struct of_device_id sun6i_msgbox_of_match[] = {
...@@ -310,7 +308,7 @@ static struct platform_driver sun6i_msgbox_driver = { ...@@ -310,7 +308,7 @@ static struct platform_driver sun6i_msgbox_driver = {
.of_match_table = sun6i_msgbox_of_match, .of_match_table = sun6i_msgbox_of_match,
}, },
.probe = sun6i_msgbox_probe, .probe = sun6i_msgbox_probe,
.remove = sun6i_msgbox_remove, .remove_new = sun6i_msgbox_remove,
}; };
module_platform_driver(sun6i_msgbox_driver); module_platform_driver(sun6i_msgbox_driver);
......
...@@ -868,13 +868,11 @@ static int tegra_hsp_probe(struct platform_device *pdev) ...@@ -868,13 +868,11 @@ static int tegra_hsp_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int tegra_hsp_remove(struct platform_device *pdev) static void tegra_hsp_remove(struct platform_device *pdev)
{ {
struct tegra_hsp *hsp = platform_get_drvdata(pdev); struct tegra_hsp *hsp = platform_get_drvdata(pdev);
lockdep_unregister_key(&hsp->lock_key); lockdep_unregister_key(&hsp->lock_key);
return 0;
} }
static int __maybe_unused tegra_hsp_resume(struct device *dev) static int __maybe_unused tegra_hsp_resume(struct device *dev)
...@@ -953,7 +951,7 @@ static struct platform_driver tegra_hsp_driver = { ...@@ -953,7 +951,7 @@ static struct platform_driver tegra_hsp_driver = {
.pm = &tegra_hsp_pm_ops, .pm = &tegra_hsp_pm_ops,
}, },
.probe = tegra_hsp_probe, .probe = tegra_hsp_probe,
.remove = tegra_hsp_remove, .remove_new = tegra_hsp_remove,
}; };
static int __init tegra_hsp_init(void) static int __init tegra_hsp_init(void)
......
...@@ -81,7 +81,6 @@ struct zynqmp_ipi_mchan { ...@@ -81,7 +81,6 @@ struct zynqmp_ipi_mchan {
* @remote_id: remote IPI agent ID * @remote_id: remote IPI agent ID
* @mbox: mailbox Controller * @mbox: mailbox Controller
* @mchans: array for channels, tx channel and rx channel. * @mchans: array for channels, tx channel and rx channel.
* @irq: IPI agent interrupt ID
*/ */
struct zynqmp_ipi_mbox { struct zynqmp_ipi_mbox {
struct zynqmp_ipi_pdata *pdata; struct zynqmp_ipi_pdata *pdata;
...@@ -688,19 +687,17 @@ static int zynqmp_ipi_probe(struct platform_device *pdev) ...@@ -688,19 +687,17 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int zynqmp_ipi_remove(struct platform_device *pdev) static void zynqmp_ipi_remove(struct platform_device *pdev)
{ {
struct zynqmp_ipi_pdata *pdata; struct zynqmp_ipi_pdata *pdata;
pdata = platform_get_drvdata(pdev); pdata = platform_get_drvdata(pdev);
zynqmp_ipi_free_mboxes(pdata); zynqmp_ipi_free_mboxes(pdata);
return 0;
} }
static struct platform_driver zynqmp_ipi_driver = { static struct platform_driver zynqmp_ipi_driver = {
.probe = zynqmp_ipi_probe, .probe = zynqmp_ipi_probe,
.remove = zynqmp_ipi_remove, .remove_new = zynqmp_ipi_remove,
.driver = { .driver = {
.name = "zynqmp-ipi", .name = "zynqmp-ipi",
.of_match_table = of_match_ptr(zynqmp_ipi_of_match), .of_match_table = of_match_ptr(zynqmp_ipi_of_match),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment