Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: 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 10:21:42 +0200
Message-ID: <CAMuHMdWnnWTgnrjbSSxkg1rUadosijZyrfB8LQk5zWhzmg3WtQ@mail.gmail.com> (raw)
In-Reply-To: <20190814145417.30670-1-laurent.pinchart+renesas@ideasonboard.com>

Hi Laurent,

On Wed, Aug 14, 2019 at 4:55 PM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> 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?

> +
> +       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);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 14:54 Laurent Pinchart
2019-08-16  8:07 ` Kieran Bingham
2019-08-16 12:34   ` Laurent Pinchart
2019-08-16  8:21 ` Geert Uytterhoeven [this message]
2019-08-16 12:44   ` Laurent Pinchart

Reply instructions:

You may reply publically 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=CAMuHMdWnnWTgnrjbSSxkg1rUadosijZyrfB8LQk5zWhzmg3WtQ@mail.gmail.com \
    --to=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

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox