All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles
@ 2018-08-06  7:14 Zhao Qiang
  2018-08-06 16:42 ` Joe Hershberger
  2018-08-23 15:19 ` York Sun
  0 siblings, 2 replies; 4+ messages in thread
From: Zhao Qiang @ 2018-08-06  7:14 UTC (permalink / raw)
  To: u-boot

Recently  the FMan Port and MAC compatibles were changed.
This patch aligns the FMan Port and MAC compatibles
to the new FMan device tree binding document.
The FMan device tree binding document can be found in the Linux
kernel:
version 3.18.0
commit 297d35fd2a7d3fbd4e5c0f0c1c18213117ba11ba
./Documentation/devicetree/bindings/powerpc/fsl/fman.txt

This patch doesn't affect legacy compatibles support.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
---
Changes for v2
	- add kernel version and commit id modifing the binding

 drivers/net/fm/init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 71c3abe..48344f0 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -329,7 +329,8 @@ void fdt_fixup_fman_ethernet(void *blob)
 				ft_fixup_port(blob, &fm_info[i],
 					      "fsl,fman-1g-mac");
 		} else {
-			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec"))
+			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec") &&
+			    ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec"))
 				ft_fixup_port(blob, &fm_info[i],
 					      "fsl,fman-10g-mac");
 		}
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles
  2018-08-06  7:14 [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles Zhao Qiang
@ 2018-08-06 16:42 ` Joe Hershberger
  2018-08-23 15:19 ` York Sun
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2018-08-06 16:42 UTC (permalink / raw)
  To: u-boot

On Mon, Aug 6, 2018 at 2:14 AM, Zhao Qiang <qiang.zhao@nxp.com> wrote:
> Recently  the FMan Port and MAC compatibles were changed.
> This patch aligns the FMan Port and MAC compatibles
> to the new FMan device tree binding document.
> The FMan device tree binding document can be found in the Linux
> kernel:
> version 3.18.0
> commit 297d35fd2a7d3fbd4e5c0f0c1c18213117ba11ba
> ./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
>
> This patch doesn't affect legacy compatibles support.
>
> Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles
  2018-08-06  7:14 [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles Zhao Qiang
  2018-08-06 16:42 ` Joe Hershberger
@ 2018-08-23 15:19 ` York Sun
  2018-08-24  2:08   ` Qiang Zhao
  1 sibling, 1 reply; 4+ messages in thread
From: York Sun @ 2018-08-23 15:19 UTC (permalink / raw)
  To: u-boot

On 08/06/2018 12:16 AM, Zhao Qiang wrote:
> Recently  the FMan Port and MAC compatibles were changed.
> This patch aligns the FMan Port and MAC compatibles
> to the new FMan device tree binding document.
> The FMan device tree binding document can be found in the Linux
> kernel:
> version 3.18.0
> commit 297d35fd2a7d3fbd4e5c0f0c1c18213117ba11ba
> ./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> 
> This patch doesn't affect legacy compatibles support.
> 
> Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
> ---
> Changes for v2
> 	- add kernel version and commit id modifing the binding
> 
>  drivers/net/fm/init.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
> index 71c3abe..48344f0 100644
> --- a/drivers/net/fm/init.c
> +++ b/drivers/net/fm/init.c
> @@ -329,7 +329,8 @@ void fdt_fixup_fman_ethernet(void *blob)
>  				ft_fixup_port(blob, &fm_info[i],
>  					      "fsl,fman-1g-mac");
>  		} else {
> -			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec"))
> +			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec") &&
> +			    ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec"))

Is this logic correct? You want success return from fixing up _both_
fman-tgec and fman-xgec before fixup fman-10-mac?

York

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles
  2018-08-23 15:19 ` York Sun
@ 2018-08-24  2:08   ` Qiang Zhao
  0 siblings, 0 replies; 4+ messages in thread
From: Qiang Zhao @ 2018-08-24  2:08 UTC (permalink / raw)
  To: u-boot

On 08/23/2018 23:20 PM, York Sun wrote:

>> -			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec"))
>> +			if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec") &&
>> +			    ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec"))

>Is this logic correct? You want success return from fixing up _both_ fman-tgec and fman-xgec before fixup fman-10-mac?

fman-10-mac, tgec and xgec is the different version compatible, it used fman-10-mac at the first time, then modified to tgec and now xgec.
If it fix up successfully with fman-10-mac, it will return 0, and doesn't fix up for the other two compatible.
If failed with fman-tgec, then to fix up for fsl,fman-xgec, if success, return 0 and doesn't fix up for fman-10-mac.

BR
Qiang Zhao

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-24  2:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06  7:14 [U-Boot] [v2 patch] net: fman: Support both new and legacy FMan Compatibles Zhao Qiang
2018-08-06 16:42 ` Joe Hershberger
2018-08-23 15:19 ` York Sun
2018-08-24  2:08   ` Qiang Zhao

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.