[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eea0ef13-58e9-4541-ac67-8246602b8e5d@foss.st.com>
Date: Tue, 11 Jun 2024 08:42:35 +0200
From: Christophe ROULLIER <christophe.roullier@...s.st.com>
To: Marek Vasut <marex@...x.de>, "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo
Abeni <pabeni@...hat.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof
Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley
<conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre
Torgue <alexandre.torgue@...s.st.com>,
Richard Cochran
<richardcochran@...il.com>,
Jose Abreu <joabreu@...opsys.com>,
Liam Girdwood
<lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>
CC: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [net-next,PATCH v6 7/8] net: stmmac: dwmac-stm32: Mask support
for PMCR configuration
On 6/10/24 19:29, Marek Vasut wrote:
> On 6/10/24 3:49 PM, Christophe ROULLIER wrote:
>>
>> On 6/10/24 15:43, Marek Vasut wrote:
>>> On 6/10/24 1:45 PM, Christophe ROULLIER wrote:
>>>>
>>>> On 6/10/24 12:39, Marek Vasut wrote:
>>>>> On 6/10/24 9:14 AM, Christophe Roullier wrote:
>>>>>
>>>>> [...]
>>>>>
>>>>>> static int stm32mp1_set_mode(struct plat_stmmacenet_data
>>>>>> *plat_dat)
>>>>>> @@ -303,7 +307,7 @@ static int stm32mcu_set_mode(struct
>>>>>> plat_stmmacenet_data *plat_dat)
>>>>>> dev_dbg(dwmac->dev, "Mode %s",
>>>>>> phy_modes(plat_dat->mac_interface));
>>>>>> return regmap_update_bits(dwmac->regmap, reg,
>>>>>> - dwmac->ops->syscfg_eth_mask, val << 23);
>>>>>> + SYSCFG_MCU_ETH_MASK, val << 23);
>>>>>> }
>>>>>> 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");
>>>>>
>>>>> Isn't this an error , so dev_err() ?
>>>> No, it is only "warning" information, for MP1 the mask is not
>>>> needed (and for backward compatibility is not planned to put mask
>>>> parameter mandatory)
>>>
>>> Should this be an error for anything newer than MP15 then ?
>> For MP25, no need of mask, so for moment it is specific to MP13.
>
> Make this a warning for MP15, error for MP13, do not check st,syscon
> presence for MP2 at all. Would that work ?
Ok I will make a warning for MP15 and MP25 and error for MP13.
Powered by blists - more mailing lists