diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-02-22 22:09:12 -0700 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 12:15:03 -0700 |
commit | 93340a22943f3169de7d359ea14cd618114da6f6 (patch) | |
tree | e9736b9fb4e9f2fdd31491b2b7a5b3dfe60ed453 /arch/arm/mach-omap2 | |
parent | 7356f0b26b3176610b4de439e8c7bfe10c797347 (diff) |
OMAP2/3/4 clock: fix DPLL multiplier value errors; also copyrights, includes, documentation
The maximum DPLL multiplier (M) values for OMAP2xxx and OMAP3xxx are
one increment higher than they should be. See for example the
OMAP242x TRM Rev X Section 5.10.6 "Clock Generator Registers" and the
OMAP36xx TRM Rev C Table 3-202 "CM_CLKSEL1_PLL". Programming a 0 into
the DPLL's M register bitfield is valid for OMAP2/3 and indicates that
the DPLL should enter MN-bypass mode. Also, increase the minimum
multiplier (M) value for the DPLL rate rounding code from 1 to 2, to
ensure that it does not inadvertently put the DPLL into bypass.
Note that the register documentation in the OMAP2xxx and OMAP3xxx TRMs
does not make clear that the actual DPLL divider value (the "N") is
the content of the appropriate register bitfield for the N value,
_plus one_. (In other words, an N register bitfield of 0 indicates a
DPLL divider value of 1.) This is only clearly documented in the
OMAP4430 TRM, in, for example, OMAP4430 TRM Rev A Table 3-1167
"CM_CLKSEL_DPLL_USB".
While here, update copyrights, add kerneldoc for struct dpll_data,
drop the unused struct dpll_data.max_tolerance field, remove some
unnecessary #includes in DPLL-related code, and replace the #include
of <linux/module.h> with <linux/list.h>, which is what was really
needed. The OMAP4 clock autogenerator script has been updated
accordingly.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/clkt_dpll.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock2xxx_data.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock34xx_data.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/dpll3xxx.c | 4 |
6 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c index 9eee0e67d5d..6ce512e902c 100644 --- a/arch/arm/mach-omap2/clkt_dpll.c +++ b/arch/arm/mach-omap2/clkt_dpll.c @@ -29,7 +29,7 @@ #include "cm-regbits-34xx.h" /* DPLL rate rounding: minimum DPLL multiplier, divider values */ -#define DPLL_MIN_MULTIPLIER 1 +#define DPLL_MIN_MULTIPLIER 2 #define DPLL_MIN_DIVIDER 1 /* Possible error results from _dpll_test_mult */ diff --git a/arch/arm/mach-omap2/clock2xxx_data.c b/arch/arm/mach-omap2/clock2xxx_data.c index 52c7a6c2d9e..f20a4b2bc6f 100644 --- a/arch/arm/mach-omap2/clock2xxx_data.c +++ b/arch/arm/mach-omap2/clock2xxx_data.c @@ -2,7 +2,7 @@ * linux/arch/arm/mach-omap2/clock2xxx_data.c * * Copyright (C) 2005-2009 Texas Instruments, Inc. - * Copyright (C) 2004-2009 Nokia Corporation + * Copyright (C) 2004-2010 Nokia Corporation * * Contacts: * Richard Woodruff <r-woodruff2@ti.com> @@ -13,9 +13,9 @@ * published by the Free Software Foundation. */ -#include <linux/module.h> #include <linux/kernel.h> #include <linux/clk.h> +#include <linux/list.h> #include <plat/clkdev_omap.h> @@ -107,7 +107,7 @@ static struct dpll_data dpll_dd = { .clk_ref = &sys_ck, .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), .enable_mask = OMAP24XX_EN_DPLL_MASK, - .max_multiplier = 1024, + .max_multiplier = 1023, .min_divider = 1, .max_divider = 16, .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c index da71ef17cb1..94f603b16c5 100644 --- a/arch/arm/mach-omap2/clock34xx_data.c +++ b/arch/arm/mach-omap2/clock34xx_data.c @@ -1,8 +1,8 @@ /* * OMAP3 clock data * - * Copyright (C) 2007-2009 Texas Instruments, Inc. - * Copyright (C) 2007-2009 Nokia Corporation + * Copyright (C) 2007-2010 Texas Instruments, Inc. + * Copyright (C) 2007-2010 Nokia Corporation * * Written by Paul Walmsley * With many device clock fixes by Kevin Hilman and Jouni Högander @@ -16,9 +16,9 @@ * to be requested from drivers directly. */ -#include <linux/module.h> #include <linux/kernel.h> #include <linux/clk.h> +#include <linux/list.h> #include <plat/control.h> #include <plat/clkdev_omap.h> @@ -37,7 +37,7 @@ #define OMAP_CM_REGADDR OMAP34XX_CM_REGADDR /* Maximum DPLL multiplier, divider values for OMAP3 */ -#define OMAP3_MAX_DPLL_MULT 2048 +#define OMAP3_MAX_DPLL_MULT 2047 #define OMAP3630_MAX_JTYPE_DPLL_MULT 4095 #define OMAP3_MAX_DPLL_DIV 128 diff --git a/arch/arm/mach-omap2/clock44xx.h b/arch/arm/mach-omap2/clock44xx.h index efe849416aa..0c739726703 100644 --- a/arch/arm/mach-omap2/clock44xx.h +++ b/arch/arm/mach-omap2/clock44xx.h @@ -2,12 +2,17 @@ * OMAP4 clock function prototypes and macros * * Copyright (C) 2009 Texas Instruments, Inc. + * Copyright (C) 2010 Nokia Corporation */ #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_44XX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK_44XX_H -#define OMAP4430_MAX_DPLL_MULT 2048 +/* + * XXX Missing values for the OMAP4 DPLL_USB + * XXX Missing min_multiplier values for all OMAP4 DPLLs + */ +#define OMAP4430_MAX_DPLL_MULT 2047 #define OMAP4430_MAX_DPLL_DIV 128 int omap4xxx_clk_init(void); diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 8d8b5734095..1abfefff703 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -20,7 +20,7 @@ */ #include <linux/kernel.h> -#include <linux/module.h> +#include <linux/list.h> #include <linux/clk.h> #include <plat/control.h> diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index 417c3caa05d..b32ccd954a1 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -18,7 +18,6 @@ * published by the Free Software Foundation. */ -#include <linux/module.h> #include <linux/kernel.h> #include <linux/device.h> #include <linux/list.h> @@ -26,13 +25,10 @@ #include <linux/delay.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/limits.h> #include <linux/bitops.h> #include <plat/cpu.h> #include <plat/clock.h> -#include <plat/sram.h> -#include <asm/div64.h> #include <asm/clkdev.h> #include "clock.h" |