From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video, ipu: make ldb clock frequenz overwriteable through board code
Date: Fri, 17 Apr 2015 08:53:10 -0700 [thread overview]
Message-ID: <55312C66.8060705@boundarydevices.com> (raw)
In-Reply-To: <5530BC0B.6050301@denx.de>
Hi Heiko,
On 04/17/2015 12:53 AM, Heiko Schocher wrote:
>>> +int ipu_set_ldb_clock(int rate);
>>> #endif
>>> diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
>>> index 1a209d4..dc054bc 100644
>>> --- a/drivers/video/ipu_common.c
>>> +++ b/drivers/video/ipu_common.c
>>> @@ -1198,3 +1198,14 @@ ipu_color_space_t
>>> format_to_colorspace(uint32_t fmt)
>>> }
>>> return RGB;
>>> }
>>> +
>>> +/* should removed when clk framework is availiable */
>>> +int ipu_set_ldb_clock(int rate)
>>> +{
>>
>> This forces a tight dependency on when this is called that
>> using ldb_clk directly would prevent.
>
> Sorry, did not understand you here ...
>
The variable g_ldb is initialized in ipu_probe(), so this routine
must be called at a very particular time.
You must have noticed it, since you put in a check for NULL.
>>> + if (g_ldb_clk == NULL)
>>> + return -ENOENT;
>>> +
If you replace this with ldb_clk.rate, the dependency goes
away.
>>> + g_ldb_clk->rate = rate;
>>> +
>>> + return 0;
>>> +}
>>>
Separately, I don't see any reason not to have g_ldb_clk
statically initialized... i.e.
struct clk *g_ldb_clk = &ldb_clk;
prev parent reply other threads:[~2015-04-17 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-12 8:19 [U-Boot] [PATCH] video, ipu: make ldb clock frequenz overwriteable through board code Heiko Schocher
2015-04-16 0:27 ` Eric Nelson
2015-04-17 7:53 ` Heiko Schocher
2015-04-17 15:53 ` Eric Nelson [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=55312C66.8060705@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--cc=u-boot@lists.denx.de \
/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