mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Asen Chavdarov Dimov <dimov@ronetix.at>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] pm9g45: fix Ethernet
Date: Thu, 1 Mar 2012 18:08:44 +0100	[thread overview]
Message-ID: <20120301170844.GS12248@game.jcrosoft.org> (raw)
In-Reply-To: <1330618889-11482-1-git-send-email-dimov@ronetix.at>

On 18:21 Thu 01 Mar     , Asen Chavdarov Dimov wrote:
> Enable PHY, MACB and PIOs clocks.
> 
> Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
> ---
>  arch/arm/boards/pm9g45/init.c |   31 +++++++++++++++++++++++++++++++
>  1 files changed, 31 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
> index 480c751..9eba12a 100644
> --- a/arch/arm/boards/pm9g45/init.c
> +++ b/arch/arm/boards/pm9g45/init.c
> @@ -82,6 +82,19 @@ static struct at91_ether_platform_data macb_pdata = {
>  	.phy_addr = 0,
>  };
>  
> +static int phy_init(void)
please keep the function name with pm9g45_xx
> +{
> +	/*
> +	 * PD2 enables the 50MHz oscillator for Ethernet PHY
> +	 * 1 - enable
> +	 * 0 - disable
> +	 */
> +	at91_set_gpio_output(AT91_PIN_PD2, 1);
> +	at91_set_gpio_value(AT91_PIN_PD2, 1);
> +
> +	return 0;
you do not check the return so drop it
> +}
> +
>  static int pm9g45_mem_init(void)
>  {
>  	at91_add_device_sdram(128 * 1024 * 1024);
> @@ -90,9 +103,27 @@ static int pm9g45_mem_init(void)
>  }
>  mem_initcall(pm9g45_mem_init);
>  
> +static const char *periph_clocks[] __initdata = {
> +	"pioA_clk",
> +	"pioB_clk",
> +	"pioC_clk",
> +	"pioDE_clk",
> +	"macb_clk"
> +};
> +
>  static int pm9g45_devices_init(void)
>  {
> +	struct clk *clk;
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) {
> +		clk = clk_get(NULL, periph_clocks[i]);
> +		clk_enable(clk);
> +	}
no need this done automaticaly

Best Regards,
J.

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

  parent reply	other threads:[~2012-03-01 17:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 16:21 Asen Chavdarov Dimov
2012-03-01 16:21 ` [PATCH 2/3] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-01 17:10   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-01 16:21 ` [PATCH 3/3] pm9g45: enable USB OHCI host and USB mass storage Asen Chavdarov Dimov
2012-03-01 17:12   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 15:20     ` RONETIX - Asen Dimov
2012-03-02 17:13       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-01 17:08 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-03-02 16:55 ` [PATCH v2 1/4] pm9g45: boot from NAND Asen Chavdarov Dimov
2012-03-02 16:55   ` [PATCH v2 2/4] pm9g45: fix Ethernet Asen Chavdarov Dimov
2012-03-02 17:19     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 16:55   ` [PATCH v2 3/4] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-02 17:21     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 16:55   ` [PATCH v2 4/4] pm9g45: enable USB OHCI host and USB mass storage Asen Chavdarov Dimov
2012-03-02 17:22     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-02 17:18   ` [PATCH v2 1/4] pm9g45: boot from NAND Jean-Christophe PLAGNIOL-VILLARD
2012-03-08 11:37     ` RONETIX - Asen Dimov
2012-03-08 13:05       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-21 16:43         ` RONETIX - Asen Dimov
2012-03-21 16:27 ` [PATCH v3 " Asen Chavdarov Dimov
2012-03-21 16:27   ` [PATCH v3 2/4] pm9g45: fix Ethernet Asen Chavdarov Dimov
2012-03-21 16:27   ` [PATCH v3 3/4] pm9g45: enable MCI0 Asen Chavdarov Dimov
2012-03-22 20:17     ` Sascha Hauer
2012-03-23 12:55       ` RONETIX - Asen Dimov
2012-03-23 15:18         ` Sascha Hauer
2012-03-21 16:27   ` [PATCH v3 4/4] pm9g45: enable USB OHCI host and USB mass storage Asen Chavdarov Dimov

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=20120301170844.GS12248@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=dimov@ronetix.at \
    /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