[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <104e9dad-6819-119e-8f76-d83473374642@linaro.org>
Date: Mon, 8 Feb 2021 21:02:45 +0300
From: Andrey Konovalov <andrey.konovalov@...aro.org>
To: Robert Foss <robert.foss@...aro.org>, todor.too@...il.com,
agross@...nel.org, bjorn.andersson@...aro.org, mchehab@...nel.org,
robh+dt@...nel.org, angelogioacchino.delregno@...ainline.org,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
AngeloGioacchino Del Regno <kholk11@...il.com>,
Rob Herring <robh@...nel.org>,
Sakari Ailus <sakari.ailus@....fi>,
Nicolas Boichat <drinkcat@...omium.org>
Cc: Tomasz Figa <tfiga@...omium.org>,
Azam Sadiq Pasha Kapatrala Syed <akapatra@...cinc.com>,
Sarvesh Sridutt <Sarvesh.Sridutt@...rtwirelesscompute.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jonathan Marek <jonathan@...ek.ca>
Subject: Re: [PATCH v4 11/22] media: camss: Add support for CSIPHY hardware
version Titan 170
Hi Robert,
Thank you for your patchset!
On 05.02.2021 13:44, Robert Foss wrote:
> Add register definitions for version 170 of the Titan architecture
> and implement support for the CSIPHY subdevice.
>
> Signed-off-by: Robert Foss <robert.foss@...aro.org>
> ---
> .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++++++++++++++++--
> .../media/platform/qcom/camss/camss-csiphy.c | 66 +++++--
> drivers/media/platform/qcom/camss/camss.c | 74 +++++++
> 3 files changed, 290 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index 97cb9de85031..148b8c50382c 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -47,6 +47,105 @@
> #define CSIPHY_3PH_CMN_CSI_COMMON_CTRL6_SHOW_REV_ID BIT(1)
> #define CSIPHY_3PH_CMN_CSI_COMMON_STATUSn(n) (0x8b0 + 0x4 * (n))
>
> +#define CSIPHY_DEFAULT_PARAMS 0
> +#define CSIPHY_LANE_ENABLE 1
> +#define CSIPHY_SETTLE_CNT_LOWER_BYTE 2
> +#define CSIPHY_SETTLE_CNT_HIGHER_BYTE 3
> +#define CSIPHY_DNP_PARAMS 4
> +#define CSIPHY_2PH_REGS 5
> +#define CSIPHY_3PH_REGS 6
> +
> +struct csiphy_reg_t {
> + int32_t reg_addr;
> + int32_t reg_data;
> + int32_t delay;
> + uint32_t csiphy_param_type;
> +};
> +
> +static const struct
> +csiphy_reg_t lane_regs_sdm845[5][14] = {
<snip>
> @@ -208,6 +294,66 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy,
>
> val = CSIPHY_3PH_LNn_MISC1_IS_CLKLANE;
> writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_MISC1(l));
> +}
> +
> +static void csiphy_gen2_config_lanes(struct csiphy_device *csiphy,
> + u8 settle_cnt)
> +{
> + int i, l;
> + u32 val;
> +
> + for (l = 0; l < 5; l++) {
> + for (i = 0; i < 14; i++) {
> + struct csiphy_reg_t *r = &lane_regs_sdm845[l][i];
- this line gives me a compilation warning :
warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
306 | struct csiphy_reg_t *r = &lane_regs_sdm845[l][i];
Change it to:
const struct csiphy_reg_t *r = &lane_regs_sdm845[l][i];
?
Thanks,
Andrey
Powered by blists - more mailing lists