> -----Original Message----- > From: Joe Hershberger [mailto:joe.hershber...@gmail.com] > Sent: Tuesday, August 11, 2015 9:02 PM > To: Wood Scott-B07421 <scottw...@freescale.com> > Cc: Liberman Igal-B31950 <igal.liber...@freescale.com>; u-boot <u- > b...@lists.denx.de>; Bucur Madalin-Cristian-B32716 > <madalin.bu...@freescale.com> > Subject: Re: [U-Boot] net/fm: Update FMan Compatibels > > Hi Igal, > > On Thu, May 28, 2015 at 10:47 AM, Scott Wood <scottw...@freescale.com> > wrote: > > On Mon, May 18, 2015 at 02:46:30PM +0300, Igal.Liberman wrote: > >> From: Igal Liberman <igal.liber...@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.liber...@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. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot