xref: /openbmc/linux/drivers/platform/x86/intel/pmc/adl.c (revision 33fd5fb1)
108876884SGayatri Kammela // SPDX-License-Identifier: GPL-2.0
208876884SGayatri Kammela /*
308876884SGayatri Kammela  * This file contains platform specific structure definitions
408876884SGayatri Kammela  * and init function used by Alder Lake PCH.
508876884SGayatri Kammela  *
608876884SGayatri Kammela  * Copyright (c) 2022, Intel Corporation.
708876884SGayatri Kammela  * All Rights Reserved.
808876884SGayatri Kammela  *
908876884SGayatri Kammela  */
1008876884SGayatri Kammela 
1108876884SGayatri Kammela #include "core.h"
1208876884SGayatri Kammela 
1308876884SGayatri Kammela /* Alder Lake: PGD PFET Enable Ack Status Register(s) bitmap */
1408876884SGayatri Kammela const struct pmc_bit_map adl_pfear_map[] = {
1508876884SGayatri Kammela 	{"SPI/eSPI",		BIT(2)},
1608876884SGayatri Kammela 	{"XHCI",		BIT(3)},
1708876884SGayatri Kammela 	{"SPA",			BIT(4)},
1808876884SGayatri Kammela 	{"SPB",			BIT(5)},
1908876884SGayatri Kammela 	{"SPC",			BIT(6)},
2008876884SGayatri Kammela 	{"GBE",			BIT(7)},
2108876884SGayatri Kammela 
2208876884SGayatri Kammela 	{"SATA",		BIT(0)},
2308876884SGayatri Kammela 	{"HDA_PGD0",		BIT(1)},
2408876884SGayatri Kammela 	{"HDA_PGD1",		BIT(2)},
2508876884SGayatri Kammela 	{"HDA_PGD2",		BIT(3)},
2608876884SGayatri Kammela 	{"HDA_PGD3",		BIT(4)},
2708876884SGayatri Kammela 	{"SPD",			BIT(5)},
2808876884SGayatri Kammela 	{"LPSS",		BIT(6)},
2908876884SGayatri Kammela 
3008876884SGayatri Kammela 	{"SMB",			BIT(0)},
3108876884SGayatri Kammela 	{"ISH",			BIT(1)},
3208876884SGayatri Kammela 	{"ITH",			BIT(3)},
3308876884SGayatri Kammela 
3408876884SGayatri Kammela 	{"XDCI",		BIT(1)},
3508876884SGayatri Kammela 	{"DCI",			BIT(2)},
3608876884SGayatri Kammela 	{"CSE",			BIT(3)},
3708876884SGayatri Kammela 	{"CSME_KVM",		BIT(4)},
3808876884SGayatri Kammela 	{"CSME_PMT",		BIT(5)},
3908876884SGayatri Kammela 	{"CSME_CLINK",		BIT(6)},
4008876884SGayatri Kammela 	{"CSME_PTIO",		BIT(7)},
4108876884SGayatri Kammela 
4208876884SGayatri Kammela 	{"CSME_USBR",		BIT(0)},
4308876884SGayatri Kammela 	{"CSME_SUSRAM",		BIT(1)},
4408876884SGayatri Kammela 	{"CSME_SMT1",		BIT(2)},
4508876884SGayatri Kammela 	{"CSME_SMS2",		BIT(4)},
4608876884SGayatri Kammela 	{"CSME_SMS1",		BIT(5)},
4708876884SGayatri Kammela 	{"CSME_RTC",		BIT(6)},
4808876884SGayatri Kammela 	{"CSME_PSF",		BIT(7)},
4908876884SGayatri Kammela 
5008876884SGayatri Kammela 	{"CNVI",		BIT(3)},
5108876884SGayatri Kammela 	{"HDA_PGD4",		BIT(2)},
5208876884SGayatri Kammela 	{"HDA_PGD5",		BIT(3)},
5308876884SGayatri Kammela 	{"HDA_PGD6",		BIT(4)},
5408876884SGayatri Kammela 	{}
5508876884SGayatri Kammela };
5608876884SGayatri Kammela 
5708876884SGayatri Kammela const struct pmc_bit_map *ext_adl_pfear_map[] = {
5808876884SGayatri Kammela 	/*
5908876884SGayatri Kammela 	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
6008876884SGayatri Kammela 	 * a list of core SoCs using this.
6108876884SGayatri Kammela 	 */
6208876884SGayatri Kammela 	adl_pfear_map,
6308876884SGayatri Kammela 	NULL
6408876884SGayatri Kammela };
6508876884SGayatri Kammela 
6608876884SGayatri Kammela const struct pmc_bit_map adl_ltr_show_map[] = {
6708876884SGayatri Kammela 	{"SOUTHPORT_A",		CNP_PMC_LTR_SPA},
6808876884SGayatri Kammela 	{"SOUTHPORT_B",		CNP_PMC_LTR_SPB},
6908876884SGayatri Kammela 	{"SATA",		CNP_PMC_LTR_SATA},
7008876884SGayatri Kammela 	{"GIGABIT_ETHERNET",	CNP_PMC_LTR_GBE},
7108876884SGayatri Kammela 	{"XHCI",		CNP_PMC_LTR_XHCI},
7208876884SGayatri Kammela 	{"SOUTHPORT_F",		ADL_PMC_LTR_SPF},
7308876884SGayatri Kammela 	{"ME",			CNP_PMC_LTR_ME},
7408876884SGayatri Kammela 	/* EVA is Enterprise Value Add, doesn't really exist on PCH */
7508876884SGayatri Kammela 	{"SATA1",		CNP_PMC_LTR_EVA},
7608876884SGayatri Kammela 	{"SOUTHPORT_C",		CNP_PMC_LTR_SPC},
7708876884SGayatri Kammela 	{"HD_AUDIO",		CNP_PMC_LTR_AZ},
7808876884SGayatri Kammela 	{"CNV",			CNP_PMC_LTR_CNV},
7908876884SGayatri Kammela 	{"LPSS",		CNP_PMC_LTR_LPSS},
8008876884SGayatri Kammela 	{"SOUTHPORT_D",		CNP_PMC_LTR_SPD},
8108876884SGayatri Kammela 	{"SOUTHPORT_E",		CNP_PMC_LTR_SPE},
8208876884SGayatri Kammela 	{"SATA2",		CNP_PMC_LTR_CAM},
8308876884SGayatri Kammela 	{"ESPI",		CNP_PMC_LTR_ESPI},
8408876884SGayatri Kammela 	{"SCC",			CNP_PMC_LTR_SCC},
8508876884SGayatri Kammela 	{"ISH",			CNP_PMC_LTR_ISH},
8608876884SGayatri Kammela 	{"UFSX2",		CNP_PMC_LTR_UFSX2},
8708876884SGayatri Kammela 	{"EMMC",		CNP_PMC_LTR_EMMC},
8808876884SGayatri Kammela 	/*
8908876884SGayatri Kammela 	 * Check intel_pmc_core_ids[] users of cnp_reg_map for
9008876884SGayatri Kammela 	 * a list of core SoCs using this.
9108876884SGayatri Kammela 	 */
9208876884SGayatri Kammela 	{"WIGIG",		ICL_PMC_LTR_WIGIG},
9308876884SGayatri Kammela 	{"THC0",		TGL_PMC_LTR_THC0},
9408876884SGayatri Kammela 	{"THC1",		TGL_PMC_LTR_THC1},
9508876884SGayatri Kammela 	{"SOUTHPORT_G",		CNP_PMC_LTR_RESERVED},
9608876884SGayatri Kammela 
9708876884SGayatri Kammela 	/* Below two cannot be used for LTR_IGNORE */
9808876884SGayatri Kammela 	{"CURRENT_PLATFORM",	CNP_PMC_LTR_CUR_PLT},
9908876884SGayatri Kammela 	{"AGGREGATED_SYSTEM",	CNP_PMC_LTR_CUR_ASLT},
10008876884SGayatri Kammela 	{}
10108876884SGayatri Kammela };
10208876884SGayatri Kammela 
10308876884SGayatri Kammela const struct pmc_bit_map adl_clocksource_status_map[] = {
10408876884SGayatri Kammela 	{"CLKPART1_OFF_STS",			BIT(0)},
10508876884SGayatri Kammela 	{"CLKPART2_OFF_STS",			BIT(1)},
10608876884SGayatri Kammela 	{"CLKPART3_OFF_STS",			BIT(2)},
10708876884SGayatri Kammela 	{"CLKPART4_OFF_STS",			BIT(3)},
10808876884SGayatri Kammela 	{"CLKPART5_OFF_STS",			BIT(4)},
10908876884SGayatri Kammela 	{"CLKPART6_OFF_STS",			BIT(5)},
11008876884SGayatri Kammela 	{"CLKPART7_OFF_STS",			BIT(6)},
11108876884SGayatri Kammela 	{"CLKPART8_OFF_STS",			BIT(7)},
11208876884SGayatri Kammela 	{"PCIE0PLL_OFF_STS",			BIT(10)},
11308876884SGayatri Kammela 	{"PCIE1PLL_OFF_STS",			BIT(11)},
11408876884SGayatri Kammela 	{"PCIE2PLL_OFF_STS",			BIT(12)},
11508876884SGayatri Kammela 	{"PCIE3PLL_OFF_STS",			BIT(13)},
11608876884SGayatri Kammela 	{"PCIE4PLL_OFF_STS",			BIT(14)},
11708876884SGayatri Kammela 	{"PCIE5PLL_OFF_STS",			BIT(15)},
11808876884SGayatri Kammela 	{"PCIE6PLL_OFF_STS",			BIT(16)},
11908876884SGayatri Kammela 	{"USB2PLL_OFF_STS",			BIT(18)},
12008876884SGayatri Kammela 	{"OCPLL_OFF_STS",			BIT(22)},
12108876884SGayatri Kammela 	{"AUDIOPLL_OFF_STS",			BIT(23)},
12208876884SGayatri Kammela 	{"GBEPLL_OFF_STS",			BIT(24)},
12308876884SGayatri Kammela 	{"Fast_XTAL_Osc_OFF_STS",		BIT(25)},
12408876884SGayatri Kammela 	{"AC_Ring_Osc_OFF_STS",			BIT(26)},
12508876884SGayatri Kammela 	{"MC_Ring_Osc_OFF_STS",			BIT(27)},
12608876884SGayatri Kammela 	{"SATAPLL_OFF_STS",			BIT(29)},
12708876884SGayatri Kammela 	{"USB3PLL_OFF_STS",			BIT(31)},
12808876884SGayatri Kammela 	{}
12908876884SGayatri Kammela };
13008876884SGayatri Kammela 
13108876884SGayatri Kammela const struct pmc_bit_map adl_power_gating_status_0_map[] = {
13208876884SGayatri Kammela 	{"PMC_PGD0_PG_STS",			BIT(0)},
13308876884SGayatri Kammela 	{"DMI_PGD0_PG_STS",			BIT(1)},
13408876884SGayatri Kammela 	{"ESPISPI_PGD0_PG_STS",			BIT(2)},
13508876884SGayatri Kammela 	{"XHCI_PGD0_PG_STS",			BIT(3)},
13608876884SGayatri Kammela 	{"SPA_PGD0_PG_STS",			BIT(4)},
13708876884SGayatri Kammela 	{"SPB_PGD0_PG_STS",			BIT(5)},
13808876884SGayatri Kammela 	{"SPC_PGD0_PG_STS",			BIT(6)},
13908876884SGayatri Kammela 	{"GBE_PGD0_PG_STS",			BIT(7)},
14008876884SGayatri Kammela 	{"SATA_PGD0_PG_STS",			BIT(8)},
14108876884SGayatri Kammela 	{"DSP_PGD0_PG_STS",			BIT(9)},
14208876884SGayatri Kammela 	{"DSP_PGD1_PG_STS",			BIT(10)},
14308876884SGayatri Kammela 	{"DSP_PGD2_PG_STS",			BIT(11)},
14408876884SGayatri Kammela 	{"DSP_PGD3_PG_STS",			BIT(12)},
14508876884SGayatri Kammela 	{"SPD_PGD0_PG_STS",			BIT(13)},
14608876884SGayatri Kammela 	{"LPSS_PGD0_PG_STS",			BIT(14)},
14708876884SGayatri Kammela 	{"SMB_PGD0_PG_STS",			BIT(16)},
14808876884SGayatri Kammela 	{"ISH_PGD0_PG_STS",			BIT(17)},
14908876884SGayatri Kammela 	{"NPK_PGD0_PG_STS",			BIT(19)},
15008876884SGayatri Kammela 	{"PECI_PGD0_PG_STS",			BIT(21)},
15108876884SGayatri Kammela 	{"XDCI_PGD0_PG_STS",			BIT(25)},
15208876884SGayatri Kammela 	{"EXI_PGD0_PG_STS",			BIT(26)},
15308876884SGayatri Kammela 	{"CSE_PGD0_PG_STS",			BIT(27)},
15408876884SGayatri Kammela 	{"KVMCC_PGD0_PG_STS",			BIT(28)},
15508876884SGayatri Kammela 	{"PMT_PGD0_PG_STS",			BIT(29)},
15608876884SGayatri Kammela 	{"CLINK_PGD0_PG_STS",			BIT(30)},
15708876884SGayatri Kammela 	{"PTIO_PGD0_PG_STS",			BIT(31)},
15808876884SGayatri Kammela 	{}
15908876884SGayatri Kammela };
16008876884SGayatri Kammela 
16108876884SGayatri Kammela const struct pmc_bit_map adl_power_gating_status_1_map[] = {
16208876884SGayatri Kammela 	{"USBR0_PGD0_PG_STS",			BIT(0)},
16308876884SGayatri Kammela 	{"SMT1_PGD0_PG_STS",			BIT(2)},
16408876884SGayatri Kammela 	{"CSMERTC_PGD0_PG_STS",			BIT(6)},
16508876884SGayatri Kammela 	{"CSMEPSF_PGD0_PG_STS",			BIT(7)},
16608876884SGayatri Kammela 	{"CNVI_PGD0_PG_STS",			BIT(19)},
16708876884SGayatri Kammela 	{"DSP_PGD4_PG_STS",			BIT(26)},
16808876884SGayatri Kammela 	{"SPG_PGD0_PG_STS",			BIT(27)},
16908876884SGayatri Kammela 	{"SPE_PGD0_PG_STS",			BIT(28)},
17008876884SGayatri Kammela 	{}
17108876884SGayatri Kammela };
17208876884SGayatri Kammela 
17308876884SGayatri Kammela const struct pmc_bit_map adl_power_gating_status_2_map[] = {
17408876884SGayatri Kammela 	{"THC0_PGD0_PG_STS",			BIT(7)},
17508876884SGayatri Kammela 	{"THC1_PGD0_PG_STS",			BIT(8)},
17608876884SGayatri Kammela 	{"SPF_PGD0_PG_STS",			BIT(14)},
17708876884SGayatri Kammela 	{}
17808876884SGayatri Kammela };
17908876884SGayatri Kammela 
18008876884SGayatri Kammela const struct pmc_bit_map adl_d3_status_0_map[] = {
18108876884SGayatri Kammela 	{"ISH_D3_STS",				BIT(2)},
18208876884SGayatri Kammela 	{"LPSS_D3_STS",				BIT(3)},
18308876884SGayatri Kammela 	{"XDCI_D3_STS",				BIT(4)},
18408876884SGayatri Kammela 	{"XHCI_D3_STS",				BIT(5)},
18508876884SGayatri Kammela 	{"SPA_D3_STS",				BIT(12)},
18608876884SGayatri Kammela 	{"SPB_D3_STS",				BIT(13)},
18708876884SGayatri Kammela 	{"SPC_D3_STS",				BIT(14)},
18808876884SGayatri Kammela 	{"SPD_D3_STS",				BIT(15)},
18908876884SGayatri Kammela 	{"SPE_D3_STS",				BIT(16)},
19008876884SGayatri Kammela 	{"DSP_D3_STS",				BIT(19)},
19108876884SGayatri Kammela 	{"SATA_D3_STS",				BIT(20)},
19208876884SGayatri Kammela 	{"DMI_D3_STS",				BIT(22)},
19308876884SGayatri Kammela 	{}
19408876884SGayatri Kammela };
19508876884SGayatri Kammela 
19608876884SGayatri Kammela const struct pmc_bit_map adl_d3_status_1_map[] = {
19708876884SGayatri Kammela 	{"GBE_D3_STS",				BIT(19)},
19808876884SGayatri Kammela 	{"CNVI_D3_STS",				BIT(27)},
19908876884SGayatri Kammela 	{}
20008876884SGayatri Kammela };
20108876884SGayatri Kammela 
20208876884SGayatri Kammela const struct pmc_bit_map adl_d3_status_2_map[] = {
20308876884SGayatri Kammela 	{"CSMERTC_D3_STS",			BIT(1)},
20408876884SGayatri Kammela 	{"CSE_D3_STS",				BIT(4)},
20508876884SGayatri Kammela 	{"KVMCC_D3_STS",			BIT(5)},
20608876884SGayatri Kammela 	{"USBR0_D3_STS",			BIT(6)},
20708876884SGayatri Kammela 	{"SMT1_D3_STS",				BIT(8)},
20808876884SGayatri Kammela 	{"PTIO_D3_STS",				BIT(16)},
20908876884SGayatri Kammela 	{"PMT_D3_STS",				BIT(17)},
21008876884SGayatri Kammela 	{}
21108876884SGayatri Kammela };
21208876884SGayatri Kammela 
21308876884SGayatri Kammela const struct pmc_bit_map adl_d3_status_3_map[] = {
21408876884SGayatri Kammela 	{"THC0_D3_STS",				BIT(14)},
21508876884SGayatri Kammela 	{"THC1_D3_STS",				BIT(15)},
21608876884SGayatri Kammela 	{}
21708876884SGayatri Kammela };
21808876884SGayatri Kammela 
21908876884SGayatri Kammela const struct pmc_bit_map adl_vnn_req_status_0_map[] = {
22008876884SGayatri Kammela 	{"ISH_VNN_REQ_STS",			BIT(2)},
22108876884SGayatri Kammela 	{"ESPISPI_VNN_REQ_STS",			BIT(18)},
22208876884SGayatri Kammela 	{"DSP_VNN_REQ_STS",			BIT(19)},
22308876884SGayatri Kammela 	{}
22408876884SGayatri Kammela };
22508876884SGayatri Kammela 
22608876884SGayatri Kammela const struct pmc_bit_map adl_vnn_req_status_1_map[] = {
22708876884SGayatri Kammela 	{"NPK_VNN_REQ_STS",			BIT(4)},
22808876884SGayatri Kammela 	{"EXI_VNN_REQ_STS",			BIT(9)},
22908876884SGayatri Kammela 	{"GBE_VNN_REQ_STS",			BIT(19)},
23008876884SGayatri Kammela 	{"SMB_VNN_REQ_STS",			BIT(25)},
23108876884SGayatri Kammela 	{"CNVI_VNN_REQ_STS",			BIT(27)},
23208876884SGayatri Kammela 	{}
23308876884SGayatri Kammela };
23408876884SGayatri Kammela 
23508876884SGayatri Kammela const struct pmc_bit_map adl_vnn_req_status_2_map[] = {
23608876884SGayatri Kammela 	{"CSMERTC_VNN_REQ_STS",			BIT(1)},
23708876884SGayatri Kammela 	{"CSE_VNN_REQ_STS",			BIT(4)},
23808876884SGayatri Kammela 	{"SMT1_VNN_REQ_STS",			BIT(8)},
23908876884SGayatri Kammela 	{"CLINK_VNN_REQ_STS",			BIT(14)},
24008876884SGayatri Kammela 	{"GPIOCOM4_VNN_REQ_STS",		BIT(20)},
24108876884SGayatri Kammela 	{"GPIOCOM3_VNN_REQ_STS",		BIT(21)},
24208876884SGayatri Kammela 	{"GPIOCOM2_VNN_REQ_STS",		BIT(22)},
24308876884SGayatri Kammela 	{"GPIOCOM1_VNN_REQ_STS",		BIT(23)},
24408876884SGayatri Kammela 	{"GPIOCOM0_VNN_REQ_STS",		BIT(24)},
24508876884SGayatri Kammela 	{}
24608876884SGayatri Kammela };
24708876884SGayatri Kammela 
24808876884SGayatri Kammela const struct pmc_bit_map adl_vnn_req_status_3_map[] = {
24908876884SGayatri Kammela 	{"GPIOCOM5_VNN_REQ_STS",		BIT(11)},
25008876884SGayatri Kammela 	{}
25108876884SGayatri Kammela };
25208876884SGayatri Kammela 
25308876884SGayatri Kammela const struct pmc_bit_map adl_vnn_misc_status_map[] = {
25408876884SGayatri Kammela 	{"CPU_C10_REQ_STS",			BIT(0)},
25508876884SGayatri Kammela 	{"PCIe_LPM_En_REQ_STS",			BIT(3)},
25608876884SGayatri Kammela 	{"ITH_REQ_STS",				BIT(5)},
25708876884SGayatri Kammela 	{"CNVI_REQ_STS",			BIT(6)},
25808876884SGayatri Kammela 	{"ISH_REQ_STS",				BIT(7)},
25908876884SGayatri Kammela 	{"USB2_SUS_PG_Sys_REQ_STS",		BIT(10)},
26008876884SGayatri Kammela 	{"PCIe_Clk_REQ_STS",			BIT(12)},
26108876884SGayatri Kammela 	{"MPHY_Core_DL_REQ_STS",		BIT(16)},
26208876884SGayatri Kammela 	{"Break-even_En_REQ_STS",		BIT(17)},
26308876884SGayatri Kammela 	{"MPHY_SUS_REQ_STS",			BIT(22)},
26408876884SGayatri Kammela 	{"xDCI_attached_REQ_STS",		BIT(24)},
26508876884SGayatri Kammela 	{}
26608876884SGayatri Kammela };
26708876884SGayatri Kammela 
26808876884SGayatri Kammela const struct pmc_bit_map *adl_lpm_maps[] = {
26908876884SGayatri Kammela 	adl_clocksource_status_map,
27008876884SGayatri Kammela 	adl_power_gating_status_0_map,
27108876884SGayatri Kammela 	adl_power_gating_status_1_map,
27208876884SGayatri Kammela 	adl_power_gating_status_2_map,
27308876884SGayatri Kammela 	adl_d3_status_0_map,
27408876884SGayatri Kammela 	adl_d3_status_1_map,
27508876884SGayatri Kammela 	adl_d3_status_2_map,
27608876884SGayatri Kammela 	adl_d3_status_3_map,
27708876884SGayatri Kammela 	adl_vnn_req_status_0_map,
27808876884SGayatri Kammela 	adl_vnn_req_status_1_map,
27908876884SGayatri Kammela 	adl_vnn_req_status_2_map,
28008876884SGayatri Kammela 	adl_vnn_req_status_3_map,
28108876884SGayatri Kammela 	adl_vnn_misc_status_map,
28208876884SGayatri Kammela 	tgl_signal_status_map,
28308876884SGayatri Kammela 	NULL
28408876884SGayatri Kammela };
28508876884SGayatri Kammela 
28608876884SGayatri Kammela const struct pmc_reg_map adl_reg_map = {
28708876884SGayatri Kammela 	.pfear_sts = ext_adl_pfear_map,
28808876884SGayatri Kammela 	.slp_s0_offset = ADL_PMC_SLP_S0_RES_COUNTER_OFFSET,
28908876884SGayatri Kammela 	.slp_s0_res_counter_step = TGL_PMC_SLP_S0_RES_COUNTER_STEP,
29008876884SGayatri Kammela 	.ltr_show_sts = adl_ltr_show_map,
29108876884SGayatri Kammela 	.msr_sts = msr_map,
29208876884SGayatri Kammela 	.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
29308876884SGayatri Kammela 	.regmap_length = CNP_PMC_MMIO_REG_LEN,
29408876884SGayatri Kammela 	.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
29508876884SGayatri Kammela 	.ppfear_buckets = CNP_PPFEAR_NUM_ENTRIES,
29608876884SGayatri Kammela 	.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
29708876884SGayatri Kammela 	.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
29808876884SGayatri Kammela 	.ltr_ignore_max = ADL_NUM_IP_IGN_ALLOWED,
29908876884SGayatri Kammela 	.lpm_num_modes = ADL_LPM_NUM_MODES,
30008876884SGayatri Kammela 	.lpm_num_maps = ADL_LPM_NUM_MAPS,
30108876884SGayatri Kammela 	.lpm_res_counter_step_x2 = TGL_PMC_LPM_RES_COUNTER_STEP_X2,
30208876884SGayatri Kammela 	.etr3_offset = ETR3_OFFSET,
30308876884SGayatri Kammela 	.lpm_sts_latch_en_offset = ADL_LPM_STATUS_LATCH_EN_OFFSET,
30408876884SGayatri Kammela 	.lpm_priority_offset = ADL_LPM_PRI_OFFSET,
30508876884SGayatri Kammela 	.lpm_en_offset = ADL_LPM_EN_OFFSET,
30608876884SGayatri Kammela 	.lpm_residency_offset = ADL_LPM_RESIDENCY_OFFSET,
30708876884SGayatri Kammela 	.lpm_sts = adl_lpm_maps,
30808876884SGayatri Kammela 	.lpm_status_offset = ADL_LPM_STATUS_OFFSET,
30908876884SGayatri Kammela 	.lpm_live_status_offset = ADL_LPM_LIVE_STATUS_OFFSET,
31008876884SGayatri Kammela };
31108876884SGayatri Kammela 
adl_core_init(struct pmc_dev * pmcdev)31280495120SXi Pardee int adl_core_init(struct pmc_dev *pmcdev)
31308876884SGayatri Kammela {
3141c709ae1SXi Pardee 	struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
31580495120SXi Pardee 	int ret;
31680495120SXi Pardee 
317*33fd5fb1SDavid E. Box 	pmcdev->suspend = cnl_suspend;
318*33fd5fb1SDavid E. Box 	pmcdev->resume = cnl_resume;
319*33fd5fb1SDavid E. Box 
3201c709ae1SXi Pardee 	pmc->map = &adl_reg_map;
3211c709ae1SXi Pardee 	ret = get_primary_reg_base(pmc);
32280495120SXi Pardee 	if (ret)
32380495120SXi Pardee 		return ret;
32480495120SXi Pardee 
32580495120SXi Pardee 	return 0;
32608876884SGayatri Kammela }
327