
On Sun, Jul 14, 2019 at 6:04 PM Vladimir Oltean olteanv@gmail.com wrote:
On Sun, 14 Jul 2019 at 04:55, Bin Meng bmeng.cn@gmail.com wrote:
Hi Vladimir,
On Sat, Jul 13, 2019 at 5:39 PM Vladimir Oltean olteanv@gmail.com wrote:
Hi Joe,
On Fri, 12 Jul 2019 at 23:46, Joe Hershberger joe.hershberger@ni.com wrote:
On Sun, Jun 23, 2019 at 12:53 PM Vladimir Oltean olteanv@gmail.com wrote:
From: Bin Meng bmeng.cn@gmail.com
Now that we have added driver model support to the TSEC driver, convert ls1021atwr board to use it.
This depends on previous DM series for ls1021atwr: http://patchwork.ozlabs.org/patch/561855/
Signed-off-by: Bin Meng bmeng.cn@gmail.com
Generally looks good, but a few nits below...
Acked-by: Joe Hershberger joe.hershberger@ni.com
[Vladimir] Made the following changes:
- Added 'status = "disabled";' for all Ethernet ports in ls1021a.dtsi
- Fixed the confusion between the SGMII/TBI PCS for enet0 and enet1 - a mistake ported over from Linux. Each SGMII PCS lies on the private MDIO bus of the interface (and the RGMII enet2 has no SGMII PCS).
Signed-off-by: Vladimir Oltean olteanv@gmail.com
arch/arm/cpu/armv7/ls102xa/cpu.c | 2 +- arch/arm/cpu/armv7/ls102xa/fdt.c | 10 ++++++++ arch/arm/dts/ls1021a-twr.dtsi | 32 +++++++++++++++++++++++++ arch/arm/dts/ls1021a.dtsi | 28 ++++++++++++++++++++-- board/freescale/ls1021atwr/ls1021atwr.c | 2 +- configs/ls1021atwr_nor_defconfig | 1 + configs/ls1021atwr_nor_lpuart_defconfig | 1 + include/configs/ls1021atwr.h | 4 ++++ 8 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index ecf9e869855e..9ccfe1042ce5 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -296,7 +296,7 @@ int cpu_mmc_init(bd_t *bis)
int cpu_eth_init(bd_t *bis) { -#ifdef CONFIG_TSEC_ENET +#if defined(CONFIG_TSEC_ENET) && !defined(CONFIG_DM_ETH) tsec_standard_init(bis); #endif
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c index 8bf9c42b2260..90cf7958f257 100644 --- a/arch/arm/cpu/armv7/ls102xa/fdt.c +++ b/arch/arm/cpu/armv7/ls102xa/fdt.c @@ -16,12 +16,17 @@ #include <tsec.h> #include <asm/arch/immap_ls102xa.h> #include <fsl_sec.h> +#include <dm.h>
DECLARE_GLOBAL_DATA_PTR;
void ft_fixup_enet_phy_connect_type(void *fdt) { +#ifndef CONFIG_DM_ETH
Please use positive logic where convenient. I.e. #ifdef CONFIG_DM_ETH and swap cases.
To be honest I don't know why keep compatibility with non-DM ETH at all for the TWR board. On the LS1021A-TSN I'm not doing that. Bin, is there any particular reason? If not, I'll just completely remove your #ifdef's for v2.
I remember at that time there were some PowerPC 83xx/85xx boards that were not converted to DM but still used TSEC driver. If this is not a concern now, I am all for it to remove the non-DM TSEC support.
For the TSEC driver code, sure, there are still non-DM users out there and we're still keeping them for now. I was talking about the board code for LS1021A-TWR when I replied to Joe.
For LS1021A-TWR board codes, I agree there is no need to keep non-DM stuff.
Regards, Bin