Re: [PATCH v2] v4l: rcar-fcp: Read IP version register at probe time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

On Fri, Aug 16, 2019 at 10:21:42AM +0200, Geert Uytterhoeven wrote:
> On Wed, Aug 14, 2019 at 4:55 PM Laurent Pinchart wrote:
> > This helps identifying the IP core version, for debugging purpose only
> > for now.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> 
> > --- a/drivers/media/platform/rcar-fcp.c
> > +++ b/drivers/media/platform/rcar-fcp.c
> 
> > @@ -138,6 +167,18 @@ static int rcar_fcp_probe(struct platform_device *pdev)
> >
> >         pm_runtime_enable(&pdev->dev);
> >
> > +       fcp->iomem = devm_platform_ioremap_resource(pdev, 0);
> > +       if (IS_ERR(fcp->iomem))
> > +               return PTR_ERR(fcp->iomem);
> > +
> > +       pm_runtime_get_sync(&pdev->dev);
> > +       version = rcar_fcp_read(fcp, FCP_VCR);
> > +       pm_runtime_put(&pdev->dev);
> 
> Unless (dynamic) debugging is enabled, all of the above is done for obtaining
> a version number that is not used.
> Can this be improved?

With FCNL support we'll need that anyway.

This patch comes from a larger FCNL series that rejects devices with an
unknown version, and I thought it could be fast-tracked in a stripped
form already. I don't mind either way, I can wait until it's time to
merge FCNL support.

> > +
> > +       dev_dbg(&pdev->dev, "FCP category %u revision %u\n",
> > +               (version & FCP_VCR_CATEGORY_MASK) >> FCP_VCR_CATEGORY_SHIFT,
> > +               (version & FCP_VCR_REVISION_MASK) >> FCP_VCR_REVISION_SHIFT);
> > +
> >         mutex_lock(&fcp_lock);
> >         list_add_tail(&fcp->list, &fcp_devices);
> >         mutex_unlock(&fcp_lock);

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux