Skip to content

Commit

Permalink
ARM: clk-imx6q: parent lvds_sel input from upstream clock gates
Browse files Browse the repository at this point in the history
The i.MX6 reference manual doesn't make a clear distinction
between the fixed clock divider and the enable gate for the
pcie and sata reference clocks. This lead to the lvds mux
inputs in the imx6q clk driver to be parented from the
ref clock (which is the divider) instead of the actual gate,
which in turn prevents the upstream clock to actually be
enabled when lvds clk out is active.

This fixes a hard machine hang regression in kernel 3.16 for
boards where only pcie is active but no sata, as with this
kernel version the imx6-pcie driver is no longer enabling
the upstream clock directly but only lvds clk out.

Reported-by: Arne Ruhnau <[email protected]>
Signed-off-by: Lucas Stach <[email protected]>
Tested-by: Arne Ruhnau <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
  • Loading branch information
lynxeye-dev authored and Shawn Guo committed Jul 18, 2014
1 parent 4c83445 commit 03e9722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-imx/clk-imx6q.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static const char *cko_sels[] = { "cko1", "cko2", };
static const char *lvds_sels[] = {
"dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
"pcie_ref", "sata_ref",
"pcie_ref_125m", "sata_ref_100m",
};

enum mx6q_clks {
Expand Down Expand Up @@ -491,7 +491,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)

/* All existing boards with PCIe use LVDS1 */
if (IS_ENABLED(CONFIG_PCI_IMX6))
clk_set_parent(clk[lvds1_sel], clk[sata_ref]);
clk_set_parent(clk[lvds1_sel], clk[sata_ref_100m]);

/* Set initial power mode */
imx6q_set_lpm(WAIT_CLOCKED);
Expand Down

0 comments on commit 03e9722

Please sign in to comment.