From: Daniel Palmer <daniel@0x0f.com>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Cc: "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)"
<linux-media@vger.kernel.org>,
Robert Beckett <bob.beckett@collabora.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com,
kiril.bicevski@collabora.com,
Nas Chung <nas.chung@chipsnmedia.com>,
lafley.kim@chipsnmedia.com, scott.woo@chipsnmedia.com,
olivier.crete@collabora.com, dan.carpenter@oracle.com,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v3 3/6] staging: media: wave5: Add the v4l2 layer
Date: Sat, 27 Nov 2021 12:04:37 +0900 [thread overview]
Message-ID: <CAFr9PX=FKnuv_YzadHxZTbwAU4ruuwTiUsN6WbwdjD8wF+f1rw@mail.gmail.com> (raw)
In-Reply-To: <20211110120910.12411-4-dafna.hirschfeld@collabora.com>
Hi Dafna,
On Wed, 10 Nov 2021 at 21:09, Dafna Hirschfeld
<dafna.hirschfeld@collabora.com> wrote:
> +static int wave5_vpu_probe(struct platform_device *pdev)
> +{
> + int ret = 0;
> + struct vpu_device *dev;
> + struct resource *res = NULL;
> + const struct wave5_match_data *match_data;
.. snip ...
> + dev->dev = &pdev->dev;
> + dev->product_code = wave5_vdi_read_register(dev, VPU_PRODUCT_CODE_REGISTER);
You access a register here..
> + ret = devm_clk_bulk_get_all(&pdev->dev, &dev->clks);
> +
> + /* continue without clock, assume externally managed */
> + if (ret < 0) {
> + dev_warn(&pdev->dev, "unable to get clocks: %d\n", ret);
> + ret = 0;
> + }
> + dev->num_clks = ret;
> +
> + ret = clk_bulk_prepare_enable(dev->num_clks, dev->clks);
> + if (ret) {
> + dev_err(&pdev->dev, "failed to enable clocks: %d\n", ret);
> + goto err_clk_prep_en;
> + }
but only get and enable the clocks further down.
For anything that needs a clock enabled to access the register and
doesn't have it enabled when probe is called the CPU might lock up.
I found this out while trying to get this code working on another chip
that has one of these IP blocks.
Cheers,
Daniel
next prev parent reply other threads:[~2021-11-27 3:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 12:09 [PATCH v3 0/6] staging: media: wave5: add wave5 codec driver Dafna Hirschfeld
2021-11-10 12:09 ` [PATCH v3 1/6] staging: media: wave5: Add vpuapi layer Dafna Hirschfeld
2021-11-12 9:22 ` Dan Carpenter
2021-11-10 12:09 ` [PATCH v3 2/6] staging: media: wave5: Add the vdi layer Dafna Hirschfeld
2021-11-12 10:30 ` Dan Carpenter
2021-11-10 12:09 ` [PATCH v3 3/6] staging: media: wave5: Add the v4l2 layer Dafna Hirschfeld
2021-11-12 12:10 ` Dan Carpenter
2021-11-24 14:51 ` Dafna Hirschfeld
2021-11-26 5:10 ` kernel test robot
2021-11-27 3:04 ` Daniel Palmer [this message]
2021-11-10 12:09 ` [PATCH v3 4/6] staging: media: wave5: Add TODO file Dafna Hirschfeld
2021-11-10 12:09 ` [PATCH v3 5/6] dt-bindings: media: staging: wave5: add yaml devicetree bindings Dafna Hirschfeld
2021-11-10 12:09 ` [PATCH v3 6/6] media: wave5: Add wave5 driver to maintainers file Dafna Hirschfeld
2021-11-25 15:08 ` [PATCH v3 0/6] staging: media: wave5: add wave5 codec driver Hans Verkuil
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='CAFr9PX=FKnuv_YzadHxZTbwAU4ruuwTiUsN6WbwdjD8wF+f1rw@mail.gmail.com' \
--to=daniel@0x0f.com \
--cc=bob.beckett@collabora.com \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=kiril.bicevski@collabora.com \
--cc=lafley.kim@chipsnmedia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.com \
--cc=olivier.crete@collabora.com \
--cc=rdunlap@infradead.org \
--cc=scott.woo@chipsnmedia.com \
/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).