Debian Codegraph @

src/soc/intel/common/block/include/intelblocks/pmc.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef SOC_INTEL_COMMON_BLOCK_PMC_H
4 #define SOC_INTEL_COMMON_BLOCK_PMC_H
5
6 #include <device/device.h>
7 #include <stdint.h>
8
9 /* PMC controller resource structure */
10 struct pmc_resource_config {
11 /* PMC PCI config offset for MMIO BAR */
12 uint8_t pwrmbase_offset;
13 /* MMIO BAR address */
14 uintptr_t pwrmbase_addr;
15 /* MMIO BAR size */
16 size_t pwrmbase_size;
17 /* PMC PCI config offset for IO BAR */
18 uint8_t abase_offset;
19 /* IO BAR address */
20 uintptr_t abase_addr;
21 /* IO BAR size */
22 size_t abase_size;
23 };
24
25 /*
26 * SoC overrides
27 *
28 * All new SoCs wishes to make use of common PMC PCI driver
29 * must implement below functionality .
30 */
31
32 /*
33 * Function to initialize PMC controller.
34 *
35 * This initialization may differ between different SoC
36 *
37 * Input: Device Structure PMC PCI device
38 */
39 void pmc_soc_init(struct device *dev);
40
41 /*
42 * SoC should fill this structure information based on
43 * PMC controller register information like PWRMBASE, ABASE offset
44 * BAR and Size
45 *
46 * Input: PMC config structure
47 * Output: -1 = Error, 0 = Success
48 */
49 int pmc_soc_get_resources(struct pmc_resource_config *cfg);
50
51 #endif /* SOC_INTEL_COMMON_BLOCK_PMC_H */