All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net/fm: Update FMan Compatibels
@ 2015-05-18 11:46 Igal.Liberman
  2015-05-28 15:47 ` [U-Boot] " Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Igal.Liberman @ 2015-05-18 11:46 UTC (permalink / raw)
  To: u-boot

From: Igal Liberman <igal.liberman@freescale.com>

During FMan upstreaming, the FMan Port and MAC compatibles changed.
This patch aligns the FMan Port and MAC compatibles to the FMan
device tree binding document.

The FMan device tree binding document can be found in the Linux kernel:
./Documentation/devicetree/bindings/powerpc/fsl/fman.txt

Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
---
 arch/powerpc/include/asm/fsl_liodn.h |   20 ++++++++++++++++----
 drivers/net/fm/init.c                |    4 ++--
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/include/asm/fsl_liodn.h b/arch/powerpc/include/asm/fsl_liodn.h
index 811f034..d493f8c 100644
--- a/arch/powerpc/include/asm/fsl_liodn.h
+++ b/arch/powerpc/include/asm/fsl_liodn.h
@@ -133,15 +133,27 @@ extern void fdt_fixup_liodn(void *blob);
 	CONFIG_SYS_FSL_FM##fmNum##_OFFSET + \
 	offsetof(struct ccsr_fman, fm_bmi_common.fmbm_ppid[portID - 1])
 
-/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
+#ifdef CONFIG_SYS_FMAN_V3
+#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
+	_SET_FMAN_RX_1G_LIODN("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
+#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
+	_SET_FMAN_RX_10G_LION("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
+#else
 #define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
-	SET_LIODN_ENTRY_1("fsl,fman-port-1g-rx", liodn, \
+	_SET_FMAN_RX_1G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
+#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
+	_SET_FMAN_RX_10G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
+#endif
+
+/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
+#define _SET_FMAN_RX_1G_LIODN(compatible, fmNum, enetNum, liodn) \
+	SET_LIODN_ENTRY_1(compatible, liodn, \
 		FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
 		CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
 
 /* enetNum is 0, 1, 2... so we + 16 for 10g to get to HW Port ID */
-#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
-	SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
+#define _SET_FMAN_RX_10G_LIODN(compatible, fmNum, enetNum, liodn)	\
+	SET_LIODN_ENTRY_1(compatible, liodn, \
 		FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
 		CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
 
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 9a8a007..4e43cca 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -306,9 +306,9 @@ void fdt_fixup_fman_ethernet(void *blob)
 #else
 	for (i = 0; i < ARRAY_SIZE(fm_info); i++) {
 		if (fm_info[i].type == FM_ETH_1G_E)
-			ft_fixup_port(blob, &fm_info[i], "fsl,fman-1g-mac");
+			ft_fixup_port(blob, &fm_info[i], "fsl,fman-dtsec");
 		else
-			ft_fixup_port(blob, &fm_info[i], "fsl,fman-10g-mac");
+			ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec");
 	}
 #endif
 }
-- 
1.7.9.5

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

* [U-Boot] net/fm: Update FMan Compatibels
  2015-05-18 11:46 [U-Boot] [PATCH] net/fm: Update FMan Compatibels Igal.Liberman
@ 2015-05-28 15:47 ` Scott Wood
  2015-08-11 18:02   ` Joe Hershberger
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2015-05-28 15:47 UTC (permalink / raw)
  To: u-boot

On Mon, May 18, 2015 at 02:46:30PM +0300, Igal.Liberman wrote:
> From: Igal Liberman <igal.liberman@freescale.com>
> 
> During FMan upstreaming, the FMan Port and MAC compatibles changed.
> This patch aligns the FMan Port and MAC compatibles to the FMan
> device tree binding document.
> 
> The FMan device tree binding document can be found in the Linux kernel:
> ./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> 
> Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
> ---
>  arch/powerpc/include/asm/fsl_liodn.h |   20 ++++++++++++++++----
>  drivers/net/fm/init.c                |    4 ++--
>  2 files changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/fsl_liodn.h b/arch/powerpc/include/asm/fsl_liodn.h
> index 811f034..d493f8c 100644
> --- a/arch/powerpc/include/asm/fsl_liodn.h
> +++ b/arch/powerpc/include/asm/fsl_liodn.h
> @@ -133,15 +133,27 @@ extern void fdt_fixup_liodn(void *blob);
>  	CONFIG_SYS_FSL_FM##fmNum##_OFFSET + \
>  	offsetof(struct ccsr_fman, fm_bmi_common.fmbm_ppid[portID - 1])
>  
> -/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
> +#ifdef CONFIG_SYS_FMAN_V3
> +#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
> +	_SET_FMAN_RX_1G_LIODN("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
> +#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> +	_SET_FMAN_RX_10G_LION("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
> +#else
>  #define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
> -	SET_LIODN_ENTRY_1("fsl,fman-port-1g-rx", liodn, \
> +	_SET_FMAN_RX_1G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
> +#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> +	_SET_FMAN_RX_10G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
> +#endif
> +
> +/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
> +#define _SET_FMAN_RX_1G_LIODN(compatible, fmNum, enetNum, liodn) \
> +	SET_LIODN_ENTRY_1(compatible, liodn, \
>  		FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
>  		CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
>  
>  /* enetNum is 0, 1, 2... so we + 16 for 10g to get to HW Port ID */
> -#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> -	SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
> +#define _SET_FMAN_RX_10G_LIODN(compatible, fmNum, enetNum, liodn)	\
> +	SET_LIODN_ENTRY_1(compatible, liodn, \
>  		FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
>  		CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
>  
> diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
> index 9a8a007..4e43cca 100644
> --- a/drivers/net/fm/init.c
> +++ b/drivers/net/fm/init.c
> @@ -306,9 +306,9 @@ void fdt_fixup_fman_ethernet(void *blob)
>  #else
>  	for (i = 0; i < ARRAY_SIZE(fm_info); i++) {
>  		if (fm_info[i].type == FM_ETH_1G_E)
> -			ft_fixup_port(blob, &fm_info[i], "fsl,fman-1g-mac");
> +			ft_fixup_port(blob, &fm_info[i], "fsl,fman-dtsec");
>  		else
> -			ft_fixup_port(blob, &fm_info[i], "fsl,fman-10g-mac");
> +			ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec");

Please make this accept either compatible so that we don't break using
upstream U-Boot with SDK kernels which is a scenario that currently
works.

-Scott

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

* [U-Boot] net/fm: Update FMan Compatibels
  2015-05-28 15:47 ` [U-Boot] " Scott Wood
