From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Josh Wu <josh.wu@atmel.com>
Cc: linux-media@vger.kernel.org, plagnioj@jcrosoft.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, nicolas.ferre@atmel.com,
s.nawrocki@samsung.com
Subject: Re: [PATCH v3 2/2] at91: add Atmel ISI and ov2640 support on sam9m10/sam9g45 board.
Date: Fri, 30 Sep 2011 11:05:36 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1109300857580.1888@axis700.grange> (raw)
In-Reply-To: <1316664661-11383-2-git-send-email-josh.wu@atmel.com>
On Thu, 22 Sep 2011, Josh Wu wrote:
> This patch
> 1. add ISI_MCK parent setting code when add ISI device.
> 2. add ov2640 support on board file.
> 3. define isi_mck clock in sam9g45 chip file.
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Looking a bit more at this, I think, the arch maintainer might want to
take a closer look at this:
1. Wouldn't it be a good idea to also bind the isi_clk via a clock
connection ID and not via the clock's name?
2. pck1 is not really dedicated to ISI on sam9g45. It can also be used,
e.g., as a generic clock output and ISI_PCK can be supplied by an external
oscillator. Such set up seems perfectly valid to me and your patch would
just unconditionally grab PCK1 and configure it to some frequency... I
think, this shall be improved.
3.
> +static int __init isi_set_clk_parent(void)
> +{
> + struct clk *pck1;
> + struct clk *plla;
> + int ret;
> +
> + /* ISI_MCK is supplied by PCK1 - set parent for it. */
> + pck1 = clk_get(NULL, "pck1");
> + if (IS_ERR(pck1)) {
> + printk(KERN_ERR "Failed to get PCK1\n");
> + ret = PTR_ERR(pck1);
> + goto err;
> + }
> +
> + plla = clk_get(NULL, "plla");
> + if (IS_ERR(plla)) {
> + printk(KERN_ERR "Failed to get PLLA\n");
> + ret = PTR_ERR(plla);
> + goto err_pck1;
> + }
> + ret = clk_set_parent(pck1, plla);
> + clk_put(plla);
I think, here you also need a
clk_put(pck1);
> + if (ret != 0) {
> + printk(KERN_ERR "Failed to set PCK1 parent\n");
> + goto err_pck1;
> + }
> + return ret;
> +
> +err_pck1:
> + clk_put(pck1);
> +err:
> + return ret;
> +}
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2011-09-30 9:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 4:11 [PATCH v3 1/2][media] Add code to enable/disable ISI_MCK clock Josh Wu
2011-09-22 4:11 ` [PATCH v3 2/2] at91: add Atmel ISI and ov2640 support on sam9m10/sam9g45 board Josh Wu
2011-09-22 7:35 ` Guennadi Liakhovetski
2011-09-24 5:26 ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-26 9:22 ` Nicolas Ferre
2011-09-26 9:32 ` Guennadi Liakhovetski
2011-09-26 10:57 ` Wu, Josh
2011-09-26 11:21 ` Guennadi Liakhovetski
2011-09-30 9:05 ` Guennadi Liakhovetski [this message]
2011-09-30 9:14 ` [PATCH v3 1/2][media] Add code to enable/disable ISI_MCK clock Guennadi Liakhovetski
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=Pine.LNX.4.64.1109300857580.1888@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=josh.wu@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
--cc=s.nawrocki@samsung.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
all inboxes | Powered by JetHome®