aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2011-07-09 21:14:46 -0400
committerPaul Walmsley <paul@pwsan.com>2011-07-09 21:14:46 -0400
commit628479a8ea5d32ef26ba0b4eb26f8d6712a574ec (patch)
tree81e5f0b23bb6d880f7aa8cfa2e77475e7a71622a /arch/arm
parent7ecd4228b48192890220e1fd1b39c8bd2988aa80 (diff)
OMAP4: clock data: Fix max mult and div for USB DPLL
The DPLL USB can generate higher speed (x2) than the regular ones. The max multiplication value is then twice the previous value. Fix both max_mult and max_div with that correct values. Change the max_div variable type to u16 to allow storing up to 256. Replace as well the define with the value to avoid unneeded indirection and provide a better readability. Remove the defines that become useless. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/clock44xx.h7
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c29
-rw-r--r--arch/arm/plat-omap/include/plat/clock.h2
3 files changed, 15 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/clock44xx.h b/arch/arm/mach-omap2/clock44xx.h
index 6be1095936db..7ceb870e7ab8 100644
--- a/arch/arm/mach-omap2/clock44xx.h
+++ b/arch/arm/mach-omap2/clock44xx.h
@@ -8,13 +8,6 @@
8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H 8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
9#define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H 9#define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
10 10
11/*
12 * XXX Missing values for the OMAP4 DPLL_USB
13 * XXX Missing min_multiplier values for all OMAP4 DPLLs
14 */
15#define OMAP4430_MAX_DPLL_MULT 2047
16#define OMAP4430_MAX_DPLL_DIV 128
17
18int omap4xxx_clk_init(void); 11int omap4xxx_clk_init(void);
19 12
20#endif 13#endif
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 4b57d55f5a11..8307c9ebd309 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -258,8 +258,8 @@ static struct dpll_data dpll_abe_dd = {
258 .enable_mask = OMAP4430_DPLL_EN_MASK, 258 .enable_mask = OMAP4430_DPLL_EN_MASK,
259 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 259 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
260 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 260 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
261 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 261 .max_multiplier = 2047,
262 .max_divider = OMAP4430_MAX_DPLL_DIV, 262 .max_divider = 128,
263 .min_divider = 1, 263 .min_divider = 1,
264}; 264};
265 265
@@ -434,8 +434,8 @@ static struct dpll_data dpll_core_dd = {
434 .enable_mask = OMAP4430_DPLL_EN_MASK, 434 .enable_mask = OMAP4430_DPLL_EN_MASK,
435 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 435 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
436 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 436 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
437 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 437 .max_multiplier = 2047,
438 .max_divider = OMAP4430_MAX_DPLL_DIV, 438 .max_divider = 128,
439 .min_divider = 1, 439 .min_divider = 1,
440}; 440};
441 441
@@ -672,8 +672,8 @@ static struct dpll_data dpll_iva_dd = {
672 .enable_mask = OMAP4430_DPLL_EN_MASK, 672 .enable_mask = OMAP4430_DPLL_EN_MASK,
673 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 673 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
674 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 674 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
675 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 675 .max_multiplier = 2047,
676 .max_divider = OMAP4430_MAX_DPLL_DIV, 676 .max_divider = 128,
677 .min_divider = 1, 677 .min_divider = 1,
678}; 678};
679 679
@@ -740,8 +740,8 @@ static struct dpll_data dpll_mpu_dd = {
740 .enable_mask = OMAP4430_DPLL_EN_MASK, 740 .enable_mask = OMAP4430_DPLL_EN_MASK,
741 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 741 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
742 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 742 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
743 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 743 .max_multiplier = 2047,
744 .max_divider = OMAP4430_MAX_DPLL_DIV, 744 .max_divider = 128,
745 .min_divider = 1, 745 .min_divider = 1,
746}; 746};
747 747
@@ -813,8 +813,8 @@ static struct dpll_data dpll_per_dd = {
813 .enable_mask = OMAP4430_DPLL_EN_MASK, 813 .enable_mask = OMAP4430_DPLL_EN_MASK,
814 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 814 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
815 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 815 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
816 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 816 .max_multiplier = 2047,
817 .max_divider = OMAP4430_MAX_DPLL_DIV, 817 .max_divider = 128,
818 .min_divider = 1, 818 .min_divider = 1,
819}; 819};
820 820
@@ -949,9 +949,8 @@ static struct dpll_data dpll_unipro_dd = {
949 .enable_mask = OMAP4430_DPLL_EN_MASK, 949 .enable_mask = OMAP4430_DPLL_EN_MASK,
950 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 950 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
951 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 951 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
952 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK, 952 .max_multiplier = 2047,
953 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 953 .max_divider = 128,
954 .max_divider = OMAP4430_MAX_DPLL_DIV,
955 .min_divider = 1, 954 .min_divider = 1,
956}; 955};
957 956
@@ -1017,8 +1016,8 @@ static struct dpll_data dpll_usb_dd = {
1017 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 1016 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
1018 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 1017 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
1019 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK, 1018 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK,
1020 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 1019 .max_multiplier = 4095,
1021 .max_divider = OMAP4430_MAX_DPLL_DIV, 1020 .max_divider = 256,
1022 .min_divider = 1, 1021 .min_divider = 1,
1023}; 1022};
1024 1023
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index 006e599c6613..f57e0649ab30 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -152,7 +152,7 @@ struct dpll_data {
152 u16 max_multiplier; 152 u16 max_multiplier;
153 u8 last_rounded_n; 153 u8 last_rounded_n;
154 u8 min_divider; 154 u8 min_divider;
155 u8 max_divider; 155 u16 max_divider;
156 u8 modes; 156 u8 modes;
157#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) 157#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
158 void __iomem *autoidle_reg; 158 void __iomem *autoidle_reg;