#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/interconnect.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <dt-bindings/power/imx8mp-power.h>
#define GPR_REG0 …
#define PCIE_CLOCK_MODULE_EN …
#define USB_CLOCK_MODULE_EN …
#define PCIE_PHY_APB_RST …
#define PCIE_PHY_INIT_RST …
#define GPR_REG1 …
#define PLL_LOCK …
#define GPR_REG2 …
#define P_PLL_MASK …
#define M_PLL_MASK …
#define S_PLL_MASK …
#define GPR_REG3 …
#define PLL_CKE …
#define PLL_RST …
struct imx8mp_blk_ctrl_domain;
struct imx8mp_blk_ctrl { … };
struct imx8mp_blk_ctrl_domain_data { … };
#define DOMAIN_MAX_CLKS …
#define DOMAIN_MAX_PATHS …
struct imx8mp_blk_ctrl_domain { … };
struct imx8mp_blk_ctrl_data { … };
static inline struct imx8mp_blk_ctrl_domain *
to_imx8mp_blk_ctrl_domain(struct generic_pm_domain *genpd)
{ … }
struct clk_hsio_pll { … };
static inline struct clk_hsio_pll *to_clk_hsio_pll(struct clk_hw *hw)
{ … }
static int clk_hsio_pll_prepare(struct clk_hw *hw)
{ … }
static void clk_hsio_pll_unprepare(struct clk_hw *hw)
{ … }
static int clk_hsio_pll_is_prepared(struct clk_hw *hw)
{ … }
static unsigned long clk_hsio_pll_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static const struct clk_ops clk_hsio_pll_ops = …;
static int imx8mp_hsio_blk_ctrl_probe(struct imx8mp_blk_ctrl *bc)
{ … }
static void imx8mp_hsio_blk_ctrl_power_on(struct imx8mp_blk_ctrl *bc,
struct imx8mp_blk_ctrl_domain *domain)
{ … }
static void imx8mp_hsio_blk_ctrl_power_off(struct imx8mp_blk_ctrl *bc,
struct imx8mp_blk_ctrl_domain *domain)
{ … }
static int imx8mp_hsio_power_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{ … }
static const struct imx8mp_blk_ctrl_domain_data imx8mp_hsio_domain_data[] = …;
static const struct imx8mp_blk_ctrl_data imx8mp_hsio_blk_ctl_dev_data = …;
#define HDMI_RTX_RESET_CTL0 …
#define HDMI_RTX_CLK_CTL0 …
#define HDMI_RTX_CLK_CTL1 …
#define HDMI_RTX_CLK_CTL2 …
#define HDMI_RTX_CLK_CTL3 …
#define HDMI_RTX_CLK_CTL4 …
#define HDMI_TX_CONTROL0 …
#define HDMI_LCDIF_NOC_HURRY_MASK …
static void imx8mp_hdmi_blk_ctrl_power_on(struct imx8mp_blk_ctrl *bc,
struct imx8mp_blk_ctrl_domain *domain)
{ … }
static void imx8mp_hdmi_blk_ctrl_power_off(struct imx8mp_blk_ctrl *bc,
struct imx8mp_blk_ctrl_domain *domain)
{ … }
static int imx8mp_hdmi_power_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{ … }
static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = …;
static const struct imx8mp_blk_ctrl_data imx8mp_hdmi_blk_ctl_dev_data = …;
static int imx8mp_blk_ctrl_power_on(struct generic_pm_domain *genpd)
{ … }
static int imx8mp_blk_ctrl_power_off(struct generic_pm_domain *genpd)
{ … }
static struct lock_class_key blk_ctrl_genpd_lock_class;
static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
{ … }
static void imx8mp_blk_ctrl_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int imx8mp_blk_ctrl_suspend(struct device *dev)
{ … }
static int imx8mp_blk_ctrl_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops imx8mp_blk_ctrl_pm_ops = …;
static const struct of_device_id imx8mp_blk_ctrl_of_match[] = …;
MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match);
static struct platform_driver imx8mp_blk_ctrl_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;