mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 00:05:11 +07:00
media: ti-vpe: cal: Rename cal_csi2_phy to cal_camerarx_data
The cal_csi2_phy contains platform data for the CAMERARX blocks. Rename it to cal_camerarx_data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
a7f8ac542a
commit
d1739eabdd
@ -215,7 +215,7 @@ enum cal_camerarx_field {
|
||||
F_MAX_FIELDS,
|
||||
};
|
||||
|
||||
struct cal_csi2_phy {
|
||||
struct cal_camerarx_data {
|
||||
struct {
|
||||
unsigned int lsb;
|
||||
unsigned int msb;
|
||||
@ -224,13 +224,12 @@ struct cal_csi2_phy {
|
||||
};
|
||||
|
||||
struct cal_data {
|
||||
const struct cal_camerarx_data *camerarx;
|
||||
unsigned int num_csi2_phy;
|
||||
const struct cal_csi2_phy *csi2_phy_core;
|
||||
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
static const struct cal_csi2_phy dra72x_cal_csi_phy[] = {
|
||||
static const struct cal_camerarx_data dra72x_cal_camerarx[] = {
|
||||
{
|
||||
.fields = {
|
||||
[F_CTRLCLKEN] = { 10, 10 },
|
||||
@ -252,17 +251,17 @@ static const struct cal_csi2_phy dra72x_cal_csi_phy[] = {
|
||||
};
|
||||
|
||||
static const struct cal_data dra72x_cal_data = {
|
||||
.csi2_phy_core = dra72x_cal_csi_phy,
|
||||
.num_csi2_phy = ARRAY_SIZE(dra72x_cal_csi_phy),
|
||||
.camerarx = dra72x_cal_camerarx,
|
||||
.num_csi2_phy = ARRAY_SIZE(dra72x_cal_camerarx),
|
||||
};
|
||||
|
||||
static const struct cal_data dra72x_es1_cal_data = {
|
||||
.csi2_phy_core = dra72x_cal_csi_phy,
|
||||
.num_csi2_phy = ARRAY_SIZE(dra72x_cal_csi_phy),
|
||||
.camerarx = dra72x_cal_camerarx,
|
||||
.num_csi2_phy = ARRAY_SIZE(dra72x_cal_camerarx),
|
||||
.flags = DRA72_CAL_PRE_ES2_LDO_DISABLE,
|
||||
};
|
||||
|
||||
static const struct cal_csi2_phy dra76x_cal_csi_phy[] = {
|
||||
static const struct cal_camerarx_data dra76x_cal_csi_phy[] = {
|
||||
{
|
||||
.fields = {
|
||||
[F_CTRLCLKEN] = { 8, 8 },
|
||||
@ -284,11 +283,11 @@ static const struct cal_csi2_phy dra76x_cal_csi_phy[] = {
|
||||
};
|
||||
|
||||
static const struct cal_data dra76x_cal_data = {
|
||||
.csi2_phy_core = dra76x_cal_csi_phy,
|
||||
.camerarx = dra76x_cal_csi_phy,
|
||||
.num_csi2_phy = ARRAY_SIZE(dra76x_cal_csi_phy),
|
||||
};
|
||||
|
||||
static const struct cal_csi2_phy am654_cal_csi_phy[] = {
|
||||
static const struct cal_camerarx_data am654_cal_csi_phy[] = {
|
||||
{
|
||||
.fields = {
|
||||
[F_CTRLCLKEN] = { 15, 15 },
|
||||
@ -300,7 +299,7 @@ static const struct cal_csi2_phy am654_cal_csi_phy[] = {
|
||||
};
|
||||
|
||||
static const struct cal_data am654_cal_data = {
|
||||
.csi2_phy_core = am654_cal_csi_phy,
|
||||
.camerarx = am654_cal_csi_phy,
|
||||
.num_csi2_phy = ARRAY_SIZE(am654_cal_csi_phy),
|
||||
};
|
||||
|
||||
@ -456,7 +455,7 @@ static u32 cal_data_get_phy_max_lanes(struct cal_ctx *ctx)
|
||||
struct cal_dev *dev = ctx->dev;
|
||||
u32 phy_id = ctx->csi2_port;
|
||||
|
||||
return dev->data->csi2_phy_core[phy_id].num_lanes;
|
||||
return dev->data->camerarx[phy_id].num_lanes;
|
||||
}
|
||||
|
||||
static u32 cal_data_get_num_csi2_phy(struct cal_dev *dev)
|
||||
@ -468,19 +467,19 @@ static int cal_camerarx_regmap_init(struct cal_dev *dev,
|
||||
struct cal_camerarx *cc,
|
||||
unsigned int idx)
|
||||
{
|
||||
const struct cal_csi2_phy *phy;
|
||||
const struct cal_camerarx_data *phy_data;
|
||||
unsigned int i;
|
||||
|
||||
if (!dev->data)
|
||||
return -EINVAL;
|
||||
|
||||
phy = &dev->data->csi2_phy_core[idx];
|
||||
phy_data = &dev->data->camerarx[idx];
|
||||
|
||||
for (i = 0; i < F_MAX_FIELDS; i++) {
|
||||
struct reg_field field = {
|
||||
.reg = dev->syscon_camerrx_offset,
|
||||
.lsb = phy->fields[i].lsb,
|
||||
.msb = phy->fields[i].msb,
|
||||
.lsb = phy_data->fields[i].lsb,
|
||||
.msb = phy_data->fields[i].msb,
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user