mbox series

[v3,0/2] dmaengine: qcom: bam_dma: Add "powered remotely" mode for BAM-DMUX

Message ID 20211018102421.19848-1-stephan@gerhold.net (mailing list archive)
Headers show
Series dmaengine: qcom: bam_dma: Add "powered remotely" mode for BAM-DMUX | expand

Message

Stephan Gerhold Oct. 18, 2021, 10:24 a.m. UTC
The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
channels of modems integrated into many older Qualcomm SoCs, e.g.
Qualcomm MSM8916 or MSM8974.

Shortly said, BAM-DMUX is built using a simple protocol layer on top of
a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
a special mode where the modem/remote side is responsible for powering
on the BAM when needed but we are responsible to initialize it.
The BAM is powered off when unneeded by coordinating power control
via bidirectional interrupts from the BAM-DMUX driver.

This series adds one possible solution for handling the "powered remotely"
mode in the bam_dma driver.

For more information about BAM-DMUX itself, see the series on netdev:
https://lore.kernel.org/netdev/20211011141733.3999-5-stephan@gerhold.net/

Changes in v3:
  - Split dmaengine changes to a separate series
  - Address review comments from Bjorn

v2: https://lore.kernel.org/netdev/20211011141733.3999-1-stephan@gerhold.net/
RFC: https://lore.kernel.org/netdev/20210719145317.79692-1-stephan@gerhold.net/


Stephan Gerhold (2):
  dt-bindings: dmaengine: bam_dma: Add "powered remotely" mode
  dmaengine: qcom: bam_dma: Add "powered remotely" mode

 .../devicetree/bindings/dma/qcom_bam_dma.txt  |  2 +
 drivers/dma/qcom/bam_dma.c                    | 90 ++++++++++++-------
 2 files changed, 59 insertions(+), 33 deletions(-)

Comments

Vinod Koul Oct. 25, 2021, 5:48 a.m. UTC | #1
On 18-10-21, 12:24, Stephan Gerhold wrote:
> The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> channels of modems integrated into many older Qualcomm SoCs, e.g.
> Qualcomm MSM8916 or MSM8974.
> 
> Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> a special mode where the modem/remote side is responsible for powering
> on the BAM when needed but we are responsible to initialize it.
> The BAM is powered off when unneeded by coordinating power control
> via bidirectional interrupts from the BAM-DMUX driver.
> 
> This series adds one possible solution for handling the "powered remotely"
> mode in the bam_dma driver.

This looks good me me. Bhupesh/Stephan what was the conclusion on the
the discussion you folks had?

> 
> For more information about BAM-DMUX itself, see the series on netdev:
> https://lore.kernel.org/netdev/20211011141733.3999-5-stephan@gerhold.net/
> 
> Changes in v3:
>   - Split dmaengine changes to a separate series
>   - Address review comments from Bjorn
> 
> v2: https://lore.kernel.org/netdev/20211011141733.3999-1-stephan@gerhold.net/
> RFC: https://lore.kernel.org/netdev/20210719145317.79692-1-stephan@gerhold.net/
> 
> 
> Stephan Gerhold (2):
>   dt-bindings: dmaengine: bam_dma: Add "powered remotely" mode
>   dmaengine: qcom: bam_dma: Add "powered remotely" mode
> 
>  .../devicetree/bindings/dma/qcom_bam_dma.txt  |  2 +
>  drivers/dma/qcom/bam_dma.c                    | 90 ++++++++++++-------
>  2 files changed, 59 insertions(+), 33 deletions(-)
> 
> -- 
> 2.33.0
Stephan Gerhold Oct. 25, 2021, 6:17 a.m. UTC | #2
On Mon, Oct 25, 2021 at 11:18:08AM +0530, Vinod Koul wrote:
> On 18-10-21, 12:24, Stephan Gerhold wrote:
> > The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> > channels of modems integrated into many older Qualcomm SoCs, e.g.
> > Qualcomm MSM8916 or MSM8974.
> > 
> > Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> > a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> > a special mode where the modem/remote side is responsible for powering
> > on the BAM when needed but we are responsible to initialize it.
> > The BAM is powered off when unneeded by coordinating power control
> > via bidirectional interrupts from the BAM-DMUX driver.
> > 
> > This series adds one possible solution for handling the "powered remotely"
> > mode in the bam_dma driver.
> 
> This looks good me me. Bhupesh/Stephan what was the conclusion on the
> the discussion you folks had?
> 

