linux/drivers/pmdomain/rockchip/pm-domains.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Rockchip Generic power domain support.
 *
 * Copyright (c) 2015 ROCKCHIP, Co. Ltd.
 */

#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/pm_clock.h>
#include <linux/pm_domain.h>
#include <linux/property.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_clk.h>
#include <linux/clk.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <soc/rockchip/pm_domains.h>
#include <dt-bindings/power/px30-power.h>
#include <dt-bindings/power/rockchip,rv1126-power.h>
#include <dt-bindings/power/rk3036-power.h>
#include <dt-bindings/power/rk3066-power.h>
#include <dt-bindings/power/rk3128-power.h>
#include <dt-bindings/power/rk3188-power.h>
#include <dt-bindings/power/rk3228-power.h>
#include <dt-bindings/power/rk3288-power.h>
#include <dt-bindings/power/rk3328-power.h>
#include <dt-bindings/power/rk3366-power.h>
#include <dt-bindings/power/rk3368-power.h>
#include <dt-bindings/power/rk3399-power.h>
#include <dt-bindings/power/rk3568-power.h>
#include <dt-bindings/power/rk3588-power.h>

struct rockchip_domain_info {};

struct rockchip_pmu_info {};

#define MAX_QOS_REGS_NUM
#define QOS_PRIORITY
#define QOS_MODE
#define QOS_BANDWIDTH
#define QOS_SATURATION
#define QOS_EXTCONTROL

struct rockchip_pm_domain {};

struct rockchip_pmu {};

#define to_rockchip_pd(gpd)

#define DOMAIN(_name, pwr, status, req, idle, ack, wakeup)

#define DOMAIN_M(_name, pwr, status, req, idle, ack, wakeup)

#define DOMAIN_M_O_R(_name, p_offset, pwr, status, m_offset, m_status, r_status, r_offset, req, idle, ack, wakeup)

#define DOMAIN_RK3036(_name, req, ack, idle, wakeup)

#define DOMAIN_PX30(name, pwr, status, req, wakeup)

#define DOMAIN_RV1126(name, pwr, req, idle, wakeup)

#define DOMAIN_RK3288(name, pwr, status, req, wakeup)

#define DOMAIN_RK3328(name, pwr, status, req, wakeup)

#define DOMAIN_RK3368(name, pwr, status, req, wakeup)

#define DOMAIN_RK3399(name, pwr, status, req, wakeup)

#define DOMAIN_RK3568(name, pwr, req, wakeup)

/*
 * Dynamic Memory Controller may need to coordinate with us -- see
 * rockchip_pmu_block().
 *
 * dmc_pmu_mutex protects registration-time races, so DMC driver doesn't try to
 * block() while we're initializing the PMU.
 */
static DEFINE_MUTEX(dmc_pmu_mutex);
static struct rockchip_pmu *dmc_pmu;

/*
 * Block PMU transitions and make sure they don't interfere with ARM Trusted
 * Firmware operations. There are two conflicts, noted in the comments below.
 *
 * Caller must unblock PMU transitions via rockchip_pmu_unblock().
 */
int rockchip_pmu_block(void)
{}
EXPORT_SYMBOL_GPL();

/* Unblock PMU transitions. */
void rockchip_pmu_unblock(void)
{}
EXPORT_SYMBOL_GPL();

#define DOMAIN_RK3588(name, p_offset, pwr, status, m_offset, m_status, r_status, r_offset, req, idle, wakeup)

static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)
{}

static unsigned int rockchip_pmu_read_ack(struct rockchip_pmu *pmu)
{}

static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
					 bool idle)
{}

static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
{}

static int rockchip_pmu_restore_qos(struct rockchip_pm_domain *pd)
{}

static bool rockchip_pmu_domain_is_on(struct rockchip_pm_domain *pd)
{}

static bool rockchip_pmu_domain_is_mem_on(struct rockchip_pm_domain *pd)
{}

static bool rockchip_pmu_domain_is_chain_on(struct rockchip_pm_domain *pd)
{}

static int rockchip_pmu_domain_mem_reset(struct rockchip_pm_domain *pd)
{}

static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
					     bool on)
{}

static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
{}

static int rockchip_pd_power_on(struct generic_pm_domain *domain)
{}

static int rockchip_pd_power_off(struct generic_pm_domain *domain)
{}

static int rockchip_pd_attach_dev(struct generic_pm_domain *genpd,
				  struct device *dev)
{}

static void rockchip_pd_detach_dev(struct generic_pm_domain *genpd,
				   struct device *dev)
{}

static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
				      struct device_node *node)
{}

static void rockchip_pm_remove_one_domain(struct rockchip_pm_domain *pd)
{}

static void rockchip_pm_domain_cleanup(struct rockchip_pmu *pmu)
{}

static void rockchip_configure_pd_cnt(struct rockchip_pmu *pmu,
				      u32 domain_reg_offset,
				      unsigned int count)
{}

static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
				     struct device_node *parent)
{}

static int rockchip_pm_domain_probe(struct platform_device *pdev)
{}

static const struct rockchip_domain_info px30_pm_domains[] =;

static const struct rockchip_domain_info rv1126_pm_domains[] =;

static const struct rockchip_domain_info rk3036_pm_domains[] =;

static const struct rockchip_domain_info rk3066_pm_domains[] =;

static const struct rockchip_domain_info rk3128_pm_domains[] =;

static const struct rockchip_domain_info rk3188_pm_domains[] =;

static const struct rockchip_domain_info rk3228_pm_domains[] =;

static const struct rockchip_domain_info rk3288_pm_domains[] =;

static const struct rockchip_domain_info rk3328_pm_domains[] =;

static const struct rockchip_domain_info rk3366_pm_domains[] =;

static const struct rockchip_domain_info rk3368_pm_domains[] =;

static const struct rockchip_domain_info rk3399_pm_domains[] =;

static const struct rockchip_domain_info rk3568_pm_domains[] =;

static const struct rockchip_domain_info rk3588_pm_domains[] =;

static const struct rockchip_pmu_info px30_pmu =;

static const struct rockchip_pmu_info rk3036_pmu =;

static const struct rockchip_pmu_info rk3066_pmu =;

static const struct rockchip_pmu_info rk3128_pmu =;

static const struct rockchip_pmu_info rk3188_pmu =;

static const struct rockchip_pmu_info rk3228_pmu =;

static const struct rockchip_pmu_info rk3288_pmu =;

static const struct rockchip_pmu_info rk3328_pmu =;

static const struct rockchip_pmu_info rk3366_pmu =;

static const struct rockchip_pmu_info rk3368_pmu =;

static const struct rockchip_pmu_info rk3399_pmu =;

static const struct rockchip_pmu_info rk3568_pmu =;

static const struct rockchip_pmu_info rk3588_pmu =;

static const struct rockchip_pmu_info rv1126_pmu =;

static const struct of_device_id rockchip_pm_domain_dt_match[] =;

static struct platform_driver rockchip_pm_domain_driver =;

static int __init rockchip_pm_domain_drv_register(void)
{}
postcore_initcall(rockchip_pm_domain_drv_register);