diff --git a/src/soc/qualcomm/common/clock.c b/src/soc/qualcomm/common/clock.c index 1768566f7c..200e16e5c7 100644 --- a/src/soc/qualcomm/common/clock.c +++ b/src/soc/qualcomm/common/clock.c @@ -59,6 +59,15 @@ void clock_reset_bcr(void *bcr_addr, bool assert) clrbits32(bcr_addr, BIT(CLK_CTL_BCR_BLK_SHFT)); } +/* Clock Reset Operations */ +void clock_reset(void *cbcr_addr, bool assert) +{ + if (assert) + setbits32(cbcr_addr, BIT(CLK_CTL_ARES_SHFT)); + else + clrbits32(cbcr_addr, BIT(CLK_CTL_ARES_SHFT)); +} + /* Clock GDSC Operations */ enum cb_err enable_and_poll_gdsc_status(void *gdscr_addr) { diff --git a/src/soc/qualcomm/common/include/soc/clock_common.h b/src/soc/qualcomm/common/include/soc/clock_common.h index 6dd9bfecc8..10ae134c70 100644 --- a/src/soc/qualcomm/common/include/soc/clock_common.h +++ b/src/soc/qualcomm/common/include/soc/clock_common.h @@ -115,8 +115,10 @@ enum clk_ctl_cmd_rcgr { enum clk_ctl_cbcr { CLK_CTL_EN_SHFT = 0, + CLK_CTL_ARES_SHFT = 2, CLK_CTL_OFF_SHFT = 31, CLK_CTL_EN_BMSK = 0x1, + CLK_CTL_ARES_BMSK = 0x1 << CLK_CTL_ARES_SHFT, CLK_CTL_OFF_BMSK = 0x80000000, }; @@ -148,6 +150,8 @@ enum cb_err enable_and_poll_gdsc_status(void *gdscr_addr); void clock_reset_bcr(void *bcr_addr, bool assert); +void clock_reset(void *cbcr_addr, bool assert); + /* * clock_configure(): Configure the clock at the given clock speed (hz). If hz * does not match any entries in the clk_cfg array, will throw and error and die().