#include <linux/bitfield.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/nvmem-consumer.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/soc/qcom/llcc-qcom.h>
#define ACTIVATE …
#define DEACTIVATE …
#define ACT_CLEAR …
#define ACT_COMPLETE …
#define ACT_CTRL_OPCODE_ACTIVATE …
#define ACT_CTRL_OPCODE_DEACTIVATE …
#define ACT_CTRL_ACT_TRIG …
#define ACT_CTRL_OPCODE_SHIFT …
#define ATTR1_PROBE_TARGET_WAYS_SHIFT …
#define ATTR1_FIXED_SIZE_SHIFT …
#define ATTR1_PRIORITY_SHIFT …
#define ATTR1_MAX_CAP_SHIFT …
#define ATTR0_RES_WAYS_MASK …
#define ATTR0_BONUS_WAYS_MASK …
#define ATTR0_BONUS_WAYS_SHIFT …
#define LLCC_STATUS_READ_DELAY …
#define CACHE_LINE_SIZE_SHIFT …
#define LLCC_LB_CNT_MASK …
#define LLCC_LB_CNT_SHIFT …
#define MAX_CAP_TO_BYTES(n) …
#define LLCC_TRP_ACT_CTRLn(n) …
#define LLCC_TRP_ACT_CLEARn(n) …
#define LLCC_TRP_STATUSn(n) …
#define LLCC_TRP_ATTR0_CFGn(n) …
#define LLCC_TRP_ATTR1_CFGn(n) …
#define LLCC_TRP_ATTR2_CFGn(n) …
#define LLCC_TRP_SCID_DIS_CAP_ALLOC …
#define LLCC_TRP_PCB_ACT …
#define LLCC_TRP_ALGO_CFG1 …
#define LLCC_TRP_ALGO_CFG2 …
#define LLCC_TRP_ALGO_CFG3 …
#define LLCC_TRP_ALGO_CFG4 …
#define LLCC_TRP_ALGO_CFG5 …
#define LLCC_TRP_WRSC_EN …
#define LLCC_TRP_ALGO_CFG6 …
#define LLCC_TRP_ALGO_CFG7 …
#define LLCC_TRP_WRSC_CACHEABLE_EN …
#define LLCC_TRP_ALGO_CFG8 …
#define LLCC_VERSION_2_0_0_0 …
#define LLCC_VERSION_2_1_0_0 …
#define LLCC_VERSION_4_1_0_0 …
struct llcc_slice_config { … };
struct qcom_llcc_config { … };
struct qcom_sct_config { … };
enum llcc_reg_offset { … };
static const struct llcc_slice_config sa8775p_data[] = …;
static const struct llcc_slice_config sc7180_data[] = …;
static const struct llcc_slice_config sc7280_data[] = …;
static const struct llcc_slice_config sc8180x_data[] = …;
static const struct llcc_slice_config sc8280xp_data[] = …;
static const struct llcc_slice_config sdm845_data[] = …;
static const struct llcc_slice_config sm6350_data[] = …;
static const struct llcc_slice_config sm7150_data[] = …;
static const struct llcc_slice_config sm8150_data[] = …;
static const struct llcc_slice_config sm8250_data[] = …;
static const struct llcc_slice_config sm8350_data[] = …;
static const struct llcc_slice_config sm8450_data[] = …;
static const struct llcc_slice_config sm8550_data[] = …;
static const struct llcc_slice_config sm8650_data[] = …;
static const struct llcc_slice_config qdu1000_data_2ch[] = …;
static const struct llcc_slice_config qdu1000_data_4ch[] = …;
static const struct llcc_slice_config qdu1000_data_8ch[] = …;
static const struct llcc_slice_config x1e80100_data[] = …;
static const struct llcc_edac_reg_offset llcc_v1_edac_reg_offset = …;
static const struct llcc_edac_reg_offset llcc_v2_1_edac_reg_offset = …;
static const u32 llcc_v1_reg_offset[] = …;
static const u32 llcc_v2_1_reg_offset[] = …;
static const struct qcom_llcc_config qdu1000_cfg[] = …;
static const struct qcom_llcc_config sa8775p_cfg[] = …;
static const struct qcom_llcc_config sc7180_cfg[] = …;
static const struct qcom_llcc_config sc7280_cfg[] = …;
static const struct qcom_llcc_config sc8180x_cfg[] = …;
static const struct qcom_llcc_config sc8280xp_cfg[] = …;
static const struct qcom_llcc_config sdm845_cfg[] = …;
static const struct qcom_llcc_config sm6350_cfg[] = …;
static const struct qcom_llcc_config sm7150_cfg[] = …;
static const struct qcom_llcc_config sm8150_cfg[] = …;
static const struct qcom_llcc_config sm8250_cfg[] = …;
static const struct qcom_llcc_config sm8350_cfg[] = …;
static const struct qcom_llcc_config sm8450_cfg[] = …;
static const struct qcom_llcc_config sm8550_cfg[] = …;
static const struct qcom_llcc_config sm8650_cfg[] = …;
static const struct qcom_llcc_config x1e80100_cfg[] = …;
static const struct qcom_sct_config qdu1000_cfgs = …;
static const struct qcom_sct_config sa8775p_cfgs = …;
static const struct qcom_sct_config sc7180_cfgs = …;
static const struct qcom_sct_config sc7280_cfgs = …;
static const struct qcom_sct_config sc8180x_cfgs = …;
static const struct qcom_sct_config sc8280xp_cfgs = …;
static const struct qcom_sct_config sdm845_cfgs = …;
static const struct qcom_sct_config sm6350_cfgs = …;
static const struct qcom_sct_config sm7150_cfgs = …;
static const struct qcom_sct_config sm8150_cfgs = …;
static const struct qcom_sct_config sm8250_cfgs = …;
static const struct qcom_sct_config sm8350_cfgs = …;
static const struct qcom_sct_config sm8450_cfgs = …;
static const struct qcom_sct_config sm8550_cfgs = …;
static const struct qcom_sct_config sm8650_cfgs = …;
static const struct qcom_sct_config x1e80100_cfgs = …;
static struct llcc_drv_data *drv_data = …;
struct llcc_slice_desc *llcc_slice_getd(u32 uid)
{ … }
EXPORT_SYMBOL_GPL(…);
void llcc_slice_putd(struct llcc_slice_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
static int llcc_update_act_ctrl(u32 sid,
u32 act_ctrl_reg_val, u32 status)
{ … }
int llcc_slice_activate(struct llcc_slice_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
int llcc_slice_deactivate(struct llcc_slice_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
int llcc_get_slice_id(struct llcc_slice_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
size_t llcc_get_slice_size(struct llcc_slice_desc *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
static int _qcom_llcc_cfg_program(const struct llcc_slice_config *config,
const struct qcom_llcc_config *cfg)
{ … }
static int qcom_llcc_cfg_program(struct platform_device *pdev,
const struct qcom_llcc_config *cfg)
{ … }
static int qcom_llcc_get_cfg_index(struct platform_device *pdev, u8 *cfg_index, int num_config)
{ … }
static void qcom_llcc_remove(struct platform_device *pdev)
{ … }
static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, u8 index,
const char *name)
{ … }
static int qcom_llcc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id qcom_llcc_of_match[] = …;
MODULE_DEVICE_TABLE(of, qcom_llcc_of_match);
static struct platform_driver qcom_llcc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;