#define pr_fmt(fmt) …
#include <linux/acpi.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/platform_data/x86/clk-pmc-atom.h>
#include <linux/platform_data/x86/pmc_atom.h>
#include <linux/platform_data/x86/simatic-ipc.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <linux/seq_file.h>
#include <linux/suspend.h>
struct pmc_bit_map { … };
struct pmc_reg_map { … };
struct pmc_data { … };
struct pmc_dev { … };
static struct pmc_dev pmc_device;
static u32 acpi_base_addr;
static const struct pmc_clk byt_clks[] = …;
static const struct pmc_clk cht_clks[] = …;
static const struct pmc_bit_map d3_sts_0_map[] = …;
static struct pmc_bit_map byt_d3_sts_1_map[] = …;
static struct pmc_bit_map cht_d3_sts_1_map[] = …;
static struct pmc_bit_map cht_func_dis_2_map[] = …;
static const struct pmc_bit_map byt_pss_map[] = …;
static const struct pmc_bit_map cht_pss_map[] = …;
static const struct pmc_reg_map byt_reg_map = …;
static const struct pmc_reg_map cht_reg_map = …;
static const struct pmc_data byt_data = …;
static const struct pmc_data cht_data = …;
static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset)
{ … }
static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val)
{ … }
int pmc_atom_read(int offset, u32 *value)
{ … }
static void pmc_power_off(void)
{ … }
static void pmc_hw_reg_setup(struct pmc_dev *pmc)
{ … }
#ifdef CONFIG_DEBUG_FS
static void pmc_dev_state_print(struct seq_file *s, int reg_index,
u32 sts, const struct pmc_bit_map *sts_map,
u32 fd, const struct pmc_bit_map *fd_map)
{ … }
static int pmc_dev_state_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int pmc_pss_state_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int pmc_sleep_tmr_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void pmc_dbgfs_register(struct pmc_dev *pmc)
{ … }
#else
static void pmc_dbgfs_register(struct pmc_dev *pmc)
{
}
#endif
static bool pmc_clk_is_critical = …;
static int dmi_callback(const struct dmi_system_id *d)
{ … }
static int dmi_callback_siemens(const struct dmi_system_id *d)
{ … }
static const struct dmi_system_id critclk_systems[] = …;
static int pmc_setup_clks(struct pci_dev *pdev, void __iomem *pmc_regmap,
const struct pmc_data *pmc_data)
{ … }
#ifdef CONFIG_SUSPEND
static void pmc_dev_state_check(u32 sts, const struct pmc_bit_map *sts_map,
u32 fd, const struct pmc_bit_map *fd_map,
u32 sts_possible_false_pos)
{ … }
static void pmc_s2idle_check(void)
{ … }
static struct acpi_s2idle_dev_ops pmc_s2idle_ops = …;
static void pmc_s2idle_check_register(void)
{ … }
#else
static void pmc_s2idle_check_register(void) {}
#endif
static int pmc_setup_dev(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static const struct pci_device_id pmc_pci_ids[] = …;
static int __init pmc_atom_init(void)
{ … }
device_initcall(pmc_atom_init);