summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/amd/pmc.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-08-23 17:30:50 +0200
committerHans de Goede <hdegoede@redhat.com>2023-08-23 17:30:50 +0200
commitb0c7f1d9d742911dd22703bf8b25ea85ae2363dd (patch)
tree6de0444803bb3211f9914bcc610f7e4f4a150f45 /drivers/platform/x86/amd/pmc.h
parent559eed7776c6557acf58e86c48ddaed9301550fd (diff)
parent0848cab765c634597636810bf76d0934003cce28 (diff)
Merge remote-tracking branch 'pdx86/fixes' into pdx86/for-next
Merge pdx86/fixes into pdx86/for-next because there are some pdx86 patches pending for the next release which build on top of some of the fixes.
Diffstat (limited to 'drivers/platform/x86/amd/pmc.h')
-rw-r--r--drivers/platform/x86/amd/pmc.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/platform/x86/amd/pmc.h b/drivers/platform/x86/amd/pmc.h
new file mode 100644
index 000000000000..c27bd6a5642f
--- /dev/null
+++ b/drivers/platform/x86/amd/pmc.h
@@ -0,0 +1,44 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * AMD SoC Power Management Controller Driver
+ *
+ * Copyright (c) 2023, Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Author: Mario Limonciello <mario.limonciello@amd.com>
+ */
+
+#ifndef PMC_H
+#define PMC_H
+
+#include <linux/types.h>
+#include <linux/mutex.h>
+
+struct amd_pmc_dev {
+ void __iomem *regbase;
+ void __iomem *smu_virt_addr;
+ void __iomem *stb_virt_addr;
+ void __iomem *fch_virt_addr;
+ bool msg_port;
+ u32 base_addr;
+ u32 cpu_id;
+ u32 active_ips;
+ u32 dram_size;
+ u32 num_ips;
+ u32 s2d_msg_id;
+/* SMU version information */
+ u8 smu_program;
+ u8 major;
+ u8 minor;
+ u8 rev;
+ struct device *dev;
+ struct pci_dev *rdev;
+ struct mutex lock; /* generic mutex lock */
+ struct dentry *dbgfs_dir;
+ struct quirk_entry *quirks;
+};
+
+void amd_pmc_process_restore_quirks(struct amd_pmc_dev *dev);
+void amd_pmc_quirks_init(struct amd_pmc_dev *dev);
+
+#endif /* PMC_H */