linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v2] v4l: rcar-fcp: Read IP version register at probe time
Date: Fri, 16 Aug 2019 15:44:12 +0300	[thread overview]
Message-ID: <20190816124412.GG5020@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAMuHMdWnnWTgnrjbSSxkg1rUadosijZyrfB8LQk5zWhzmg3WtQ@mail.gmail.com>

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@ideasonboard.com>
> 
> > --- 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

      reply	other threads:[~2019-08-16 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 14:54 [PATCH v2] v4l: rcar-fcp: Read IP version register at probe time Laurent Pinchart
2019-08-16  8:07 ` Kieran Bingham
2019-08-16 12:34   ` Laurent Pinchart
2019-08-16  8:21 ` Geert Uytterhoeven
2019-08-16 12:44   ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190816124412.GG5020@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).