aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-12 18:33:15 -0500
committerOlof Johansson <olof@lixom.net>2013-02-12 18:33:15 -0500
commit488c77c961e65894d864af4da720a880a5fbb066 (patch)
tree87bf0d4b7b3f8f365009eac6a16feb4d80c91ce7 /arch/arm/mach-omap2
parent379095930b0383e48be6da308e041aca8860c72d (diff)
parent14211e2fd223212ee6498a707e01ac45fef22b10 (diff)
Merge tag 'omap-for-v3.9/clock-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into late/omap
From Tony Lindgren: omap clock changes via Paul Walmsley <paul@pwsan.com>: Some miscellaneous OMAP2+ clock fixes, mostly related to the recent common clock framework conversion. Basic test logs are available here: http://www.pwsan.com/omap/testlogs/clock_devel_a_3.9/20130208120108/ * tag 'omap-for-v3.9/clock-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP4: clock data: Add missing clkdm association for dpll_usb ARM: OMAP AM33XX: clock data: SET_RATE_PARENT in lcd path ARM: OMAP2+: clock data: add DEFINE_STRUCT_CLK_FLAGS helper ARM: OMAP2+: dpll: am335x - avoid freqsel omap3isp: Set cam_mclk rate directly ARM: OMAP3: clock: Back-propagate rate change from cam_mclk to dpll4_m5
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/cclock33xx_data.c10
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c10
-rw-r--r--arch/arm/mach-omap2/cclock44xx_data.c13
-rw-r--r--arch/arm/mach-omap2/clock.h11
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c5
5 files changed, 41 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index ea64ad606759..476b82066cb6 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
284 * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2 284 * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
285 * and ALT_CLK1/2) 285 * and ALT_CLK1/2)
286 */ 286 */
287DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0, 287DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
288 AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT, 288 CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
289 AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL); 289 AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
290 CLK_DIVIDER_ONE_BASED, NULL);
290 291
291/* DPLL_PER */ 292/* DPLL_PER */
292static struct dpll_data dpll_per_dd = { 293static struct dpll_data dpll_per_dd = {
@@ -723,7 +724,8 @@ static struct clk_hw_omap lcd_gclk_hw = {
723 .clksel_mask = AM33XX_CLKSEL_0_1_MASK, 724 .clksel_mask = AM33XX_CLKSEL_0_1_MASK,
724}; 725};
725 726
726DEFINE_STRUCT_CLK(lcd_gclk, lcd_ck_parents, gpio_fck_ops); 727DEFINE_STRUCT_CLK_FLAGS(lcd_gclk, lcd_ck_parents,
728 gpio_fck_ops, CLK_SET_RATE_PARENT);
727 729
728DEFINE_CLK_FIXED_FACTOR(mmc_clk, "dpll_per_m2_ck", &dpll_per_m2_ck, 0x0, 1, 2); 730DEFINE_CLK_FIXED_FACTOR(mmc_clk, "dpll_per_m2_ck", &dpll_per_m2_ck, 0x0, 1, 2);
729 731
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index 6ef87580c33f..4579c3c5338f 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -426,6 +426,7 @@ static struct clk dpll4_m5x2_ck_3630 = {
426 .parent_names = dpll4_m5x2_ck_parent_names, 426 .parent_names = dpll4_m5x2_ck_parent_names,
427 .num_parents = ARRAY_SIZE(dpll4_m5x2_ck_parent_names), 427 .num_parents = ARRAY_SIZE(dpll4_m5x2_ck_parent_names),
428 .ops = &dpll4_m5x2_ck_3630_ops, 428 .ops = &dpll4_m5x2_ck_3630_ops,
429 .flags = CLK_SET_RATE_PARENT,
429}; 430};
430 431
431static struct clk cam_mclk; 432static struct clk cam_mclk;
@@ -443,7 +444,14 @@ static struct clk_hw_omap cam_mclk_hw = {
443 .clkdm_name = "cam_clkdm", 444 .clkdm_name = "cam_clkdm",
444}; 445};
445 446
446DEFINE_STRUCT_CLK(cam_mclk, cam_mclk_parent_names, aes2_ick_ops); 447static struct clk cam_mclk = {
448 .name = "cam_mclk",
449 .hw = &cam_mclk_hw.hw,
450 .parent_names = cam_mclk_parent_names,
451 .num_parents = ARRAY_SIZE(cam_mclk_parent_names),
452 .ops = &aes2_ick_ops,
453 .flags = CLK_SET_RATE_PARENT,
454};
447 455
448static const struct clksel_rate clkout2_src_core_rates[] = { 456static const struct clksel_rate clkout2_src_core_rates[] = {
449 { .div = 1, .val = 0, .flags = RATE_IN_3XXX }, 457 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
index cebe2b31943e..3d58f335f173 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -605,15 +605,26 @@ static const char *dpll_usb_ck_parents[] = {
605 605
606static struct clk dpll_usb_ck; 606static struct clk dpll_usb_ck;
607 607
608static const struct clk_ops dpll_usb_ck_ops = {
609 .enable = &omap3_noncore_dpll_enable,
610 .disable = &omap3_noncore_dpll_disable,
611 .recalc_rate = &omap3_dpll_recalc,
612 .round_rate = &omap2_dpll_round_rate,
613 .set_rate = &omap3_noncore_dpll_set_rate,
614 .get_parent = &omap2_init_dpll_parent,
615 .init = &omap2_init_clk_clkdm,
616};
617
608static struct clk_hw_omap dpll_usb_ck_hw = { 618static struct clk_hw_omap dpll_usb_ck_hw = {
609 .hw = { 619 .hw = {
610 .clk = &dpll_usb_ck, 620 .clk = &dpll_usb_ck,
611 }, 621 },
612 .dpll_data = &dpll_usb_dd, 622 .dpll_data = &dpll_usb_dd,
623 .clkdm_name = "l3_init_clkdm",
613 .ops = &clkhwops_omap3_dpll, 624 .ops = &clkhwops_omap3_dpll,
614}; 625};
615 626
616DEFINE_STRUCT_CLK(dpll_usb_ck, dpll_usb_ck_parents, dpll_ck_ops); 627DEFINE_STRUCT_CLK(dpll_usb_ck, dpll_usb_ck_parents, dpll_usb_ck_ops);
617 628
618static const char *dpll_usb_clkdcoldo_ck_parents[] = { 629static const char *dpll_usb_clkdcoldo_ck_parents[] = {
619 "dpll_usb_ck", 630 "dpll_usb_ck",
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index b40204837bd7..60ddd8612b4d 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -65,6 +65,17 @@ struct clockdomain;
65 .ops = &_clkops_name, \ 65 .ops = &_clkops_name, \
66 }; 66 };
67 67
68#define DEFINE_STRUCT_CLK_FLAGS(_name, _parent_array_name, \
69 _clkops_name, _flags) \
70 static struct clk _name = { \
71 .name = #_name, \
72 .hw = &_name##_hw.hw, \
73 .parent_names = _parent_array_name, \
74 .num_parents = ARRAY_SIZE(_parent_array_name), \
75 .ops = &_clkops_name, \
76 .flags = _flags, \
77 };
78
68#define DEFINE_STRUCT_CLK_HW_OMAP(_name, _clkdm_name) \ 79#define DEFINE_STRUCT_CLK_HW_OMAP(_name, _clkdm_name) \
69 static struct clk_hw_omap _name##_hw = { \ 80 static struct clk_hw_omap _name##_hw = { \
70 .hw = { \ 81 .hw = { \
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index 0a02aab5df67..3aed4b0b9563 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -500,8 +500,9 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
500 if (dd->last_rounded_rate == 0) 500 if (dd->last_rounded_rate == 0)
501 return -EINVAL; 501 return -EINVAL;
502 502
503 /* No freqsel on OMAP4 and OMAP3630 */ 503 /* No freqsel on AM335x, OMAP4 and OMAP3630 */
504 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 504 if (!soc_is_am33xx() && !cpu_is_omap44xx() &&
505 !cpu_is_omap3630()) {
505 freqsel = _omap3_dpll_compute_freqsel(clk, 506 freqsel = _omap3_dpll_compute_freqsel(clk,
506 dd->last_rounded_n); 507 dd->last_rounded_n);
507 WARN_ON(!freqsel); 508 WARN_ON(!freqsel);