本文整理汇总了C++中OSAL_CCMU_MclkReset函数的典型用法代码示例。如果您正苦于以下问题:C++ OSAL_CCMU_MclkReset函数的具体用法?C++ OSAL_CCMU_MclkReset怎么用?C++ OSAL_CCMU_MclkReset使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OSAL_CCMU_MclkReset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scaler_clk_exit
__s32 scaler_clk_exit(__u32 sel)
{
if(sel == 0)
{
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_defe0mclk, RST_VAILD);
#endif
OSAL_CCMU_MclkOnOff(h_defe0ahbclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe0dramclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe0mclk, CLK_OFF);
OSAL_CCMU_CloseMclk(h_defe0ahbclk);
OSAL_CCMU_CloseMclk(h_defe0dramclk);
OSAL_CCMU_CloseMclk(h_defe0mclk);
g_clk_status &= (CLK_DEFE0_AHB_OFF & CLK_DEFE0_MOD_OFF & CLK_DEFE0_DRAM_OFF);
}
else if(sel == 1)
{
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_defe1mclk, RST_VAILD);
#endif
OSAL_CCMU_MclkOnOff(h_defe1ahbclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe1dramclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe1mclk, CLK_OFF);
OSAL_CCMU_CloseMclk(h_defe1ahbclk);
OSAL_CCMU_CloseMclk(h_defe1dramclk);
OSAL_CCMU_CloseMclk(h_defe1mclk);
g_clk_status &= (CLK_DEFE1_AHB_OFF & CLK_DEFE1_MOD_OFF & CLK_DEFE1_DRAM_OFF);
}
return DIS_SUCCESS;
}
示例2: lcdc_clk_init
__s32 lcdc_clk_init(__u32 screen_id)
{
DE_INF("lcd %d clk init\n", screen_id);
if(screen_id == 0) {
h_lcd0ahbclk = OSAL_CCMU_OpenMclk(AHB_CLK_LCD0);
h_lcd0ch0mclk0 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD0CH0);
#if (!defined CONFIG_ARCH_SUN7I)
h_lcd0ch1mclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD0CH1);
#else
h_lcd0ch1mclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD0CH1_S1);
h_lcd0ch1mclk2 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD0CH1_S2);
#endif
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd0ch0mclk0, RST_INVAILD);
#endif
OSAL_CCMU_SetMclkSrc(h_lcd0ch0mclk0, CLK_LCD_CH0_SRC);
OSAL_CCMU_SetMclkSrc(h_lcd0ch1mclk1, CLK_LCD_CH1_SRC);
OSAL_CCMU_SetMclkDiv(h_lcd0ch1mclk1, 10);
OSAL_CCMU_SetMclkDiv(h_lcd0ch1mclk2, 10);
OSAL_CCMU_MclkOnOff(h_lcd0ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ahbclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd0ch0mclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch0mclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk2, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk2, CLK_OFF);
} else if(screen_id == 1) {
h_lcd1ahbclk = OSAL_CCMU_OpenMclk(AHB_CLK_LCD1);
h_lcd1ch0mclk0 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD1CH0);
#if (!defined CONFIG_ARCH_SUN7I)
h_lcd1ch1mclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD1CH1);
#else
h_lcd1ch1mclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD1CH1_S1);
h_lcd1ch1mclk2 = OSAL_CCMU_OpenMclk(MOD_CLK_LCD1CH1_S2);
#endif
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd1ch0mclk0, RST_INVAILD);
#endif
OSAL_CCMU_SetMclkSrc(h_lcd1ch0mclk0, CLK_LCD_CH0_SRC);
OSAL_CCMU_SetMclkSrc(h_lcd1ch1mclk1, CLK_LCD_CH1_SRC);
OSAL_CCMU_SetMclkDiv(h_lcd1ch1mclk1, 10);
OSAL_CCMU_SetMclkDiv(h_lcd1ch1mclk2, 10);
OSAL_CCMU_MclkOnOff(h_lcd1ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ahbclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd1ch0mclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch0mclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk1, CLK_OFF);
}
return DIS_SUCCESS;
}
示例3: deu_clk_init
__s32 deu_clk_init(__u32 sel)
{
__u32 pll_freq;
__u32 mclk_div;
DE_INF("deu %d clk init\n", sel);
if(!sel) {
h_deuahbclk0 = OSAL_CCMU_OpenMclk(AHB_CLK_DEU0);
h_deudramclk0 = OSAL_CCMU_OpenMclk(DRAM_CLK_DEU0);
h_deumclk0 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDEU0);
OSAL_CCMU_SetMclkSrc(h_deumclk0, CLK_FE_SRC); //FIX CONNECT TO PLL10
OSAL_CCMU_SetMclkDiv(h_deumclk0, 1);
pll_freq = OSAL_CCMU_GetSrcFreq(CLK_FE_SRC);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000) {
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_deumclk0, mclk_div);
OSAL_CCMU_MclkOnOff(h_deuahbclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deuahbclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_deudramclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deudramclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_deumclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deumclk0, CLK_OFF);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_deumclk0, RST_INVAILD);
#endif
} else {
h_deuahbclk1 = OSAL_CCMU_OpenMclk(AHB_CLK_DEU1);
h_deudramclk1 = OSAL_CCMU_OpenMclk(DRAM_CLK_DEU1);
h_deumclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDEU1);
OSAL_CCMU_SetMclkSrc(h_deumclk1, CLK_FE_SRC); //FIX CONNECT TO PLL9
OSAL_CCMU_SetMclkDiv(h_deumclk1, 1);
pll_freq = OSAL_CCMU_GetSrcFreq(CLK_FE_SRC);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000) {
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_deumclk1, mclk_div);
OSAL_CCMU_MclkOnOff(h_deuahbclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deuahbclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_deudramclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deudramclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_deumclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deumclk1, CLK_OFF);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_deumclk1, RST_INVAILD);
#endif
}
return DIS_SUCCESS;
}
示例4: lcdc_clk_init
__s32 lcdc_clk_init(__u32 sel)
{
if(sel == 0)
{
h_lcd0ahbclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_AHB_LCD0);
h_lcd0ch0mclk0 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD0CH0);
h_lcd0ch1mclk1 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD0CH1_S1);
h_lcd0ch1mclk2 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD0CH1_S2);
OSAL_CCMU_SetMclkSrc(h_lcd0ch0mclk0, AW_SYS_CLK_PLL7); //Default to Video Pll0
OSAL_CCMU_SetMclkSrc(h_lcd0ch1mclk1, AW_SYS_CLK_PLL7); //Default to Video Pll0
//OSAL_CCMU_SetMclkSrc(h_lcd0ch1mclk2, AW_SYS_CLK_PLL7); //Default to Video Pll0
OSAL_CCMU_SetMclkDiv(h_lcd0ch1mclk2, 10);
OSAL_CCMU_SetMclkDiv(h_lcd0ch1mclk1, 10);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd0ch0mclk0, RST_INVAILD);
#endif
OSAL_CCMU_MclkOnOff(h_lcd0ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch0mclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch0mclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk2, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk2, CLK_OFF);
g_clk_status |= CLK_LCDC0_AHB_ON;
}
else if(sel == 1)
{
h_lcd1ahbclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_AHB_LCD1);
h_lcd1ch0mclk0 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD1CH0);
h_lcd1ch1mclk1 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD1CH1_S1);
h_lcd1ch1mclk2 = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LCD1CH1_S2);
OSAL_CCMU_SetMclkSrc(h_lcd1ch0mclk0, AW_SYS_CLK_PLL7); //Default to Video Pll0
OSAL_CCMU_SetMclkSrc(h_lcd1ch1mclk1, AW_SYS_CLK_PLL7); //Default to Video Pll0
//OSAL_CCMU_SetMclkSrc(h_lcd1ch1mclk2, AW_SYS_CLK_PLL7); //Default to Video Pll0
OSAL_CCMU_SetMclkDiv(h_lcd1ch1mclk2, 10);
OSAL_CCMU_SetMclkDiv(h_lcd1ch1mclk1, 10);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd1ch0mclk0, RST_INVAILD);
#endif
OSAL_CCMU_MclkOnOff(h_lcd1ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch0mclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch0mclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk2, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk2, CLK_OFF);
g_clk_status |= CLK_LCDC1_AHB_ON;
}
return DIS_SUCCESS;
}
示例5: drc_clk_init
__s32 drc_clk_init(__u32 sel)
{
__u32 pll_freq;
__u32 mclk_div;
DE_INF("drc %d clk init\n", sel);
if(!sel) {
h_drcahbclk0 = OSAL_CCMU_OpenMclk(AHB_CLK_DRC0);
h_drcdramclk0 = OSAL_CCMU_OpenMclk(DRAM_CLK_DRC0);
h_drcmclk0 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDRC0);
OSAL_CCMU_SetMclkSrc(h_drcmclk0, CLK_BE_SRC);
pll_freq = OSAL_CCMU_GetSrcFreq(CLK_BE_SRC);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000) {
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_drcmclk0, mclk_div);
OSAL_CCMU_MclkOnOff(h_drcahbclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcahbclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_drcdramclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcdramclk0, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_drcmclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcmclk0, CLK_OFF);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_drcmclk0, RST_INVAILD);
#endif
} else {
h_drcahbclk1 = OSAL_CCMU_OpenMclk(AHB_CLK_DRC1);
h_drcdramclk1 = OSAL_CCMU_OpenMclk(DRAM_CLK_DRC1);
h_drcmclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDRC1);
OSAL_CCMU_SetMclkSrc(h_drcmclk1, CLK_BE_SRC);
pll_freq = OSAL_CCMU_GetSrcFreq(CLK_BE_SRC);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000) {
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_drcmclk1, mclk_div);
OSAL_CCMU_MclkOnOff(h_drcahbclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcahbclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_drcdramclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcdramclk1, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_drcmclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_drcmclk1, CLK_OFF);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_drcmclk1, RST_INVAILD);
#endif
}
return DIS_SUCCESS;
}
示例6: deu_clk_exit
__s32 deu_clk_exit(__u32 sel)
{
if(!sel)
{
OSAL_CCMU_MclkReset(h_deumclk0, RST_VAILD);
if(g_deu_clk_status & CLK_DEU0_DRAM_ON)
{
OSAL_CCMU_MclkOnOff(h_deudramclk0, CLK_OFF);
}
if(g_deu_clk_status & CLK_DEU0_MOD_ON)
{
OSAL_CCMU_MclkOnOff(h_deumclk0, CLK_OFF);
}
if(g_deu_clk_status & CLK_DEU0_AHB_ON)
{
OSAL_CCMU_MclkOnOff(h_deuahbclk0, CLK_OFF);
}
OSAL_CCMU_CloseMclk(h_deuahbclk0);
OSAL_CCMU_CloseMclk(h_deudramclk0);
OSAL_CCMU_CloseMclk(h_deumclk0);
g_deu_clk_status &= (CLK_DEU0_AHB_OFF & CLK_DEU0_MOD_OFF & CLK_DEU0_DRAM_OFF);
}
else
{
OSAL_CCMU_MclkReset(h_deumclk1, RST_VAILD);
if(g_deu_clk_status & CLK_DEU1_DRAM_ON)
{
OSAL_CCMU_MclkOnOff(h_deudramclk1, CLK_OFF);
}
if(g_deu_clk_status & CLK_DEU1_MOD_ON)
{
OSAL_CCMU_MclkOnOff(h_deumclk1, CLK_OFF);
}
if(g_deu_clk_status & CLK_DEU1_AHB_ON)
{
OSAL_CCMU_MclkOnOff(h_deuahbclk1, CLK_OFF);
}
OSAL_CCMU_CloseMclk(h_deuahbclk1);
OSAL_CCMU_CloseMclk(h_deudramclk1);
OSAL_CCMU_CloseMclk(h_deumclk1);
g_deu_clk_status &= (CLK_DEU1_AHB_OFF & CLK_DEU1_MOD_OFF & CLK_DEU1_DRAM_OFF);
}
return DIS_SUCCESS;
}
示例7: deu_clk_init
__s32 deu_clk_init(__u32 sel)
{
__u32 pll_freq;
__u32 mclk_div;
DE_INF("deu %d clk init\n", sel);
if(!sel)
{
h_deuahbclk0 = OSAL_CCMU_OpenMclk(AHB_CLK_DEU0);
h_deudramclk0 = OSAL_CCMU_OpenMclk(DRAM_CLK_DEU0);
h_deumclk0 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDEU0);
OSAL_CCMU_MclkReset(h_deumclk0, RST_INVAILD);
OSAL_CCMU_SetMclkSrc(h_deumclk0, SYS_CLK_PLL10); //FIX CONNECT TO PLL10
OSAL_CCMU_SetMclkDiv(h_deumclk0, 1);
pll_freq = OSAL_CCMU_GetSrcFreq(SYS_CLK_PLL10);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000)
{
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_deumclk0, mclk_div);
OSAL_CCMU_MclkOnOff(h_deuahbclk0, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deumclk0, CLK_ON);
g_deu_clk_status |= (CLK_DEU0_AHB_ON | CLK_DEU0_MOD_ON);
}
else
{
h_deuahbclk1 = OSAL_CCMU_OpenMclk(AHB_CLK_DEU1);
h_deudramclk1 = OSAL_CCMU_OpenMclk(DRAM_CLK_DEU1);
h_deumclk1 = OSAL_CCMU_OpenMclk(MOD_CLK_IEPDEU1);
OSAL_CCMU_MclkReset(h_deumclk1, RST_INVAILD);
OSAL_CCMU_SetMclkSrc(h_deumclk1, SYS_CLK_PLL10); //FIX CONNECT TO PLL10
OSAL_CCMU_SetMclkDiv(h_deumclk1, 1);
pll_freq = OSAL_CCMU_GetSrcFreq(SYS_CLK_PLL10);
mclk_div = 1;
while((pll_freq / mclk_div) > 300000000)
{
mclk_div ++;
}
OSAL_CCMU_SetMclkDiv(h_deumclk1, mclk_div);
OSAL_CCMU_MclkOnOff(h_deuahbclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_deumclk1, CLK_ON);
g_deu_clk_status |= (CLK_DEU1_AHB_ON | CLK_DEU1_MOD_ON);
}
return DIS_SUCCESS;
}
示例8: dsi_clk_on
__s32 dsi_clk_on(void)
{
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_dsimclk_s, RST_INVAILD);
OSAL_CCMU_MclkReset(h_dsimclk_p, RST_INVAILD);
#endif
OSAL_CCMU_MclkOnOff(h_dsiahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_dsimclk_s, CLK_ON);
OSAL_CCMU_MclkOnOff(h_dsimclk_p, CLK_ON);
g_clk_status |= CLK_DSI_AHB_ON | CLK_DSI_MOD_ON;
return DIS_SUCCESS;
}
示例9: lvds_clk_off
__s32 lvds_clk_off(void)
{
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lvdsmclk, RST_VAILD);
#endif
return DIS_SUCCESS;
}
示例10: drc_clk_exit
__s32 drc_clk_exit(__u32 sel)
{
if(!sel) {
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_drcmclk0, RST_VAILD);
#endif
if(g_drc_clk_status & CLK_DRC0_DRAM_ON) {
OSAL_CCMU_MclkOnOff(h_drcdramclk0, CLK_OFF);
}
if(g_drc_clk_status & CLK_DRC0_MOD_ON) {
OSAL_CCMU_MclkOnOff(h_drcmclk0, CLK_OFF);
}
if(g_drc_clk_status & CLK_DRC0_AHB_ON) {
OSAL_CCMU_MclkOnOff(h_drcahbclk0, CLK_OFF);
}
OSAL_CCMU_CloseMclk(h_drcahbclk0);
OSAL_CCMU_CloseMclk(h_drcdramclk0);
OSAL_CCMU_CloseMclk(h_drcmclk0);
g_drc_clk_status &= (CLK_DRC0_AHB_OFF & CLK_DRC0_MOD_OFF & CLK_DRC0_DRAM_OFF);
} else {
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_drcmclk1, RST_VAILD);
#endif
if(g_drc_clk_status & CLK_DRC1_DRAM_ON) {
OSAL_CCMU_MclkOnOff(h_drcdramclk1, CLK_OFF);
}
if(g_drc_clk_status & CLK_DRC1_MOD_ON) {
OSAL_CCMU_MclkOnOff(h_drcmclk1, CLK_OFF);
}
if(g_drc_clk_status & CLK_DRC1_AHB_ON) {
OSAL_CCMU_MclkOnOff(h_drcahbclk1, CLK_OFF);
}
OSAL_CCMU_CloseMclk(h_drcahbclk1);
OSAL_CCMU_CloseMclk(h_drcdramclk1);
OSAL_CCMU_CloseMclk(h_drcmclk1);
g_drc_clk_status &= (CLK_DRC1_AHB_OFF & CLK_DRC1_MOD_OFF & CLK_DRC1_DRAM_OFF);
}
return DIS_SUCCESS;
}
示例11: lvds_clk_init
__s32 lvds_clk_init(void)
{
h_lvdsmclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_LVDS);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lvdsmclk, RST_INVAILD);
#endif
return DIS_SUCCESS;
}
示例12: lvds_clk_exit
__s32 lvds_clk_exit(void)
{
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lvdsmclk, RST_VAILD);
#endif
OSAL_CCMU_CloseMclk(AW_MOD_CLK_LVDS);
return DIS_SUCCESS;
}
示例13: scaler_clk_init
__s32 scaler_clk_init(__u32 sel)
{
if(sel == 0)
{
h_defe0ahbclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_AHB_DEFE0);
h_defe0dramclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_SDRAM_DEFE0);
h_defe0mclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_DEFE0);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_defe0mclk, RST_INVAILD);
#endif
OSAL_CCMU_SetMclkSrc(h_defe0mclk, AW_SYS_CLK_PLL7); //FIX CONNECT TO VIDEO PLL1
OSAL_CCMU_SetMclkDiv(h_defe0mclk, 1);
OSAL_CCMU_MclkOnOff(h_defe0ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe0mclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe0mclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe0dramclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe0dramclk, CLK_OFF);
g_clk_status |= CLK_DEFE0_AHB_ON;
}
else if(sel == 1)
{
h_defe1ahbclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_AHB_DEFE1);
h_defe1dramclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_SDRAM_DEFE1);
h_defe1mclk = OSAL_CCMU_OpenMclk(AW_MOD_CLK_DEFE1);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_defe1mclk, RST_INVAILD);
#endif
OSAL_CCMU_SetMclkSrc(h_defe1mclk, AW_SYS_CLK_PLL7); //FIX CONNECT TO VIDEO PLL1
OSAL_CCMU_SetMclkDiv(h_defe1mclk, 1);
OSAL_CCMU_MclkOnOff(h_defe1ahbclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe1mclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe1mclk, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_defe1dramclk, CLK_ON);
OSAL_CCMU_MclkOnOff(h_defe1dramclk, CLK_OFF);
g_clk_status |= CLK_DEFE1_AHB_ON;
}
return DIS_SUCCESS;
}
示例14: lcdc_clk_on
//type 0:rst, ahb clk
//type 1: mod clk
__s32 lcdc_clk_on(__u32 screen_id, __u32 tcon_index, __u32 type)
{
if(screen_id == 0) {
if(type == 0) {
OSAL_CCMU_MclkOnOff(h_lcd0ahbclk, CLK_ON);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd0ch0mclk0, RST_INVAILD);
#endif
g_clk_status |= CLK_LCDC0_AHB_ON;
} else if(type == 1) {
if((tcon_index == 0) || (tcon_index == 0xff)) {
OSAL_CCMU_MclkOnOff(h_lcd0ch0mclk0, CLK_ON);
g_clk_status |= CLK_LCDC0_MOD0_ON;
} else if((tcon_index == 1) || (tcon_index == 0xff)) {
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd0ch1mclk2, CLK_ON);
g_clk_status |= CLK_LCDC0_MOD1_ON;
}
}
} else if(screen_id == 1) {
if(type == 0) {
OSAL_CCMU_MclkOnOff(h_lcd1ahbclk, CLK_ON);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_lcd1ch0mclk0, RST_INVAILD);
#endif
g_clk_status |= CLK_LCDC1_AHB_ON;
} else if(type == 1) {
if((tcon_index == 0) || (tcon_index == 0xff)) {
OSAL_CCMU_MclkOnOff(h_lcd1ch0mclk0, CLK_ON);
g_clk_status |= CLK_LCDC1_MOD0_ON;
} else if((tcon_index == 1) || (tcon_index == 0xff)) {
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk1, CLK_ON);
OSAL_CCMU_MclkOnOff(h_lcd1ch1mclk2, CLK_ON);
g_clk_status |= CLK_LCDC1_MOD1_ON;
}
}
}
return DIS_SUCCESS;
}
示例15: dsi_clk_off
__s32 dsi_clk_off(void)
{
OSAL_CCMU_MclkOnOff(h_dsimclk_s, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_dsimclk_p, CLK_OFF);
OSAL_CCMU_MclkOnOff(h_dsiahbclk, CLK_OFF);
#ifdef RESET_OSAL
OSAL_CCMU_MclkReset(h_dsimclk_s, RST_VAILD);
#endif
g_clk_status &= (CLK_DSI_MOD_OFF & CLK_DSI_AHB_OFF);
return DIS_SUCCESS;
}