/* @clk_src: The clock you want to set 0:OSC24M 1:APB1  */
void hal_pwm_clk_src_set(uint32_t channel_in, hal_pwm_clk_src clk_src)
/* @clk_src: The clock you want to set 0:OSC24M 1:APB1  */
void hal_pwm_clk_src_set(uint32_t channel_in, hal_pwm_clk_src clk_src)
{
    unsigned long reg_addr = PWM_BASE + PWM_PCCR_BASE;
    uint32_t reg_val;
    uint32_t channel = channel_in / 2;
    reg_addr += 4 * channel;
    reg_val = hal_readl(reg_addr);
    reg_val = SET_REG_VAL(reg_val, PWM_CLK_SRC_SHIFT, PWM_CLK_SRC_WIDTH, clk_src);
    hal_writel(reg_val, reg_addr);
}