Basically I said I would wait if you still want to take this for 5.16. :)
There is a conflict with the DT schema conversion in Bhupesh's series,
but it's trivial to solve no matter which of the patches is applied first.

Since Bhupesh still needs to send v5 as far as I can tell (and has a
much larger series overall), I think it's fine to apply this one first.

Bhupesh, you can just copy-paste this below qcom,controlled-remotely
in your DT schema if Vinod applies this patch first:

  qcom,powered-remotely:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      Indicates that the bam is powered up by a remote processor
      but must be initialized by the local processor.

Thanks!
Stephan
Bhupesh Sharma Oct. 28, 2021, 6:50 a.m. UTC | #3
Hi Stephan and Vinod,

On Mon, 25 Oct 2021 at 11:47, Stephan Gerhold <stephan@gerhold.net> wrote:
>
> On Mon, Oct 25, 2021 at 11:18:08AM +0530, Vinod Koul wrote:
> > On 18-10-21, 12:24, Stephan Gerhold wrote:
> > > The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> > > channels of modems integrated into many older Qualcomm SoCs, e.g.
> > > Qualcomm MSM8916 or MSM8974.
> > >
> > > Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> > > a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> > > a special mode where the modem/remote side is responsible for powering
> > > on the BAM when needed but we are responsible to initialize it.
> > > The BAM is powered off when unneeded by coordinating power control
> > > via bidirectional interrupts from the BAM-DMUX driver.
> > >
> > > This series adds one possible solution for handling the "powered remotely"
> > > mode in the bam_dma driver.
> >
> > This looks good me me. Bhupesh/Stephan what was the conclusion on the
> > the discussion you folks had?
> >
>
> Basically I said I would wait if you still want to take this for 5.16. :)
> There is a conflict with the DT schema conversion in Bhupesh's series,
> but it's trivial to solve no matter which of the patches is applied first.
>
> Since Bhupesh still needs to send v5 as far as I can tell (and has a
> much larger series overall), I think it's fine to apply this one first.
>
> Bhupesh, you can just copy-paste this below qcom,controlled-remotely
> in your DT schema if Vinod applies this patch first:
>
>   qcom,powered-remotely:
>     $ref: /schemas/types.yaml#/definitions/flag
>     description:
>       Indicates that the bam is powered up by a remote processor
>       but must be initialized by the local processor.

Sure, I can respin my v5 with 'qcom,powered-remotely' property added,
if this series gets applied first. Can I add you S-o-B to the same?

Thanks,
Bhupesh
Stephan Gerhold Oct. 28, 2021, 7:15 a.m. UTC | #4
Hi Bhupesh,

On Thu, Oct 28, 2021 at 12:20:35PM +0530, Bhupesh Sharma wrote:
> On Mon, 25 Oct 2021 at 11:47, Stephan Gerhold <stephan@gerhold.net> wrote:
> >
> > On Mon, Oct 25, 2021 at 11:18:08AM +0530, Vinod Koul wrote:
> > > On 18-10-21, 12:24, Stephan Gerhold wrote:
> > > > The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> > > > channels of modems integrated into many older Qualcomm SoCs, e.g.
> > > > Qualcomm MSM8916 or MSM8974.
> > > >
> > > > Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> > > > a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> > > > a special mode where the modem/remote side is responsible for powering
> > > > on the BAM when needed but we are responsible to initialize it.
> > > > The BAM is powered off when unneeded by coordinating power control
> > > > via bidirectional interrupts from the BAM-DMUX driver.
> > > >
> > > > This series adds one possible solution for handling the "powered remotely"
> > > > mode in the bam_dma driver.
> > >
> > > This looks good me me. Bhupesh/Stephan what was the conclusion on the
> > > the discussion you folks had?
> > >
> >
> > Basically I said I would wait if you still want to take this for 5.16. :)
> > There is a conflict with the DT schema conversion in Bhupesh's series,
> > but it's trivial to solve no matter which of the patches is applied first.
> >
> > Since Bhupesh still needs to send v5 as far as I can tell (and has a
> > much larger series overall), I think it's fine to apply this one first.
> >
> > Bhupesh, you can just copy-paste this below qcom,controlled-remotely
> > in your DT schema if Vinod applies this patch first:
> >
> >   qcom,powered-remotely:
> >     $ref: /schemas/types.yaml#/definitions/flag
> >     description:
> >       Indicates that the bam is powered up by a remote processor
> >       but must be initialized by the local processor.
> 
> Sure, I can respin my v5 with 'qcom,powered-remotely' property added,
> if this series gets applied first.

