lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Apr 2023 08:21:45 -0500
From:   Andrew Davis <afd@...com>
To:     Nishanth Menon <nm@...com>,
        Siddharth Vadapalli <s-vadapalli@...com>
CC:     <vigneshr@...com>, <kristo@...nel.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski@...aro.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <srk@...com>
Subject: Re: [RFC PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add main CPSW2G
 devicetree node

On 4/26/23 7:59 AM, Nishanth Menon wrote:
> On 16:27-20230426, Siddharth Vadapalli wrote:
>> From: Kishon Vijay Abraham I <kishon@...com>
>>
>> TI's J721S2 SoC has a MAIN CPSW2G instance of the CPSW Ethernet Switch.
>> Add devicetree node for it.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@...com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 69 ++++++++++++++++++++++
>>   1 file changed, 69 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> index 6629b2989180..14dfef7b0758 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> @@ -51,6 +51,12 @@ usb_serdes_mux: mux-controller@0 {
>>   			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
>>   		};
>>   
>> +		phy_gmii_sel_cpsw: phy@34 {
>> +			compatible = "ti,am654-phy-gmii-sel";
>> +			reg = <0x34 0x4>;
>> +			#phy-cells = <1>;
>> +		};
> 
> 
> See this thread: https://lore.kernel.org/all/76da0b98-3274-b047-db11-ecabc117ae11@ti.com/
> 

"ti,am654-phy-gmii-sel" already has "reg", so this DT is good as is.
Adding the driver fallback to use that when the parent is not a "syscon"
node should be as easy as this:

--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -435,9 +435,12 @@ static int phy_gmii_sel_probe(struct platform_device *pdev)
  
         priv->regmap = syscon_node_to_regmap(node->parent);
         if (IS_ERR(priv->regmap)) {
-               ret = PTR_ERR(priv->regmap);
-               dev_err(dev, "Failed to get syscon %d\n", ret);
-               return ret;
+               priv->regmap = device_node_to_regmap(node);
+               if (IS_ERR(priv->regmap)) {
+                       ret = PTR_ERR(priv->regmap);
+                       dev_err(dev, "Failed to get syscon %d\n", ret);
+                       return ret;
+               }
         }


I'll send this patch when the window opens.

Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