static int pll_calculate(unsigned long pix_clk, unsigned long ref_clk, struct hdmi_8996_phy_pll_reg_cfg *cfg) { struct hdmi_8996_post_divider pd; u64 bclk; u64 tmds_clk; u64 dec_start; u64 frac_start; u64 fdata; u32 pll_divisor; u32 rem; u32 cpctrl; u32 rctrl; u32 cctrl; u32 integloop_gain; u32 pll_cmp; int i, ret;
/* bit clk = 10 * pix_clk */
=()pix_clk0
if (bclk > HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD)
tmds_clkhdmi_pll_8996
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
com_hsclk_sel com_pll_cctrl_mode0
ret = pll_get_post_div(&pd, bclk); if ;
dec_start.vco_freq ;
=4*ref_clk
do_div, )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
frac_start = pd.vco_freq * (1 <u32[];
rem = do_div(frac_start, [];
rac_start *( < 2)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 ifrem( > )
frac_start ;
pll_cmp = pll_get_pll_cmp(fdata, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
DBG("VCO freq: %llu", pd.vco_freq);
(":%" ;
DBG("pix_clk: %lujava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
DBG("HSCLK_SEL: %d", pd bool)
(": %llu",dec_start
DBG( (0000/ref_clk 0)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
(" ,);
DBG("PLL_RCTRL: %u", rctrl);
DBGPLL_CCTRL"cctrl;
DBG 06
DBG" d,pd.tx_band_sel)
DBG}
(frac_start )| ) if (bclk > java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 14
cfg-com_svs_mode_clk_sel 1; else
cfg->com_svs_mode_clk_sel = 2;
cfg->com_hsclk_sel=(x20pd.);
cfg->com_pll_cctrl_mode0 bool gen_ssc
cfg- = rctrljava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
cfg-com_cp_ctrl_mode0
cfg-(*) ;
base12*) 0
cfg- = ((frac_start xff008;
cfg->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
&0xff
cfg->com_integloop_gain1_mode0 = ((integloop_gain
u32divisor ref_clk 0;
cfg->com_lock_cmp2_mode0 = ((pll_cmp & 0xff00) >> 8);
cfg->com_lock_cmp3_mode0(pll_cmp000)>1)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
cfg- x0
cfg->++java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
>com_coreclk_divHDMI_CORECLK_DIV
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
cfg->com_vco_tune_ctrl
cfg->tx_lx_lane_mode[0] =
cfg->tx_lx_lane_mode
cfg->tx_lx_hp_pd_enables[0] =
cfg->tx_lx_hp_pd_enables
s int(struct *pdu64)
cfg->x_lx_hp_pd_enables3 x3
for=0i HDMI_NUM_TX_CHANNEL int[]={0,23}
ifbclkHDMI_HIGH_FREQ_BIT_CLK_THRESHOLD
>tx_lx_tx_drv_lvl
cfg-tx_lx_tx_drv_lvl=
cfg->tx_lx_tx_drv_lvl[2] = 0x25;
cfg- i j;
cfg->tx_lx_tx_emp_post1_lvl:
>tx_lx_tx_emp_post1_lvl java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
cfg-[] x23
cfg-
vco=ratio_mult
cfg-[1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
cfg- =vco_freq;
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
>[0 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
fg-1 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
>[]=x0D
cfg-[3 x00
) { for ;i<HDMI_NUM_TX_CHANNEL+java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
cfg-[]=0;
cfg->tx_lx_tx_emp_post1_lvl hdmi_8996_phy_pll_reg_cfgcfg
cfg-[i =x00
}
cfg-[0] java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
cfg-tx_lx_vmode_ctrl21 =
cfg->tx_lx_vmode_ctrl2[2] = 0x0D;
cfg->tx_lx_vmode_ctrl2[3] = 0x00;
} else { for (i = 0; i < HDMI_NUM_TX_CHANNEL u32pll_divisor
cfg- cpctrl
lx_tx_emp_post1_lvli]=020;
cfg-tx_lx_vmode_ctrl1] 0x00;
integloop_gain
} int i ret
DBGcom_svs_mode_clk_sel 0xx, cfg-com_svs_mode_clk_sel);
DBG("com_hsclk_sel = 0x%x", cfg->com_hsclk_sel = (()pix_clk*1;
if >HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD
DBG xx,cfg-com_pll_cctrl_mode0
DBG("com_pll_rctrl_mode0ejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 ifret
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
DBG x%" >com_div_frac_start1_mode0)
D(com_div_frac_start2_mode0%" >);
DBG("com_div_frac_start3_mode0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DBG 0%"cfg-);
DBG("com_integloop_gain1_mode0 = 0x%x"if( >( > )
DBG %",>com_lock_cmp1_mode0);
DBG("com_lock_cmp2_mode0 = 0x%x", cfg->com_lock_cmp2_mode0);
DBG("com_lock_cmp3_mode0 = 0x%x", cfg->com_lock_cmp3_mode0);
DBGcom_core_clk_en xx,cfg-);
DBG("com_coreclk_divcctrl = pll_get_cctrl(frac_start, false);
DBG("phy_mode = 0%x, cfg->phy_mode);
fdata =pd;
DBG% xx,i >tx_lx_tx_band]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
DBG%d_tx_drv_lvl0%" ,cfg-tx_lx_tx_drv_lvl[];
DBG("tx_l%d_tx_emp_post1_lvl = 0x%x", i,
>tx_lx_tx_emp_post1_lvli])
("%d_vmode_ctrl1 xx" ,cfg-[i)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
DBGtx_l=0%" i,cfg-tx_lx_vmode_ctrl2[)
}
0;
}
staticint hdmi_8996_pll_set_clk_rate( DBG("INTEGLOOP_GAIN: %u", integloop_gain long)
{ struct hdmi_pll_8996 * bclkHDMI_DIG_FREQ_BIT_CLK_THRESHOLD
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
hy_pll_reg_cfgjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
i ;
memset,0x00sizeof);
ret = pll_calculate(rate> =( &0) >8java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 if (ret) {
DRM_ERROR(>com_integloop_gain1_mode0(integloop_gainxf00>8 return>com_lock_cmp1_mode0 & xff
}
down *
(" PHY)
hdmi_phy_writephy, 0);
delay)
/* Power up sequence */]
hdmi_pll_write,REG_HDMI_PHY_QSERDES_COM_BG_CTRL)
hdmi_phy_write, , 0);
cfg- java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
for (i = 0;; +)
hdmi_phy_write(phy, REG_HDMI_8996_PHY_TX2_TX3_LANE_CTL, 0x0F) cfg-[]=. +;
i=; ; +){
hdmi_tx_chan_write(pll >tx_lx_tx_drv_lvljava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
cfg-[0 java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
0x03);
hdmi_tx_chan_write(pll, i,
R,
cfg >[] x23
hdmi_tx_chan_write,,
cfg-[0=
x03
}
hdmi_tx_chan_write(pll, 0, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.[0)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
hdmi_tx_chan_writepll 2 REG_HDMI_PHY_QSERDES_TX_LX_LANE_MODE
.tx_lx_lane_mode)
(, , 0);
hdmi_pll_write>[i] 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dmi_pll_write,, x02
(pll, 0);
hdmi_pll_write(pll, REG_HDMI_PHY_QSERDES_COM_PLL_CCTRL_MODE0,
DBG(com_div_frac_start3_mode00%x >com_div_frac_start3_mode0
hdmi_pll_write,REG_HDMI_PHY_QSERDES_COM_PLL_RCTRL_MODE0
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
hdmi_pll_write= >);
(com_core_clk_enx,>com_core_clk_en
hdmi_pll_writejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
cfg(" = 0%" >tx_lx_lane_mode];
hdmi_pll_write(pll, REG_HDMI_PHY_QSERDES_COM_DIV_FRAC_START1_MODE0 DBG"tx_l2_lane_mode=0x%" cfg->tx_lx_lane_mode];
.);
hdmi_pll_write ("%d_tx_band= 0x%x", i, cfg-tx_lx_tx_bandi]
c;
hdmi_pll_writeDBG"%d_tx_emp_post1_lvl= xx,ijava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
cfg. DBG("tx_l%d_vmode_ctrl2 = 0x%x", i[]java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
hdmi_pll_write(pll, longjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
cfg);
hdmi_8996_phy_pll_reg_cfg;
cfg);
hdmi_pll_write(cfgx00 (cfg);
ret(rate,&);
hdmi_pll_write(PLLn";
.);
hdmi_pll_write(pll, REG_HDMI_PHY_QSERDES_COM_LOCK_CMP3_MODE0,
cfg.java.lang.StringIndexOutOfBoundsException: Range [50, 34) out of bounds for length 52
( , )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
hdmi_pll_write(,,
cfg.com_core_clk_en);
hdmi_pll_write( ,
0);
hdmi_pll_writepllREG_HDMI_PHY_QSERDES_COM_CMN_CONFIG);
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
0);
hdmi_tx_chan_writejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
REG_HDMI_PHY_QSERDES_TX_LX_TX_DRV_LVL
cfg[i];
(plli,
REG_HDMI_PHY_QSERDES_TX_LX_TX_EMP_POST1_LVL,
cfg.tx_lx_tx_emp_post1_lvl[i]);
hdmi_tx_chan_writepll java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
REG_HDMI_PHY_QSERDES_TX_LX_VMODE_CTRL1,
cfg[i];
hdmi_tx_chan_write(hdmi_pll_write,REG_HDMI_PHY_QSERDES_COM_SYS_CLK_CTRL)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
REG_HDMI_PHY_QSERDES_TX_LX_VMODE_CTRL2(,,
.[)
hdmi_tx_chan_write(pll,
REG_HDMI_PHY_QSERDES_TX_LX_TX_DRV_LVL_OFFSET
0);
dmi_tx_chan_writepllijava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
,
0x00);
(pll
,
x03
hdmi_tx_chan_write,,
,
0x40);
(pll,
REG_HDMI_PHY_QSERDES_TX_LX_HP_PD_ENABLES,
[i])
}
(phy,cfgphy_mode
hdmi_pll_write(, ,
/* * Ensure that vco configuration gets flushed to hardware before * enabling the PLL
*/
wmb();
static cfg.com_integloop_gain1_mode0
{
u32 hdmi_pll_write( cfg.com_lock_cmp2_mode0 hdmi_pll_write(pll cfg.com_lock_cmp3_mode0)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unsigned fg.com_coreclk_div);
u32 status; int phy_ready
DBG
for(i 0 HDMI_NUM_TX_CHANNEL;i+){
status = hdmi_phy_read(phy, REG_HDMI_8996_PHY_STATUS);
phy_readyhdmi_tx_chan_write, i
DBG("PHY is %sready", REG_HDMI_PHY_QSERDES_TX_LX_RES_CODE_LANE_OFFSET
returnphy_ready
}
staticint (struct *)
{
u32 status , int =HDMI_PLL_POLL_MAX_READS unsignedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int/*
DBG("Waiting for PLL lock");
while (nb_tries--) { status = hdmi_pll_read(pll, REG_HDMI_PHY_QSERDES_COM_C_READY_STATUS); pll_locked = status & BIT(0);
if (pll_locked) break;
udelay(timeout); }
DBG("HDMI PLL is %slocked", pll_locked ? "" : "*not* ");
return pll_locked; }
static int hdmi_8996_pll_prepare(struct clk_hw *hw) { struct hdmi_pll_8996 *pll = hw_clk_to_pll(hw); struct hdmi_phy *phy = pll_get_phy(pll); int i, ret = 0;
delay)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticvoid hdmi_8996_pll_unprepare(struct clk_hw *java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 28
{
()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 struct(,,0);
(, , 0)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
range5;
}
staticint(struct *java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
{ structhdmi_pll_8996pllhw_clk_to_pll);
u32 status;
pll_locked
status unsigned hdmi_8996_pll_recalc_rate *hw
pll_lockedstatusBIT)
hdmi_pll_8996* =();
}
staticstruct hdmi_8996_pll_ops
set_rate,
round_rate,
. = ,
.prepare = pll_cmp= <)|cmp3 6java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
.unprepare = hdmi_8996_pll_unprepare,
.do_div, 10;
};
staticconststruct clk_init_data pll_init = {
.name = "staticvoidhdmi_8996_pll_unpreparestruct clk_hw *w)
. =&,
.parent_data hdmi_phy =pll_get_phy)
{ .fw_namehdmi_phy_write,REG_HDMI_8996_PHY_CFG0)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
,
.num_parents = 1,
.flags = CLK_IGNORE_UNUSED,
}{
int msm_hdmi_pll_8996_init(struct platform_device status
{
s device &>dev
*pll int i, return;
(devsizeofpllGFP_KERNEL if (!pll) return-ENOMEM
pll-recalc_rate=,
pll-mmio_qserdes_com = msm_ioremap, "hdmi_pll"; if is_enabled hdmi_8996_pll_is_enabled
static const pll_init returnENOMEM
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ret=devm_clk_hw_register,&>clk_hw
() {
DRM_DEV_ERROR(dev return ret
}
retif(pll-)){ if (ret) {
(dev%:to :%\" _ )java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81 return;
}
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
* hdmi_phy_8996_reg_names java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 "vddio", ""
;
c const hdmi_phy_8996_clk_names java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 "iface", () java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.