Thanks!

> Can I add you S-o-B to the same?

I literally just copy-pasted this from "qcom,controlled-remotely" in
your patch with the description from my dt-bindings change that already
has my S-o-B. I don't think it is necessary to add my S-o-B to your
patch as well just for this. :)

Thanks,
Stephan
Bhupesh Sharma Oct. 28, 2021, 7:18 a.m. UTC | #5
On Thu, 28 Oct 2021 at 12:45, Stephan Gerhold <stephan@gerhold.net> wrote:
>
> Hi Bhupesh,
>
> On Thu, Oct 28, 2021 at 12:20:35PM +0530, Bhupesh Sharma wrote:
> > On Mon, 25 Oct 2021 at 11:47, Stephan Gerhold <stephan@gerhold.net> wrote:
> > >
> > > On Mon, Oct 25, 2021 at 11:18:08AM +0530, Vinod Koul wrote:
> > > > On 18-10-21, 12:24, Stephan Gerhold wrote:
> > > > > The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> > > > > channels of modems integrated into many older Qualcomm SoCs, e.g.
> > > > > Qualcomm MSM8916 or MSM8974.
> > > > >
> > > > > Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> > > > > a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> > > > > a special mode where the modem/remote side is responsible for powering
> > > > > on the BAM when needed but we are responsible to initialize it.
> > > > > The BAM is powered off when unneeded by coordinating power control
> > > > > via bidirectional interrupts from the BAM-DMUX driver.
> > > > >
> > > > > This series adds one possible solution for handling the "powered remotely"
> > > > > mode in the bam_dma driver.
> > > >
> > > > This looks good me me. Bhupesh/Stephan what was the conclusion on the
> > > > the discussion you folks had?
> > > >
> > >
> > > Basically I said I would wait if you still want to take this for 5.16. :)
> > > There is a conflict with the DT schema conversion in Bhupesh's series,
> > > but it's trivial to solve no matter which of the patches is applied first.
> > >
> > > Since Bhupesh still needs to send v5 as far as I can tell (and has a
> > > much larger series overall), I think it's fine to apply this one first.
> > >
> > > Bhupesh, you can just copy-paste this below qcom,controlled-remotely
> > > in your DT schema if Vinod applies this patch first:
> > >
> > >   qcom,powered-remotely:
> > >     $ref: /schemas/types.yaml#/definitions/flag
> > >     description:
> > >       Indicates that the bam is powered up by a remote processor
> > >       but must be initialized by the local processor.
> >
> > Sure, I can respin my v5 with 'qcom,powered-remotely' property added,
> > if this series gets applied first.
>
> Thanks!
>
> > Can I add you S-o-B to the same?
>
> I literally just copy-pasted this from "qcom,controlled-remotely" in
> your patch with the description from my dt-bindings change that already
> has my S-o-B. I don't think it is necessary to add my S-o-B to your
> patch as well just for this. :)

Great, thanks. I will handle the "qcom,controlled-remotely" in my v5 patchset.

Otherwise, the series looks good to me, so:
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Regards.
Vinod Koul Oct. 28, 2021, 5:12 p.m. UTC | #6
On 18-10-21, 12:24, Stephan Gerhold wrote:
> The BAM Data Multiplexer (BAM-DMUX) provides access to the network data
> channels of modems integrated into many older Qualcomm SoCs, e.g.
> Qualcomm MSM8916 or MSM8974.
> 
> Shortly said, BAM-DMUX is built using a simple protocol layer on top of
> a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in
> a special mode where the modem/remote side is responsible for powering
> on the BAM when needed but we are responsible to initialize it.
> The BAM is powered off when unneeded by coordinating power control
> via bidirectional interrupts from the BAM-DMUX driver.
> 
> This series adds one possible solution for handling the "powered remotely"
> mode in the bam_dma driver.

Applied, thanks