Re: [net-next,PATCH v7 7/8] net: stmmac: dwmac-stm32: Mask support for PMCR configuration

Christophe ROULLIER
2024-06-11T13:34:04Z

On 6/11/24 15:07, Marek Vasut wrote:
> On 6/11/24 10:36 AM, Christophe Roullier wrote:
>
> [...]
>
>>   static void stm32_dwmac_clk_disable(struct stm32_dwmac *dwmac, bool
>> suspend)
>> @@ -348,8 +352,15 @@ static int stm32_dwmac_parse_data(struct
>> stm32_dwmac *dwmac,
>>           return PTR_ERR(dwmac->regmap);
>>         err = of_property_read_u32_index(np, "st,syscon", 1,
>> &dwmac->mode_reg);
>> -    if (err)
>> +    if (err) {
>>           dev_err(dev, "Can't get sysconfig mode offset (%d)\n", err);
>> +        return err;
>> +    }
>> +
>> +    dwmac->mode_mask = SYSCFG_MP1_ETH_MASK;
>> +    err = of_property_read_u32_index(np, "st,syscon", 2,
>> &dwmac->mode_mask);
>> +    if (err)
>> +        dev_dbg(dev, "Warning sysconfig register mask not set\n");
>
> My comment on V6 was not addressed I think ?

Hi Marek,

I put the modification in patch which introduce MP13 (V7 8/8) ;-)

err = of_property_read_u32_index(np, "st,syscon", 2, &dwmac->mode_mask);
- if (err)
- dev_dbg(dev, "Warning sysconfig register mask not set\n");
+ if (err) {
+ if (dwmac->ops->is_mp13)
+ dev_err(dev, "Sysconfig register mask must be set (%d)\n", err);
+ else
+ dev_dbg(dev, "Warning sysconfig register mask not set\n");
+ }