diff options
author | Ben Dooks <ben-linux@fluff.org> | 2005-08-29 17:46:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-08-29 17:46:30 -0400 |
commit | d6b0bf213b4be478029b768fcee80058ace7150a (patch) | |
tree | e963fa53b688c1c8001d9da2e764cd57d62fcb4b | |
parent | bdf82b59c5dcf04bbdbd1938eefca14dd9cb44d3 (diff) |
[ARM] 2855/1: S3C2410 - add CLKSLOW definitions, and show in init
Patch from Ben Dooks
Add the definitions for the S3C2410_CLKSLOW registers to
the header files, and show the values when the system
starts up
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-s3c2410/clock.c | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-clock.h | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index 9a66050e887d..f59608268751 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -388,6 +388,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
388 | unsigned long hclk, | 388 | unsigned long hclk, |
389 | unsigned long pclk) | 389 | unsigned long pclk) |
390 | { | 390 | { |
391 | unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); | ||
391 | struct clk *clkp = init_clocks; | 392 | struct clk *clkp = init_clocks; |
392 | int ptr; | 393 | int ptr; |
393 | int ret; | 394 | int ret; |
@@ -446,5 +447,13 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
446 | } | 447 | } |
447 | } | 448 | } |
448 | 449 | ||
450 | /* show the clock-slow value */ | ||
451 | |||
452 | printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n", | ||
453 | print_mhz(xtal / ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))), | ||
454 | (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast", | ||
455 | (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", | ||
456 | (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); | ||
457 | |||
449 | return 0; | 458 | return 0; |
450 | } | 459 | } |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index e5e938b79acc..16f4c3cc1388 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs-clock.h | 1 | /* linux/include/asm/arch-s3c2410/regs-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003,2004,2005 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://armlinux.simtec.co.uk/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -17,6 +17,7 @@ | |||
17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion | 17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion |
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | 18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) |
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | 19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA |
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #ifndef __ASM_ARM_REGS_CLOCK | 23 | #ifndef __ASM_ARM_REGS_CLOCK |
@@ -74,6 +75,12 @@ | |||
74 | #define S3C2410_CLKDIVN_PDIVN (1<<0) | 75 | #define S3C2410_CLKDIVN_PDIVN (1<<0) |
75 | #define S3C2410_CLKDIVN_HDIVN (1<<1) | 76 | #define S3C2410_CLKDIVN_HDIVN (1<<1) |
76 | 77 | ||
78 | #define S3C2410_CLKSLOW_UCLK_OFF (1<<7) | ||
79 | #define S3C2410_CLKSLOW_MPLL_OFF (1<<5) | ||
80 | #define S3C2410_CLKSLOW_SLOW (1<<4) | ||
81 | #define S3C2410_CLKSLOW_SLOWVAL(x) (x) | ||
82 | #define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) | ||
83 | |||
77 | #ifndef __ASSEMBLY__ | 84 | #ifndef __ASSEMBLY__ |
78 | 85 | ||
79 | static inline unsigned int | 86 | static inline unsigned int |