Skip to content

Commit

Permalink
ARM: OMAP3: clock: fix boot breakage in legacy mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 2e1a7b0 ("ARM: OMAP3+: DPLL: use determine_rate() and...")
Cc: Paul Walmsley <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Reported-by: Kevin Hilman <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
  • Loading branch information
Tero Kristo authored and Michael Turquette committed Dec 16, 2014
1 parent 6f8e853 commit 83ccc46
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions arch/arm/mach-omap2/cclock3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ static struct clk dpll3_ck;

static const char *dpll3_ck_parent_names[] = {
"sys_ck",
"sys_ck",
};

static const struct clk_ops dpll3_ck_ops = {
Expand Down Expand Up @@ -733,6 +734,10 @@ static const char *corex2_fck_parent_names[] = {
DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck, NULL);
DEFINE_STRUCT_CLK(corex2_fck, corex2_fck_parent_names, core_ck_ops);

static const char *cpefuse_fck_parent_names[] = {
"sys_ck",
};

static struct clk cpefuse_fck;

static struct clk_hw_omap cpefuse_fck_hw = {
Expand All @@ -744,7 +749,7 @@ static struct clk_hw_omap cpefuse_fck_hw = {
.clkdm_name = "core_l4_clkdm",
};

DEFINE_STRUCT_CLK(cpefuse_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(cpefuse_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk csi2_96m_fck;

Expand Down Expand Up @@ -775,7 +780,7 @@ static struct clk_hw_omap d2d_26m_fck_hw = {
.clkdm_name = "d2d_clkdm",
};

DEFINE_STRUCT_CLK(d2d_26m_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(d2d_26m_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk des1_ick;

Expand Down Expand Up @@ -1046,7 +1051,7 @@ static struct clk_hw_omap dss2_alwon_fck_hw = {
.clkdm_name = "dss_clkdm",
};

DEFINE_STRUCT_CLK(dss2_alwon_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(dss2_alwon_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk dss_96m_fck;

Expand Down Expand Up @@ -1368,7 +1373,7 @@ DEFINE_STRUCT_CLK(gpio1_dbck, gpio1_dbck_parent_names, aes2_ick_ops);
static struct clk wkup_l4_ick;

DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick, "wkup_clkdm");
DEFINE_STRUCT_CLK(wkup_l4_ick, dpll3_ck_parent_names, core_l4_ick_ops);
DEFINE_STRUCT_CLK(wkup_l4_ick, cpefuse_fck_parent_names, core_l4_ick_ops);

static struct clk gpio1_ick;

Expand Down Expand Up @@ -1862,7 +1867,7 @@ static struct clk_hw_omap hecc_ck_hw = {
.clkdm_name = "core_l3_clkdm",
};

DEFINE_STRUCT_CLK(hecc_ck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(hecc_ck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk hsotgusb_fck_am35xx;

Expand All @@ -1875,7 +1880,7 @@ static struct clk_hw_omap hsotgusb_fck_am35xx_hw = {
.clkdm_name = "core_l3_clkdm",
};

DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk hsotgusb_ick_3430es1;

Expand Down Expand Up @@ -2411,7 +2416,7 @@ static struct clk_hw_omap modem_fck_hw = {
.clkdm_name = "d2d_clkdm",
};

DEFINE_STRUCT_CLK(modem_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(modem_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk mspro_fck;

Expand Down Expand Up @@ -2710,7 +2715,7 @@ static struct clk_hw_omap sr1_fck_hw = {
.clkdm_name = "wkup_clkdm",
};

DEFINE_STRUCT_CLK(sr1_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(sr1_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk sr2_fck;

Expand All @@ -2724,7 +2729,7 @@ static struct clk_hw_omap sr2_fck_hw = {
.clkdm_name = "wkup_clkdm",
};

DEFINE_STRUCT_CLK(sr2_fck, dpll3_ck_parent_names, aes2_ick_ops);
DEFINE_STRUCT_CLK(sr2_fck, cpefuse_fck_parent_names, aes2_ick_ops);

static struct clk sr_l4_ick;

Expand Down

0 comments on commit 83ccc46

Please sign in to comment.