Message ID | 20180912152702.14640-1-l.stach@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | soc: imx: gpc: set DMA mask for PD platform devices | expand |
Hi Lucas, On Wed, Sep 12, 2018 at 12:27 PM, Lucas Stach <l.stach@pengutronix.de> wrote: > The PD platform devices aren't DMA capable (as is correctly reflected > in with a zero mask coherent_dma_mask). As they have a of_node attached > they will go through of_dma_configure, which will warn if it finds an > uninitialized DMA mask. Let the driver core know that this isn't a > missing configuration, but a non DMA capable device by pointing the > dma_mask to the coherent_dma_mask. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> This fixes the following warnings seen on imx6q-sabresd: [ 1.323046] imx-pgc-pd imx-pgc-power-domain.0: DMA mask not set [ 1.323700] imx-pgc-pd imx-pgc-power-domain.1: DMA mask not set Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
On Wed, Sep 12, 2018 at 05:27:02PM +0200, Lucas Stach wrote: > The PD platform devices aren't DMA capable (as is correctly reflected > in with a zero mask coherent_dma_mask). As they have a of_node attached > they will go through of_dma_configure, which will warn if it finds an > uninitialized DMA mask. Let the driver core know that this isn't a > missing configuration, but a non DMA capable device by pointing the > dma_mask to the coherent_dma_mask. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- > Since the warning that is triggered with the incomplete configuration > has been introduced in the v4.19 cycle, it would nice to get this in > as a fix. Applied as a fix, thanks.
Hi Shawn, On Tue, Sep 25, 2018 at 11:41 PM Shawn Guo <shawnguo@kernel.org> wrote: > > On Wed, Sep 12, 2018 at 05:27:02PM +0200, Lucas Stach wrote: > > The PD platform devices aren't DMA capable (as is correctly reflected > > in with a zero mask coherent_dma_mask). As they have a of_node attached > > they will go through of_dma_configure, which will warn if it finds an > > uninitialized DMA mask. Let the driver core know that this isn't a > > missing configuration, but a non DMA capable device by pointing the > > dma_mask to the coherent_dma_mask. > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > --- > > Since the warning that is triggered with the incomplete configuration > > has been introduced in the v4.19 cycle, it would nice to get this in > > as a fix. > > Applied as a fix, thanks. Did you forget to push this change? I still don't see it applied.
Hi Fabio, Am Donnerstag, den 24.01.2019, 09:46 -0200 schrieb Fabio Estevam: > Hi Shawn, > > On Tue, Sep 25, 2018 at 11:41 PM Shawn Guo <shawnguo@kernel.org> > wrote: > > > > On Wed, Sep 12, 2018 at 05:27:02PM +0200, Lucas Stach wrote: > > > The PD platform devices aren't DMA capable (as is correctly > > > reflected > > > in with a zero mask coherent_dma_mask). As they have a of_node > > > attached > > > they will go through of_dma_configure, which will warn if it > > > finds an > > > uninitialized DMA mask. Let the driver core know that this isn't > > > a > > > missing configuration, but a non DMA capable device by pointing > > > the > > > dma_mask to the coherent_dma_mask. > > > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > > > --- > > > Since the warning that is triggered with the incomplete > > > configuration > > > has been introduced in the v4.19 cycle, it would nice to get this > > > in > > > as a fix. > > > > Applied as a fix, thanks. > > Did you forget to push this change? I still don't see it applied. It was dropped due to discussion in the pull request: https://patchwork.kernel.org/patch/10621589/ It seems we are stuck there and I don't have the bandwidth to follow up with this currently. Regards, Lucas
Hi Lucas, On Thu, Jan 24, 2019 at 12:34 PM Lucas Stach <l.stach@pengutronix.de> wrote: > It was dropped due to discussion in the pull request: > > https://patchwork.kernel.org/patch/10621589/ > > It seems we are stuck there and I don't have the bandwidth to follow up > with this currently. Understood. Thanks for the clarification.
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c index f301fcd96c07..a897c851f305 100644 --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -493,6 +493,7 @@ static int imx_gpc_probe(struct platform_device *pdev) pd_pdev->dev.parent = &pdev->dev; pd_pdev->dev.of_node = np; + pd_pdev->dev.dma_mask = &pd_pdev->dev.coherent_dma_mask; ret = platform_device_add(pd_pdev); if (ret) {
The PD platform devices aren't DMA capable (as is correctly reflected in with a zero mask coherent_dma_mask). As they have a of_node attached they will go through of_dma_configure, which will warn if it finds an uninitialized DMA mask. Let the driver core know that this isn't a missing configuration, but a non DMA capable device by pointing the dma_mask to the coherent_dma_mask. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- Since the warning that is triggered with the incomplete configuration has been introduced in the v4.19 cycle, it would nice to get this in as a fix. --- drivers/soc/imx/gpc.c | 1 + 1 file changed, 1 insertion(+)