mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] at91: implement clock framework
Date: Tue, 3 Aug 2010 22:23:11 +0200	[thread overview]
Message-ID: <20100803202311.GO14113@pengutronix.de> (raw)
In-Reply-To: <1280840019-11421-3-git-send-email-plagnioj@jcrosoft.com>

Hi Jean-Christophe,

That was fast ;)

On Tue, Aug 03, 2010 at 02:53:39PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> this implementation is based on linux one
> it will calculate all the clock dynamically instead of statictly
> this will use also the new clock framework

I think it's a good idea to leave a pointer to the Linux version this
code is from. This will help us find relevant changes for barebox in the
Linux history.

> 
> +
> +static struct clk *periph_clocks[] = {
> +	&pioA_clk,
> +	&pioB_clk,
> +	&pioC_clk,
> +	&adc_clk,
> +	&usart0_clk,
> +	&usart1_clk,
> +	&usart2_clk,
> +	&mmc_clk,
> +	&udc_clk,
> +	&twi_clk,
> +	&spi0_clk,
> +	&spi1_clk,
> +	&ssc_clk,
> +	&tc0_clk,
> +	&tc1_clk,
> +	&tc2_clk,
> +	&ohci_clk,
> +	&macb_clk,
> +	&isi_clk,
> +	&usart3_clk,
> +	&usart4_clk,
> +	&usart5_clk,
> +	&tc3_clk,
> +	&tc4_clk,
> +	&tc5_clk,
> +	// irq0 .. irq2
> +};
> +
> +/*
> + * The two programmable clocks.
> + * You must configure pin multiplexing to bring these signals out.
> + */
> +static struct clk pck0 = {
> +	.name		= "pck0",
> +	.pmc_mask	= AT91_PMC_PCK0,
> +	.type		= CLK_TYPE_PROGRAMMABLE,
> +	.id		= 0,
> +};
> +static struct clk pck1 = {
> +	.name		= "pck1",
> +	.pmc_mask	= AT91_PMC_PCK1,
> +	.type		= CLK_TYPE_PROGRAMMABLE,
> +	.id		= 1,
> +};
> +
> +static void __init at91sam9260_register_clocks(void)
> +{
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
> +		clk_register(periph_clocks[i]);
> +
> +	clk_register(&pck0);
> +	clk_register(&pck1);

Any special reason these are not registered in the array above other
that they are not peripheral clocks?
I just saw that it's the same in Linux, so probably this is the reason.

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-08-03 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 12:51 [PATCH 0/3] introduce clk framework Jean-Christophe PLAGNIOL-VILLARD
2010-08-03 12:53 ` [PATCH 1/3] initcall: add postconsole_initcall Jean-Christophe PLAGNIOL-VILLARD
2010-08-03 12:53   ` [PATCH 2/3] clock: Introduce clock framework from Linux Jean-Christophe PLAGNIOL-VILLARD
2010-08-03 12:53     ` [PATCH 3/3] at91: implement clock framework Jean-Christophe PLAGNIOL-VILLARD
2010-08-03 20:23       ` Sascha Hauer [this message]
2010-08-04  1:33       ` [PATCH 3/3 v2] " Jean-Christophe PLAGNIOL-VILLARD
2010-08-04  5:20         ` Baruch Siach
2010-08-04  6:06           ` Jean-Christophe PLAGNIOL-VILLARD
2010-08-04  6:12         ` [PATCH 3/3 v3] " Jean-Christophe PLAGNIOL-VILLARD
2010-08-29 16:53   ` [PATCH V2] initcall: add postconsole_initcall Jean-Christophe PLAGNIOL-VILLARD
2010-08-30  1:21     ` [PATCH V3] " Jean-Christophe PLAGNIOL-VILLARD

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=20100803202311.GO14113@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.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