@ 2015-08-11 18:02   ` Joe Hershberger
  2015-08-12  7:23     ` Liberman Igal
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Hershberger @ 2015-08-11 18:02 UTC (permalink / raw)
  To: u-boot

Hi Igal,

On Thu, May 28, 2015 at 10:47 AM, Scott Wood <scottwood@freescale.com> wrote:
> On Mon, May 18, 2015 at 02:46:30PM +0300, Igal.Liberman wrote:
>> From: Igal Liberman <igal.liberman@freescale.com>
>>
>> During FMan upstreaming, the FMan Port and MAC compatibles changed.
>> This patch aligns the FMan Port and MAC compatibles to the FMan
>> device tree binding document.
>>
>> The FMan device tree binding document can be found in the Linux kernel:
>> ./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
>>
>> Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
>> ---
>>  arch/powerpc/include/asm/fsl_liodn.h |   20 ++++++++++++++++----
>>  drivers/net/fm/init.c                |    4 ++--
>>  2 files changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/fsl_liodn.h b/arch/powerpc/include/asm/fsl_liodn.h
>> index 811f034..d493f8c 100644
>> --- a/arch/powerpc/include/asm/fsl_liodn.h
>> +++ b/arch/powerpc/include/asm/fsl_liodn.h
>> @@ -133,15 +133,27 @@ extern void fdt_fixup_liodn(void *blob);
>>       CONFIG_SYS_FSL_FM##fmNum##_OFFSET + \
>>       offsetof(struct ccsr_fman, fm_bmi_common.fmbm_ppid[portID - 1])
>>
>> -/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
>> +#ifdef CONFIG_SYS_FMAN_V3
>> +#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
>> +     _SET_FMAN_RX_1G_LIODN("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
>> +#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
>> +     _SET_FMAN_RX_10G_LION("fsl,fman-v3-port-rx", fmNum, enetNum, liodn)
>> +#else
>>  #define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
>> -     SET_LIODN_ENTRY_1("fsl,fman-port-1g-rx", liodn, \
>> +     _SET_FMAN_RX_1G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
>> +#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
>> +     _SET_FMAN_RX_10G_LIODN("fsl,fman-v2-port-rx", fmNum, enetNum, liodn)
>> +#endif
>> +
>> +/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
>> +#define _SET_FMAN_RX_1G_LIODN(compatible, fmNum, enetNum, liodn) \
>> +     SET_LIODN_ENTRY_1(compatible, liodn, \
>>               FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
>>               CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
>>
>>  /* enetNum is 0, 1, 2... so we + 16 for 10g to get to HW Port ID */
>> -#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
>> -     SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
>> +#define _SET_FMAN_RX_10G_LIODN(compatible, fmNum, enetNum, liodn)    \
>> +     SET_LIODN_ENTRY_1(compatible, liodn, \
>>               FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
>>               CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
>>
>> diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
>> index 9a8a007..4e43cca 100644
>> --- a/drivers/net/fm/init.c
>> +++ b/drivers/net/fm/init.c
>> @@ -306,9 +306,9 @@ void fdt_fixup_fman_ethernet(void *blob)
>>  #else
>>       for (i = 0; i < ARRAY_SIZE(fm_info); i++) {
>>               if (fm_info[i].type == FM_ETH_1G_E)
>> -                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-1g-mac");
>> +                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-dtsec");
>>               else
>> -                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-10g-mac");
>> +                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec");
>
> Please make this accept either compatible so that we don't break using
> upstream U-Boot with SDK kernels which is a scenario that currently
> works.

What became of this patch? Also, please fix the misspelling of
"compatibles" in the subject.

Thanks,
-Joe

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

* [U-Boot] net/fm: Update FMan Compatibels
  2015-08-11 18:02   ` Joe Hershberger
@ 2015-08-12  7:23     ` Liberman Igal
  0 siblings, 0 replies; 4+ messages in thread
From: Liberman Igal @ 2015-08-12  7:23 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
> Sent: Tuesday, August 11, 2015 9:02 PM
> To: Wood Scott-B07421 <scottwood@freescale.com>
> Cc: Liberman Igal-B31950 <Igal.Liberman@freescale.com>; u-boot <u-
> boot at lists.denx.de>; Bucur Madalin-Cristian-B32716
> <madalin.bucur@freescale.com>
> Subject: Re: [U-Boot] net/fm: Update FMan Compatibels
> 
> Hi Igal,
> 
> On Thu, May 28, 2015 at 10:47 AM, Scott Wood <scottwood@freescale.com>
> wrote:
> > On Mon, May 18, 2015 at 02:46:30PM +0300, Igal.Liberman wrote:
> >> From: Igal Liberman <igal.liberman@freescale.com>
> >>
> >> During FMan upstreaming, the FMan Port and MAC compatibles changed.
> >> This patch aligns the FMan Port and MAC compatibles to the FMan
> >> device tree binding document.
> >>
> >> The FMan device tree binding document can be found in the Linux kernel:
> >> ./Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> >>
> >> Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
> >> ---
> >>  arch/powerpc/include/asm/fsl_liodn.h |   20 ++++++++++++++++----
> >>  drivers/net/fm/init.c                |    4 ++--
> >>  2 files changed, 18 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/arch/powerpc/include/asm/fsl_liodn.h
> >> b/arch/powerpc/include/asm/fsl_liodn.h
> >> index 811f034..d493f8c 100644
> >> --- a/arch/powerpc/include/asm/fsl_liodn.h
> >> +++ b/arch/powerpc/include/asm/fsl_liodn.h
> >> @@ -133,15 +133,27 @@ extern void fdt_fixup_liodn(void *blob);
> >>       CONFIG_SYS_FSL_FM##fmNum##_OFFSET + \
> >>       offsetof(struct ccsr_fman, fm_bmi_common.fmbm_ppid[portID - 1])
> >>
> >> -/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
> >> +#ifdef CONFIG_SYS_FMAN_V3
> >> +#define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
> >> +     _SET_FMAN_RX_1G_LIODN("fsl,fman-v3-port-rx", fmNum,
> enetNum,
> >> +liodn) #define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> >> +     _SET_FMAN_RX_10G_LION("fsl,fman-v3-port-rx", fmNum, enetNum,
> >> +liodn) #else
> >>  #define SET_FMAN_RX_1G_LIODN(fmNum, enetNum, liodn) \
> >> -     SET_LIODN_ENTRY_1("fsl,fman-port-1g-rx", liodn, \
> >> +     _SET_FMAN_RX_1G_LIODN("fsl,fman-v2-port-rx", fmNum,
> enetNum,
> >> +liodn) #define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> >> +     _SET_FMAN_RX_10G_LIODN("fsl,fman-v2-port-rx", fmNum,
> enetNum,
> >> +liodn) #endif
> >> +
> >> +/* enetNum is 0, 1, 2... so we + 8 for 1g to get to HW Port ID */
> >> +#define _SET_FMAN_RX_1G_LIODN(compatible, fmNum, enetNum,
> liodn) \
> >> +     SET_LIODN_ENTRY_1(compatible, liodn, \
> >>               FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 8), \
> >>
> CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_1G_OFFSET) \
> >>
> >>  /* enetNum is 0, 1, 2... so we + 16 for 10g to get to HW Port ID */
> >> -#define SET_FMAN_RX_10G_LIODN(fmNum, enetNum, liodn) \
> >> -     SET_LIODN_ENTRY_1("fsl,fman-port-10g-rx", liodn, \
> >> +#define _SET_FMAN_RX_10G_LIODN(compatible, fmNum, enetNum,
> liodn)    \
> >> +     SET_LIODN_ENTRY_1(compatible, liodn, \
> >>               FM_PPID_RX_PORT_OFFSET(fmNum, enetNum + 16), \
> >>
> CONFIG_SYS_FSL_FM##fmNum##_RX##enetNum##_10G_OFFSET) \
> >>
> >> diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c index
> >> 9a8a007..4e43cca 100644
> >> --- a/drivers/net/fm/init.c
> >> +++ b/drivers/net/fm/init.c
> >> @@ -306,9 +306,9 @@ void fdt_fixup_fman_ethernet(void *blob)  #else
> >>       for (i = 0; i < ARRAY_SIZE(fm_info); i++) {
> >>               if (fm_info[i].type == FM_ETH_1G_E)
> >> -                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-1g-mac");
> >> +                     ft_fixup_port(blob, &fm_info[i],
> >> + "fsl,fman-dtsec");
> >>               else
> >> -                     ft_fixup_port(blob, &fm_info[i], "fsl,fman-10g-mac");
> >> +                     ft_fixup_port(blob, &fm_info[i],
> >> + "fsl,fman-xgec");
> >
> > Please make this accept either compatible so that we don't break using
> > upstream U-Boot with SDK kernels which is a scenario that currently
> > works.
> 
> What became of this patch? Also, please fix the misspelling of "compatibles"
> in the subject.
> 

Hi Joe,
I've prepared a new patch which support both compatibles (As Scott requested).
I'll send it upstream after testing it on all available platforms. 

Thanks for the comment regarding the typo!

> Thanks,
> -Joe

Igal.

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

end of thread, other threads:[~2015-08-12  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 11:46 [U-Boot] [PATCH] net/fm: Update FMan Compatibels Igal.Liberman
2015-05-28 15:47 ` [U-Boot] " Scott Wood
2015-08-11 18:02   ` Joe Hershberger
2015-08-12  7:23     ` Liberman Igal

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.