All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabor Juhos <juhosg@openwrt.org>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH V2 02/16] MIPS: ralink: fix RT305x clock setup
Date: Fri, 12 Apr 2013 10:22:17 +0200	[thread overview]
Message-ID: <5167C439.4090300@openwrt.org> (raw)
In-Reply-To: <1365751663-5725-2-git-send-email-blogic@openwrt.org>

2013.04.12. 9:27 keltezéssel, John Crispin írta:
> Add a few missing clocks.
> 
> Signed-off-by: John Crispin <blogic@openwrt.org>
> ---
>  arch/mips/ralink/rt305x.c |   13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
> index 0a4bbdc..64a0336 100644
> --- a/arch/mips/ralink/rt305x.c
> +++ b/arch/mips/ralink/rt305x.c
> @@ -123,7 +123,8 @@ struct ralink_pinmux gpio_pinmux = {
>  
>  void __init ralink_clk_init(void)
>  {
> -	unsigned long cpu_rate, sys_rate, wdt_rate, uart_rate;
> +	unsigned long cpu_rate, sys_rate, wdt_rate,
> +			uart_rate, wmac_rate = 40000000;

Moving the wmac_rate definition into a separate line would make the code more
readable.

>  	u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);
>  
>  	if (soc_is_rt305x() || soc_is_rt3350()) {
> @@ -176,11 +177,21 @@ void __init ralink_clk_init(void)
>  		BUG();
>  	}
>  
> +	if (soc_is_rt3352() || soc_is_rt5350()) {
> +		u32 val = rt_sysc_r32(RT3352_SYSC_REG_SYSCFG0);
> +
> +		if (!(val & RT3352_CLKCFG0_XTAL_SEL))

Given the fact that the definition of RT3352_SYSC_REG_SYSCFG0 and
RT3352_CLKCFG0_XTAL_SEL is added in a later patch, this code causes a build error?

> +			wmac_rate = 20000000;
> +	}
> +
>  	ralink_clk_add("cpu", cpu_rate);
>  	ralink_clk_add("10000b00.spi", sys_rate);
>  	ralink_clk_add("10000100.timer", wdt_rate);
> +	ralink_clk_add("10000120.watchdog", wdt_rate);
>  	ralink_clk_add("10000500.uart", uart_rate);
>  	ralink_clk_add("10000c00.uartlite", uart_rate);
> +	ralink_clk_add("10100000.ethernet", sys_rate);
> +	ralink_clk_add("wmac@10180000", wmac_rate);

Should not this be "10180000.wmac"?

>  }
>  
>  void __init ralink_of_remap(void)
> 

-Gabor

  reply	other threads:[~2013-04-12  8:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12  7:27 [PATCH V2 01/16] MIPS: ralink: add PCI IRQ handling John Crispin
2013-04-12  7:27 ` [PATCH V2 02/16] MIPS: ralink: fix RT305x clock setup John Crispin
2013-04-12  8:22   ` Gabor Juhos [this message]
2013-04-12  8:21     ` John Crispin
2013-04-12 13:00   ` Sergei Shtylyov
2013-04-12  7:27 ` [PATCH V2 03/16] MIPS: ralink: add missing comment in irq driver John Crispin
2013-04-12  8:24   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 04/16] MIPS: ralink: add RT5350 sdram register defines John Crispin
2013-04-12  8:29   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 05/16] MIPS: ralink: add RT3352 usb " John Crispin
2013-04-12  8:47   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 06/16] MIPS: ralink: extend RT3050 dtsi file John Crispin
2013-04-12  9:22   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 07/16] MIPS: ralink: add RT5350 " John Crispin
2013-04-12  9:25   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 08/16] MIPS: ralink: make early_printk work on RT2880 John Crispin
2013-04-12  9:28   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 09/16] MIPS: ralink: adds support for RT2880 SoC family John Crispin
2013-04-12 11:12   ` Gabor Juhos
2013-04-12 11:19     ` John Crispin
2013-04-12 17:03       ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 10/16] MIPS: ralink: add rt2880 dts files John Crispin
2013-04-12  7:27 ` [PATCH V2 11/16] MIPS: ralink: adds support for RT3883 SoC family John Crispin
2013-04-12 11:13   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 12/16] MIPS: ralink: add rt3883 dts files John Crispin
2013-04-12  7:27 ` [PATCH V2 13/16] MIPS: ralink: adds support for MT7620 SoC family John Crispin
2013-04-12  7:27 ` [PATCH V2 14/16] MIPS: ralink: add MT7620 dts files John Crispin
2013-04-12  7:27 ` [PATCH V2 15/16] MIPS: ralink: add support for periodic timer irq John Crispin
2013-04-12 16:35   ` Gabor Juhos
2013-04-12  7:27 ` [PATCH V2 16/16] MIPS: ralink: add cpu-feature-overrides.h John Crispin
2013-04-12 17:20   ` Gabor Juhos
2013-04-12  8:21 ` [PATCH V2 01/16] MIPS: ralink: add PCI IRQ handling Gabor Juhos

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=5167C439.4090300@openwrt.org \
    --to=juhosg@openwrt.org \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.