*/
void hdcp22_clk_en(bool en)
{
- if (en)
+ if (en) {
+ wr_reg_hhi(HHI_HDCP22_CLK_CNTL,
+ (rd_reg_hhi(HHI_HDCP22_CLK_CNTL) & 0xffff0000) |
+ /* [10: 9] fclk_div7=2000/7=285.71 MHz */
+ ((0 << 9) |
+ /* [ 8] clk_en. Enable gated clock */
+ (1 << 8) |
+ /* [ 6: 0] Divide by 1. = 285.71/1 = 285.71 MHz */
+ (0 << 0)));
+
+ wr_reg_hhi(HHI_HDCP22_CLK_CNTL,
+ (rd_reg_hhi(HHI_HDCP22_CLK_CNTL) & 0x0000ffff) |
+ /* [26:25] select cts_oscin_clk=24 MHz */
+ ((0 << 25) |
+ (1 << 24) | /* [ 24] Enable gated clock */
+ (0 << 16)));
hdmirx_wr_bits_top(TOP_CLK_CNTL, MSK(3, 3), 0x7);
- else
+ } else {
hdmirx_wr_bits_top(TOP_CLK_CNTL, MSK(3, 3), 0x0);
+ wr_reg_hhi(HHI_HDCP22_CLK_CNTL, 0);
+ }
}
/*
*/
void hdcp22_suspend(void)
{
- wr_reg_hhi(HHI_HDCP22_CLK_CNTL, 0);
hdcp22_clk_en(0);
/* note: can't pull down hpd before enter suspend */
/* it will stop cec wake up func if EE domain still working */