soc/intel/denverton_ns: Add `pmc_mmio_regs` as public function
This patch adds `pmc_mmio_regs` a public function for other IA common code may need to get access to this function. BUG=none TEST=none Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I67a0f7fdcd0827172426bc938569a5022eff16f2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62166 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
fac11d000a
commit
e0ddea49d1
|
@ -28,6 +28,9 @@ struct chipset_power_state {
|
||||||
uint32_t prev_sleep_state;
|
uint32_t prev_sleep_state;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
/* Get base address PMC memory mapped registers. */
|
||||||
|
uint8_t *pmc_mmio_regs(void);
|
||||||
|
|
||||||
struct chipset_power_state *fill_power_state(void);
|
struct chipset_power_state *fill_power_state(void);
|
||||||
|
|
||||||
/* Power Management Utility Functions. */
|
/* Power Management Utility Functions. */
|
||||||
|
|
|
@ -84,6 +84,18 @@ void enable_smi(uint32_t mask)
|
||||||
outl(smi_en, (uint16_t)(pmbase + SMI_EN));
|
outl(smi_en, (uint16_t)(pmbase + SMI_EN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t *pmc_mmio_regs(void)
|
||||||
|
{
|
||||||
|
uint32_t reg32;
|
||||||
|
|
||||||
|
reg32 = pci_read_config32(PCH_DEV_PMC, PMC_PWRM_BASE);
|
||||||
|
|
||||||
|
/* 4KiB alignment. */
|
||||||
|
reg32 &= ~0xfff;
|
||||||
|
|
||||||
|
return (void *)(uintptr_t) reg32;
|
||||||
|
}
|
||||||
|
|
||||||
void disable_smi(uint32_t mask)
|
void disable_smi(uint32_t mask)
|
||||||
{
|
{
|
||||||
uint16_t pmbase = get_pmbase();
|
uint16_t pmbase = get_pmbase();
|
||||||
|
|
Loading…
Reference in New Issue