Merge "msm: display: Add device pointer with clk_get for retrieving clocks" into msm-3.0
diff --git a/arch/arm/mach-msm/clock-7x30.c b/arch/arm/mach-msm/clock-7x30.c
index 48417a4..b161030 100644
--- a/arch/arm/mach-msm/clock-7x30.c
+++ b/arch/arm/mach-msm/clock-7x30.c
@@ -2773,12 +2773,12 @@
{ CLK_LOOKUP("phy_clk", usb_phy_clk.c, "msm_otg") },
/* Voters */
- { CLK_LOOKUP("ebi1_dtv_clk", ebi_dtv_clk.c, NULL) },
+ { CLK_LOOKUP("mem_clk", ebi_dtv_clk.c, "dtv.0") },
{ CLK_LOOKUP("bus_clk", ebi_grp_2d_clk.c, "kgsl-2d0.0") },
{ CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0") },
- { CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL) },
- { CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL) },
- { CLK_LOOKUP("ebi1_tv_clk", ebi_tv_clk.c, NULL) },
+ { CLK_LOOKUP("mem_clk", ebi_lcdc_clk.c, "lcdc.0") },
+ { CLK_LOOKUP("mem_clk", ebi_mddi_clk.c, "mddi.0") },
+ { CLK_LOOKUP("mem_clk", ebi_tv_clk.c, "tvenc.0") },
{ CLK_LOOKUP("mem_clk", ebi_vcd_clk.c, "msm_vidc.0") },
{ CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL) },
{ CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov") },
@@ -2794,7 +2794,7 @@
OWN(APPS1, 6, "core_clk", grp_2d_clk, "footswitch-pcom.0"),
OWN(APPS1, 6, "iface_clk", grp_2d_p_clk, "kgsl-2d0.0"),
OWN(APPS1, 6, "iface_clk", grp_2d_p_clk, "footswitch-pcom.0"),
- OWN(APPS1, 31, "hdmi_clk", hdmi_clk, NULL),
+ OWN(APPS1, 31, "hdmi_clk", hdmi_clk, "dtv.0"),
OWN(APPS1, 0, "jpeg_clk", jpeg_clk, NULL),
OWN(APPS1, 0, "jpeg_pclk", jpeg_p_clk, NULL),
OWN(APPS1, 23, "lpa_codec_clk", lpa_codec_clk, NULL),
@@ -2824,25 +2824,25 @@
{ CLK_LOOKUP("src_clk", grp_3d_src_clk.c, "footswitch-pcom.2"),
O(APPS2), BIT(0), &p_grp_3d_clk.c },
OWN(APPS2, 0, "mem_clk", imem_clk, "kgsl-3d0.0"),
- OWN(APPS2, 4, "mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk, NULL),
- OWN(APPS2, 4, "mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk, NULL),
- OWN(APPS2, 4, "mdp_pclk", mdp_p_clk, NULL),
+ OWN(APPS2, 4, "lcdc_clk", mdp_lcdc_pad_pclk_clk, "lcdc.0"),
+ OWN(APPS2, 4, "mdp_clk", mdp_lcdc_pclk_clk, "lcdc.0"),
+ OWN(APPS2, 4, "iface_clk", mdp_p_clk, "mdp.0"),
OWN(APPS2, 4, "iface_clk", mdp_p_clk, "footswitch-pcom.4"),
- OWN(APPS2, 28, "mdp_vsync_clk", mdp_vsync_clk, NULL),
+ OWN(APPS2, 28, "vsync_clk", mdp_vsync_clk, "mdp.0"),
OWN(APPS2, 5, "ref_clk", tsif_ref_clk, "msm_tsif.0"),
OWN(APPS2, 5, "iface_clk", tsif_p_clk, "msm_tsif.0"),
- { CLK_LOOKUP("tv_src_clk", tv_clk.c, NULL),
+ { CLK_LOOKUP("src_clk", tv_clk.c, "dtv.0"),
O(APPS2), BIT(2), &p_tv_enc_clk.c },
OWN(APPS2, 2, "tv_dac_clk", tv_dac_clk, NULL),
OWN(APPS2, 2, "tv_enc_clk", tv_enc_clk, NULL),
- OWN(ROW1, 7, "emdh_clk", emdh_clk, "msm_mddi.1"),
- OWN(ROW1, 7, "emdh_pclk", emdh_p_clk, "msm_mddi.1"),
+ OWN(ROW1, 7, "core_clk", emdh_clk, "msm_mddi.1"),
+ OWN(ROW1, 7, "iface_clk", emdh_p_clk, "msm_mddi.1"),
OWN(ROW1, 11, "core_clk", i2c_clk, "msm_i2c.0"),
OWN(ROW1, 12, "core_clk", i2c_2_clk, "msm_i2c.2"),
OWN(ROW1, 17, "mdc_clk", mdc_clk, NULL),
- OWN(ROW1, 19, "mddi_clk", pmdh_clk, NULL),
- OWN(ROW1, 19, "mddi_pclk", pmdh_p_clk, NULL),
+ OWN(ROW1, 19, "core_clk", pmdh_clk, "mddi.0"),
+ OWN(ROW1, 19, "iface_clk", pmdh_p_clk, "mddi.0"),
OWN(ROW1, 23, "core_clk", sdc1_clk, "msm_sdcc.1"),
OWN(ROW1, 23, "iface_clk", sdc1_p_clk, "msm_sdcc.1"),
OWN(ROW1, 25, "core_clk", sdc2_clk, "msm_sdcc.2"),
@@ -2876,7 +2876,7 @@
OWN(APPS3, 11, "csi_clk", csi0_clk, NULL),
OWN(APPS3, 11, "csi_vfe_clk", csi0_vfe_clk, NULL),
OWN(APPS3, 11, "csi_pclk", csi0_p_clk, NULL),
- OWN(APPS3, 0, "mdp_clk", mdp_clk, NULL),
+ OWN(APPS3, 0, "core_clk", mdp_clk, "mdp.0"),
OWN(APPS3, 0, "core_clk", mdp_clk, "footswitch-pcom.4"),
OWN(APPS3, 2, "core_clk", mfc_clk, "msm_vidc.0"),
OWN(APPS3, 2, "core_clk", mfc_clk, "footswitch-pcom.5"),
diff --git a/arch/arm/mach-msm/clock-8960.c b/arch/arm/mach-msm/clock-8960.c
index c0019a3..f370c1d 100644
--- a/arch/arm/mach-msm/clock-8960.c
+++ b/arch/arm/mach-msm/clock-8960.c
@@ -5033,10 +5033,10 @@
CLK_LOOKUP("csiphy_timer_clk", csi0phy_timer_clk.c, "msm_csiphy.0"),
CLK_LOOKUP("csiphy_timer_clk", csi1phy_timer_clk.c, "msm_csiphy.1"),
CLK_LOOKUP("csiphy_timer_clk", csi2phy_timer_clk.c, "msm_csiphy.2"),
- CLK_LOOKUP("dsi_byte_div_clk", dsi1_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_byte_div_clk", dsi2_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi1_esc_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi2_esc_clk.c, NULL),
+ CLK_LOOKUP("byte_clk", dsi1_byte_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("byte_clk", dsi2_byte_clk.c, "mipi_dsi.2"),
+ CLK_LOOKUP("esc_clk", dsi1_esc_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("esc_clk", dsi2_esc_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("rgb_clk", rgb_tv_clk.c, ""),
CLK_LOOKUP("npl_clk", npl_tv_clk.c, ""),
@@ -5055,22 +5055,22 @@
CLK_LOOKUP("ijpeg_clk", ijpeg_clk.c, ""),
CLK_LOOKUP("core_clk", ijpeg_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("core_clk", jpegd_clk.c, ""),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
CLK_LOOKUP("core_clk", mdp_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("lut_mdp", lut_mdp_clk.c, NULL),
+ CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "mdp.0"),
CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("core_clk", rot_clk.c, "msm_rotator.0"),
CLK_LOOKUP("core_clk", rot_clk.c, "footswitch-8x60.6"),
CLK_LOOKUP("tv_src_clk", tv_src_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("tv_src_clk", tv_src_clk.c, NULL),
- CLK_LOOKUP("tv_src_div_clk", tv_src_div_clk.c, NULL),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "dtv.0"),
+ CLK_LOOKUP("div_clk", tv_src_div_clk.c, ""),
CLK_LOOKUP("core_clk", vcodec_clk.c, "msm_vidc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "footswitch-8x60.7"),
- CLK_LOOKUP("mdp_tv_clk", mdp_tv_clk.c, NULL),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "dtv.0"),
CLK_LOOKUP("tv_clk", mdp_tv_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, NULL),
+ CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, "dtv.0"),
CLK_LOOKUP("core_clk", hdmi_app_clk.c, "hdmi_msm.1"),
CLK_LOOKUP("vpe_clk", vpe_clk.c, "msm_vpe.0"),
CLK_LOOKUP("core_clk", vpe_clk.c, "footswitch-8x60.9"),
@@ -5084,14 +5084,15 @@
CLK_LOOKUP("bus_a_clk", vcodec_axi_a_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_b_clk", vcodec_axi_b_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_clk", vpe_axi_clk.c, "footswitch-8x60.9"),
- CLK_LOOKUP("amp_pclk", amp_p_clk.c, NULL),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.0"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.1"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.2"),
- CLK_LOOKUP("dsi_m_pclk", dsi1_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi1_s_p_clk.c, NULL),
- CLK_LOOKUP("dsi_m_pclk", dsi2_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi2_s_p_clk.c, NULL),
+ CLK_LOOKUP("master_iface_clk", dsi1_m_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("slave_iface_clk", dsi1_s_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("master_iface_clk", dsi2_m_p_clk.c, "mipi_dsi.2"),
+ CLK_LOOKUP("slave_iface_clk", dsi2_s_p_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("iface_clk", gfx3d_p_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("iface_clk", gfx3d_p_clk.c, "footswitch-8x60.2"),
CLK_LOOKUP("master_iface_clk", hdmi_m_p_clk.c, "hdmi_msm.1"),
@@ -5100,7 +5101,7 @@
CLK_LOOKUP("iface_clk", ijpeg_p_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("iface_clk", jpegd_p_clk.c, ""),
CLK_LOOKUP("mem_iface_clk", imem_p_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("mdp_pclk", mdp_p_clk.c, NULL),
+ CLK_LOOKUP("iface_clk", mdp_p_clk.c, "mdp.0"),
CLK_LOOKUP("iface_clk", mdp_p_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("iface_clk", smmu_p_clk.c, "msm_iommu"),
CLK_LOOKUP("iface_clk", rot_p_clk.c, "msm_rotator.0"),
@@ -5342,10 +5343,10 @@
CLK_LOOKUP("csiphy_timer_clk", csi0phy_timer_clk.c, "msm_csiphy.0"),
CLK_LOOKUP("csiphy_timer_clk", csi1phy_timer_clk.c, "msm_csiphy.1"),
CLK_LOOKUP("csiphy_timer_clk", csi2phy_timer_clk.c, "msm_csiphy.2"),
- CLK_LOOKUP("dsi_byte_div_clk", dsi1_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_byte_div_clk", dsi2_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi1_esc_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi2_esc_clk.c, NULL),
+ CLK_LOOKUP("byte_clk", dsi1_byte_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("byte_clk", dsi2_byte_clk.c, "mipi_dsi.2"),
+ CLK_LOOKUP("esc_clk", dsi1_esc_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("esc_clk", dsi2_esc_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("core_clk", gfx2d0_clk.c, "kgsl-2d0.0"),
CLK_LOOKUP("core_clk", gfx2d0_clk.c, "footswitch-8x60.0"),
CLK_LOOKUP("core_clk", gfx2d1_clk.c, "kgsl-2d1.1"),
@@ -5357,23 +5358,25 @@
CLK_LOOKUP("ijpeg_clk", ijpeg_clk.c, NULL),
CLK_LOOKUP("core_clk", ijpeg_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("core_clk", jpegd_clk.c, ""),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
CLK_LOOKUP("core_clk", mdp_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("lut_mdp", lut_mdp_clk.c, NULL),
+ CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "mdp.0"),
CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("core_clk", rot_clk.c, "msm_rotator.0"),
CLK_LOOKUP("core_clk", rot_clk.c, "footswitch-8x60.6"),
- CLK_LOOKUP("tv_src_clk", tv_src_clk.c, NULL),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "dtv.0"),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "tvenc.0"),
CLK_LOOKUP("tv_src_clk", tv_src_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("tv_enc_clk", tv_enc_clk.c, NULL),
- CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL),
+ CLK_LOOKUP("enc_clk", tv_enc_clk.c, "tvenc.0"),
+ CLK_LOOKUP("dac_clk", tv_dac_clk.c, "tvenc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "msm_vidc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "footswitch-8x60.7"),
- CLK_LOOKUP("mdp_tv_clk", mdp_tv_clk.c, NULL),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "dtv.0"),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "tvenc.0"),
CLK_LOOKUP("tv_clk", mdp_tv_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, NULL),
+ CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, "dtv.0"),
CLK_LOOKUP("core_clk", hdmi_app_clk.c, "hdmi_msm.1"),
CLK_LOOKUP("vpe_clk", vpe_clk.c, "msm_vpe.0"),
CLK_LOOKUP("core_clk", vpe_clk.c, "footswitch-8x60.9"),
@@ -5387,14 +5390,15 @@
CLK_LOOKUP("bus_a_clk", vcodec_axi_a_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_b_clk", vcodec_axi_b_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_clk", vpe_axi_clk.c, "footswitch-8x60.9"),
- CLK_LOOKUP("amp_pclk", amp_p_clk.c, NULL),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.0"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.1"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.2"),
- CLK_LOOKUP("dsi_m_pclk", dsi1_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi1_s_p_clk.c, NULL),
- CLK_LOOKUP("dsi_m_pclk", dsi2_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi2_s_p_clk.c, NULL),
+ CLK_LOOKUP("master_iface_clk", dsi1_m_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("slave_iface_clk", dsi1_s_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("master_iface_clk", dsi2_m_p_clk.c, "mipi_dsi.2"),
+ CLK_LOOKUP("slave_iface_clk", dsi2_s_p_clk.c, "mipi_dsi.2"),
CLK_LOOKUP("iface_clk", gfx2d0_p_clk.c, "kgsl-2d0.0"),
CLK_LOOKUP("iface_clk", gfx2d0_p_clk.c, "footswitch-8x60.0"),
CLK_LOOKUP("iface_clk", gfx2d1_p_clk.c, "kgsl-2d1.1"),
@@ -5407,12 +5411,12 @@
CLK_LOOKUP("iface_clk", ijpeg_p_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("iface_clk", jpegd_p_clk.c, ""),
CLK_LOOKUP("mem_iface_clk", imem_p_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("mdp_pclk", mdp_p_clk.c, NULL),
+ CLK_LOOKUP("iface_clk", mdp_p_clk.c, "mdp.0"),
CLK_LOOKUP("iface_clk", mdp_p_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("iface_clk", smmu_p_clk.c, "msm_iommu"),
CLK_LOOKUP("iface_clk", rot_p_clk.c, "msm_rotator.0"),
CLK_LOOKUP("iface_clk", rot_p_clk.c, "footswitch-8x60.6"),
- CLK_LOOKUP("tv_enc_pclk", tv_enc_p_clk.c, NULL),
+ CLK_LOOKUP("iface_clk", tv_enc_p_clk.c, "tvenc.0"),
CLK_LOOKUP("iface_clk", vcodec_p_clk.c, "msm_vidc.0"),
CLK_LOOKUP("iface_clk", vcodec_p_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("vfe_pclk", vfe_p_clk.c, "msm_vfe.0"),
@@ -5633,8 +5637,8 @@
CLK_LOOKUP("csiphy_timer_clk", csi0phy_timer_clk.c, "msm_csiphy.0"),
CLK_LOOKUP("csiphy_timer_clk", csi1phy_timer_clk.c, "msm_csiphy.1"),
CLK_LOOKUP("csiphy_timer_clk", csi2phy_timer_clk.c, "msm_csiphy.2"),
- CLK_LOOKUP("dsi_byte_div_clk", dsi1_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi1_esc_clk.c, NULL),
+ CLK_LOOKUP("byte_clk", dsi1_byte_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("esc_clk", dsi1_esc_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("core_clk", gfx3d_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("core_clk", gfx3d_clk.c, "footswitch-8x60.2"),
CLK_LOOKUP("bus_clk",
@@ -5643,22 +5647,24 @@
CLK_LOOKUP("imem_clk", imem_axi_clk.c, NULL),
CLK_LOOKUP("ijpeg_clk", ijpeg_clk.c, NULL),
CLK_LOOKUP("core_clk", ijpeg_clk.c, "footswitch-8x60.3"),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
CLK_LOOKUP("core_clk", mdp_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("lut_mdp", lut_mdp_clk.c, NULL),
+ CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "mdp.0"),
CLK_LOOKUP("lut_clk", lut_mdp_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("core_clk", rot_clk.c, "msm_rotator.0"),
CLK_LOOKUP("core_clk", rot_clk.c, "footswitch-8x60.6"),
- CLK_LOOKUP("tv_src_clk", tv_src_clk.c, NULL),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "dtv.0"),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "tvenc.0"),
CLK_LOOKUP("tv_src_clk", tv_src_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL),
+ CLK_LOOKUP("dac_clk", tv_dac_clk.c, "tvenc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "msm_vidc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "footswitch-8x60.7"),
- CLK_LOOKUP("mdp_tv_clk", mdp_tv_clk.c, NULL),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "dtv.0"),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "tvenc.0"),
CLK_LOOKUP("tv_clk", mdp_tv_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, NULL),
+ CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, "dtv.0"),
CLK_LOOKUP("core_clk", hdmi_app_clk.c, "hdmi_msm.1"),
CLK_LOOKUP("vpe_clk", vpe_clk.c, "msm_vpe.0"),
CLK_LOOKUP("core_clk", vpe_clk.c, "footswitch-8x60.9"),
@@ -5672,12 +5678,12 @@
CLK_LOOKUP("bus_a_clk", vcodec_axi_a_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_b_clk", vcodec_axi_b_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_clk", vpe_axi_clk.c, "footswitch-8x60.9"),
- CLK_LOOKUP("amp_pclk", amp_p_clk.c, NULL),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.0"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.1"),
CLK_LOOKUP("csi_pclk", csi_p_clk.c, "msm_csid.2"),
- CLK_LOOKUP("dsi_m_pclk", dsi1_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi1_s_p_clk.c, NULL),
+ CLK_LOOKUP("master_iface_clk", dsi1_m_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("slave_iface_clk", dsi1_s_p_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("iface_clk", gfx3d_p_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("iface_clk", gfx3d_p_clk.c, "footswitch-8x60.2"),
CLK_LOOKUP("master_iface_clk", hdmi_m_p_clk.c, "hdmi_msm.1"),
@@ -5685,7 +5691,7 @@
CLK_LOOKUP("ijpeg_pclk", ijpeg_p_clk.c, NULL),
CLK_LOOKUP("iface_clk", ijpeg_p_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("mem_iface_clk", imem_p_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("mdp_pclk", mdp_p_clk.c, NULL),
+ CLK_LOOKUP("iface_clk", mdp_p_clk.c, "mdp.0"),
CLK_LOOKUP("iface_clk", mdp_p_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("iface_clk", smmu_p_clk.c, "msm_iommu"),
CLK_LOOKUP("iface_clk", rot_p_clk.c, "msm_rotator.0"),
diff --git a/arch/arm/mach-msm/clock-8x60.c b/arch/arm/mach-msm/clock-8x60.c
index 3bfb5a3..6716b44 100644
--- a/arch/arm/mach-msm/clock-8x60.c
+++ b/arch/arm/mach-msm/clock-8x60.c
@@ -3614,8 +3614,8 @@
CLK_LOOKUP("csi_clk", csi1_clk.c, "msm_camera_ov9726.0"),
CLK_LOOKUP("csi_clk", csi1_clk.c, "msm_csic.1"),
CLK_LOOKUP("csi_src_clk", csi_src_clk.c, NULL),
- CLK_LOOKUP("dsi_byte_div_clk", dsi_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi_esc_clk.c, NULL),
+ CLK_LOOKUP("byte_clk", dsi_byte_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("esc_clk", dsi_esc_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("core_clk", gfx2d0_clk.c, "kgsl-2d0.0"),
CLK_LOOKUP("core_clk", gfx2d0_clk.c, "footswitch-8x60.0"),
CLK_LOOKUP("core_clk", gfx2d1_clk.c, "kgsl-2d1.1"),
@@ -3625,13 +3625,13 @@
CLK_LOOKUP("ijpeg_clk", ijpeg_clk.c, NULL),
CLK_LOOKUP("core_clk", ijpeg_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("core_clk", jpegd_clk.c, NULL),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
CLK_LOOKUP("core_clk", mdp_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("pixel_lcdc_clk", pixel_lcdc_clk.c, NULL),
+ CLK_LOOKUP("lcdc_clk", pixel_lcdc_clk.c, "lcdc.0"),
CLK_LOOKUP("pixel_lcdc_clk", pixel_lcdc_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("pixel_mdp_clk", pixel_mdp_clk.c, NULL),
+ CLK_LOOKUP("mdp_clk", pixel_mdp_clk.c, "lcdc.0"),
CLK_LOOKUP("pixel_mdp_clk", pixel_mdp_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("core_clk", rot_clk.c, "msm_rotator.0"),
CLK_LOOKUP("core_clk", rot_clk.c, "footswitch-8x60.6"),
@@ -3639,10 +3639,10 @@
CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL),
CLK_LOOKUP("core_clk", vcodec_clk.c, "msm_vidc.0"),
CLK_LOOKUP("core_clk", vcodec_clk.c, "footswitch-8x60.7"),
- CLK_LOOKUP("mdp_tv_clk", mdp_tv_clk.c, NULL),
+ CLK_LOOKUP("mdp_clk", mdp_tv_clk.c, "dtv.0"),
CLK_LOOKUP("tv_clk", mdp_tv_clk.c, "footswitch-8x60.4"),
- CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, NULL),
- CLK_LOOKUP("tv_src_clk", tv_src_clk.c, NULL),
+ CLK_LOOKUP("hdmi_clk", hdmi_tv_clk.c, "dtv.0"),
+ CLK_LOOKUP("src_clk", tv_src_clk.c, "dtv.0"),
CLK_LOOKUP("tv_src_clk", tv_src_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("core_clk", hdmi_app_clk.c, "hdmi_msm.1"),
CLK_LOOKUP("vpe_clk", vpe_clk.c, NULL),
@@ -3660,13 +3660,13 @@
CLK_LOOKUP("bus_clk", rot_axi_clk.c, "footswitch-8x60.6"),
CLK_LOOKUP("bus_clk", vcodec_axi_clk.c, "footswitch-8x60.7"),
CLK_LOOKUP("bus_clk", vpe_axi_clk.c, "footswitch-8x60.9"),
- CLK_LOOKUP("amp_pclk", amp_p_clk.c, NULL),
+ CLK_LOOKUP("arb_clk", amp_p_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("csi_pclk", csi0_p_clk.c, NULL),
CLK_LOOKUP("csi_pclk", csi1_p_clk.c, "msm_camera_ov7692.0"),
CLK_LOOKUP("csi_pclk", csi1_p_clk.c, "msm_camera_ov9726.0"),
CLK_LOOKUP("csi_pclk", csi1_p_clk.c, "msm_csic.1"),
- CLK_LOOKUP("dsi_m_pclk", dsi_m_p_clk.c, NULL),
- CLK_LOOKUP("dsi_s_pclk", dsi_s_p_clk.c, NULL),
+ CLK_LOOKUP("master_iface_clk", dsi_m_p_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("slave_iface_clk", dsi_s_p_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("iface_clk", gfx2d0_p_clk.c, "kgsl-2d0.0"),
CLK_LOOKUP("iface_clk", gfx2d0_p_clk.c, "footswitch-8x60.0"),
CLK_LOOKUP("iface_clk", gfx2d1_p_clk.c, "kgsl-2d1.1"),
@@ -3679,7 +3679,7 @@
CLK_LOOKUP("iface_clk", ijpeg_p_clk.c, "footswitch-8x60.3"),
CLK_LOOKUP("iface_clk", jpegd_p_clk.c, NULL),
CLK_LOOKUP("mem_iface_clk", imem_p_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("mdp_pclk", mdp_p_clk.c, NULL),
+ CLK_LOOKUP("iface_clk", mdp_p_clk.c, "mdp.0"),
CLK_LOOKUP("iface_clk", mdp_p_clk.c, "footswitch-8x60.4"),
CLK_LOOKUP("iface_clk", smmu_p_clk.c, "msm_iommu"),
CLK_LOOKUP("iface_clk", rot_p_clk.c, "msm_rotator.0"),
diff --git a/arch/arm/mach-msm/clock-pcom-lookup.c b/arch/arm/mach-msm/clock-pcom-lookup.c
index ed3b8c2..99b6501 100644
--- a/arch/arm/mach-msm/clock-pcom-lookup.c
+++ b/arch/arm/mach-msm/clock-pcom-lookup.c
@@ -195,7 +195,7 @@
CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL),
CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL),
CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL),
- CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL),
+ CLK_LOOKUP("core_clk", emdh_clk.c, "msm_mddi.1"),
CLK_LOOKUP("core_clk", gp_clk.c, ""),
CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"),
@@ -203,8 +203,8 @@
CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL),
CLK_LOOKUP("mem_clk", imem_clk.c, NULL),
CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL),
- CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
+ CLK_LOOKUP("core_clk", pmdh_clk.c, "mddi.0"),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL),
CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL),
CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL),
@@ -258,11 +258,11 @@
CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL),
CLK_LOOKUP("mem_clk", imem_clk.c, NULL),
CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL),
- CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("core_clk", pmdh_clk.c, "mddi.0"),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
+ CLK_LOOKUP("mdp_clk", mdp_lcdc_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("lcdc_clk", mdp_lcdc_pad_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL),
CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL),
CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL),
@@ -293,8 +293,8 @@
CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL),
CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL),
- CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL),
+ CLK_LOOKUP("mem_clk", ebi_lcdc_clk.c, "lcdc.0"),
+ CLK_LOOKUP("mem_clk", ebi_mddi_clk.c, "mddi.0"),
CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_otg"),
CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL),
CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"),
@@ -314,8 +314,8 @@
static struct clk_lookup msm_cmn_clk_7625a_7627a[] __initdata = {
CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"),
CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL),
- CLK_LOOKUP("ahb_m_clk", ahb_m_clk.c, NULL),
- CLK_LOOKUP("ahb_s_clk", ahb_s_clk.c, NULL),
+ CLK_LOOKUP("master_iface_clk", ahb_m_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("slave_iface_clk", ahb_s_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("cam_m_clk", cam_m_clk.c, NULL),
CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-0036"),
CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-001b"),
@@ -337,11 +337,11 @@
CLK_LOOKUP("csi_clk", csi1_clk.c, "msm_csic.1"),
CLK_LOOKUP("csi_pclk", csi1_p_clk.c, "msm_csic.1"),
CLK_LOOKUP("csi_vfe_clk", csi1_vfe_clk.c, "msm_csic.1"),
- CLK_LOOKUP("dsi_byte_clk", dsi_byte_clk.c, NULL),
- CLK_LOOKUP("dsi_clk", dsi_clk.c, NULL),
- CLK_LOOKUP("dsi_esc_clk", dsi_esc_clk.c, NULL),
- CLK_LOOKUP("dsi_pixel_clk", dsi_pixel_clk.c, NULL),
- CLK_LOOKUP("dsi_ref_clk", dsi_ref_clk.c, NULL),
+ CLK_LOOKUP("byte_clk", dsi_byte_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("core_clk", dsi_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("esc_clk", dsi_esc_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("pixel_clk", dsi_pixel_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("ref_clk", dsi_ref_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL),
CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL),
CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL),
@@ -357,12 +357,12 @@
CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL),
CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL),
CLK_LOOKUP("mem_clk", imem_clk.c, NULL),
- CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
- CLK_LOOKUP("mdp_dsi_pclk", mdp_dsi_p_clk.c, NULL),
+ CLK_LOOKUP("core_clk", pmdh_clk.c, "mddi.0"),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
+ CLK_LOOKUP("mdp_clk", mdp_lcdc_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("lcdc_clk", mdp_lcdc_pad_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
+ CLK_LOOKUP("mdp_clk", mdp_dsi_p_clk.c, "mipi_dsi.1"),
CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL),
CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL),
CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL),
@@ -394,8 +394,8 @@
CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL),
CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"),
- CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL),
- CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL),
+ CLK_LOOKUP("mem_clk", ebi_lcdc_clk.c, "lcdc.0"),
+ CLK_LOOKUP("mem_clk", ebi_mddi_clk.c, "mddi.0"),
CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL),
CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"),
@@ -441,7 +441,7 @@
CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL),
CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL),
CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL),
- CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL),
+ CLK_LOOKUP("core_clk", emdh_clk.c, "msm_mddi.1"),
CLK_LOOKUP("core_clk", gp_clk.c, ""),
CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"),
@@ -449,11 +449,11 @@
CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL),
CLK_LOOKUP("mem_clk", imem_clk.c, NULL),
CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL),
- CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL),
- CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL),
- CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL),
+ CLK_LOOKUP("core_clk", pmdh_clk.c, "mddi.0"),
+ CLK_LOOKUP("core_clk", mdp_clk.c, "mdp.0"),
+ CLK_LOOKUP("mdp_clk", mdp_lcdc_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("lcdc_clk", mdp_lcdc_pad_pclk_clk.c, "lcdc.0"),
+ CLK_LOOKUP("vsync_clk", mdp_vsync_clk.c, "mdp.0"),
CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL),
CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL),
CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL),
@@ -492,9 +492,10 @@
CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL),
CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"),
CLK_LOOKUP("bus_clk", ebi_grp_2d_clk.c, "kgsl-2d0.0"),
- CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL),
- CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL),
- CLK_LOOKUP("ebi1_tv_clk", ebi_tv_clk.c, NULL),
+ CLK_LOOKUP("mem_clk", ebi_lcdc_clk.c, "lcdc.0"),
+ CLK_LOOKUP("mem_clk", ebi_lcdc_clk.c, "mipi_dsi.1"),
+ CLK_LOOKUP("mem_clk", ebi_mddi_clk.c, "mddi.0"),
+ CLK_LOOKUP("mem_clk", ebi_tv_clk.c, "tvenc.0"),
CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_otg"),
CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_hsusb_host.0"),
CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL),
diff --git a/drivers/video/msm/lcdc.c b/drivers/video/msm/lcdc.c
index 135bf68..9709a07 100644
--- a/drivers/video/msm/lcdc.c
+++ b/drivers/video/msm/lcdc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -158,13 +158,33 @@
struct platform_device *mdp_dev = NULL;
struct msm_fb_panel_data *pdata = NULL;
int rc;
+ struct clk *ebi1_clk = NULL;
if (pdev->id == 0) {
lcdc_pdata = pdev->dev.platform_data;
+ pixel_mdp_clk = clk_get(&pdev->dev, "mdp_clk");
+ if (IS_ERR(pixel_mdp_clk)) {
+ pr_err("Couldnt find pixel_mdp_clk\n");
+ return -EINVAL;
+ }
+
+ pixel_lcdc_clk = clk_get(&pdev->dev, "lcdc_clk");
+ if (IS_ERR(pixel_lcdc_clk)) {
+ pr_err("Couldnt find pixel_lcdc_clk\n");
+ return -EINVAL;
+ }
+
+#ifndef CONFIG_MSM_BUS_SCALING
+ ebi1_clk = clk_get(&pdev->dev, "mem_clk");
+ if (IS_ERR(ebi1_clk))
+ return PTR_ERR(ebi1_clk);
+#endif
+
return 0;
}
mfd = platform_get_drvdata(pdev);
+ mfd->ebi1_clk = ebi1_clk;
if (!mfd)
return -ENODEV;
@@ -191,7 +211,7 @@
if (platform_device_add_data
(mdp_dev, pdev->dev.platform_data,
sizeof(struct msm_fb_panel_data))) {
- printk(KERN_ERR "lcdc_probe: platform_device_add_data failed!\n");
+ pr_err("lcdc_probe: platform_device_add_data failed!\n");
platform_device_put(mdp_dev);
return -ENOMEM;
}
@@ -223,11 +243,6 @@
fbi->var.hsync_len = mfd->panel_info.lcdc.h_pulse_width;
fbi->var.vsync_len = mfd->panel_info.lcdc.v_pulse_width;
-#ifndef CONFIG_MSM_BUS_SCALING
- mfd->ebi1_clk = clk_get(NULL, "ebi1_lcdc_clk");
- if (IS_ERR(mfd->ebi1_clk))
- return PTR_ERR(mfd->ebi1_clk);
-#endif
/*
* set driver data
*/
@@ -268,30 +283,6 @@
static int __init lcdc_driver_init(void)
{
- pixel_mdp_clk = clk_get(NULL, "pixel_mdp_clk");
- if (IS_ERR(pixel_mdp_clk))
- pixel_mdp_clk = NULL;
-
- if (pixel_mdp_clk) {
- pixel_lcdc_clk = clk_get(NULL, "pixel_lcdc_clk");
- if (IS_ERR(pixel_lcdc_clk)) {
- printk(KERN_ERR "Couldnt find pixel_lcdc_clk\n");
- return -EINVAL;
- }
- } else {
- pixel_mdp_clk = clk_get(NULL, "mdp_lcdc_pclk_clk");
- if (IS_ERR(pixel_mdp_clk)) {
- printk(KERN_ERR "Couldnt find mdp_lcdc_pclk_clk\n");
- return -EINVAL;
- }
-
- pixel_lcdc_clk = clk_get(NULL, "mdp_lcdc_pad_pclk_clk");
- if (IS_ERR(pixel_lcdc_clk)) {
- printk(KERN_ERR "Couldnt find mdp_lcdc_pad_pclk_clk\n");
- return -EINVAL;
- }
- }
-
return lcdc_register_driver();
}
diff --git a/drivers/video/msm/lvds.c b/drivers/video/msm/lvds.c
index d9785d8..1a7619d 100644
--- a/drivers/video/msm/lvds.c
+++ b/drivers/video/msm/lvds.c
@@ -274,6 +274,12 @@
if (pdev->id == 0) {
lvds_pdata = pdev->dev.platform_data;
+
+ lvds_clk = clk_get(&pdev->dev, "lvds_clk");
+ if (IS_ERR_OR_NULL(lvds_clk)) {
+ pr_err("Couldnt find lvds_clk\n");
+ lvds_clk = NULL;
+ }
return 0;
}
@@ -371,12 +377,6 @@
static int __init lvds_driver_init(void)
{
- lvds_clk = clk_get(NULL, "lvds_clk");
- if (IS_ERR_OR_NULL(lvds_clk)) {
- pr_err("Couldnt find lvds_clk\n");
- lvds_clk = NULL;
- }
-
return lvds_register_driver();
}
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index c6f9fb2..7f5e125 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -2,7 +2,7 @@
* MSM MDDI Transport
*
* Copyright (C) 2007 Google Incorporated
- * Copyright (c) 2007-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2007-2012, Code Aurora Forum. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -296,9 +296,38 @@
int rc;
resource_size_t size ;
u32 clk_rate;
+ unsigned long rate;
+ int ret;
+ struct clk *ebi1_clk = NULL;
if ((pdev->id == 0) && (pdev->num_resources >= 0)) {
mddi_pdata = pdev->dev.platform_data;
+ pmdh_clk_status = 0;
+
+ mddi_clk = clk_get(&pdev->dev, "core_clk");
+ if (IS_ERR(mddi_clk)) {
+ pr_err("can't find mddi_clk\n");
+ return PTR_ERR(mddi_clk);
+ }
+ rate = clk_round_rate(mddi_clk, 49000000);
+ ret = clk_set_rate(mddi_clk, rate);
+ if (ret)
+ pr_err("Can't set mddi_clk min rate to %lu\n",
+ rate);
+
+ pr_info("mddi_clk init rate is %lu\n",
+ clk_get_rate(mddi_clk));
+ mddi_pclk = clk_get(&pdev->dev, "iface_clk");
+ if (IS_ERR(mddi_pclk))
+ mddi_pclk = NULL;
+ pmdh_clk_enable();
+
+#ifndef CONFIG_MSM_BUS_SCALING
+ ebi1_clk = clk_get(&pdev->dev, "mem_clk");
+ if (IS_ERR(ebi1_clk))
+ return PTR_ERR(ebi1_clk);
+ clk_set_rate(ebi1_clk, 65000000);
+#endif
size = resource_size(&pdev->resource[0]);
msm_pmdh_base = ioremap(pdev->resource[0].start, size);
@@ -320,6 +349,7 @@
return -EPERM;
mfd = platform_get_drvdata(pdev);
+ mfd->ebi1_clk = ebi1_clk;
if (!mfd)
return -ENODEV;
@@ -397,12 +427,6 @@
rc = 0;
pm_runtime_enable(&pdev->dev);
-#ifndef CONFIG_MSM_BUS_SCALING
- mfd->ebi1_clk = clk_get(NULL, "ebi1_mddi_clk");
- if (IS_ERR(mfd->ebi1_clk))
- return PTR_ERR(mfd->ebi1_clk);
- clk_set_rate(mfd->ebi1_clk, 65000000);
-#endif
/*
* register in mdp driver
*/
@@ -547,25 +571,6 @@
static int __init mddi_driver_init(void)
{
int ret;
- unsigned long rate;
- pmdh_clk_status = 0;
-
- mddi_clk = clk_get(NULL, "mddi_clk");
- if (IS_ERR(mddi_clk)) {
- printk(KERN_ERR "can't find mddi_clk\n");
- return PTR_ERR(mddi_clk);
- }
- rate = clk_round_rate(mddi_clk, 49000000);
- ret = clk_set_rate(mddi_clk, rate);
- if (ret)
- printk(KERN_ERR "Can't set mddi_clk min rate to %lu\n", rate);
-
- printk(KERN_INFO "mddi_clk init rate is %lu\n",
- clk_get_rate(mddi_clk));
- mddi_pclk = clk_get(NULL, "mddi_pclk");
- if (IS_ERR(mddi_pclk))
- mddi_pclk = NULL;
- pmdh_clk_enable();
ret = mddi_register_driver();
if (ret) {
diff --git a/drivers/video/msm/mddi_ext.c b/drivers/video/msm/mddi_ext.c
index 677b46c..09cc201 100644
--- a/drivers/video/msm/mddi_ext.c
+++ b/drivers/video/msm/mddi_ext.c
@@ -150,6 +150,18 @@
if ((pdev->id == 0) && (pdev->num_resources >= 0)) {
mddi_ext_pdata = pdev->dev.platform_data;
+ mddi_ext_clk = clk_get(&pdev->dev, "core_clk");
+ if (IS_ERR(mddi_ext_clk)) {
+ pr_err("can't find emdh_clk\n");
+ return PTR_ERR(mddi_ext_clk);
+ }
+ clk_enable(mddi_ext_clk);
+
+ mddi_ext_pclk = clk_get(&pdev->dev, "iface_clk");
+ if (IS_ERR(mddi_ext_pclk))
+ mddi_ext_pclk = NULL;
+ else
+ clk_enable(mddi_ext_pclk);
size = resource_size(&pdev->resource[0]);
msm_emdh_base = ioremap(pdev->resource[0].start, size);
@@ -329,19 +341,6 @@
{
int ret;
- mddi_ext_clk = clk_get(NULL, "emdh_clk");
- if (IS_ERR(mddi_ext_clk)) {
- printk(KERN_ERR "can't find emdh_clk\n");
- return PTR_ERR(mddi_ext_clk);
- }
- clk_enable(mddi_ext_clk);
-
- mddi_ext_pclk = clk_get(NULL, "emdh_pclk");
- if (IS_ERR(mddi_ext_pclk))
- mddi_ext_pclk = NULL;
- else
- clk_enable(mddi_ext_pclk);
-
ret = mddi_ext_register_driver();
if (ret) {
clk_disable(mddi_ext_clk);
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c
index 79464bf..d841e11 100644
--- a/drivers/video/msm/mdp.c
+++ b/drivers/video/msm/mdp.c
@@ -50,6 +50,7 @@
static struct clk *mdp_lut_clk;
int mdp_rev;
+static struct platform_device *mdp_init_pdev;
static struct regulator *footswitch;
static unsigned int mdp_footswitch_on;
@@ -1692,7 +1693,8 @@
return clk_rate;
}
-static int mdp_irq_clk_setup(char cont_splashScreen)
+static int mdp_irq_clk_setup(struct platform_device *pdev,
+ char cont_splashScreen)
{
int ret;
@@ -1715,7 +1717,7 @@
mdp_footswitch_on = 1;
}
- mdp_clk = clk_get(NULL, "mdp_clk");
+ mdp_clk = clk_get(&pdev->dev, "core_clk");
if (IS_ERR(mdp_clk)) {
ret = PTR_ERR(mdp_clk);
printk(KERN_ERR "can't get mdp_clk error:%d!\n", ret);
@@ -1723,12 +1725,12 @@
return ret;
}
- mdp_pclk = clk_get(NULL, "mdp_pclk");
+ mdp_pclk = clk_get(&pdev->dev, "iface_clk");
if (IS_ERR(mdp_pclk))
mdp_pclk = NULL;
if (mdp_rev >= MDP_REV_42) {
- mdp_lut_clk = clk_get(NULL, "lut_mdp");
+ mdp_lut_clk = clk_get(&pdev->dev, "lut_clk");
if (IS_ERR(mdp_lut_clk)) {
ret = PTR_ERR(mdp_lut_clk);
pr_err("can't get mdp_clk error:%d!\n", ret);
@@ -1779,7 +1781,7 @@
static int contSplash_update_done;
if ((pdev->id == 0) && (pdev->num_resources > 0)) {
-
+ mdp_init_pdev = pdev;
mdp_pdata = pdev->dev.platform_data;
size = resource_size(&pdev->resource[0]);
@@ -1799,7 +1801,7 @@
mdp_rev = mdp_pdata->mdp_rev;
- rc = mdp_irq_clk_setup(mdp_pdata->cont_splash_enabled);
+ rc = mdp_irq_clk_setup(pdev, mdp_pdata->cont_splash_enabled);
if (rc)
return rc;
@@ -1956,7 +1958,7 @@
mdp4_display_intf_sel(if_no, intf);
#endif
- mdp_config_vsync(mfd);
+ mdp_config_vsync(mdp_init_pdev, mfd);
break;
#ifdef CONFIG_FB_MSM_MIPI_DSI
@@ -2032,7 +2034,7 @@
INIT_WORK(&mfd->dma_update_worker,
mdp_lcd_update_workqueue_handler);
#endif
- mdp_config_vsync(mfd);
+ mdp_config_vsync(mdp_init_pdev, mfd);
break;
#endif
diff --git a/drivers/video/msm/mdp.h b/drivers/video/msm/mdp.h
index be57ee0..cf3a26a 100644
--- a/drivers/video/msm/mdp.h
+++ b/drivers/video/msm/mdp.h
@@ -681,7 +681,8 @@
void mdp_dma2_update(struct msm_fb_data_type *mfd);
void mdp_vsync_cfg_regs(struct msm_fb_data_type *mfd,
boolean first_time);
-void mdp_config_vsync(struct msm_fb_data_type *);
+void mdp_config_vsync(struct platform_device *pdev,
+ struct msm_fb_data_type *mfd);
uint32 mdp_get_lcd_line_counter(struct msm_fb_data_type *mfd);
enum hrtimer_restart mdp_dma2_vsync_hrtimer_handler(struct hrtimer *ht);
void mdp_set_scale(MDPIBUF *iBuf,
diff --git a/drivers/video/msm/mdp4_dtv.c b/drivers/video/msm/mdp4_dtv.c
index e3115a3..9f2cf8c 100644
--- a/drivers/video/msm/mdp4_dtv.c
+++ b/drivers/video/msm/mdp4_dtv.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -177,6 +177,40 @@
if (pdev->id == 0) {
dtv_pdata = pdev->dev.platform_data;
+#ifdef CONFIG_MSM_BUS_SCALING
+ if (!dtv_bus_scale_handle && dtv_pdata &&
+ dtv_pdata->bus_scale_table) {
+ dtv_bus_scale_handle =
+ msm_bus_scale_register_client(
+ dtv_pdata->bus_scale_table);
+ if (!dtv_bus_scale_handle) {
+ pr_err("%s not able to get bus scale\n",
+ __func__);
+ }
+ }
+#else
+ ebi1_clk = clk_get(&pdev->dev, "mem_clk");
+ if (IS_ERR(ebi1_clk)) {
+ ebi1_clk = NULL;
+ pr_warning("%s: Couldn't get ebi1 clock\n", __func__);
+ }
+#endif
+ tv_src_clk = clk_get(&pdev->dev, "src_clk");
+ if (IS_ERR(tv_src_clk)) {
+ pr_err("error: can't get tv_src_clk!\n");
+ return IS_ERR(tv_src_clk);
+ }
+
+ hdmi_clk = clk_get(&pdev->dev, "hdmi_clk");
+ if (IS_ERR(hdmi_clk)) {
+ pr_err("error: can't get hdmi_clk!\n");
+ return IS_ERR(hdmi_clk);
+ }
+
+ mdp_tv_clk = clk_get(&pdev->dev, "mdp_clk");
+ if (IS_ERR(mdp_tv_clk))
+ mdp_tv_clk = NULL;
+
return 0;
}
@@ -237,24 +271,6 @@
fbi->var.hsync_len = mfd->panel_info.lcdc.h_pulse_width;
fbi->var.vsync_len = mfd->panel_info.lcdc.v_pulse_width;
-#ifdef CONFIG_MSM_BUS_SCALING
- if (!dtv_bus_scale_handle && dtv_pdata &&
- dtv_pdata->bus_scale_table) {
- dtv_bus_scale_handle =
- msm_bus_scale_register_client(
- dtv_pdata->bus_scale_table);
- if (!dtv_bus_scale_handle) {
- pr_err("%s not able to get bus scale\n",
- __func__);
- }
- }
-#else
- ebi1_clk = clk_get(NULL, "ebi1_dtv_clk");
- if (IS_ERR(ebi1_clk)) {
- ebi1_clk = NULL;
- pr_warning("%s: Couldn't get ebi1 clock\n", __func__);
- }
-#endif
/*
* set driver data
*/
@@ -304,22 +320,6 @@
static int __init dtv_driver_init(void)
{
- tv_src_clk = clk_get(NULL, "tv_src_clk");
- if (IS_ERR(tv_src_clk)) {
- pr_err("error: can't get tv_src_clk!\n");
- return IS_ERR(tv_src_clk);
- }
-
- hdmi_clk = clk_get(NULL, "hdmi_clk");
- if (IS_ERR(hdmi_clk)) {
- pr_err("error: can't get hdmi_clk!\n");
- return IS_ERR(hdmi_clk);
- }
-
- mdp_tv_clk = clk_get(NULL, "mdp_tv_clk");
- if (IS_ERR(mdp_tv_clk))
- mdp_tv_clk = NULL;
-
return dtv_register_driver();
}
diff --git a/drivers/video/msm/mdp_vsync.c b/drivers/video/msm/mdp_vsync.c
index 7500513..c73de92 100644
--- a/drivers/video/msm/mdp_vsync.c
+++ b/drivers/video/msm/mdp_vsync.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2008-2009, 2012 Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -291,7 +291,8 @@
}
#endif
-void mdp_config_vsync(struct msm_fb_data_type *mfd)
+void mdp_config_vsync(struct platform_device *pdev,
+ struct msm_fb_data_type *mfd)
{
/* vsync on primary lcd only for now */
if ((mfd->dest != DISPLAY_LCD) || (mfd->panel_info.pdest != DISPLAY_1)
@@ -314,7 +315,7 @@
#ifdef MDP_HW_VSYNC
if (mdp_vsync_clk == NULL)
- mdp_vsync_clk = clk_get(NULL, "mdp_vsync_clk");
+ mdp_vsync_clk = clk_get(&pdev->dev, "vsync_clk");
if (IS_ERR(mdp_vsync_clk)) {
printk(KERN_ERR "error: can't get mdp_vsync_clk!\n");
diff --git a/drivers/video/msm/mipi_dsi.c b/drivers/video/msm/mipi_dsi.c
index a9f5078..7e3eb19 100644
--- a/drivers/video/msm/mipi_dsi.c
+++ b/drivers/video/msm/mipi_dsi.c
@@ -167,7 +167,7 @@
if (mipi_dsi_pdata && mipi_dsi_pdata->dsi_power_save)
mipi_dsi_pdata->dsi_power_save(1);
- cont_splash_clk_ctrl();
+ cont_splash_clk_ctrl(0);
local_bh_disable();
mipi_dsi_ahb_ctrl(1);
local_bh_enable();
@@ -426,13 +426,14 @@
}
}
+ if (mipi_dsi_clk_init(pdev))
+ return -EPERM;
+
mipi_dsi_resource_initialized = 1;
return 0;
}
- mipi_dsi_clk_init(pdev);
-
if (!mipi_dsi_resource_initialized)
return -EPERM;
@@ -447,6 +448,8 @@
if (pdev_list_cnt >= MSM_FB_MAX_DEV_LIST)
return -ENOMEM;
+ if (!mfd->cont_splash_done)
+ cont_splash_clk_ctrl(1);
mdp_dev = platform_device_alloc("mdp", pdev->id);
if (!mdp_dev)
diff --git a/drivers/video/msm/mipi_dsi.h b/drivers/video/msm/mipi_dsi.h
index 79eb8b8..31ce3ba 100644
--- a/drivers/video/msm/mipi_dsi.h
+++ b/drivers/video/msm/mipi_dsi.h
@@ -299,10 +299,10 @@
int target_type);
int mipi_dsi_clk_div_config(uint8 bpp, uint8 lanes,
uint32 *expected_dsi_pclk);
-void mipi_dsi_clk_init(struct platform_device *pdev);
+int mipi_dsi_clk_init(struct platform_device *pdev);
void mipi_dsi_clk_deinit(struct device *dev);
void mipi_dsi_ahb_ctrl(u32 enable);
-void cont_splash_clk_ctrl(void);
+void cont_splash_clk_ctrl(int enable);
void mipi_dsi_turn_on_clks(void);
void mipi_dsi_turn_off_clks(void);
diff --git a/drivers/video/msm/msm_dss_io_7x27a.c b/drivers/video/msm/msm_dss_io_7x27a.c
index 193b89c..70f8982 100644
--- a/drivers/video/msm/msm_dss_io_7x27a.c
+++ b/drivers/video/msm/msm_dss_io_7x27a.c
@@ -32,78 +32,95 @@
static struct clk *ebi1_dsi_clk;
int mipi_dsi_clk_on;
-void mipi_dsi_clk_init(struct platform_device *pdev)
+int mipi_dsi_clk_init(struct platform_device *pdev)
{
- dsi_esc_clk = clk_get(NULL, "dsi_esc_clk");
- if (IS_ERR(dsi_esc_clk)) {
+ struct device *dev = &pdev->dev;
+ dsi_esc_clk = clk_get(dev, "esc_clk");
+ if (IS_ERR_OR_NULL(dsi_esc_clk)) {
printk(KERN_ERR "can't find dsi_esc_clk\n");
+ dsi_esc_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_byte_div_clk = clk_get(NULL, "dsi_byte_clk");
- if (IS_ERR(dsi_byte_div_clk)) {
+ dsi_byte_div_clk = clk_get(dev, "byte_clk");
+ if (IS_ERR_OR_NULL(dsi_byte_div_clk)) {
pr_err("can't find dsi_byte_div_clk\n");
+ dsi_byte_div_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_pixel_clk = clk_get(NULL, "dsi_pixel_clk");
- if (IS_ERR(dsi_pixel_clk)) {
+ dsi_pixel_clk = clk_get(dev, "pixel_clk");
+ if (IS_ERR_OR_NULL(dsi_pixel_clk)) {
pr_err("can't find dsi_pixel_clk\n");
+ dsi_pixel_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_clk = clk_get(NULL, "dsi_clk");
- if (IS_ERR(dsi_clk)) {
+ dsi_clk = clk_get(dev, "core_clk");
+ if (IS_ERR_OR_NULL(dsi_clk)) {
pr_err("can't find dsi_clk\n");
+ dsi_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_ref_clk = clk_get(NULL, "dsi_ref_clk");
- if (IS_ERR(dsi_ref_clk)) {
+ dsi_ref_clk = clk_get(dev, "ref_clk");
+ if (IS_ERR_OR_NULL(dsi_ref_clk)) {
pr_err("can't find dsi_ref_clk\n");
+ dsi_ref_clk = NULL;
goto mipi_dsi_clk_err;
}
- mdp_dsi_pclk = clk_get(NULL, "mdp_dsi_pclk");
- if (IS_ERR(mdp_dsi_pclk)) {
+ mdp_dsi_pclk = clk_get(dev, "mdp_clk");
+ if (IS_ERR_OR_NULL(mdp_dsi_pclk)) {
pr_err("can't find mdp_dsi_pclk\n");
+ mdp_dsi_pclk = NULL;
goto mipi_dsi_clk_err;
}
- ahb_m_clk = clk_get(NULL, "ahb_m_clk");
- if (IS_ERR(ahb_m_clk)) {
+ ahb_m_clk = clk_get(dev, "master_iface_clk");
+ if (IS_ERR_OR_NULL(ahb_m_clk)) {
pr_err("can't find ahb_m_clk\n");
+ ahb_m_clk = NULL;
goto mipi_dsi_clk_err;
}
- ahb_s_clk = clk_get(NULL, "ahb_s_clk");
- if (IS_ERR(ahb_s_clk)) {
+ ahb_s_clk = clk_get(dev, "slave_iface_clk");
+ if (IS_ERR_OR_NULL(ahb_s_clk)) {
pr_err("can't find ahb_s_clk\n");
+ ahb_s_clk = NULL;
goto mipi_dsi_clk_err;
}
- ebi1_dsi_clk = clk_get(NULL, "ebi1_lcdc_clk");
- if (IS_ERR(ebi1_dsi_clk)) {
+ ebi1_dsi_clk = clk_get(dev, "mem_clk");
+ if (IS_ERR_OR_NULL(ebi1_dsi_clk)) {
pr_err("can't find ebi1_dsi_clk\n");
+ ebi1_dsi_clk = NULL;
goto mipi_dsi_clk_err;
}
- return;
+ return 0;
mipi_dsi_clk_err:
mipi_dsi_clk_deinit(NULL);
-
+ return -EPERM;
}
void mipi_dsi_clk_deinit(struct device *dev)
{
- clk_put(mdp_dsi_pclk);
- clk_put(ahb_m_clk);
- clk_put(ahb_s_clk);
- clk_put(dsi_ref_clk);
- clk_put(dsi_byte_div_clk);
- clk_put(dsi_esc_clk);
- clk_put(ebi1_dsi_clk);
+ if (mdp_dsi_pclk)
+ clk_put(mdp_dsi_pclk);
+ if (ahb_m_clk)
+ clk_put(ahb_m_clk);
+ if (ahb_s_clk)
+ clk_put(ahb_s_clk);
+ if (dsi_ref_clk)
+ clk_put(dsi_ref_clk);
+ if (dsi_byte_div_clk)
+ clk_put(dsi_byte_div_clk);
+ if (dsi_esc_clk)
+ clk_put(dsi_esc_clk);
+ if (ebi1_dsi_clk)
+ clk_put(ebi1_dsi_clk);
}
static void mipi_dsi_clk_ctrl(struct dsi_clk_desc *clk, int clk_en)
@@ -295,7 +312,7 @@
wmb();
}
-void cont_splash_clk_ctrl(void)
+void cont_splash_clk_ctrl(int enable)
{
}
diff --git a/drivers/video/msm/msm_dss_io_8960.c b/drivers/video/msm/msm_dss_io_8960.c
index a6f1d36..eb30448 100644
--- a/drivers/video/msm/msm_dss_io_8960.c
+++ b/drivers/video/msm/msm_dss_io_8960.c
@@ -64,64 +64,67 @@
static struct clk *amp_pclk;
int mipi_dsi_clk_on;
-static int cont_splash_clks_enabled;
-
-void mipi_dsi_clk_init(struct platform_device *pdev)
+int mipi_dsi_clk_init(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
struct device *dev = &pdev->dev;
mfd = platform_get_drvdata(pdev);
- amp_pclk = clk_get(NULL, "amp_pclk");
- if (IS_ERR(amp_pclk)) {
+ amp_pclk = clk_get(dev, "arb_clk");
+ if (IS_ERR_OR_NULL(amp_pclk)) {
pr_err("can't find amp_pclk\n");
+ amp_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_m_pclk = clk_get(dev, "dsi_m_pclk");
- if (IS_ERR(dsi_m_pclk)) {
+ dsi_m_pclk = clk_get(dev, "master_iface_clk");
+ if (IS_ERR_OR_NULL(dsi_m_pclk)) {
pr_err("can't find dsi_m_pclk\n");
+ dsi_m_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_s_pclk = clk_get(dev, "dsi_s_pclk");
- if (IS_ERR(dsi_s_pclk)) {
+ dsi_s_pclk = clk_get(dev, "slave_iface_clk");
+ if (IS_ERR_OR_NULL(dsi_s_pclk)) {
pr_err("can't find dsi_s_pclk\n");
+ dsi_s_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_byte_div_clk = clk_get(dev, "dsi_byte_div_clk");
+ dsi_byte_div_clk = clk_get(dev, "byte_clk");
if (IS_ERR(dsi_byte_div_clk)) {
pr_err("can't find dsi_byte_div_clk\n");
+ dsi_byte_div_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_esc_clk = clk_get(dev, "dsi_esc_clk");
+ dsi_esc_clk = clk_get(dev, "esc_clk");
if (IS_ERR(dsi_esc_clk)) {
printk(KERN_ERR "can't find dsi_esc_clk\n");
+ dsi_esc_clk = NULL;
goto mipi_dsi_clk_err;
}
- if (!(mfd->cont_splash_done)) {
- clk_enable(dsi_byte_div_clk);
- clk_enable(dsi_esc_clk);
- cont_splash_clks_enabled = 1;
- }
-
- return;
+ return 0;
mipi_dsi_clk_err:
- mipi_dsi_clk_deinit(NULL);
+ mipi_dsi_clk_deinit(dev);
+ return -EPERM;
}
void mipi_dsi_clk_deinit(struct device *dev)
{
- clk_put(amp_pclk);
- clk_put(dsi_m_pclk);
- clk_put(dsi_s_pclk);
- clk_put(dsi_byte_div_clk);
- clk_put(dsi_esc_clk);
+ if (amp_pclk)
+ clk_put(amp_pclk);
+ if (amp_pclk)
+ clk_put(dsi_m_pclk);
+ if (dsi_s_pclk)
+ clk_put(dsi_s_pclk);
+ if (dsi_byte_div_clk)
+ clk_put(dsi_byte_div_clk);
+ if (dsi_esc_clk)
+ clk_put(dsi_esc_clk);
}
static void mipi_dsi_clk_ctrl(struct dsi_clk_desc *clk, int clk_en)
@@ -541,12 +544,17 @@
mipi_dsi_configure_serdes();
}
-void cont_splash_clk_ctrl(void)
+void cont_splash_clk_ctrl(int enable)
{
- if (cont_splash_clks_enabled) {
- clk_disable(dsi_byte_div_clk);
- clk_disable(dsi_esc_clk);
- cont_splash_clks_enabled = 0;
+ static int cont_splash_clks_enabled;
+ if (enable && !cont_splash_clks_enabled) {
+ clk_enable(dsi_byte_div_clk);
+ clk_enable(dsi_esc_clk);
+ cont_splash_clks_enabled = 1;
+ } else if (!enable && cont_splash_clks_enabled) {
+ clk_disable(dsi_byte_div_clk);
+ clk_disable(dsi_esc_clk);
+ cont_splash_clks_enabled = 0;
}
}
diff --git a/drivers/video/msm/msm_dss_io_8x60.c b/drivers/video/msm/msm_dss_io_8x60.c
index 2231bce..72d7960 100644
--- a/drivers/video/msm/msm_dss_io_8x60.c
+++ b/drivers/video/msm/msm_dss_io_8x60.c
@@ -34,51 +34,63 @@
static struct clk *amp_pclk;
int mipi_dsi_clk_on;
-void mipi_dsi_clk_init(struct platform_device *pdev)
+int mipi_dsi_clk_init(struct platform_device *pdev)
{
- amp_pclk = clk_get(NULL, "amp_pclk");
- if (IS_ERR(amp_pclk)) {
+ struct device *dev = &pdev->dev;
+ amp_pclk = clk_get(dev, "arb_clk");
+ if (IS_ERR_OR_NULL(amp_pclk)) {
pr_err("can't find amp_pclk\n");
+ amp_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_m_pclk = clk_get(NULL, "dsi_m_pclk");
- if (IS_ERR(dsi_m_pclk)) {
+ dsi_m_pclk = clk_get(dev, "master_iface_clk");
+ if (IS_ERR_OR_NULL(dsi_m_pclk)) {
pr_err("can't find dsi_m_pclk\n");
+ dsi_m_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_s_pclk = clk_get(NULL, "dsi_s_pclk");
- if (IS_ERR(dsi_s_pclk)) {
+ dsi_s_pclk = clk_get(dev, "slave_iface_clk");
+ if (IS_ERR_OR_NULL(dsi_s_pclk)) {
pr_err("can't find dsi_s_pclk\n");
+ dsi_s_pclk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_byte_div_clk = clk_get(NULL, "dsi_byte_div_clk");
- if (IS_ERR(dsi_byte_div_clk)) {
+ dsi_byte_div_clk = clk_get(dev, "byte_clk");
+ if (IS_ERR_OR_NULL(dsi_byte_div_clk)) {
pr_err("can't find dsi_byte_div_clk\n");
+ dsi_byte_div_clk = NULL;
goto mipi_dsi_clk_err;
}
- dsi_esc_clk = clk_get(NULL, "dsi_esc_clk");
- if (IS_ERR(dsi_esc_clk)) {
+ dsi_esc_clk = clk_get(dev, "esc_clk");
+ if (IS_ERR_OR_NULL(dsi_esc_clk)) {
printk(KERN_ERR "can't find dsi_esc_clk\n");
+ dsi_esc_clk = NULL;
goto mipi_dsi_clk_err;
}
- return;
+ return 0;
mipi_dsi_clk_err:
mipi_dsi_clk_deinit(NULL);
+ return -EPERM;
}
void mipi_dsi_clk_deinit(struct device *dev)
{
- clk_put(amp_pclk);
- clk_put(dsi_m_pclk);
- clk_put(dsi_s_pclk);
- clk_put(dsi_byte_div_clk);
- clk_put(dsi_esc_clk);
+ if (amp_pclk)
+ clk_put(amp_pclk);
+ if (dsi_m_pclk)
+ clk_put(dsi_m_pclk);
+ if (dsi_s_pclk)
+ clk_put(dsi_s_pclk);
+ if (dsi_byte_div_clk)
+ clk_put(dsi_byte_div_clk);
+ if (dsi_esc_clk)
+ clk_put(dsi_esc_clk);
}
static void mipi_dsi_clk_ctrl(struct dsi_clk_desc *clk, int clk_en)
@@ -391,7 +403,7 @@
wmb();
}
-void cont_splash_clk_ctrl(void)
+void cont_splash_clk_ctrl(int enable)
{
}
diff --git a/drivers/video/msm/tvenc.c b/drivers/video/msm/tvenc.c
index 672b2a7..e494cfa 100644
--- a/drivers/video/msm/tvenc.c
+++ b/drivers/video/msm/tvenc.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -316,7 +316,8 @@
struct msm_fb_data_type *mfd;
struct platform_device *mdp_dev = NULL;
struct msm_fb_panel_data *pdata = NULL;
- int rc;
+ int rc, ret;
+ struct clk *ebi1_clk = NULL;
if (pdev->id == 0) {
tvenc_base = ioremap(pdev->resource[0].start,
@@ -326,6 +327,61 @@
pr_err("tvenc_base ioremap failed!\n");
return -ENOMEM;
}
+
+ tvenc_clk = clk_get(&pdev->dev, "enc_clk");
+ tvdac_clk = clk_get(&pdev->dev, "dac_clk");
+ tvenc_pclk = clk_get(&pdev->dev, "iface_clk");
+ mdp_tv_clk = clk_get(&pdev->dev, "mdp_clk");
+
+#ifndef CONFIG_MSM_BUS_SCALING
+ ebi1_clk = clk_get(&pdev->dev, "mem_clk");
+ if (IS_ERR(ebi1_clk)) {
+ rc = PTR_ERR(ebi1_clk);
+ goto tvenc_probe_err;
+ }
+ clk_set_rate(ebi1_clk, MSM_SYSTEM_BUS_RATE);
+#endif
+
+#ifdef CONFIG_FB_MSM_MDP40
+ tv_src_clk = clk_get(&pdev->dev, "src_clk");
+ if (IS_ERR(tv_src_clk))
+ tv_src_clk = tvenc_clk; /* Fallback to slave */
+#endif
+
+ if (IS_ERR(tvenc_clk)) {
+ pr_err("%s: error: can't get tvenc_clk!\n", __func__);
+ return PTR_ERR(tvenc_clk);
+ }
+
+ if (IS_ERR(tvdac_clk)) {
+ pr_err("%s: error: can't get tvdac_clk!\n", __func__);
+ return PTR_ERR(tvdac_clk);
+ }
+
+ if (IS_ERR(tvenc_pclk)) {
+ ret = PTR_ERR(tvenc_pclk);
+ if (-ENOENT == ret)
+ pr_info("%s: tvenc_pclk does not exist!\n",
+ __func__);
+ else {
+ pr_err("%s: error: can't get tvenc_pclk!\n",
+ __func__);
+ return ret;
+ }
+ }
+
+ if (IS_ERR(mdp_tv_clk)) {
+ ret = PTR_ERR(mdp_tv_clk);
+ if (-ENOENT == ret)
+ pr_info("%s: mdp_tv_clk does not exist!\n",
+ __func__);
+ else {
+ pr_err("%s: error: can't get mdp_tv_clk!\n",
+ __func__);
+ return ret;
+ }
+ }
+
tvenc_pdata = pdev->dev.platform_data;
tvenc_resource_initialized = 1;
return 0;
@@ -335,6 +391,7 @@
return -EPERM;
mfd = platform_get_drvdata(pdev);
+ mfd->ebi1_clk = ebi1_clk;
if (!mfd)
return -ENODEV;
@@ -397,13 +454,6 @@
__func__);
}
}
-#else
- mfd->ebi1_clk = clk_get(NULL, "ebi1_tv_clk");
- if (IS_ERR(mfd->ebi1_clk)) {
- rc = PTR_ERR(mfd->ebi1_clk);
- goto tvenc_probe_err;
- }
- clk_set_rate(mfd->ebi1_clk, MSM_SYSTEM_BUS_RATE);
#endif
/*
@@ -466,48 +516,6 @@
static int __init tvenc_driver_init(void)
{
- int ret;
- tvenc_clk = clk_get(NULL, "tv_enc_clk");
- tvdac_clk = clk_get(NULL, "tv_dac_clk");
- tvenc_pclk = clk_get(NULL, "tv_enc_pclk");
- mdp_tv_clk = clk_get(NULL, "mdp_tv_clk");
-
-#ifdef CONFIG_FB_MSM_MDP40
- tv_src_clk = clk_get(NULL, "tv_src_clk");
- if (IS_ERR(tv_src_clk))
- tv_src_clk = tvenc_clk; /* Fallback to slave */
-#endif
-
- if (IS_ERR(tvenc_clk)) {
- pr_err("%s: error: can't get tvenc_clk!\n", __func__);
- return PTR_ERR(tvenc_clk);
- }
-
- if (IS_ERR(tvdac_clk)) {
- pr_err("%s: error: can't get tvdac_clk!\n", __func__);
- return PTR_ERR(tvdac_clk);
- }
-
- if (IS_ERR(tvenc_pclk)) {
- ret = PTR_ERR(tvenc_pclk);
- if (-ENOENT == ret)
- pr_info("%s: tvenc_pclk does not exist!\n", __func__);
- else {
- pr_err("%s: error: can't get tvenc_pclk!\n", __func__);
- return ret;
- }
- }
-
- if (IS_ERR(mdp_tv_clk)) {
- ret = PTR_ERR(mdp_tv_clk);
- if (-ENOENT == ret)
- pr_info("%s: mdp_tv_clk does not exist!\n", __func__);
- else {
- pr_err("%s: error: can't get mdp_tv_clk!\n", __func__);
- return ret;
- }
- }
-
return tvenc_register_driver();
}