linux/drivers/pmdomain/bcm/bcm2835-power.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Power domain driver for Broadcom BCM2835
 *
 * Copyright (C) 2018 Broadcom
 */

#include <dt-bindings/soc/bcm2835-pm.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mfd/bcm2835-pm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/reset-controller.h>
#include <linux/types.h>

#define PM_GNRIC
#define PM_AUDIO
#define PM_STATUS
#define PM_RSTC
#define PM_RSTS
#define PM_WDOG
#define PM_PADS0
#define PM_PADS2
#define PM_PADS3
#define PM_PADS4
#define PM_PADS5
#define PM_PADS6
#define PM_CAM0
#define PM_CAM0_LDOHPEN
#define PM_CAM0_LDOLPEN
#define PM_CAM0_CTRLEN

#define PM_CAM1
#define PM_CAM1_LDOHPEN
#define PM_CAM1_LDOLPEN
#define PM_CAM1_CTRLEN

#define PM_CCP2TX
#define PM_CCP2TX_LDOEN
#define PM_CCP2TX_CTRLEN

#define PM_DSI0
#define PM_DSI0_LDOHPEN
#define PM_DSI0_LDOLPEN
#define PM_DSI0_CTRLEN

#define PM_DSI1
#define PM_DSI1_LDOHPEN
#define PM_DSI1_LDOLPEN
#define PM_DSI1_CTRLEN

#define PM_HDMI
#define PM_HDMI_RSTDR
#define PM_HDMI_LDOPD
#define PM_HDMI_CTRLEN

#define PM_USB
/* The power gates must be enabled with this bit before enabling the LDO in the
 * USB block.
 */
#define PM_USB_CTRLEN

#define PM_PXLDO
#define PM_PXBG
#define PM_DFT
#define PM_SMPS
#define PM_XOSC
#define PM_SPAREW
#define PM_SPARER
#define PM_AVS_RSTDR
#define PM_AVS_STAT
#define PM_AVS_EVENT
#define PM_AVS_INTEN
#define PM_DUMMY

#define PM_IMAGE
#define PM_GRAFX
#define PM_PROC
#define PM_ENAB
#define PM_ISPRSTN
#define PM_H264RSTN
#define PM_PERIRSTN
#define PM_V3DRSTN
#define PM_ISFUNC
#define PM_MRDONE
#define PM_MEMREP
#define PM_ISPOW
#define PM_POWOK
#define PM_POWUP
#define PM_INRUSH_SHIFT
#define PM_INRUSH_3_5_MA
#define PM_INRUSH_5_MA
#define PM_INRUSH_10_MA
#define PM_INRUSH_20_MA
#define PM_INRUSH_MASK

#define PM_PASSWORD

#define PM_WDOG_TIME_SET
#define PM_RSTC_WRCFG_CLR
#define PM_RSTS_HADWRH_SET
#define PM_RSTC_WRCFG_SET
#define PM_RSTC_WRCFG_FULL_RESET
#define PM_RSTC_RESET

#define PM_READ(reg)
#define PM_WRITE(reg, val)

#define ASB_BRDG_VERSION
#define ASB_CPR_CTRL

#define ASB_V3D_S_CTRL
#define ASB_V3D_M_CTRL
#define ASB_ISP_S_CTRL
#define ASB_ISP_M_CTRL
#define ASB_H264_S_CTRL
#define ASB_H264_M_CTRL

#define ASB_REQ_STOP
#define ASB_ACK
#define ASB_EMPTY
#define ASB_FULL

#define ASB_AXI_BRDG_ID

#define BCM2835_BRDG_ID

struct bcm2835_power_domain {};

struct bcm2835_power {};

static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable)
{}

static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg)
{}

static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg)
{}

static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg)
{}

static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg)
{}

static int bcm2835_asb_power_on(struct bcm2835_power_domain *pd,
				u32 pm_reg,
				u32 asb_m_reg,
				u32 asb_s_reg,
				u32 reset_flags)
{}

static int bcm2835_asb_power_off(struct bcm2835_power_domain *pd,
				 u32 pm_reg,
				 u32 asb_m_reg,
				 u32 asb_s_reg,
				 u32 reset_flags)
{}

static int bcm2835_power_pd_power_on(struct generic_pm_domain *domain)
{}

static int bcm2835_power_pd_power_off(struct generic_pm_domain *domain)
{}

static int
bcm2835_init_power_domain(struct bcm2835_power *power,
			  int pd_xlate_index, const char *name)
{}

/** bcm2835_reset_reset - Resets a block that has a reset line in the
 * PM block.
 *
 * The consumer of the reset controller must have the power domain up
 * -- there's no reset ability with the power domain down.  To reset
 * the sub-block, we just disable its access to memory through the
 * ASB, reset, and re-enable.
 */
static int bcm2835_reset_reset(struct reset_controller_dev *rcdev,
			       unsigned long id)
{}

static int bcm2835_reset_status(struct reset_controller_dev *rcdev,
				unsigned long id)
{}

static const struct reset_control_ops bcm2835_reset_ops =;

static const char *const power_domain_names[] =;

static int bcm2835_power_probe(struct platform_device *pdev)
{}

static struct platform_driver bcm2835_power_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();