Commit d6b0bf21 authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[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: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent bdf82b59
...@@ -388,6 +388,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, ...@@ -388,6 +388,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
unsigned long hclk, unsigned long hclk,
unsigned long pclk) unsigned long pclk)
{ {
unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
struct clk *clkp = init_clocks; struct clk *clkp = init_clocks;
int ptr; int ptr;
int ret; int ret;
...@@ -446,5 +447,13 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, ...@@ -446,5 +447,13 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
} }
} }
/* show the clock-slow value */
printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n",
print_mhz(xtal / ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))),
(clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast",
(clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
(clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
return 0; return 0;
} }
/* linux/include/asm/arch-s3c2410/regs-clock.h /* linux/include/asm/arch-s3c2410/regs-clock.h
* *
* Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk> * Copyright (c) 2003,2004,2005 Simtec Electronics <linux@simtec.co.uk>
* http://www.simtec.co.uk/products/SWLINUX/ * http://armlinux.simtec.co.uk/
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion
* 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat)
* 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA
* 27-Aug-2005 Ben Dooks Add clock-slow info
*/ */
#ifndef __ASM_ARM_REGS_CLOCK #ifndef __ASM_ARM_REGS_CLOCK
...@@ -74,6 +75,12 @@ ...@@ -74,6 +75,12 @@
#define S3C2410_CLKDIVN_PDIVN (1<<0) #define S3C2410_CLKDIVN_PDIVN (1<<0)
#define S3C2410_CLKDIVN_HDIVN (1<<1) #define S3C2410_CLKDIVN_HDIVN (1<<1)
#define S3C2410_CLKSLOW_UCLK_OFF (1<<7)
#define S3C2410_CLKSLOW_MPLL_OFF (1<<5)
#define S3C2410_CLKSLOW_SLOW (1<<4)
#define S3C2410_CLKSLOW_SLOWVAL(x) (x)
#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline unsigned int static inline unsigned int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment