Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1352962 > unrolled thread

[PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()

Started byVineet Gupta <Vineet.Gupta1@synopsys.com>
First post2016-03-08 13:30 +0100
Last post2016-03-08 15:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-08 13:30 +0100
    Re: [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() christian.ruppert@alitech.com - 2016-03-08 15:00 +0100

#1352962 — [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()

FromVineet Gupta <Vineet.Gupta1@synopsys.com>
Date2016-03-08 13:30 +0100
Subject[PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()
Message-ID<raoVZ-Mw-27@gated-at.bofh.it>
From: Alexey Brodkin <abrodkin@synopsys.com>

UARTs usually have fixed clock so we're switching to use of
constant values instead of something derived from core clock
frequency.

Among other things this will allow us to get rid of
arc_{get|set}_core_freq() and switch to generic clock
framework later on.

Cc: Christian Ruppert <christian.ruppert@alitech.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
Changes v1 -> v2
 - Base baud TB10x needs to be 166.66 not 166.67	[Christian]

v1:
 - http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000453.html

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/kernel/devtree.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
index 7e844fd8213f..fecbc96df828 100644
--- a/arch/arc/kernel/devtree.c
+++ b/arch/arc/kernel/devtree.c
@@ -28,14 +28,12 @@ unsigned int __init arc_early_base_baud(void)
 
 static void __init arc_set_early_base_baud(unsigned long dt_root)
 {
-	unsigned int core_clk = arc_get_core_freq();
-
 	if (of_flat_dt_is_compatible(dt_root, "abilis,arc-tb10x"))
-		arc_base_baud = core_clk/3;
+		arc_base_baud = 166666666;	/* Fixed 166.6MHz clk (TB10x) */
 	else if (of_flat_dt_is_compatible(dt_root, "snps,arc-sdp"))
 		arc_base_baud = 33333333;	/* Fixed 33MHz clk (AXS10x) */
 	else
-		arc_base_baud = core_clk;
+		arc_base_baud = 50000000;	/* Fixed default 50MHz */
 }
 #else
 #define arc_set_early_base_baud(dt_root)
-- 
2.5.0

[toc] | [next] | [standalone]


#1353066

Fromchristian.ruppert@alitech.com
Date2016-03-08 15:00 +0100
Message-ID<raql5-1Bi-31@gated-at.bofh.it>
In reply to#1352962
Vineet Gupta <Vineet.Gupta1@synopsys.com> wrote on 08.03.2016 13:26:10:
> From: Alexey Brodkin <abrodkin@synopsys.com>
> 
> UARTs usually have fixed clock so we're switching to use of
> constant values instead of something derived from core clock
> frequency.
> 
> Among other things this will allow us to get rid of
> arc_{get|set}_core_freq() and switch to generic clock
> framework later on.
> 
> Cc: Christian Ruppert <christian.ruppert@alitech.com>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

Acked-by: Christian Ruppert <christian.ruppert@alitech.com>

> ---
> Changes v1 -> v2
>  - Base baud TB10x needs to be 166.66 not 166.67   [Christian]
> 
> v1:
>  - http://lists.infradead.org/pipermail/linux-snps-arc/2016-
> February/000453.html
> 
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> ---
>  arch/arc/kernel/devtree.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
> index 7e844fd8213f..fecbc96df828 100644
> --- a/arch/arc/kernel/devtree.c
> +++ b/arch/arc/kernel/devtree.c
> @@ -28,14 +28,12 @@ unsigned int __init arc_early_base_baud(void)
> 
>  static void __init arc_set_early_base_baud(unsigned long dt_root)
>  {
> -   unsigned int core_clk = arc_get_core_freq();
> -
>     if (of_flat_dt_is_compatible(dt_root, "abilis,arc-tb10x"))
> -      arc_base_baud = core_clk/3;
> +      arc_base_baud = 166666666;   /* Fixed 166.6MHz clk (TB10x) */
>     else if (of_flat_dt_is_compatible(dt_root, "snps,arc-sdp"))
>        arc_base_baud = 33333333;   /* Fixed 33MHz clk (AXS10x) */
>     else
> -      arc_base_baud = core_clk;
> +      arc_base_baud = 50000000;   /* Fixed default 50MHz */
>  }
>  #else
>  #define arc_set_early_base_baud(dt_root)
> -- 
> 2.5.0
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web