From: "Sriranjani P" <sriranjani.p@samsung.com>
To: "'Andrew Lunn'" <andrew@lunn.ch>
Cc: <peppe.cavallaro@st.com>, <alexandre.torgue@foss.st.com>,
<joabreu@synopsys.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<mcoquelin.stm32@gmail.com>, <richardcochran@gmail.com>,
<netdev@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"'Chandrasekar R'" <rcsekar@samsung.com>,
"'Suresh Siddha'" <ssiddha@tesla.com>, <ravi.patel@samsung.com>,
"'Pankaj Dubey'" <pankaj.dubey@samsung.com>
Subject: RE: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
Date: Wed, 16 Nov 2022 11:54:47 +0530 [thread overview]
Message-ID: <04b001d8f984$23e921b0$6bbb6510$@samsung.com> (raw)
In-Reply-To: <Y2Uu16RSF9Py5AdC@lunn.ch>
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: 04 November 2022 20:55
> To: Sriranjani P <sriranjani.p@samsung.com>
> Cc: peppe.cavallaro@st.com; alexandre.torgue@foss.st.com;
> joabreu@synopsys.com; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; mcoquelin.stm32@gmail.com;
> richardcochran@gmail.com; netdev@vger.kernel.org; linux-stm32@st-md-
> mailman.stormreply.com; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Chandrasekar R <rcsekar@samsung.com>; Suresh
> Siddha <ssiddha@tesla.com>
> Subject: Re: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
>
> > +static int dwc_eqos_setup_rxclock(struct platform_device *pdev) {
> > + struct device_node *np = pdev->dev.of_node;
> > +
> > + if (np && of_property_read_bool(np, "rx-clock-mux")) {
> > + unsigned int reg, val;
> > + struct regmap *syscon =
> syscon_regmap_lookup_by_phandle(np,
> > + "rx-clock-mux");
> > +
> > + if (IS_ERR(syscon)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> syscon!\n");
> > + return PTR_ERR(syscon);
> > + }
> > +
> > + if (of_property_read_u32_index(np, "rx-clock-mux", 1,
> ®)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> reg. offset!\n");
> > + return -EINVAL;
> > + }
> > +
> > + if (of_property_read_u32_index(np, "rx-clock-mux", 2,
> &val)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> reg. val!\n");
> > + return -EINVAL;
> > + }
> > +
> > + regmap_write(syscon, reg, val);
>
> This appears to be one of those binds which allows any magic value to be
> placed into any register. That is not how DT should be used.
[Sriranjani P] Will fix in the next version.
>
> Andrew
[Sriranjani P] Thank you for the review comment.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: "Sriranjani P" <sriranjani.p@samsung.com>
To: "'Andrew Lunn'" <andrew@lunn.ch>
Cc: <peppe.cavallaro@st.com>, <alexandre.torgue@foss.st.com>,
<joabreu@synopsys.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<mcoquelin.stm32@gmail.com>, <richardcochran@gmail.com>,
<netdev@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"'Chandrasekar R'" <rcsekar@samsung.com>,
"'Suresh Siddha'" <ssiddha@tesla.com>, <ravi.patel@samsung.com>,
"'Pankaj Dubey'" <pankaj.dubey@samsung.com>
Subject: RE: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
Date: Wed, 16 Nov 2022 11:54:47 +0530 [thread overview]
Message-ID: <04b001d8f984$23e921b0$6bbb6510$@samsung.com> (raw)
In-Reply-To: <Y2Uu16RSF9Py5AdC@lunn.ch>
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: 04 November 2022 20:55
> To: Sriranjani P <sriranjani.p@samsung.com>
> Cc: peppe.cavallaro@st.com; alexandre.torgue@foss.st.com;
> joabreu@synopsys.com; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; mcoquelin.stm32@gmail.com;
> richardcochran@gmail.com; netdev@vger.kernel.org; linux-stm32@st-md-
> mailman.stormreply.com; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Chandrasekar R <rcsekar@samsung.com>; Suresh
> Siddha <ssiddha@tesla.com>
> Subject: Re: [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
>
> > +static int dwc_eqos_setup_rxclock(struct platform_device *pdev) {
> > + struct device_node *np = pdev->dev.of_node;
> > +
> > + if (np && of_property_read_bool(np, "rx-clock-mux")) {
> > + unsigned int reg, val;
> > + struct regmap *syscon =
> syscon_regmap_lookup_by_phandle(np,
> > + "rx-clock-mux");
> > +
> > + if (IS_ERR(syscon)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> syscon!\n");
> > + return PTR_ERR(syscon);
> > + }
> > +
> > + if (of_property_read_u32_index(np, "rx-clock-mux", 1,
> ®)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> reg. offset!\n");
> > + return -EINVAL;
> > + }
> > +
> > + if (of_property_read_u32_index(np, "rx-clock-mux", 2,
> &val)) {
> > + dev_err(&pdev->dev, "couldn't get the rx-clock-mux
> reg. val!\n");
> > + return -EINVAL;
> > + }
> > +
> > + regmap_write(syscon, reg, val);
>
> This appears to be one of those binds which allows any magic value to be
> placed into any register. That is not how DT should be used.
[Sriranjani P] Will fix in the next version.
>
> Andrew
[Sriranjani P] Thank you for the review comment.
next prev parent reply other threads:[~2022-11-16 6:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20221104115833epcas5p31f68ef0a192e0d6678d2e2a0b3b89c4e@epcas5p3.samsung.com>
2022-11-04 12:05 ` [PATCH 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Sriranjani P
2022-11-04 12:05 ` Sriranjani P
2022-11-04 12:05 ` [PATCH 1/4] dt-bindings: net: Add EQoS compatible for FSD SoC Sriranjani P
2022-11-04 12:05 ` Sriranjani P
2022-11-04 12:48 ` Krzysztof Kozlowski
2022-11-04 12:48 ` Krzysztof Kozlowski
2022-11-16 6:21 ` Sriranjani P
2022-11-16 6:21 ` Sriranjani P
2022-11-04 12:05 ` [PATCH 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Sriranjani P
2022-11-04 12:05 ` Sriranjani P
2022-11-04 15:25 ` Andrew Lunn
2022-11-04 15:25 ` Andrew Lunn
2022-11-16 6:24 ` Sriranjani P [this message]
2022-11-16 6:24 ` Sriranjani P
2022-11-04 15:32 ` Andrew Lunn
2022-11-04 15:32 ` Andrew Lunn
2022-11-04 12:05 ` [PATCH 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Sriranjani P
2022-11-04 12:05 ` Sriranjani P
2022-11-04 12:45 ` Krzysztof Kozlowski
2022-11-04 12:45 ` Krzysztof Kozlowski
2022-11-04 12:47 ` Krzysztof Kozlowski
2022-11-04 12:47 ` Krzysztof Kozlowski
2022-11-16 6:22 ` Sriranjani P
2022-11-16 6:22 ` Sriranjani P
2022-11-04 12:05 ` [PATCH 4/4] arm64: dts: fsd: Add Ethernet support for PERIC " Sriranjani P
2022-11-04 12:05 ` Sriranjani P
2022-11-04 12:46 ` Krzysztof Kozlowski
2022-11-04 12:46 ` Krzysztof Kozlowski
2022-11-16 6:17 ` Sriranjani P
2022-11-16 6:17 ` Sriranjani P
2022-11-04 15:34 ` Andrew Lunn
2022-11-04 15:34 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='04b001d8f984$23e921b0$6bbb6510$@samsung.com' \
--to=sriranjani.p@samsung.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pankaj.dubey@samsung.com \
--cc=peppe.cavallaro@st.com \
--cc=ravi.patel@samsung.com \
--cc=rcsekar@samsung.com \
--cc=richardcochran@gmail.com \
--cc=ssiddha@tesla.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.