blob: 418c4a5535f94161cdf0d0e9c5aee66c17761e5b [file] [log] [blame]
Dinesh Gehlot095043f2023-08-18 10:04:53 +05301/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <device/mmio.h>
4#include <intelblocks/pmc.h>
5#include <soc/iomap.h>
6#include <soc/pm.h>
7
8static void ioe_pmc_read_resources(struct device *dev)
9{
10 /* Add the fixed MMIO resource */
11 mmio_range(dev, PWRMBASE, IOE_PWRM_BASE_ADDRESS, IOE_PWRM_BASE_SIZE);
12}
13
14static void ioe_pmc_init(struct device *dev)
15{
16 if (!CONFIG(USE_PM_ACPI_TIMER))
17 setbits8(ioe_pmc_mmio_regs() + PCH_PWRM_ACPI_TMR_CTL, ACPI_TIM_DIS);
18}
19
20struct device_operations ioe_pmc_ops = {
21 .read_resources = ioe_pmc_read_resources,
22 .set_resources = noop_set_resources,
23 .init = ioe_pmc_init,
24};