diff options
Diffstat (limited to 'src/soc/intel/baytrail/pmutil.c')
-rw-r--r-- | src/soc/intel/baytrail/pmutil.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/pmutil.c b/src/soc/intel/baytrail/pmutil.c index ad37511534..5d37a1366d 100644 --- a/src/soc/intel/baytrail/pmutil.c +++ b/src/soc/intel/baytrail/pmutil.c @@ -21,6 +21,7 @@ #include <arch/io.h> #include <console/console.h> +#include <baytrail/iomap.h> #include <baytrail/lpc.h> #include <baytrail/pci_devs.h> #include <baytrail/pmc.h> @@ -348,3 +349,16 @@ uint32_t clear_alt_status(void) { return print_alt_sts(reset_alt_status()); } + +void clear_pmc_status(void) +{ + uint32_t prsts; + uint32_t gen_pmcon1; + + prsts = read32(PMC_BASE_ADDRESS + PRSTS); + gen_pmcon1 = read32(PMC_BASE_ADDRESS + GEN_PMCON1); + + /* Clear the status bits. */ + write32(PMC_BASE_ADDRESS + GEN_PMCON1, gen_pmcon1); + write32(PMC_BASE_ADDRESS + PRSTS, prsts); +} |