Loading Documentation/devicetree/bindings/soc/qcom/qcom,glink-probe.txt +36 −5 Original line number Diff line number Diff line Loading @@ -13,26 +13,57 @@ The GLINK probe node must contain subnodes that describes the edge-pairs. See qcom,glink.txt for details on how to describe them. In addition to the properties in qcom,glink.txt, The GLINK Probe driver requires the remote-pid and transport type to be specified in the subnodes. requires the qcom,glink-label and transport type to be specified in the subnodes. - transport : Usage: required Value type: <stringlist> Definition: must be "smem", "spss", or "spi" - qcom,remote-pid : - qcom,glink-label : Usage: required Value type: <prop-encoded-array> Value type: <stringlist> Definition: specifies the identifier of the remote proc of this edge. = GLINK_SSR The GLINK probe driver also initializes the GLINK_SSR channel for the edges that it brings up. The channel should be specified as a subnode to each edge. In addition to the properties in qcom,glink.txt to specify a channel device node, the qcom,notify-edges property must be defined. - qcom,notify-edges : Usage: required Value type: <prop-encoded-array> Definition: list of phandles that specify the subsystems this glink edge needs to receive ssr notifications about. = EXAMPLE qcom,glink { compatible = "qcom,glink"; modem { glink_modem: modem { transport = "smem"; qcom,remote-pid = <1>; qcom,remote-pid = <0>; mboxes = <&apcs_glb 8>; mbox-names = "mpss_smem"; interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_adsp>; }; }; glink_adsp: adsp { transport = "smem"; qcom,remote-pid = <2>; mboxes = <&apcs_glb 4>; mbox-names = "adsp_smem"; interrupts = <GIC_SPI 348 IRQ_TYPE_EDGE_RISING>; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>; }; }; }; arch/arm64/boot/dts/qcom/sm8150.dtsi +64 −15 Original line number Diff line number Diff line Loading @@ -2307,14 +2307,17 @@ #size-cells = <1>; ranges; modem { glink_modem: modem { qcom,remote-pid = <1>; transport = "smem"; mboxes = <&apcs_glb 12>; mbox-names = "mpss_smem"; interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>; modem_qrtr { label = "modem"; qcom,glink-label = "mpss"; qcom,modem_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2327,27 +2330,38 @@ qcom,intents = <0x64 64>; }; modem_ds { qcom,modem_ds { qcom,glink-channels = "DS"; qcom,intents = <0x4000 0x2>; }; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_adsp>, <&glink_slpi>, <&glink_cdsp>, <&glink_spss>; }; }; adsp { glink_adsp: adsp { qcom,remote-pid = <2>; transport = "smem"; mboxes = <&apcs_glb 8>; mbox-names = "adsp_smem"; interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>; adsp_qrtr { label = "adsp"; qcom,glink-label = "lpass"; qcom,adsp_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 0x4400 2>; }; apr_tal_rpmsg { qcom,apr_tal_rpmsg { qcom,glink-channels = "apr_audio_svc"; qcom,intents = <0x200 20>; }; Loading @@ -2357,16 +2371,26 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,adsp_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_slpi>, <&glink_cdsp>; }; }; dsps { glink_slpi: dsps { qcom,remote-pid = <3>; transport = "smem"; mboxes = <&apcs_glb 24>; mbox-names = "dsps_smem"; interrupts = <GIC_SPI 170 IRQ_TYPE_EDGE_RISING>; dsps_qrtr { label = "slpi"; qcom,glink-label = "dsps"; qcom,slpi_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2378,16 +2402,26 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,slpi_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_adsp>, <&glink_cdsp>; }; }; cdsp { glink_cdsp: cdsp { qcom,remote-pid = <5>; transport = "smem"; mboxes = <&apcs_glb 4>; mbox-names = "cdsp_smem"; interrupts = <GIC_SPI 574 IRQ_TYPE_EDGE_RISING>; cdsp_qrtr { label = "cdsp"; qcom,glink-label = "cdsp"; qcom,cdsp_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2399,9 +2433,16 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,cdsp_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_adsp>, <&glink_slpi>; }; }; spss { glink_spss: spss { qcom,remote-pid = <8>; transport = "spss"; mboxes = <&sp_scsr 0>; Loading @@ -2413,6 +2454,14 @@ <0x1885010 0x4>; reg-names = "qcom,spss-addr", "qcom,spss-size"; label = "spss"; qcom,glink-label = "spss"; qcom,spss_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>; }; }; glink_spi_xprt_wdsp: wdsp { Loading @@ -2421,22 +2470,22 @@ tx-descriptors = <0x12000 0x12004>; rx-descriptors = <0x1200c 0x12010>; wdsp_ctrl { qcom,wdsp_ctrl { qcom,glink-channels = "g_glink_ctrl"; qcom,intents = <0x400 1>; }; wdsp_ild { qcom,wdsp_ild { qcom,glink-channels = "g_glink_persistent_data_ild"; }; wdsp_nild { qcom,wdsp_nild { qcom,glink-channels = "g_glink_persistent_data_nild"; }; wdsp_data { qcom,wdsp_data { qcom,glink-channels = "g_glink_audio_data"; qcom,intents = <0x1000 2>; }; Loading drivers/rpmsg/qcom_glink_native.c +11 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,15 @@ static void qcom_glink_tx_write(struct qcom_glink *glink, glink->tx_pipe->write(glink->tx_pipe, hdr, hlen, data, dlen); } static void qcom_glink_pipe_reset(struct qcom_glink *glink) { if (glink->tx_pipe->reset) glink->tx_pipe->reset(glink->tx_pipe); if (glink->rx_pipe->reset) glink->rx_pipe->reset(glink->rx_pipe); } static int qcom_glink_tx(struct qcom_glink *glink, const void *hdr, size_t hlen, const void *data, size_t dlen, bool wait) Loading Loading @@ -1852,6 +1861,8 @@ void qcom_glink_native_remove(struct qcom_glink *glink) idr_destroy(&glink->lcids); idr_destroy(&glink->rcids); spin_unlock_irqrestore(&glink->idr_lock, flags); qcom_glink_pipe_reset(glink); mbox_free_channel(glink->mbox_chan); } EXPORT_SYMBOL_GPL(qcom_glink_native_remove); Loading drivers/rpmsg/qcom_glink_native.h +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ struct qcom_glink_pipe { void (*write)(struct qcom_glink_pipe *glink_pipe, const void *hdr, size_t hlen, const void *data, size_t dlen); void (*reset)(struct qcom_glink_pipe *glink_pipe); }; struct qcom_glink; Loading drivers/rpmsg/qcom_glink_spss.c +12 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ struct glink_spss_pipe { #define to_spss_pipe(p) container_of(p, struct glink_spss_pipe, native) static void glink_spss_reset(struct qcom_glink_pipe *np) { struct glink_spss_pipe *pipe = to_spss_pipe(np); *pipe->head = cpu_to_le32(0); *pipe->tail = cpu_to_le32(0); } static size_t glink_spss_rx_avail(struct qcom_glink_pipe *np) { struct glink_spss_pipe *pipe = to_spss_pipe(np); Loading Loading @@ -210,8 +218,8 @@ static int glink_spss_advertise_cfg(struct device *dev, *spss_addr = cpu_to_le64(addr); *spss_size = cpu_to_le32(size); iounmap(spss_addr); iounmap(spss_size); devm_iounmap(dev, spss_addr); devm_iounmap(dev, spss_size); return 0; } Loading Loading @@ -296,10 +304,12 @@ struct qcom_glink *qcom_glink_spss_register(struct device *parent, rx_pipe->native.avail = glink_spss_rx_avail; rx_pipe->native.peak = glink_spss_rx_peak; rx_pipe->native.advance = glink_spss_rx_advance; rx_pipe->native.reset = glink_spss_reset; rx_pipe->remote_pid = remote_pid; tx_pipe->native.avail = glink_spss_tx_avail; tx_pipe->native.write = glink_spss_tx_write; tx_pipe->native.reset = glink_spss_reset; tx_pipe->remote_pid = remote_pid; *rx_pipe->tail = 0; Loading Loading
Documentation/devicetree/bindings/soc/qcom/qcom,glink-probe.txt +36 −5 Original line number Diff line number Diff line Loading @@ -13,26 +13,57 @@ The GLINK probe node must contain subnodes that describes the edge-pairs. See qcom,glink.txt for details on how to describe them. In addition to the properties in qcom,glink.txt, The GLINK Probe driver requires the remote-pid and transport type to be specified in the subnodes. requires the qcom,glink-label and transport type to be specified in the subnodes. - transport : Usage: required Value type: <stringlist> Definition: must be "smem", "spss", or "spi" - qcom,remote-pid : - qcom,glink-label : Usage: required Value type: <prop-encoded-array> Value type: <stringlist> Definition: specifies the identifier of the remote proc of this edge. = GLINK_SSR The GLINK probe driver also initializes the GLINK_SSR channel for the edges that it brings up. The channel should be specified as a subnode to each edge. In addition to the properties in qcom,glink.txt to specify a channel device node, the qcom,notify-edges property must be defined. - qcom,notify-edges : Usage: required Value type: <prop-encoded-array> Definition: list of phandles that specify the subsystems this glink edge needs to receive ssr notifications about. = EXAMPLE qcom,glink { compatible = "qcom,glink"; modem { glink_modem: modem { transport = "smem"; qcom,remote-pid = <1>; qcom,remote-pid = <0>; mboxes = <&apcs_glb 8>; mbox-names = "mpss_smem"; interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_adsp>; }; }; glink_adsp: adsp { transport = "smem"; qcom,remote-pid = <2>; mboxes = <&apcs_glb 4>; mbox-names = "adsp_smem"; interrupts = <GIC_SPI 348 IRQ_TYPE_EDGE_RISING>; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>; }; }; };
arch/arm64/boot/dts/qcom/sm8150.dtsi +64 −15 Original line number Diff line number Diff line Loading @@ -2307,14 +2307,17 @@ #size-cells = <1>; ranges; modem { glink_modem: modem { qcom,remote-pid = <1>; transport = "smem"; mboxes = <&apcs_glb 12>; mbox-names = "mpss_smem"; interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>; modem_qrtr { label = "modem"; qcom,glink-label = "mpss"; qcom,modem_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2327,27 +2330,38 @@ qcom,intents = <0x64 64>; }; modem_ds { qcom,modem_ds { qcom,glink-channels = "DS"; qcom,intents = <0x4000 0x2>; }; qcom,modem_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_adsp>, <&glink_slpi>, <&glink_cdsp>, <&glink_spss>; }; }; adsp { glink_adsp: adsp { qcom,remote-pid = <2>; transport = "smem"; mboxes = <&apcs_glb 8>; mbox-names = "adsp_smem"; interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>; adsp_qrtr { label = "adsp"; qcom,glink-label = "lpass"; qcom,adsp_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 0x4400 2>; }; apr_tal_rpmsg { qcom,apr_tal_rpmsg { qcom,glink-channels = "apr_audio_svc"; qcom,intents = <0x200 20>; }; Loading @@ -2357,16 +2371,26 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,adsp_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_slpi>, <&glink_cdsp>; }; }; dsps { glink_slpi: dsps { qcom,remote-pid = <3>; transport = "smem"; mboxes = <&apcs_glb 24>; mbox-names = "dsps_smem"; interrupts = <GIC_SPI 170 IRQ_TYPE_EDGE_RISING>; dsps_qrtr { label = "slpi"; qcom,glink-label = "dsps"; qcom,slpi_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2378,16 +2402,26 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,slpi_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_adsp>, <&glink_cdsp>; }; }; cdsp { glink_cdsp: cdsp { qcom,remote-pid = <5>; transport = "smem"; mboxes = <&apcs_glb 4>; mbox-names = "cdsp_smem"; interrupts = <GIC_SPI 574 IRQ_TYPE_EDGE_RISING>; cdsp_qrtr { label = "cdsp"; qcom,glink-label = "cdsp"; qcom,cdsp_qrtr { qcom,glink-channels = "IPCRTR"; qcom,intents = <0x800 5 0x2000 3 Loading @@ -2399,9 +2433,16 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x64 64>; }; qcom,cdsp_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>, <&glink_adsp>, <&glink_slpi>; }; }; spss { glink_spss: spss { qcom,remote-pid = <8>; transport = "spss"; mboxes = <&sp_scsr 0>; Loading @@ -2413,6 +2454,14 @@ <0x1885010 0x4>; reg-names = "qcom,spss-addr", "qcom,spss-size"; label = "spss"; qcom,glink-label = "spss"; qcom,spss_glink_ssr { qcom,glink-channels = "glink_ssr"; qcom,notify-edges = <&glink_modem>; }; }; glink_spi_xprt_wdsp: wdsp { Loading @@ -2421,22 +2470,22 @@ tx-descriptors = <0x12000 0x12004>; rx-descriptors = <0x1200c 0x12010>; wdsp_ctrl { qcom,wdsp_ctrl { qcom,glink-channels = "g_glink_ctrl"; qcom,intents = <0x400 1>; }; wdsp_ild { qcom,wdsp_ild { qcom,glink-channels = "g_glink_persistent_data_ild"; }; wdsp_nild { qcom,wdsp_nild { qcom,glink-channels = "g_glink_persistent_data_nild"; }; wdsp_data { qcom,wdsp_data { qcom,glink-channels = "g_glink_audio_data"; qcom,intents = <0x1000 2>; }; Loading
drivers/rpmsg/qcom_glink_native.c +11 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,15 @@ static void qcom_glink_tx_write(struct qcom_glink *glink, glink->tx_pipe->write(glink->tx_pipe, hdr, hlen, data, dlen); } static void qcom_glink_pipe_reset(struct qcom_glink *glink) { if (glink->tx_pipe->reset) glink->tx_pipe->reset(glink->tx_pipe); if (glink->rx_pipe->reset) glink->rx_pipe->reset(glink->rx_pipe); } static int qcom_glink_tx(struct qcom_glink *glink, const void *hdr, size_t hlen, const void *data, size_t dlen, bool wait) Loading Loading @@ -1852,6 +1861,8 @@ void qcom_glink_native_remove(struct qcom_glink *glink) idr_destroy(&glink->lcids); idr_destroy(&glink->rcids); spin_unlock_irqrestore(&glink->idr_lock, flags); qcom_glink_pipe_reset(glink); mbox_free_channel(glink->mbox_chan); } EXPORT_SYMBOL_GPL(qcom_glink_native_remove); Loading
drivers/rpmsg/qcom_glink_native.h +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ struct qcom_glink_pipe { void (*write)(struct qcom_glink_pipe *glink_pipe, const void *hdr, size_t hlen, const void *data, size_t dlen); void (*reset)(struct qcom_glink_pipe *glink_pipe); }; struct qcom_glink; Loading
drivers/rpmsg/qcom_glink_spss.c +12 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ struct glink_spss_pipe { #define to_spss_pipe(p) container_of(p, struct glink_spss_pipe, native) static void glink_spss_reset(struct qcom_glink_pipe *np) { struct glink_spss_pipe *pipe = to_spss_pipe(np); *pipe->head = cpu_to_le32(0); *pipe->tail = cpu_to_le32(0); } static size_t glink_spss_rx_avail(struct qcom_glink_pipe *np) { struct glink_spss_pipe *pipe = to_spss_pipe(np); Loading Loading @@ -210,8 +218,8 @@ static int glink_spss_advertise_cfg(struct device *dev, *spss_addr = cpu_to_le64(addr); *spss_size = cpu_to_le32(size); iounmap(spss_addr); iounmap(spss_size); devm_iounmap(dev, spss_addr); devm_iounmap(dev, spss_size); return 0; } Loading Loading @@ -296,10 +304,12 @@ struct qcom_glink *qcom_glink_spss_register(struct device *parent, rx_pipe->native.avail = glink_spss_rx_avail; rx_pipe->native.peak = glink_spss_rx_peak; rx_pipe->native.advance = glink_spss_rx_advance; rx_pipe->native.reset = glink_spss_reset; rx_pipe->remote_pid = remote_pid; tx_pipe->native.avail = glink_spss_tx_avail; tx_pipe->native.write = glink_spss_tx_write; tx_pipe->native.reset = glink_spss_reset; tx_pipe->remote_pid = remote_pid; *rx_pipe->tail = 0; Loading