Re: [RFC PATCH 08/17] sunxi: introduce NCAT2 generation model

Andre Przywara
2023-05-26T11:05:34Z

On Thu, 25 May 2023 21:25:57 +0300
Maksim Kiselev <bigunclemax@gmail.com> wrote:

Hi Maksim,

> Could you please include this fix for i2c in the next version of this
> series.
>
> diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
> index 93bbc6916e..d088ea75b9 100644
> --- a/drivers/i2c/mvtwsi.c
> +++ b/drivers/i2c/mvtwsi.c
> @@ -124,7 +124,7 @@ enum mvtwsi_ctrl_register_fields {
>   * on other platforms, it is a normal r/w bit, which is cleared by
> writing 0.
>   */
>
> -#if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_SUN50I_GEN_H6)
> +#if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_SUN50I_GEN_H6) ||
> defined(CONFIG_SUNXI_GEN_NCAT2)

Ah, thanks for pointing this out, I never really tried I2C, I think.
So those code lines are of course hideous to begin with, but it's a
nightmare to fix this properly (by looking at the DT compatible
string), and we might need it for the SPL anyway, so would need
something like this anyway.
So I will just go ahead and add this to this patch.

Thanks for the report!

Cheers,
Andre

>  #define        MVTWSI_CONTROL_CLEAR_IFLG       0x00000008
>  #else
>  #define        MVTWSI_CONTROL_CLEAR_IFLG       0x00000000
>