linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] at91: add Atmel ISI and ov2640 support on m10/g45 board.
Date: Tue, 6 Sep 2011 08:15:11 +0200	[thread overview]
Message-ID: <20110906061511.GD677@game.jcrosoft.org> (raw)
In-Reply-To: <4C79549CB6F772498162A641D92D532802A0995F@penmb01.corp.atmel.com>

On 16:55 Mon 05 Sep     , Wu, Josh wrote:
> 
> 
> On 09/03/2011 2:22 AM Jean-Christophe PLAGNIOL-VILLARD wrote: 
> 
> >>  
> >>  #include <asm/setup.h>
> >>  #include <asm/mach-types.h>
> >> @@ -194,6 +197,95 @@ static void __init ek_add_device_nand(void)
> >>  	at91_add_device_nand(&ek_nand_data);
> >>  }
> >>  
> >> +/*
> >> + *  ISI
> >> + */
> >> +#if defined(CONFIG_VIDEO_ATMEL_ISI) || defined(CONFIG_VIDEO_ATMEL_ISI_MODULE)
> >> +static struct isi_platform_data __initdata isi_data = {
> >> +	.frate		= ISI_CFG1_FRATE_CAPTURE_ALL,
> >> +	.has_emb_sync	= 0,
> >> +	.emb_crc_sync = 0,
> >> +	.hsync_act_low = 0,
> >> +	.vsync_act_low = 0,
> >> +	.pclk_act_falling = 0,
> >> +	/* to use codec and preview path simultaneously */
> >> +	.isi_full_mode = 1,
> >> +	.data_width_flags = ISI_DATAWIDTH_8 | ISI_DATAWIDTH_10,
> >> +};
> >> +
> >> +static void __init isi_set_clk(void)
> >> +{
> >> +	struct clk *pck1;
> >> +	struct clk *plla;
> >> +
> >> +	pck1 = clk_get(NULL, "pck1");
> >> +	plla = clk_get(NULL, "plla");
> >> +
> >> +	clk_set_parent(pck1, plla);
> >> +	clk_set_rate(pck1, 25000000);
> >> +	clk_enable(pck1);
> 
> > you must not enable the clock always
> 
> > you must enable it just when you need it
> 
> > and manage the clock at the board level really so so
> 
> I see, I will move such clock code to atmel_isi.c driver and add clock name, clock frequence to isi_platform_data structure in next version.
no you miss the idea bind the clkdev

you manage the clock at soc level and then only if it's mandatory at board
level

for the clock rate you pass it to the driver

and let the driver manage when it want to enable/disable the clock

the driver need to have a abtraction of the clock constraint and just request
it and use it

Best Regards,
J.

      reply	other threads:[~2011-09-06  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 10:50 [PATCH] at91: add Atmel ISI and ov2640 support on m10/g45 board Josh Wu
2011-09-02 18:21 ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-05  8:55   ` Wu, Josh
2011-09-06  6:15     ` Jean-Christophe PLAGNIOL-VILLARD [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=20110906061511.GD677@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=linux-arm-kernel@lists.infradead.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).