Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP3: clock: fix boot breakage in legacy mode

The new usage of determine_rate and set_rate_and_parent calls for
OMAP DPLLs assumes the DPLLs must have two parents defined, even
if it is the same clock. Legacy clock data did not fullfill this
requirement and caused a boot crash. Fixed by adding the missing
parent information to the DPLL clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Fixes: 2e1a7b014f ("ARM: OMAP3+: DPLL: use determine_rate() and...")
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Reported-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>

authored by

Tero Kristo and committed by
Michael Turquette
83ccc467 6f8e853d

+14 -9
+14 -9
arch/arm/mach-omap2/cclock3xxx_data.c
··· 111 112 static const char *dpll3_ck_parent_names[] = { 113 "sys_ck", 114 }; 115 116 static const struct clk_ops dpll3_ck_ops = { ··· 734 DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck, NULL); 735 DEFINE_STRUCT_CLK(corex2_fck, corex2_fck_parent_names, core_ck_ops); 736 737 static struct clk cpefuse_fck; 738 739 static struct clk_hw_omap cpefuse_fck_hw = { ··· 749 .clkdm_name = "core_l4_clkdm", 750 }; 751 752 - DEFINE_STRUCT_CLK(cpefuse_fck, dpll3_ck_parent_names, aes2_ick_ops); 753 754 static struct clk csi2_96m_fck; 755 ··· 780 .clkdm_name = "d2d_clkdm", 781 }; 782 783 - DEFINE_STRUCT_CLK(d2d_26m_fck, dpll3_ck_parent_names, aes2_ick_ops); 784 785 static struct clk des1_ick; 786 ··· 1051 .clkdm_name = "dss_clkdm", 1052 }; 1053 1054 - DEFINE_STRUCT_CLK(dss2_alwon_fck, dpll3_ck_parent_names, aes2_ick_ops); 1055 1056 static struct clk dss_96m_fck; 1057 ··· 1373 static struct clk wkup_l4_ick; 1374 1375 DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick, "wkup_clkdm"); 1376 - DEFINE_STRUCT_CLK(wkup_l4_ick, dpll3_ck_parent_names, core_l4_ick_ops); 1377 1378 static struct clk gpio1_ick; 1379 ··· 1867 .clkdm_name = "core_l3_clkdm", 1868 }; 1869 1870 - DEFINE_STRUCT_CLK(hecc_ck, dpll3_ck_parent_names, aes2_ick_ops); 1871 1872 static struct clk hsotgusb_fck_am35xx; 1873 ··· 1880 .clkdm_name = "core_l3_clkdm", 1881 }; 1882 1883 - DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, dpll3_ck_parent_names, aes2_ick_ops); 1884 1885 static struct clk hsotgusb_ick_3430es1; 1886 ··· 2416 .clkdm_name = "d2d_clkdm", 2417 }; 2418 2419 - DEFINE_STRUCT_CLK(modem_fck, dpll3_ck_parent_names, aes2_ick_ops); 2420 2421 static struct clk mspro_fck; 2422 ··· 2715 .clkdm_name = "wkup_clkdm", 2716 }; 2717 2718 - DEFINE_STRUCT_CLK(sr1_fck, dpll3_ck_parent_names, aes2_ick_ops); 2719 2720 static struct clk sr2_fck; 2721 ··· 2729 .clkdm_name = "wkup_clkdm", 2730 }; 2731 2732 - DEFINE_STRUCT_CLK(sr2_fck, dpll3_ck_parent_names, aes2_ick_ops); 2733 2734 static struct clk sr_l4_ick; 2735
··· 111 112 static const char *dpll3_ck_parent_names[] = { 113 "sys_ck", 114 + "sys_ck", 115 }; 116 117 static const struct clk_ops dpll3_ck_ops = { ··· 733 DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck, NULL); 734 DEFINE_STRUCT_CLK(corex2_fck, corex2_fck_parent_names, core_ck_ops); 735 736 + static const char *cpefuse_fck_parent_names[] = { 737 + "sys_ck", 738 + }; 739 + 740 static struct clk cpefuse_fck; 741 742 static struct clk_hw_omap cpefuse_fck_hw = { ··· 744 .clkdm_name = "core_l4_clkdm", 745 }; 746 747 + DEFINE_STRUCT_CLK(cpefuse_fck, cpefuse_fck_parent_names, aes2_ick_ops); 748 749 static struct clk csi2_96m_fck; 750 ··· 775 .clkdm_name = "d2d_clkdm", 776 }; 777 778 + DEFINE_STRUCT_CLK(d2d_26m_fck, cpefuse_fck_parent_names, aes2_ick_ops); 779 780 static struct clk des1_ick; 781 ··· 1046 .clkdm_name = "dss_clkdm", 1047 }; 1048 1049 + DEFINE_STRUCT_CLK(dss2_alwon_fck, cpefuse_fck_parent_names, aes2_ick_ops); 1050 1051 static struct clk dss_96m_fck; 1052 ··· 1368 static struct clk wkup_l4_ick; 1369 1370 DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick, "wkup_clkdm"); 1371 + DEFINE_STRUCT_CLK(wkup_l4_ick, cpefuse_fck_parent_names, core_l4_ick_ops); 1372 1373 static struct clk gpio1_ick; 1374 ··· 1862 .clkdm_name = "core_l3_clkdm", 1863 }; 1864 1865 + DEFINE_STRUCT_CLK(hecc_ck, cpefuse_fck_parent_names, aes2_ick_ops); 1866 1867 static struct clk hsotgusb_fck_am35xx; 1868 ··· 1875 .clkdm_name = "core_l3_clkdm", 1876 }; 1877 1878 + DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, cpefuse_fck_parent_names, aes2_ick_ops); 1879 1880 static struct clk hsotgusb_ick_3430es1; 1881 ··· 2411 .clkdm_name = "d2d_clkdm", 2412 }; 2413 2414 + DEFINE_STRUCT_CLK(modem_fck, cpefuse_fck_parent_names, aes2_ick_ops); 2415 2416 static struct clk mspro_fck; 2417 ··· 2710 .clkdm_name = "wkup_clkdm", 2711 }; 2712 2713 + DEFINE_STRUCT_CLK(sr1_fck, cpefuse_fck_parent_names, aes2_ick_ops); 2714 2715 static struct clk sr2_fck; 2716 ··· 2724 .clkdm_name = "wkup_clkdm", 2725 }; 2726 2727 + DEFINE_STRUCT_CLK(sr2_fck, cpefuse_fck_parent_names, aes2_ick_ops); 2728 2729 static struct clk sr_l4_ick; 2730