Re: [U-Boot] [PATCH v10 07/16] mips: Implement {in, out}_{le, be}_{16, 32, 64} and {in, out}_8
On 04.10.2018 09:00, Mario Six wrote: MIPS is the only architecture currently supported by U-Boot that does not implement any of the in/out register access functions. To have a interface that is useable across architectures, add the functions to the MIPS architecture (implemented using the __raw_write and __raw_read functions). Reviewed-by: Simon Glass Signed-off-by: Mario Six --- v9 -> v10: No changes v8 -> v9: No changes v7 -> v8: No changes v6 -> v7: No changes v5 -> v6: New in v6 --- arch/mips/include/asm/io.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 957442effd..7c40e415c7 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -547,6 +547,28 @@ __BUILD_CLRSETBITS(bwlq, sfx, end, type) #define __to_cpu(v) (v) #define cpu_to__(v) (v) +#define out_arch(type, endian, a, v) __raw_write##type(cpu_to_##endian(v),a) +#define in_arch(type, endian, a) endian##_to_cpu(__raw_read##type(a)) + +#define out_le64(a, v) out_arch(q, le64, a, v) +#define out_le32(a, v) out_arch(l, le32, a, v) +#define out_le16(a, v) out_arch(w, le16, a, v) + +#define in_le64(a) in_arch(q, le64, a) +#define in_le32(a) in_arch(l, le32, a) +#define in_le16(a) in_arch(w, le16, a) + +#define out_be64(a, v) out_arch(q, be64, a, v) +#define out_be32(a, v) out_arch(l, be32, a, v) +#define out_be16(a, v) out_arch(w, be16, a, v) + +#define in_be64(a) in_arch(q, be64, a) +#define in_be32(a) in_arch(l, be32, a) +#define in_be16(a) in_arch(w, be16, a) + +#define out_8(a, v)__raw_writeb(v, a) +#define in_8(a)__raw_readb(a) + Reviewed-by: Stefan Roese Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 03/11] drivers: spi: cf_spi: migrate to DM and DT
On Wed, Oct 10, 2018 at 5:10 AM Angelo Dureghello wrote: > > Adding DM and DT support and removing old non-DM code. Commit head can be: spi: cf_spi: Convert to driver model > > Signed-off-by: Angelo Dureghello > --- > Changes for v2: > - removed non DM code part > - add default setup of CTAR registers > - add DT CTAR register setup support > --- > drivers/spi/cf_spi.c| 510 +++- > include/dm/platform_data/spi_coldfire.h | 29 ++ > 2 files changed, 346 insertions(+), 193 deletions(-) > create mode 100644 include/dm/platform_data/spi_coldfire.h > > diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c > index 522631cbbf..55e2c9d7b7 100644 > --- a/drivers/spi/cf_spi.c > +++ b/drivers/spi/cf_spi.c > @@ -6,16 +6,28 @@ > * > * Copyright (C) 2004-2009 Freescale Semiconductor, Inc. > * TsiChung Liew (tsi-chung.l...@freescale.com) > + * > + * Support for DM and DT, non-DM code removed. > + * Copyright (C) 2018 Angelo Dureghello > + * > + * TODO: fsl_dspi.c should work as a driver for the DSPI module. what is this for? > */ > > #include > +#include > +#include > #include > #include > #include > +#include > > -struct cf_spi_slave { > +struct coldfire_spi_priv { > +#ifndef CONFIG_DM_SPI > struct spi_slave slave; > +#endif do you still maintain non-dm code? if yes can't we get rid of? > + struct dspi *regs; > uint baudrate; > + int mode; > int charbit; > }; > > @@ -38,14 +50,30 @@ DECLARE_GLOBAL_DATA_PTR; > #define SPI_MODE_MOD 0x0020 > #define SPI_DBLRATE0x0010 > > -static inline struct cf_spi_slave *to_cf_spi_slave(struct spi_slave *slave) > -{ > - return container_of(slave, struct cf_spi_slave, slave); > -} > +#define MCF_DSPI_MAX_CTAR_REGS 8 > + > +/* Default values */ > +#define MCF_DSPI_DEFAULT_SCK_FREQ 1000 > +#define MCF_DSPI_DEFAULT_MAX_CS4 > +#define MCF_DSPI_DEFAULT_MODE 0 > > -static void cfspi_init(void) > +#define MCF_DSPI_DEFAULT_CTAR (DSPI_CTAR_TRSZ(7) | \ > + DSPI_CTAR_PCSSCK_1CLK | \ > + DSPI_CTAR_PASC(0) | \ > + DSPI_CTAR_PDT(0) | \ > + DSPI_CTAR_CSSCK(0) | \ > + DSPI_CTAR_ASC(0) | \ [snip] > -int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, > -void *din, unsigned long flags) > +static int coldfire_spi_probe(struct udevice *bus) > { > - return cfspi_xfer(slave, bitlen, dout, din, flags); > + struct coldfire_spi_platdata *plat = dev_get_platdata(bus); > + struct coldfire_spi_priv *cfspi = dev_get_priv(bus); > + int i; > + > + cfspi->regs = (struct dspi *)plat->regs_addr; > + > + cfspi->baudrate = plat->speed_hz; > + cfspi->mode = plat->mode; > + > + for (i = 0; i < MCF_DSPI_MAX_CTAR_REGS; i++) { > + unsigned int ctar = 0; > + > + if (plat->ctar[i][0] == 0) > + break; > + > + ctar = DSPI_CTAR_TRSZ(plat->ctar[i][0]) | > + DSPI_CTAR_PCSSCK(plat->ctar[i][1]) | > + DSPI_CTAR_PASC(plat->ctar[i][2]) | > + DSPI_CTAR_PDT(plat->ctar[i][3]) | > + DSPI_CTAR_CSSCK(plat->ctar[i][4]) | > + DSPI_CTAR_ASC(plat->ctar[i][5]) | > + DSPI_CTAR_DT(plat->ctar[i][6]) | > + DSPI_CTAR_BR(plat->ctar[i][7]); > + > + writel(ctar, >regs->ctar[i]); > + } > + > + __spi_init(cfspi); > + > + return 0; > } > -#endif /* CONFIG_CMD_SPI */ > + > +static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus) If you want to support platdata, it shouldn't available for DT so add ifdef for DT. See recent patches about this change. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 01/14] mips: Add in_le32(), out_le32() etc IO accessor functions
Hi Anatolij, On 09.10.2018 19:38, Anatolij Gustschin wrote: Hi Stefan, On Tue, 9 Oct 2018 08:59:03 +0200 Stefan Roese s...@denx.de wrote: in_le32() and out_le32() are needed for the bootcounter support. So lets implement these accessor functions for MIPS as well. Signed-off-by: Stefan Roese Cc: Daniel Schwierzeck --- arch/mips/include/asm/io.h | 21 + 1 file changed, 21 insertions(+) There is a similar patch pending: http://patchwork.ozlabs.org/patch/978674/ Yes, thanks. Looks pretty identical. Please go ahead with this one from Mario and my patch can be dropped from this series then. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 02/11] drivers: spi: cf_spi: add Kconfig option
On Wed, Oct 10, 2018 at 11:14 AM Angelo Dureghello wrote: > Commit message? > Signed-off-by: Angelo Dureghello > --- > Changes for v2: > - new patch > --- > drivers/spi/Kconfig | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig > index 196767a3f6..6340453870 100644 > --- a/drivers/spi/Kconfig > +++ b/drivers/spi/Kconfig > @@ -87,6 +87,12 @@ config CADENCE_QSPI > used to access the SPI NOR flash on platforms embedding this > Cadence IP core. > > +config CF_SPI > +bool "ColdFire SPI driver" > +help > + Enable the ColdFire SPI driver. This driver can be used on > + some m68k SoCs. > + > config DESIGNWARE_SPI > bool "Designware SPI driver" > help > @@ -259,18 +265,18 @@ config ZYNQMP_GQSPI > > endif # if DM_SPI > > -config SOFT_SPI > - bool "Soft SPI driver" > - help > -Enable Soft SPI driver. This driver is to use GPIO simulate > -the SPI protocol. > - > config CF_SPI > bool "ColdFire SPI driver" > help > Enable the ColdFire SPI driver. This driver can be used on > some m68k SoCs. > > +config SOFT_SPI > + bool "Soft SPI driver" > + help > +Enable Soft SPI driver. This driver is to use GPIO simulate > +the SPI protocol. > + Why this move? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/11] m68k: add basic set of devicetrees
On Wed, Oct 10, 2018 at 5:09 AM Angelo Dureghello wrote: > > This patch adds a basic group of devicetrees, one for each > cpu family, including actually just uart and dspi devices, > since these are the drivers supporting devicetree (support > added in this patch-set). I hope this is Linux DT sync? if yes better to mention the sync commit id. Acked-by: Jagan Teki ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 09/11] configs: enable use of DT for all m68k boards
Enable DT usage for all m68k boards. To provide a working single binary, the dts has been kept as embedded. Signed-off-by: Angelo Dureghello --- Changes for v2: - new patch --- configs/M5208EVBE_defconfig | 2 ++ configs/M52277EVB_defconfig | 2 ++ configs/M52277EVB_stmicro_defconfig | 2 ++ configs/M5235EVB_Flash32_defconfig| 2 ++ configs/M5235EVB_defconfig| 2 ++ configs/M5249EVB_defconfig| 2 ++ configs/M5253DEMO_defconfig | 2 ++ configs/M5272C3_defconfig | 2 ++ configs/M5275EVB_defconfig| 3 +++ configs/M5282EVB_defconfig| 2 ++ configs/M53017EVB_defconfig | 2 ++ configs/M5329AFEE_defconfig | 2 ++ configs/M5329BFEE_defconfig | 2 ++ configs/M5373EVB_defconfig| 2 ++ configs/M54418TWR_defconfig | 2 ++ configs/M54418TWR_nand_mii_defconfig | 2 ++ configs/M54418TWR_nand_rmii_defconfig | 2 ++ configs/M54418TWR_nand_rmii_lowfreq_defconfig | 2 ++ configs/M54418TWR_serial_mii_defconfig| 2 ++ configs/M54418TWR_serial_rmii_defconfig | 2 ++ configs/M54451EVB_defconfig | 2 ++ configs/M54451EVB_stmicro_defconfig | 2 ++ configs/M54455EVB_a66_defconfig | 2 ++ configs/M54455EVB_defconfig | 2 ++ configs/M54455EVB_i66_defconfig | 2 ++ configs/M54455EVB_intel_defconfig | 2 ++ configs/M54455EVB_stm33_defconfig | 2 ++ configs/M5475BFE_defconfig| 2 ++ configs/M5475CFE_defconfig| 2 ++ configs/M5475DFE_defconfig| 2 ++ configs/M5475EFE_defconfig| 2 ++ configs/M5475FFE_defconfig| 2 ++ configs/M5475GFE_defconfig| 2 ++ configs/M5485AFE_defconfig| 2 ++ configs/M5485BFE_defconfig| 2 ++ configs/M5485CFE_defconfig| 2 ++ configs/M5485DFE_defconfig| 2 ++ configs/M5485EFE_defconfig| 2 ++ configs/M5485FFE_defconfig| 2 ++ configs/M5485GFE_defconfig| 2 ++ configs/M5485HFE_defconfig| 2 ++ configs/amcore_defconfig | 2 ++ configs/astro_mcf5373l_defconfig | 2 ++ configs/cobra5272_defconfig | 2 ++ configs/eb_cpu5282_defconfig | 2 ++ configs/eb_cpu5282_internal_defconfig | 2 ++ configs/stmark2_defconfig | 2 ++ 47 files changed, 95 insertions(+) diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig index 920476042d..69f44dface 100644 --- a/configs/M5208EVBE_defconfig +++ b/configs/M5208EVBE_defconfig @@ -1,6 +1,8 @@ CONFIG_M68K=y CONFIG_SYS_TEXT_BASE=0x0 CONFIG_TARGET_M5208EVBE=y +CONFIG_DEFAULT_DEVICE_TREE="M5208EVBE" +CONFIG_OF_EMBED=y CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set # CONFIG_CMDLINE_EDITING is not set diff --git a/configs/M52277EVB_defconfig b/configs/M52277EVB_defconfig index 233e258a61..b41209ab6f 100644 --- a/configs/M52277EVB_defconfig +++ b/configs/M52277EVB_defconfig @@ -1,6 +1,8 @@ CONFIG_M68K=y CONFIG_SYS_TEXT_BASE=0x0 CONFIG_TARGET_M52277EVB=y +CONFIG_DEFAULT_DEVICE_TREE="M52277EVB" +CONFIG_OF_EMBED=y CONFIG_SYS_EXTRA_OPTIONS="SYS_SPANSION_BOOT" CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/configs/M52277EVB_stmicro_defconfig b/configs/M52277EVB_stmicro_defconfig index 573cea9655..d1a3e7db3c 100644 --- a/configs/M52277EVB_stmicro_defconfig +++ b/configs/M52277EVB_stmicro_defconfig @@ -1,6 +1,8 @@ CONFIG_M68K=y CONFIG_SYS_TEXT_BASE=0x43E0 CONFIG_TARGET_M52277EVB=y +CONFIG_DEFAULT_DEVICE_TREE="M52277EVB_stmicro" +CONFIG_OF_EMBED=y CONFIG_SYS_EXTRA_OPTIONS="CF_SBF,SYS_STMICRO_BOOT" CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/configs/M5235EVB_Flash32_defconfig b/configs/M5235EVB_Flash32_defconfig index 7d3b6d8581..1ae7ed5114 100644 --- a/configs/M5235EVB_Flash32_defconfig +++ b/configs/M5235EVB_Flash32_defconfig @@ -1,6 +1,8 @@ CONFIG_M68K=y CONFIG_SYS_TEXT_BASE=0xFFC0 CONFIG_TARGET_M5235EVB=y +CONFIG_DEFAULT_DEVICE_TREE="M5235EVB_Flash32" +CONFIG_OF_EMBED=y CONFIG_SYS_EXTRA_OPTIONS="NORFLASH_PS32BIT" CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/configs/M5235EVB_defconfig b/configs/M5235EVB_defconfig index 78d8ddc130..5ecdcaccf4 100644 --- a/configs/M5235EVB_defconfig +++ b/configs/M5235EVB_defconfig @@ -1,6 +1,8 @@ CONFIG_M68K=y CONFIG_SYS_TEXT_BASE=0xFFE0 CONFIG_TARGET_M5235EVB=y +CONFIG_DEFAULT_DEVICE_TREE="M5235EVB" +CONFIG_OF_EMBED=y CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set # CONFIG_CMDLINE_EDITING is not set diff --git a/configs/M5249EVB_defconfig
[U-Boot] [PATCH v2 02/11] drivers: spi: cf_spi: add Kconfig option
Signed-off-by: Angelo Dureghello --- Changes for v2: - new patch --- drivers/spi/Kconfig | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 196767a3f6..6340453870 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -87,6 +87,12 @@ config CADENCE_QSPI used to access the SPI NOR flash on platforms embedding this Cadence IP core. +config CF_SPI +bool "ColdFire SPI driver" +help + Enable the ColdFire SPI driver. This driver can be used on + some m68k SoCs. + config DESIGNWARE_SPI bool "Designware SPI driver" help @@ -259,18 +265,18 @@ config ZYNQMP_GQSPI endif # if DM_SPI -config SOFT_SPI - bool "Soft SPI driver" - help -Enable Soft SPI driver. This driver is to use GPIO simulate -the SPI protocol. - config CF_SPI bool "ColdFire SPI driver" help Enable the ColdFire SPI driver. This driver can be used on some m68k SoCs. +config SOFT_SPI + bool "Soft SPI driver" + help +Enable Soft SPI driver. This driver is to use GPIO simulate +the SPI protocol. + config FSL_ESPI bool "Freescale eSPI driver" help -- 2.19.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] arm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table
On Tue, 2018-10-09 at 14:48 +0200, Marek Vasut wrote: > On 10/09/2018 05:03 AM, Ang, Chee Hong wrote: > > > > On Mon, 2018-10-08 at 22:32 +0200, Marek Vasut wrote: > > > > > > On 10/08/2018 05:10 PM, Ang, Chee Hong wrote: > > > > > > > > > > > > On Mon, 2018-10-08 at 11:57 +0200, Marek Vasut wrote: > > > > > > > > > > > > > > > On 10/08/2018 11:48 AM, chee.hong@intel.com wrote: > > > > > > > > > > > > > > > > > > > > > > > > From: "Ang, Chee Hong" > > > > > > > > > > > > Enable 'fpga' command in u-boot. User will be able to use > > > > > > the > > > > > > fpga > > > > > > command to program the FPGA on Stratix10 SoC. > > > > > > > > > > > > Signed-off-by: Ang, Chee Hong > > > > > > --- > > > > > > arch/arm/mach-socfpga/misc.c | 29 > > > > > > + > > > > > > arch/arm/mach-socfpga/misc_s10.c | 2 ++ > > > > > > drivers/fpga/altera.c| 6 ++ > > > > > > include/altera.h | 4 > > > > > > 4 files changed, 41 insertions(+) > > > > > > > > > > > > diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach- > > > > > > socfpga/misc.c > > > > > > index a4f6d5c..7986b58 100644 > > > > > > --- a/arch/arm/mach-socfpga/misc.c > > > > > > +++ b/arch/arm/mach-socfpga/misc.c > > > > > > @@ -88,6 +88,27 @@ int overwrite_console(void) > > > > > > #endif > > > > > > > > > > > > #ifdef CONFIG_FPGA > > > > > > +#ifdef CONFIG_FPGA_STRATIX10 > > > > > > +/* > > > > > > + * FPGA programming support for SoC FPGA Stratix 10 > > > > > > + */ > > > > > > +static Altera_desc altera_fpga[] = { > > > > > > + { > > > > > > + /* Family */ > > > > > > + Intel_FPGA_Stratix10, > > > > > > + /* Interface type */ > > > > > > + secure_device_manager_mailbox, > > > > > > + /* No limitation as additional data will > > > > > > be > > > > > > ignored */ > > > > > > + -1, > > > > > > + /* No device function table */ > > > > > > + NULL, > > > > > > + /* Base interface address specified in > > > > > > driver > > > > > > */ > > > > > > + NULL, > > > > > > + /* No cookie implementation */ > > > > > > + 0 > > > > > > + }, > > > > > > +}; > > > > > > +#else > > > > > > /* > > > > > > * FPGA programming support for SoC FPGA Cyclone V > > > > > > */ > > > > > > @@ -107,6 +128,7 @@ static Altera_desc altera_fpga[] = { > > > > > > 0 > > > > > > }, > > > > > > }; > > > > > > +#endif > > > > > > > > > > > > /* add device descriptor to FPGA device table */ > > > > > > void socfpga_fpga_add(void) > > > > > > @@ -116,6 +138,13 @@ void socfpga_fpga_add(void) > > > > > > for (i = 0; i < ARRAY_SIZE(altera_fpga); i++) > > > > > > fpga_add(fpga_altera, _fpga[i]); > > > > > > } > > > > > > + > > > > > > +#else > > > > > > + > > > > > > +__weak void socfpga_fpga_add(void) > > > > > > +{ > > > > > > +} > > > > > Why is a __weak function defined only in else-statement ? > > > > > > > > > > It should be defined always, with a sane default > > > > > implementation. > > > > I will remove the empty function in #else-statement and define > > > > the > > > > default function like this : > > > > > > > > /* add device descriptor to FPGA device table */ > > > > void socfpga_fpga_add(void) > > > > { > > > > #ifdef CONFIG_FPGA > > > > int i; > > > > fpga_init(); > > > > for (i = 0; i < ARRAY_SIZE(altera_fpga); i++) > > > > fpga_add(fpga_altera, _fpga[i]); > > > > #endif > > > > } > > > > > > > > Is that OK? > > > Can't you have __weak empty implementation of socfpga_fpga_add() > > > and > > > implement a version per platform ? Would that work and make sense > > > ? > > socfpga_fpga_add() as shown above is a generic function for adding > > FPGA > > devices to FPGA driver which applies to all our platforms. This is > > the > > reason why it is defined in misc.c instead of > > misc_.c. > > > > It turned out we already have this defined in misc.h: > > #ifdef CONFIG_FPGA > > void socfpga_fpga_add(void); > > #else > > static inline void socfpga_fpga_add(void) {} > > #endif > Right, if you had one socfpga_fpga_add() per platform + generic empty > one, you could drop that whole thing ^. Yes. It's being addressed in v3 patch: https://lists.denx.de/pipermail/u-boot/2018-October/343561.html > > > > > So I don't think I need to make any changes to socfpga_fpga_add() > > in > > misc.c. I just have to remove ifdef CONFIG_FPGA in misc_s10.c > > because > > it was unnecessary. I will submit v3 for this patch and you can > > comment > > further. The v3 patch will be simpler. Thanks. > Please don't submit stuff before the discussion concluded, it's > pointless. OK. > > > > > > > > > > > > btw. the best solution would be to fix this proper and implement > > > a > > > DM/DT > > > based probing of the FPGA, including a proper driver(s) in > > > drivers/fpga/ > > > instead of putting all the crud
Re: [U-Boot] [PATCH v3 2/6] driver: net: fsl-mc: remove unused strcture elements
Hi Joe, > -Original Message- > From: Joe Hershberger [mailto:joe.hershber...@ni.com] > Sent: Wednesday, October 10, 2018 9:29 AM > To: Pankaj Bansal > Cc: Joseph Hershberger ; u-boot b...@lists.denx.de> > Subject: Re: [U-Boot] [PATCH v3 2/6] driver: net: fsl-mc: remove unused > strcture elements > > On Tue, Oct 9, 2018 at 9:59 PM Pankaj Bansal > wrote: > > > > The phydev structure is present in both ldpaa_eth_priv and > > wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used > > > > As the phydev is created based on phy_addr and bus members of > > wriop_dpmac_info, it is appropriate to keep phydev in > wriop_dpmac_info. > > > > Also phy_regs is not being used, therefore remove it > > > > Signed-off-by: Pankaj Bansal > > Acked-by: Joe Hershberger > > --- > > > > Notes: > > V3: > > - No change > > Please be sure you are running scripts/checkpatch.pl on your patches. > v2 had a number of issues I had to fix up. I'm pretty sure this was one of > them. I had run checkpatch script on all the versions of patches I sent. I use this command "./scripts/checkpatch.pl 0001-something.patch" This "no return at the end of function" issue was not reported by checkpatch script. Can you please tell me which issues in V2 are you referring to? Because when I ran checkpatch.pl, it gave me no errors or warnings but 7 checks regarding alignment in board/freescale/ls2080aqds/eth.c. I did not do any changes for that because that code was not part of my patch and I think that was done so that line doesn't exceed 80 characters. > > You would do yourself a favor to use tools/patman/patman. This is a good advice. I will use patman from now onwards to prepare and send patches. > > > V2: > > - change (phydev && bus != NULL) to (phydev && bus) > > - after free phydev just pass NULL into wriop_set_phy_dev() > > > > drivers/net/ldpaa_eth/ldpaa_eth.c | 56 +++ > > drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - > > drivers/net/ldpaa_eth/ldpaa_wriop.c | 2 + > > include/fsl-mc/ldpaa_wriop.h| 1 - > > 4 files changed, 33 insertions(+), 27 deletions(-) > > > > diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c > > b/drivers/net/ldpaa_eth/ldpaa_eth.c > > index 82a684bea2..ca3459cc33 100644 > > --- a/drivers/net/ldpaa_eth/ldpaa_eth.c > > +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c > > @@ -35,7 +35,7 @@ static int init_phy(struct eth_device *dev) > > return -1; > > } > > > > - priv->phydev = phydev; > > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > > > return phy_config(phydev); > > } > > @@ -388,6 +388,7 @@ static int ldpaa_eth_open(struct eth_device > *net_dev, bd_t *bd) > > struct mii_dev *bus; > > phy_interface_t enet_if; > > struct dpni_queue d_queue; > > + struct phy_device *phydev = NULL; > > > > if (net_dev->state == ETH_STATE_ACTIVE) > > return 0; > > @@ -408,38 +409,41 @@ static int ldpaa_eth_open(struct eth_device > *net_dev, bd_t *bd) > > goto err_dpmac_setup; > > > > #ifdef CONFIG_PHYLIB > > - if (priv->phydev) { > > - err = phy_startup(priv->phydev); > > + phydev = wriop_get_phy_dev(priv->dpmac_id); > > + if (phydev) { > > + err = phy_startup(phydev); > > if (err) { > > printf("%s: Could not initialize\n", > > - priv->phydev->dev->name); > > + phydev->dev->name); > > goto err_dpmac_bind; > > } > > } > > #else > > - priv->phydev = (struct phy_device *)malloc(sizeof(struct > phy_device)); > > - memset(priv->phydev, 0, sizeof(struct phy_device)); > > + phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); > > + memset(phydev, 0, sizeof(struct phy_device)); > > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > > > - priv->phydev->speed = SPEED_1000; > > - priv->phydev->link = 1; > > - priv->phydev->duplex = DUPLEX_FULL; > > + phydev->speed = SPEED_1000; > > + phydev->link = 1; > > + phydev->duplex = DUPLEX_FULL; > > #endif > > > > bus = wriop_get_mdio(priv->dpmac_id); > > enet_if = wriop_get_enet_if(priv->dpmac_id); > > if ((bus == NULL) && > > (enet_if == PHY_INTERFACE_MODE_XGMII)) { > > - priv->phydev = (struct phy_device *) > > + phydev = (struct phy_device *) > > malloc(sizeof(struct phy_device)); > > - memset(priv->phydev, 0, sizeof(struct phy_device)); > > + memset(phydev, 0, sizeof(struct phy_device)); > > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > > > - priv->phydev->speed = SPEED_1; > > - priv->phydev->link = 1; > > - priv->phydev->duplex = DUPLEX_FULL; > > +
[U-Boot] [PATCH v4] arm: socfpga: fix SPL booting from fpga OnChip RAM
This patch prevents disabling the FPGA bridges when SPL or U-Boot is executed from FPGA onchip RAM. Signed-off-by: Simon Goldschmidt --- Changes in v4: - use an inline function in misc.h to check for the address range instead of a macro in base_addr_ac5.h Changes in v3: - use __image_copy_start to check if we are executing from FPGA Changes in v2: - use less ifdefs and more C code for address checks (but this gives a checkpatch warning because of comparing two upper case constants) - changed comments arch/arm/mach-socfpga/include/mach/base_addr_ac5.h | 1 + arch/arm/mach-socfpga/include/mach/misc.h | 7 +++ arch/arm/mach-socfpga/misc_gen5.c | 10 +- arch/arm/mach-socfpga/spl_gen5.c | 10 +++--- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-socfpga/include/mach/base_addr_ac5.h b/arch/arm/mach-socfpga/include/mach/base_addr_ac5.h index bb9e3faa29..2725e9fcc3 100644 --- a/arch/arm/mach-socfpga/include/mach/base_addr_ac5.h +++ b/arch/arm/mach-socfpga/include/mach/base_addr_ac5.h @@ -6,6 +6,7 @@ #ifndef _SOCFPGA_BASE_ADDRS_H_ #define _SOCFPGA_BASE_ADDRS_H_ +#define SOCFPGA_FPGA_SLAVES_ADDRESS0xc000 #define SOCFPGA_STM_ADDRESS0xfc00 #define SOCFPGA_DAP_ADDRESS0xff00 #define SOCFPGA_EMAC0_ADDRESS 0xff70 diff --git a/arch/arm/mach-socfpga/include/mach/misc.h b/arch/arm/mach-socfpga/include/mach/misc.h index 4fc9570a04..e78a86503e 100644 --- a/arch/arm/mach-socfpga/include/mach/misc.h +++ b/arch/arm/mach-socfpga/include/mach/misc.h @@ -23,6 +23,13 @@ static inline void socfpga_fpga_add(void) {} #ifdef CONFIG_TARGET_SOCFPGA_GEN5 void socfpga_sdram_remap_zero(void); +static inline bool socfpga_is_fpga_slaves_addr(void *addr) +{ + if ((addr >= (void *)SOCFPGA_FPGA_SLAVES_ADDRESS) && + (addr < (void *)SOCFPGA_STM_ADDRESS)) + return true; + return false; +} #endif #ifdef CONFIG_TARGET_SOCFPGA_ARRIA10 diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c index 429c3d6cd5..030f43d80a 100644 --- a/arch/arm/mach-socfpga/misc_gen5.c +++ b/arch/arm/mach-socfpga/misc_gen5.c @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -177,6 +178,8 @@ static void socfpga_nic301_slave_ns(void) void socfpga_sdram_remap_zero(void) { + u32 remap; + socfpga_nic301_slave_ns(); /* @@ -187,7 +190,12 @@ void socfpga_sdram_remap_zero(void) setbits_le32(_regs->sacr, 0xfff); /* Configure the L2 controller to make SDRAM start at 0 */ - writel(0x1, _regs->remap); /* remap.mpuzero */ + remap = 0x1; /* remap.mpuzero */ + /* Keep fpga bridge enabled when running from FPGA onchip RAM */ + if (socfpga_is_fpga_slaves_addr(__image_copy_start)) + remap |= 0x8; /* remap.hps2fpga */ + writel(remap, _regs->remap); + writel(0x1, >pl310_addr_filter_start); } diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c index be318cc0d9..db1c4b722c 100644 --- a/arch/arm/mach-socfpga/spl_gen5.c +++ b/arch/arm/mach-socfpga/spl_gen5.c @@ -92,8 +92,11 @@ void board_init_f(ulong dummy) /* Put everything into reset but L4WD0. */ socfpga_per_reset_all(); - /* Put FPGA bridges into reset too. */ - socfpga_bridges_reset(1); + + if (!socfpga_is_fpga_slaves_addr(__image_copy_start)) { + /* Put FPGA bridges into reset (unless booting from FPGA). */ + socfpga_bridges_reset(1); + } socfpga_per_reset(SOCFPGA_RESET(SDR), 0); socfpga_per_reset(SOCFPGA_RESET(UART0), 0); @@ -163,5 +166,6 @@ void board_init_f(ulong dummy) hang(); } - socfpga_bridges_reset(1); + if (!socfpga_is_fpga_slaves_addr(__image_copy_start)) + socfpga_bridges_reset(1); } -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/6] driver: net: fsl-mc: remove unused strcture elements
On Tue, Oct 9, 2018 at 9:59 PM Pankaj Bansal wrote: > > The phydev structure is present in both ldpaa_eth_priv and > wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used > > As the phydev is created based on phy_addr and bus members of > wriop_dpmac_info, it is appropriate to keep phydev in wriop_dpmac_info. > > Also phy_regs is not being used, therefore remove it > > Signed-off-by: Pankaj Bansal > Acked-by: Joe Hershberger > --- > > Notes: > V3: > - No change Please be sure you are running scripts/checkpatch.pl on your patches. v2 had a number of issues I had to fix up. I'm pretty sure this was one of them. You would do yourself a favor to use tools/patman/patman. > V2: > - change (phydev && bus != NULL) to (phydev && bus) > - after free phydev just pass NULL into wriop_set_phy_dev() > > drivers/net/ldpaa_eth/ldpaa_eth.c | 56 +++ > drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - > drivers/net/ldpaa_eth/ldpaa_wriop.c | 2 + > include/fsl-mc/ldpaa_wriop.h| 1 - > 4 files changed, 33 insertions(+), 27 deletions(-) > > diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c > b/drivers/net/ldpaa_eth/ldpaa_eth.c > index 82a684bea2..ca3459cc33 100644 > --- a/drivers/net/ldpaa_eth/ldpaa_eth.c > +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c > @@ -35,7 +35,7 @@ static int init_phy(struct eth_device *dev) > return -1; > } > > - priv->phydev = phydev; > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > return phy_config(phydev); > } > @@ -388,6 +388,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, > bd_t *bd) > struct mii_dev *bus; > phy_interface_t enet_if; > struct dpni_queue d_queue; > + struct phy_device *phydev = NULL; > > if (net_dev->state == ETH_STATE_ACTIVE) > return 0; > @@ -408,38 +409,41 @@ static int ldpaa_eth_open(struct eth_device *net_dev, > bd_t *bd) > goto err_dpmac_setup; > > #ifdef CONFIG_PHYLIB > - if (priv->phydev) { > - err = phy_startup(priv->phydev); > + phydev = wriop_get_phy_dev(priv->dpmac_id); > + if (phydev) { > + err = phy_startup(phydev); > if (err) { > printf("%s: Could not initialize\n", > - priv->phydev->dev->name); > + phydev->dev->name); > goto err_dpmac_bind; > } > } > #else > - priv->phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); > - memset(priv->phydev, 0, sizeof(struct phy_device)); > + phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); > + memset(phydev, 0, sizeof(struct phy_device)); > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > - priv->phydev->speed = SPEED_1000; > - priv->phydev->link = 1; > - priv->phydev->duplex = DUPLEX_FULL; > + phydev->speed = SPEED_1000; > + phydev->link = 1; > + phydev->duplex = DUPLEX_FULL; > #endif > > bus = wriop_get_mdio(priv->dpmac_id); > enet_if = wriop_get_enet_if(priv->dpmac_id); > if ((bus == NULL) && > (enet_if == PHY_INTERFACE_MODE_XGMII)) { > - priv->phydev = (struct phy_device *) > + phydev = (struct phy_device *) > malloc(sizeof(struct phy_device)); > - memset(priv->phydev, 0, sizeof(struct phy_device)); > + memset(phydev, 0, sizeof(struct phy_device)); > + wriop_set_phy_dev(priv->dpmac_id, phydev); > > - priv->phydev->speed = SPEED_1; > - priv->phydev->link = 1; > - priv->phydev->duplex = DUPLEX_FULL; > + phydev->speed = SPEED_1; > + phydev->link = 1; > + phydev->duplex = DUPLEX_FULL; > } > > - if (!priv->phydev->link) { > - printf("%s: No link.\n", priv->phydev->dev->name); > + if (!phydev->link) { > + printf("%s: No link.\n", phydev->dev->name); > err = -1; > goto err_dpmac_bind; > } > @@ -476,17 +480,17 @@ static int ldpaa_eth_open(struct eth_device *net_dev, > bd_t *bd) > return err; > } > > - dpmac_link_state.rate = priv->phydev->speed; > + dpmac_link_state.rate = phydev->speed; > > - if (priv->phydev->autoneg == AUTONEG_DISABLE) > + if (phydev->autoneg == AUTONEG_DISABLE) > dpmac_link_state.options &= ~DPMAC_LINK_OPT_AUTONEG; > else > dpmac_link_state.options |= DPMAC_LINK_OPT_AUTONEG; > > - if (priv->phydev->duplex == DUPLEX_HALF) > + if (phydev->duplex == DUPLEX_HALF) > dpmac_link_state.options |= DPMAC_LINK_OPT_HALF_DUPLEX; > > - dpmac_link_state.up = priv->phydev->link; > + dpmac_link_state.up = phydev->link;
[U-Boot] [PATCH v1] armv8: lx2160a: add some minor fixes on esdhc node
The esdhc node has some minor fixes according to the RM document. Signed-off-by: Yinbo Zhu --- arch/arm/dts/fsl-lx2160a.dtsi | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 73c24f7..8c8172b 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -77,8 +77,7 @@ }; esdhc0: esdhc@214 { - status = "disabled"; - compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; + compatible = "fsl,esdhc"; reg = <0x0 0x214 0x0 0x1>; interrupts = <0 28 0x4>; /* Level high type */ clocks = < 4 1>; @@ -86,18 +85,20 @@ sdhci,auto-cmd12; little-endian; bus-width = <4>; + status = "disabled"; }; esdhc1: esdhc@215 { - status = "disabled"; - compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; + compatible = "fsl,esdhc"; reg = <0x0 0x215 0x0 0x1>; - interrupts = <0 28 0x4>; /* Level high type */ + interrupts = <0 63 0x4>; /* Level high type */ clocks = < 4 1>; voltage-ranges = <1800 1800 3300 3300>; sdhci,auto-cmd12; + non-removable; little-endian; bus-width = <4>; + status = "disabled"; }; dspi0: dspi@210 { -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1] configs: lx2160a: enable driver model for eSDHC
Enable driver model for eSDHC on lx2160a rdb board. Signed-off-by: Yinbo Zhu --- configs/lx2160ardb_defconfig |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/configs/lx2160ardb_defconfig b/configs/lx2160ardb_defconfig index bc16085..3d577fc 100644 --- a/configs/lx2160ardb_defconfig +++ b/configs/lx2160ardb_defconfig @@ -35,6 +35,9 @@ CONFIG_NXP_FSPI=y CONFIG_PHYLIB=y CONFIG_NETDEVICES=y CONFIG_PHY_GIGE=y +CONFIG_DM_MMC=y +CONFIG_DM_MMC_OPS=n +CONFIG_BLK=n CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1] armv8: lx2160a: add eSDHC nodes
This patch is to add eSDHC nodes for lx2160a. Signed-off-by: Yinbo Zhu --- arch/arm/dts/fsl-lx2160a-rdb.dts |8 arch/arm/dts/fsl-lx2160a.dtsi| 24 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/dts/fsl-lx2160a-rdb.dts b/arch/arm/dts/fsl-lx2160a-rdb.dts index 162ec25..1d67ba6 100644 --- a/arch/arm/dts/fsl-lx2160a-rdb.dts +++ b/arch/arm/dts/fsl-lx2160a-rdb.dts @@ -38,3 +38,11 @@ reg = <0>; }; }; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/arch/arm/dts/fsl-lx2160a.dtsi b/arch/arm/dts/fsl-lx2160a.dtsi index 12655fc..ad9bfa2 100644 --- a/arch/arm/dts/fsl-lx2160a.dtsi +++ b/arch/arm/dts/fsl-lx2160a.dtsi @@ -76,6 +76,30 @@ status = "disabled"; }; + esdhc0: esdhc@214 { + status = "disabled"; + compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; + reg = <0x0 0x214 0x0 0x1>; + interrupts = <0 28 0x4>; /* Level high type */ + clocks = < 4 1>; + voltage-ranges = <1800 1800 3300 3300>; + sdhci,auto-cmd12; + little-endian; + bus-width = <4>; + }; + + esdhc1: esdhc@215 { + status = "disabled"; + compatible = "fsl,ls2080a-esdhc", "fsl,esdhc"; + reg = <0x0 0x215 0x0 0x1>; + interrupts = <0 28 0x4>; /* Level high type */ + clocks = < 4 1>; + voltage-ranges = <1800 1800 3300 3300>; + sdhci,auto-cmd12; + little-endian; + bus-width = <4>; + }; + fspi: flexspi@20c { compatible = "nxp,lx2160a-fspi"; #address-cells = <1>; -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 5/6] driver: net: fsl-mc: initialize dpmac irrespective of phy
The dpmac initalization should not depend on phy. As the phy is not necessary to be present for dpmac to function. Therefore, remove dpmac initialization dependency from phy. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - No Change drivers/net/fsl-mc/mc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index d9a897dc86..b245fbc681 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -363,8 +363,7 @@ static int mc_fixup_mac_addrs(void *blob, enum mc_fixup_type type) for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) { /* port not enabled */ - if ((wriop_is_enabled_dpmac(i) != 1) || - (wriop_get_phy_address(i) == -1)) + if (wriop_is_enabled_dpmac(i) != 1) continue; snprintf(ethname, ETH_NAME_LEN, "DPMAC%d@%s", i, @@ -886,8 +885,7 @@ int fsl_mc_ldpaa_init(bd_t *bis) int i; for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) - if ((wriop_is_enabled_dpmac(i) == 1) && - (wriop_get_phy_address(i) != -1)) + if (wriop_is_enabled_dpmac(i) == 1) ldpaa_eth_init(i, wriop_get_enet_if(i)); return 0; } -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 6/6] driver: net: fsl-mc: Add support of multiple phys for dpmac
Till now we have had cases where we had one phy device per dpmac. Now, with the upcoming products (LX2160AQDS), we have cases, where there are sometimes two phy devices for one dpmac. One phy for TX lanes and one phy for RX lanes. to handle such cases, add the support for multiple phys in ethernet driver. The ethernet link is up if all the phy devices connected to one dpmac report link up. also the link capabilities are limited by the weakest phy device. i.e. say if there are two phys for one dpmac. one operates at 10G without autoneg and other operate at 1G with autoneg. Then the ethernet interface will operate at 1G without autoneg. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - return 0 from end of functions whose return type has been changed from void to int V2: - use single-line comment format. - use WRIOP_MAX_PHY_NUM. - use -ENODEV or -EINVAL instead of -1 wherever appropriate - include the variable names in the headers too. - Change the return type of some functions from void to int so that a meaningful error message can be returned board/freescale/ls1088a/eth_ls1088aqds.c | 18 ++--- board/freescale/ls1088a/eth_ls1088ardb.c | 21 +++--- board/freescale/ls2080aqds/eth.c | 26 +++ board/freescale/ls2080ardb/eth_ls2080rdb.c | 24 +++ drivers/net/ldpaa_eth/ldpaa_eth.c | 66 -- drivers/net/ldpaa_eth/ldpaa_wriop.c| 71 +--- include/fsl-mc/ldpaa_wriop.h | 45 +++-- 7 files changed, 162 insertions(+), 109 deletions(-) diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index 40b1a0e631..f16b78cf03 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -487,16 +487,16 @@ void ls1088a_handle_phy_interface_sgmii(int dpmac_id) case 0x3A: switch (dpmac_id) { case 1: - wriop_set_phy_address(dpmac_id, riser_phy_addr[1]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[1]); break; case 2: - wriop_set_phy_address(dpmac_id, riser_phy_addr[0]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[0]); break; case 3: - wriop_set_phy_address(dpmac_id, riser_phy_addr[3]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[3]); break; case 7: - wriop_set_phy_address(dpmac_id, riser_phy_addr[2]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[2]); break; default: printf("WRIOP: Wrong DPMAC%d set to SGMII", dpmac_id); @@ -532,13 +532,13 @@ void ls1088a_handle_phy_interface_qsgmii(int dpmac_id) case 4: case 5: case 6: - wriop_set_phy_address(dpmac_id, dpmac_id + 9); + wriop_set_phy_address(dpmac_id, 0, dpmac_id + 9); break; case 7: case 8: case 9: case 10: - wriop_set_phy_address(dpmac_id, dpmac_id + 1); + wriop_set_phy_address(dpmac_id, 0, dpmac_id + 1); break; } @@ -567,7 +567,7 @@ void ls1088a_handle_phy_interface_xsgmii(int i) case 0x15: case 0x1D: case 0x1E: - wriop_set_phy_address(i, i + 26); + wriop_set_phy_address(i, 0, i + 26); ls1088a_qds_enable_SFP_TX(SFP_TX); break; default: @@ -590,13 +590,13 @@ static void ls1088a_handle_phy_interface_rgmii(int dpmac_id) switch (dpmac_id) { case 4: - wriop_set_phy_address(dpmac_id, RGMII_PHY1_ADDR); + wriop_set_phy_address(dpmac_id, 0, RGMII_PHY1_ADDR); dpmac_info[dpmac_id].board_mux = EMI1_RGMII1; bus = mii_dev_for_muxval(EMI1_RGMII1); wriop_set_mdio(dpmac_id, bus); break; case 5: - wriop_set_phy_address(dpmac_id, RGMII_PHY2_ADDR); + wriop_set_phy_address(dpmac_id, 0, RGMII_PHY2_ADDR); dpmac_info[dpmac_id].board_mux = EMI1_RGMII2; bus = mii_dev_for_muxval(EMI1_RGMII2); wriop_set_mdio(dpmac_id, bus); diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c index 418f362e9a..a2b52a879b 100644 --- a/board/freescale/ls1088a/eth_ls1088ardb.c +++ b/board/freescale/ls1088a/eth_ls1088ardb.c @@ -55,16 +55,17 @@ int board_eth_init(bd_t *bis) * a MAC has no PHY address, we give a PHY address to XFI *
[U-Boot] [PATCH v3 3/6] driver: net: fsl-mc: fix error handing in init_phy
if an error occurs during init_phy, we should free the phydev structure which has been allocated by phy_connect. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - after free phydev just pass NULL into wriop_set_phy_dev() drivers/net/ldpaa_eth/ldpaa_eth.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index ca3459cc33..f122e945a4 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -23,6 +23,7 @@ static int init_phy(struct eth_device *dev) struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)dev->priv; struct phy_device *phydev = NULL; struct mii_dev *bus; + int ret; bus = wriop_get_mdio(priv->dpmac_id); if (bus == NULL) @@ -37,7 +38,14 @@ static int init_phy(struct eth_device *dev) wriop_set_phy_dev(priv->dpmac_id, phydev); - return phy_config(phydev); + ret = phy_config(phydev); + + if (ret) { + free(phydev); + wriop_set_phy_dev(priv->dpmac_id, NULL); + } + + return ret; } #endif -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 4/6] driver: net: fsl-mc: Modify the dpmac link detection method
when there is no phy present for a dpmac, a dummy phy device is created. when we move to multiple phy method, we need to create as many dummy phy devices. Change this method so that we don't need to create dummy phy devices. We always report linkup if no phy is present. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - Change (phydev->link == 1) to (phydev->link) - Use min macro instead of ternary operator - return -ENOLINK instead of -1 from ldpaa_get_dpmac_state - Change (state->up == 0) to (!state->up) drivers/net/ldpaa_eth/ldpaa_eth.c | 119 +--- 1 file changed, 57 insertions(+), 62 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index f122e945a4..4f0b977449 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -385,6 +385,59 @@ error: return err; } +static int ldpaa_get_dpmac_state(struct ldpaa_eth_priv *priv, +struct dpmac_link_state *state) +{ + struct phy_device *phydev = NULL; + phy_interface_t enet_if; + int err; + + /* let's start off with maximum capabilities +*/ + enet_if = wriop_get_enet_if(priv->dpmac_id); + switch (enet_if) { + case PHY_INTERFACE_MODE_XGMII: + state->rate = SPEED_1; + break; + default: + state->rate = SPEED_1000; + break; + } + state->up = 1; + +#ifdef CONFIG_PHYLIB + state->options |= DPMAC_LINK_OPT_AUTONEG; + + phydev = wriop_get_phy_dev(priv->dpmac_id); + if (phydev) { + err = phy_startup(phydev); + if (err) { + printf("%s: Could not initialize\n", phydev->dev->name); + state->up = 0; + } + if (phydev->link) { + state->rate = min(state->rate, (uint32_t)phydev->speed); + if (!phydev->duplex) + state->options |= DPMAC_LINK_OPT_HALF_DUPLEX; + if (!phydev->autoneg) + state->options &= ~DPMAC_LINK_OPT_AUTONEG; + } else { + state->up = 0; + } + } +#endif + if (!phydev) + state->options &= ~DPMAC_LINK_OPT_AUTONEG; + + if (!state->up) { + state->rate = 0; + state->options = 0; + return -ENOLINK; + } + + return 0; +} + static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) { struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)net_dev->priv; @@ -393,10 +446,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) struct dpni_link_state link_state; #endif int err = 0; - struct mii_dev *bus; - phy_interface_t enet_if; struct dpni_queue d_queue; - struct phy_device *phydev = NULL; if (net_dev->state == ETH_STATE_ACTIVE) return 0; @@ -416,45 +466,9 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (err < 0) goto err_dpmac_setup; -#ifdef CONFIG_PHYLIB - phydev = wriop_get_phy_dev(priv->dpmac_id); - if (phydev) { - err = phy_startup(phydev); - if (err) { - printf("%s: Could not initialize\n", - phydev->dev->name); - goto err_dpmac_bind; - } - } -#else - phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); - memset(phydev, 0, sizeof(struct phy_device)); - wriop_set_phy_dev(priv->dpmac_id, phydev); - - phydev->speed = SPEED_1000; - phydev->link = 1; - phydev->duplex = DUPLEX_FULL; -#endif - - bus = wriop_get_mdio(priv->dpmac_id); - enet_if = wriop_get_enet_if(priv->dpmac_id); - if ((bus == NULL) && - (enet_if == PHY_INTERFACE_MODE_XGMII)) { - phydev = (struct phy_device *) - malloc(sizeof(struct phy_device)); - memset(phydev, 0, sizeof(struct phy_device)); - wriop_set_phy_dev(priv->dpmac_id, phydev); - - phydev->speed = SPEED_1; - phydev->link = 1; - phydev->duplex = DUPLEX_FULL; - } - - if (!phydev->link) { - printf("%s: No link.\n", phydev->dev->name); - err = -1; + err = ldpaa_get_dpmac_state(priv, _link_state); + if (err < 0) goto err_dpmac_bind; - } /* DPMAC binding DPNI */ err = ldpaa_dpmac_bind(priv); @@ -488,18 +502,6 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) return err; } - dpmac_link_state.rate = phydev->speed; - - if
[U-Boot] [PATCH v3 2/6] driver: net: fsl-mc: remove unused strcture elements
The phydev structure is present in both ldpaa_eth_priv and wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used As the phydev is created based on phy_addr and bus members of wriop_dpmac_info, it is appropriate to keep phydev in wriop_dpmac_info. Also phy_regs is not being used, therefore remove it Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - change (phydev && bus != NULL) to (phydev && bus) - after free phydev just pass NULL into wriop_set_phy_dev() drivers/net/ldpaa_eth/ldpaa_eth.c | 56 +++ drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - drivers/net/ldpaa_eth/ldpaa_wriop.c | 2 + include/fsl-mc/ldpaa_wriop.h| 1 - 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 82a684bea2..ca3459cc33 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -35,7 +35,7 @@ static int init_phy(struct eth_device *dev) return -1; } - priv->phydev = phydev; + wriop_set_phy_dev(priv->dpmac_id, phydev); return phy_config(phydev); } @@ -388,6 +388,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) struct mii_dev *bus; phy_interface_t enet_if; struct dpni_queue d_queue; + struct phy_device *phydev = NULL; if (net_dev->state == ETH_STATE_ACTIVE) return 0; @@ -408,38 +409,41 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) goto err_dpmac_setup; #ifdef CONFIG_PHYLIB - if (priv->phydev) { - err = phy_startup(priv->phydev); + phydev = wriop_get_phy_dev(priv->dpmac_id); + if (phydev) { + err = phy_startup(phydev); if (err) { printf("%s: Could not initialize\n", - priv->phydev->dev->name); + phydev->dev->name); goto err_dpmac_bind; } } #else - priv->phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); - memset(priv->phydev, 0, sizeof(struct phy_device)); + phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); + memset(phydev, 0, sizeof(struct phy_device)); + wriop_set_phy_dev(priv->dpmac_id, phydev); - priv->phydev->speed = SPEED_1000; - priv->phydev->link = 1; - priv->phydev->duplex = DUPLEX_FULL; + phydev->speed = SPEED_1000; + phydev->link = 1; + phydev->duplex = DUPLEX_FULL; #endif bus = wriop_get_mdio(priv->dpmac_id); enet_if = wriop_get_enet_if(priv->dpmac_id); if ((bus == NULL) && (enet_if == PHY_INTERFACE_MODE_XGMII)) { - priv->phydev = (struct phy_device *) + phydev = (struct phy_device *) malloc(sizeof(struct phy_device)); - memset(priv->phydev, 0, sizeof(struct phy_device)); + memset(phydev, 0, sizeof(struct phy_device)); + wriop_set_phy_dev(priv->dpmac_id, phydev); - priv->phydev->speed = SPEED_1; - priv->phydev->link = 1; - priv->phydev->duplex = DUPLEX_FULL; + phydev->speed = SPEED_1; + phydev->link = 1; + phydev->duplex = DUPLEX_FULL; } - if (!priv->phydev->link) { - printf("%s: No link.\n", priv->phydev->dev->name); + if (!phydev->link) { + printf("%s: No link.\n", phydev->dev->name); err = -1; goto err_dpmac_bind; } @@ -476,17 +480,17 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) return err; } - dpmac_link_state.rate = priv->phydev->speed; + dpmac_link_state.rate = phydev->speed; - if (priv->phydev->autoneg == AUTONEG_DISABLE) + if (phydev->autoneg == AUTONEG_DISABLE) dpmac_link_state.options &= ~DPMAC_LINK_OPT_AUTONEG; else dpmac_link_state.options |= DPMAC_LINK_OPT_AUTONEG; - if (priv->phydev->duplex == DUPLEX_HALF) + if (phydev->duplex == DUPLEX_HALF) dpmac_link_state.options |= DPMAC_LINK_OPT_HALF_DUPLEX; - dpmac_link_state.up = priv->phydev->link; + dpmac_link_state.up = phydev->link; err = dpmac_set_link_state(dflt_mc_io, MC_CMD_NO_FLAGS, priv->dpmac_handle, _link_state); @@ -530,7 +534,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) goto err_qdid; } - return priv->phydev->link; + return phydev->link; err_qdid: err_get_queue: @@ -556,6 +560,7 @@ static void ldpaa_eth_stop(struct eth_device *net_dev) #ifdef CONFIG_PHYLIB struct mii_dev *bus =
[U-Boot] [PATCH v3 1/6] driver: net: fsl-mc: modify the label name
The goto label name is misspelled it should be DPMAC not DPAMC Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - No change drivers/net/ldpaa_eth/ldpaa_eth.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index a25b7cd906..82a684bea2 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -413,7 +413,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (err) { printf("%s: Could not initialize\n", priv->phydev->dev->name); - goto err_dpamc_bind; + goto err_dpmac_bind; } } #else @@ -441,13 +441,13 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (!priv->phydev->link) { printf("%s: No link.\n", priv->phydev->dev->name); err = -1; - goto err_dpamc_bind; + goto err_dpmac_bind; } /* DPMAC binding DPNI */ err = ldpaa_dpmac_bind(priv); if (err) - goto err_dpamc_bind; + goto err_dpmac_bind; /* DPNI initialization */ err = ldpaa_dpni_setup(priv); @@ -540,7 +540,7 @@ err_dpni_bind: err_dpbp_setup: dpni_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle); err_dpni_setup: -err_dpamc_bind: +err_dpmac_bind: dpmac_close(dflt_mc_io, MC_CMD_NO_FLAGS, priv->dpmac_handle); dpmac_destroy(dflt_mc_io, dflt_dprc_handle, -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 0/6] driver: net: fsl-mc: Add support of multiple phys for dpmac
This patch set adds support of multiple phys for one dpmac Till now we have had cases where we had one phy device per dpmac. Now, with the upcoming products (LX2160AQDS), we have cases, where there are sometimes two phy devices for one dpmac. One phy for TX lanes and one phy for RX lanes. To handle such cases, add the support for multiple phys in ethernet driver. The ethernet link is up if all the phy devices connected to one dpmac report link up. also the link capabilities are limited by the weakest phy device. i.e. say if there are two phys for one dpmac. one operates at 10G without autoneg and other operate at 1G with autoneg. Then the ethernet interface will operate at 1G without autoneg. Cc: Varun Sethi Pankaj Bansal (6): driver: net: fsl-mc: modify the label name driver: net: fsl-mc: remove unused strcture elements driver: net: fsl-mc: fix error handing in init_phy driver: net: fsl-mc: Modify the dpmac link detection method driver: net: fsl-mc: initialize dpmac irrespective of phy driver: net: fsl-mc: Add support of multiple phys for dpmac board/freescale/ls1088a/eth_ls1088aqds.c | 18 +-- board/freescale/ls1088a/eth_ls1088ardb.c | 21 +-- board/freescale/ls2080aqds/eth.c | 26 ++-- board/freescale/ls2080ardb/eth_ls2080rdb.c | 24 +-- drivers/net/fsl-mc/mc.c| 6 +- drivers/net/ldpaa_eth/ldpaa_eth.c | 171 + drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - drivers/net/ldpaa_eth/ldpaa_wriop.c| 69 ++--- include/fsl-mc/ldpaa_wriop.h | 46 +++--- 9 files changed, 221 insertions(+), 161 deletions(-) -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-dm
Hi Tom, On 9 October 2018 at 18:24, Simon Glass wrote: > > Hi Tom, > > Here is my attempt at a signed pull request. I've brought in most of the > outstanding dm patches. Please let me know if it looks OK. Do you have my > public key? > Build result here: https://travis-ci.org/sglass68/u-boot/builds/439071186 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/6] driver: net: fsl-mc: Add support of multiple phys for dpmac
> -Original Message- > From: Joe Hershberger [mailto:joe.hershber...@ni.com] > Sent: Wednesday, October 10, 2018 3:02 AM > To: Pankaj Bansal > Cc: u-boot ; Joseph Hershberger > ; Priyanka Jain ; > Varun Sethi > Subject: Re: [U-Boot] [PATCH v2 6/6] driver: net: fsl-mc: Add support of > multiple phys for dpmac > > On Mon, Jul 30, 2018 at 2:48 AM Pankaj Bansal > wrote: > > > > Till now we have had cases where we had one phy device per dpmac. > > Now, with the upcoming products (LX2160AQDS), we have cases, where > > there are sometimes two phy devices for one dpmac. One phy for TX > > lanes and one phy for RX lanes. to handle such cases, add the support > > for multiple phys in ethernet driver. The ethernet link is up if all > > the phy devices connected to one dpmac report link up. also the link > > capabilities are limited by the weakest phy device. > > > > i.e. say if there are two phys for one dpmac. one operates at 10G > > without autoneg and other operate at 1G with autoneg. Then the > > ethernet interface will operate at 1G without autoneg. > > > > Signed-off-by: Pankaj Bansal > > --- > > > > Notes: > > V2: > > - use single-line comment format. > > - use WRIOP_MAX_PHY_NUM. > > - use -ENODEV or -EINVAL instead of -1 wherever appropriate > > - include the variable names in the headers too. > > - Change the return type of some functions from void to int so that > > a meaningful error message can be returned > > > > board/freescale/ls1088a/eth_ls1088aqds.c | 18 +++--- > > board/freescale/ls1088a/eth_ls1088ardb.c | 21 --- > > board/freescale/ls2080aqds/eth.c | 26 > > board/freescale/ls2080ardb/eth_ls2080rdb.c | 24 +++ > > drivers/net/ldpaa_eth/ldpaa_eth.c | 66 ++-- > > drivers/net/ldpaa_eth/ldpaa_wriop.c| 61 +++--- > > include/fsl-mc/ldpaa_wriop.h | 45 ++--- > > 7 files changed, 152 insertions(+), 109 deletions(-) > > > > [ ... ] > > > diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c > > b/drivers/net/ldpaa_eth/ldpaa_wriop.c > > index afbb1ca91e..be3101d26a 100644 > > --- a/drivers/net/ldpaa_eth/ldpaa_wriop.c > > +++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c > > @@ -22,11 +22,10 @@ __weak phy_interface_t > wriop_dpmac_enet_if(int > > dpmac_id, int lane_prtc) void wriop_init_dpmac(int sd, int dpmac_id, > > int lane_prtcl) { > > phy_interface_t enet_if; > > + int phy_num; > > > > dpmac_info[dpmac_id].enabled = 0; > > dpmac_info[dpmac_id].id = 0; > > - dpmac_info[dpmac_id].phy_addr = -1; > > - dpmac_info[dpmac_id].phydev = NULL; > > dpmac_info[dpmac_id].enet_if = PHY_INTERFACE_MODE_NONE; > > > > enet_if = wriop_dpmac_enet_if(dpmac_id, lane_prtcl); @@ -35,15 > > +34,23 @@ void wriop_init_dpmac(int sd, int dpmac_id, int lane_prtcl) > > dpmac_info[dpmac_id].id = dpmac_id; > > dpmac_info[dpmac_id].enet_if = enet_if; > > } > > + for (phy_num = 0; phy_num < WRIOP_MAX_PHY_NUM; > phy_num++) { > > + dpmac_info[dpmac_id].phydev[phy_num] = NULL; > > + dpmac_info[dpmac_id].phy_addr[phy_num] = -1; > > + } > > } > > > > void wriop_init_dpmac_enet_if(int dpmac_id, phy_interface_t enet_if) > > { > > + int phy_num; > > + > > dpmac_info[dpmac_id].enabled = 1; > > dpmac_info[dpmac_id].id = dpmac_id; > > - dpmac_info[dpmac_id].phy_addr = -1; > > dpmac_info[dpmac_id].enet_if = enet_if; > > - dpmac_info[dpmac_id].phydev = NULL; > > + for (phy_num = 0; phy_num < WRIOP_MAX_PHY_NUM; > phy_num++) { > > + dpmac_info[dpmac_id].phydev[phy_num] = NULL; > > + dpmac_info[dpmac_id].phy_addr[phy_num] = -1; > > + } > > } > > > > > > @@ -60,45 +67,45 @@ static int wriop_dpmac_to_index(int dpmac_id) > > return -1; > > } > > > > -void wriop_disable_dpmac(int dpmac_id) > > +int wriop_disable_dpmac(int dpmac_id) > > { > > int i = wriop_dpmac_to_index(dpmac_id); > > > > if (i == -1) > > - return; > > + return -ENODEV; > > > > dpmac_info[i].enabled = 0; > > wriop_dpmac_disable(dpmac_id); > > These functions all warn since you don't return 0 at the end of them. > Now I'll have to back this series out of the release and wait for an update. > Patches need to build without warnings. My apologies for this oversight on my part. I have sent V3 of these patches with the return 0 at the end of all functions, whose return type changed. I have also tested these patches for build warning after compiling for "ls2080aqds" > > > } > > > > -void wriop_enable_dpmac(int dpmac_id) > > +int wriop_enable_dpmac(int dpmac_id) > > { > > int i = wriop_dpmac_to_index(dpmac_id); > > > > if (i == -1) > > - return; > > + return -ENODEV; > > > > dpmac_info[i].enabled = 1; > >
[U-Boot] [PATCH v3 6/6] driver: net: fsl-mc: Add support of multiple phys for dpmac
Till now we have had cases where we had one phy device per dpmac. Now, with the upcoming products (LX2160AQDS), we have cases, where there are sometimes two phy devices for one dpmac. One phy for TX lanes and one phy for RX lanes. to handle such cases, add the support for multiple phys in ethernet driver. The ethernet link is up if all the phy devices connected to one dpmac report link up. also the link capabilities are limited by the weakest phy device. i.e. say if there are two phys for one dpmac. one operates at 10G without autoneg and other operate at 1G with autoneg. Then the ethernet interface will operate at 1G without autoneg. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - return 0 from end of functions whose return type has been changed from void to int V2: - use single-line comment format. - use WRIOP_MAX_PHY_NUM. - use -ENODEV or -EINVAL instead of -1 wherever appropriate - include the variable names in the headers too. - Change the return type of some functions from void to int so that a meaningful error message can be returned board/freescale/ls1088a/eth_ls1088aqds.c | 18 ++--- board/freescale/ls1088a/eth_ls1088ardb.c | 21 +++--- board/freescale/ls2080aqds/eth.c | 26 +++ board/freescale/ls2080ardb/eth_ls2080rdb.c | 24 +++ drivers/net/ldpaa_eth/ldpaa_eth.c | 66 -- drivers/net/ldpaa_eth/ldpaa_wriop.c| 73 ++-- include/fsl-mc/ldpaa_wriop.h | 45 ++-- 7 files changed, 164 insertions(+), 109 deletions(-) diff --git a/board/freescale/ls1088a/eth_ls1088aqds.c b/board/freescale/ls1088a/eth_ls1088aqds.c index 40b1a0e631..f16b78cf03 100644 --- a/board/freescale/ls1088a/eth_ls1088aqds.c +++ b/board/freescale/ls1088a/eth_ls1088aqds.c @@ -487,16 +487,16 @@ void ls1088a_handle_phy_interface_sgmii(int dpmac_id) case 0x3A: switch (dpmac_id) { case 1: - wriop_set_phy_address(dpmac_id, riser_phy_addr[1]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[1]); break; case 2: - wriop_set_phy_address(dpmac_id, riser_phy_addr[0]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[0]); break; case 3: - wriop_set_phy_address(dpmac_id, riser_phy_addr[3]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[3]); break; case 7: - wriop_set_phy_address(dpmac_id, riser_phy_addr[2]); + wriop_set_phy_address(dpmac_id, 0, riser_phy_addr[2]); break; default: printf("WRIOP: Wrong DPMAC%d set to SGMII", dpmac_id); @@ -532,13 +532,13 @@ void ls1088a_handle_phy_interface_qsgmii(int dpmac_id) case 4: case 5: case 6: - wriop_set_phy_address(dpmac_id, dpmac_id + 9); + wriop_set_phy_address(dpmac_id, 0, dpmac_id + 9); break; case 7: case 8: case 9: case 10: - wriop_set_phy_address(dpmac_id, dpmac_id + 1); + wriop_set_phy_address(dpmac_id, 0, dpmac_id + 1); break; } @@ -567,7 +567,7 @@ void ls1088a_handle_phy_interface_xsgmii(int i) case 0x15: case 0x1D: case 0x1E: - wriop_set_phy_address(i, i + 26); + wriop_set_phy_address(i, 0, i + 26); ls1088a_qds_enable_SFP_TX(SFP_TX); break; default: @@ -590,13 +590,13 @@ static void ls1088a_handle_phy_interface_rgmii(int dpmac_id) switch (dpmac_id) { case 4: - wriop_set_phy_address(dpmac_id, RGMII_PHY1_ADDR); + wriop_set_phy_address(dpmac_id, 0, RGMII_PHY1_ADDR); dpmac_info[dpmac_id].board_mux = EMI1_RGMII1; bus = mii_dev_for_muxval(EMI1_RGMII1); wriop_set_mdio(dpmac_id, bus); break; case 5: - wriop_set_phy_address(dpmac_id, RGMII_PHY2_ADDR); + wriop_set_phy_address(dpmac_id, 0, RGMII_PHY2_ADDR); dpmac_info[dpmac_id].board_mux = EMI1_RGMII2; bus = mii_dev_for_muxval(EMI1_RGMII2); wriop_set_mdio(dpmac_id, bus); diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c index 418f362e9a..a2b52a879b 100644 --- a/board/freescale/ls1088a/eth_ls1088ardb.c +++ b/board/freescale/ls1088a/eth_ls1088ardb.c @@ -55,16 +55,17 @@ int board_eth_init(bd_t *bis) * a MAC has no PHY address, we give a PHY address to XFI *
[U-Boot] [PATCH v3 5/6] driver: net: fsl-mc: initialize dpmac irrespective of phy
The dpmac initalization should not depend on phy. As the phy is not necessary to be present for dpmac to function. Therefore, remove dpmac initialization dependency from phy. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - No Change drivers/net/fsl-mc/mc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index d9a897dc86..b245fbc681 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -363,8 +363,7 @@ static int mc_fixup_mac_addrs(void *blob, enum mc_fixup_type type) for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) { /* port not enabled */ - if ((wriop_is_enabled_dpmac(i) != 1) || - (wriop_get_phy_address(i) == -1)) + if (wriop_is_enabled_dpmac(i) != 1) continue; snprintf(ethname, ETH_NAME_LEN, "DPMAC%d@%s", i, @@ -886,8 +885,7 @@ int fsl_mc_ldpaa_init(bd_t *bis) int i; for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) - if ((wriop_is_enabled_dpmac(i) == 1) && - (wriop_get_phy_address(i) != -1)) + if (wriop_is_enabled_dpmac(i) == 1) ldpaa_eth_init(i, wriop_get_enet_if(i)); return 0; } -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 4/6] driver: net: fsl-mc: Modify the dpmac link detection method
when there is no phy present for a dpmac, a dummy phy device is created. when we move to multiple phy method, we need to create as many dummy phy devices. Change this method so that we don't need to create dummy phy devices. We always report linkup if no phy is present. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - Change (phydev->link == 1) to (phydev->link) - Use min macro instead of ternary operator - return -ENOLINK instead of -1 from ldpaa_get_dpmac_state - Change (state->up == 0) to (!state->up) drivers/net/ldpaa_eth/ldpaa_eth.c | 119 +--- 1 file changed, 57 insertions(+), 62 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index f122e945a4..4f0b977449 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -385,6 +385,59 @@ error: return err; } +static int ldpaa_get_dpmac_state(struct ldpaa_eth_priv *priv, +struct dpmac_link_state *state) +{ + struct phy_device *phydev = NULL; + phy_interface_t enet_if; + int err; + + /* let's start off with maximum capabilities +*/ + enet_if = wriop_get_enet_if(priv->dpmac_id); + switch (enet_if) { + case PHY_INTERFACE_MODE_XGMII: + state->rate = SPEED_1; + break; + default: + state->rate = SPEED_1000; + break; + } + state->up = 1; + +#ifdef CONFIG_PHYLIB + state->options |= DPMAC_LINK_OPT_AUTONEG; + + phydev = wriop_get_phy_dev(priv->dpmac_id); + if (phydev) { + err = phy_startup(phydev); + if (err) { + printf("%s: Could not initialize\n", phydev->dev->name); + state->up = 0; + } + if (phydev->link) { + state->rate = min(state->rate, (uint32_t)phydev->speed); + if (!phydev->duplex) + state->options |= DPMAC_LINK_OPT_HALF_DUPLEX; + if (!phydev->autoneg) + state->options &= ~DPMAC_LINK_OPT_AUTONEG; + } else { + state->up = 0; + } + } +#endif + if (!phydev) + state->options &= ~DPMAC_LINK_OPT_AUTONEG; + + if (!state->up) { + state->rate = 0; + state->options = 0; + return -ENOLINK; + } + + return 0; +} + static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) { struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)net_dev->priv; @@ -393,10 +446,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) struct dpni_link_state link_state; #endif int err = 0; - struct mii_dev *bus; - phy_interface_t enet_if; struct dpni_queue d_queue; - struct phy_device *phydev = NULL; if (net_dev->state == ETH_STATE_ACTIVE) return 0; @@ -416,45 +466,9 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (err < 0) goto err_dpmac_setup; -#ifdef CONFIG_PHYLIB - phydev = wriop_get_phy_dev(priv->dpmac_id); - if (phydev) { - err = phy_startup(phydev); - if (err) { - printf("%s: Could not initialize\n", - phydev->dev->name); - goto err_dpmac_bind; - } - } -#else - phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); - memset(phydev, 0, sizeof(struct phy_device)); - wriop_set_phy_dev(priv->dpmac_id, phydev); - - phydev->speed = SPEED_1000; - phydev->link = 1; - phydev->duplex = DUPLEX_FULL; -#endif - - bus = wriop_get_mdio(priv->dpmac_id); - enet_if = wriop_get_enet_if(priv->dpmac_id); - if ((bus == NULL) && - (enet_if == PHY_INTERFACE_MODE_XGMII)) { - phydev = (struct phy_device *) - malloc(sizeof(struct phy_device)); - memset(phydev, 0, sizeof(struct phy_device)); - wriop_set_phy_dev(priv->dpmac_id, phydev); - - phydev->speed = SPEED_1; - phydev->link = 1; - phydev->duplex = DUPLEX_FULL; - } - - if (!phydev->link) { - printf("%s: No link.\n", phydev->dev->name); - err = -1; + err = ldpaa_get_dpmac_state(priv, _link_state); + if (err < 0) goto err_dpmac_bind; - } /* DPMAC binding DPNI */ err = ldpaa_dpmac_bind(priv); @@ -488,18 +502,6 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) return err; } - dpmac_link_state.rate = phydev->speed; - - if
[U-Boot] [PATCH v3 2/6] driver: net: fsl-mc: remove unused strcture elements
The phydev structure is present in both ldpaa_eth_priv and wriop_dpmac_info. the phydev in wriop_dpmac_info is not being used As the phydev is created based on phy_addr and bus members of wriop_dpmac_info, it is appropriate to keep phydev in wriop_dpmac_info. Also phy_regs is not being used, therefore remove it Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - change (phydev && bus != NULL) to (phydev && bus) - after free phydev just pass NULL into wriop_set_phy_dev() drivers/net/ldpaa_eth/ldpaa_eth.c | 56 +++ drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - drivers/net/ldpaa_eth/ldpaa_wriop.c | 2 + include/fsl-mc/ldpaa_wriop.h| 1 - 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 82a684bea2..ca3459cc33 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -35,7 +35,7 @@ static int init_phy(struct eth_device *dev) return -1; } - priv->phydev = phydev; + wriop_set_phy_dev(priv->dpmac_id, phydev); return phy_config(phydev); } @@ -388,6 +388,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) struct mii_dev *bus; phy_interface_t enet_if; struct dpni_queue d_queue; + struct phy_device *phydev = NULL; if (net_dev->state == ETH_STATE_ACTIVE) return 0; @@ -408,38 +409,41 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) goto err_dpmac_setup; #ifdef CONFIG_PHYLIB - if (priv->phydev) { - err = phy_startup(priv->phydev); + phydev = wriop_get_phy_dev(priv->dpmac_id); + if (phydev) { + err = phy_startup(phydev); if (err) { printf("%s: Could not initialize\n", - priv->phydev->dev->name); + phydev->dev->name); goto err_dpmac_bind; } } #else - priv->phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); - memset(priv->phydev, 0, sizeof(struct phy_device)); + phydev = (struct phy_device *)malloc(sizeof(struct phy_device)); + memset(phydev, 0, sizeof(struct phy_device)); + wriop_set_phy_dev(priv->dpmac_id, phydev); - priv->phydev->speed = SPEED_1000; - priv->phydev->link = 1; - priv->phydev->duplex = DUPLEX_FULL; + phydev->speed = SPEED_1000; + phydev->link = 1; + phydev->duplex = DUPLEX_FULL; #endif bus = wriop_get_mdio(priv->dpmac_id); enet_if = wriop_get_enet_if(priv->dpmac_id); if ((bus == NULL) && (enet_if == PHY_INTERFACE_MODE_XGMII)) { - priv->phydev = (struct phy_device *) + phydev = (struct phy_device *) malloc(sizeof(struct phy_device)); - memset(priv->phydev, 0, sizeof(struct phy_device)); + memset(phydev, 0, sizeof(struct phy_device)); + wriop_set_phy_dev(priv->dpmac_id, phydev); - priv->phydev->speed = SPEED_1; - priv->phydev->link = 1; - priv->phydev->duplex = DUPLEX_FULL; + phydev->speed = SPEED_1; + phydev->link = 1; + phydev->duplex = DUPLEX_FULL; } - if (!priv->phydev->link) { - printf("%s: No link.\n", priv->phydev->dev->name); + if (!phydev->link) { + printf("%s: No link.\n", phydev->dev->name); err = -1; goto err_dpmac_bind; } @@ -476,17 +480,17 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) return err; } - dpmac_link_state.rate = priv->phydev->speed; + dpmac_link_state.rate = phydev->speed; - if (priv->phydev->autoneg == AUTONEG_DISABLE) + if (phydev->autoneg == AUTONEG_DISABLE) dpmac_link_state.options &= ~DPMAC_LINK_OPT_AUTONEG; else dpmac_link_state.options |= DPMAC_LINK_OPT_AUTONEG; - if (priv->phydev->duplex == DUPLEX_HALF) + if (phydev->duplex == DUPLEX_HALF) dpmac_link_state.options |= DPMAC_LINK_OPT_HALF_DUPLEX; - dpmac_link_state.up = priv->phydev->link; + dpmac_link_state.up = phydev->link; err = dpmac_set_link_state(dflt_mc_io, MC_CMD_NO_FLAGS, priv->dpmac_handle, _link_state); @@ -530,7 +534,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) goto err_qdid; } - return priv->phydev->link; + return phydev->link; err_qdid: err_get_queue: @@ -556,6 +560,7 @@ static void ldpaa_eth_stop(struct eth_device *net_dev) #ifdef CONFIG_PHYLIB struct mii_dev *bus =
[U-Boot] [PATCH v3 3/6] driver: net: fsl-mc: fix error handing in init_phy
if an error occurs during init_phy, we should free the phydev structure which has been allocated by phy_connect. Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - after free phydev just pass NULL into wriop_set_phy_dev() drivers/net/ldpaa_eth/ldpaa_eth.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index ca3459cc33..f122e945a4 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -23,6 +23,7 @@ static int init_phy(struct eth_device *dev) struct ldpaa_eth_priv *priv = (struct ldpaa_eth_priv *)dev->priv; struct phy_device *phydev = NULL; struct mii_dev *bus; + int ret; bus = wriop_get_mdio(priv->dpmac_id); if (bus == NULL) @@ -37,7 +38,14 @@ static int init_phy(struct eth_device *dev) wriop_set_phy_dev(priv->dpmac_id, phydev); - return phy_config(phydev); + ret = phy_config(phydev); + + if (ret) { + free(phydev); + wriop_set_phy_dev(priv->dpmac_id, NULL); + } + + return ret; } #endif -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 1/6] driver: net: fsl-mc: modify the label name
The goto label name is misspelled it should be DPMAC not DPAMC Signed-off-by: Pankaj Bansal Acked-by: Joe Hershberger --- Notes: V3: - No change V2: - No change drivers/net/ldpaa_eth/ldpaa_eth.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index a25b7cd906..82a684bea2 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -413,7 +413,7 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (err) { printf("%s: Could not initialize\n", priv->phydev->dev->name); - goto err_dpamc_bind; + goto err_dpmac_bind; } } #else @@ -441,13 +441,13 @@ static int ldpaa_eth_open(struct eth_device *net_dev, bd_t *bd) if (!priv->phydev->link) { printf("%s: No link.\n", priv->phydev->dev->name); err = -1; - goto err_dpamc_bind; + goto err_dpmac_bind; } /* DPMAC binding DPNI */ err = ldpaa_dpmac_bind(priv); if (err) - goto err_dpamc_bind; + goto err_dpmac_bind; /* DPNI initialization */ err = ldpaa_dpni_setup(priv); @@ -540,7 +540,7 @@ err_dpni_bind: err_dpbp_setup: dpni_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle); err_dpni_setup: -err_dpamc_bind: +err_dpmac_bind: dpmac_close(dflt_mc_io, MC_CMD_NO_FLAGS, priv->dpmac_handle); dpmac_destroy(dflt_mc_io, dflt_dprc_handle, -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3 0/6] driver: net: fsl-mc: Add support of multiple phys for dpmac
This patch set adds support of multiple phys for one dpmac Till now we have had cases where we had one phy device per dpmac. Now, with the upcoming products (LX2160AQDS), we have cases, where there are sometimes two phy devices for one dpmac. One phy for TX lanes and one phy for RX lanes. To handle such cases, add the support for multiple phys in ethernet driver. The ethernet link is up if all the phy devices connected to one dpmac report link up. also the link capabilities are limited by the weakest phy device. i.e. say if there are two phys for one dpmac. one operates at 10G without autoneg and other operate at 1G with autoneg. Then the ethernet interface will operate at 1G without autoneg. Cc: Varun Sethi Pankaj Bansal (6): driver: net: fsl-mc: modify the label name driver: net: fsl-mc: remove unused strcture elements driver: net: fsl-mc: fix error handing in init_phy driver: net: fsl-mc: Modify the dpmac link detection method driver: net: fsl-mc: initialize dpmac irrespective of phy driver: net: fsl-mc: Add support of multiple phys for dpmac board/freescale/ls1088a/eth_ls1088aqds.c | 18 +-- board/freescale/ls1088a/eth_ls1088ardb.c | 21 +-- board/freescale/ls2080aqds/eth.c | 26 ++-- board/freescale/ls2080ardb/eth_ls2080rdb.c | 24 +-- drivers/net/fsl-mc/mc.c| 6 +- drivers/net/ldpaa_eth/ldpaa_eth.c | 171 + drivers/net/ldpaa_eth/ldpaa_eth.h | 1 - drivers/net/ldpaa_eth/ldpaa_wriop.c| 71 ++--- include/fsl-mc/ldpaa_wriop.h | 46 +++--- 9 files changed, 223 insertions(+), 161 deletions(-) -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mmc: tmio: Pass full address to tmio_sd_addr_is_dmaable()
On Wed, Oct 10, 2018 at 1:17 AM Marek Vasut wrote: > > On 10/09/2018 05:35 PM, Masahiro Yamada wrote: > > On Tue, Oct 9, 2018 at 11:55 PM Marek Vasut wrote: > >> > >> On 10/09/2018 02:24 PM, Masahiro Yamada wrote: > >>> Hi Marek, > >> > >> Hi, > >> > >>> On Tue, Oct 9, 2018 at 8:26 PM Marek Vasut wrote: > > Pass the entire source data pointer to tmio_sd_addr_is_dmaable() > >>> > >>> > >>> This statement sounds like > >>> the current code is passing the pointer address only partially. > >>> Is it right? > >> > >> With this change it is. > > > > > > Is anything wrong with my code? > > Don't think so. > > > How about your patch title > > "mmc: tmio: Pass full address to tmio_sd_addr_is_dmaable()" ? > > > > Does it mean my code is not passing full address? > > Could use a rephrasing, yeah > > so we don't have to apply casts throughout the code. > >>> > >>> I do not understand this either > >>> since I see a cast in your code too. > >> > >> There is a cast, but it's isolated to this function. > >> > >>> In the previous code, the caller casts src->address > >>> when it passes it to tmio_sd_addr_is_dmaable(). > >>> > >>> In the new code, 'src' is casted > >>> in tmio_sd_addr_is_dmaable(). > >>> > >>> To me, you just moved the location of casting. > >>> What is the difference (i.e. benefit)? > >> > >> I moved the cast from the code into the function, which I think is cleaner. > > > > I do not think so. > > So would you prefer to see stuff like > > function foo(long bar) > {...} > > foo((cast)baz); > > ... > > foo((cast)quux); > > In the code :) It is a hypothetical situation. If there were multiple function calls, I would agree with you. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] efi_loader: set image_base and image_size to correct values
# This discussion should be in ML as more people can join? On Tue, Oct 09, 2018 at 07:25:47PM +0200, Heinrich Schuchardt wrote: > On 10/09/2018 08:55 AM, AKASHI Takahiro wrote: > > On Sat, Oct 06, 2018 at 09:51:01AM +0200, Heinrich Schuchardt wrote: > >> On 09/30/2018 07:26 AM, Heinrich Schuchardt wrote: > >>> From: AKASHI Takahiro > >>> > >>> Currently, image's image_base points to an address where the image was > >>> temporarily uploaded for further loading. Since efi_loader relocates > >>> the image to final destination, image_base and image_size should reflect > >>> that. > >>> > >>> This bug was detected in UEFI SCT, "Loaded Image Protocol Test - test 2," > >>> which shows that 'Unload' function doesn't fit into a range suggested by > >>> image_base and image_size. > >>> TestCase/UEFI/EFI/Protocol/LoadedImage/BlackBoxTest/ > >>> LoadedImageBBTestMain.c:1002 > >>> > >>> This patch also reverts a patch, "efi_loader: save image relocation > >>> address > >>> and size" since newly added fields are no longer needed. > >>> > >>> Signed-off-by: AKASHI Takahiro > >>> > >>> Rebase the patch. Keep the relocation address in struct efi_image_object. > >>> We will use the address to free the image in UnloadImage. > >>> > >>> Signed-off-by: Heinrich Schuchardt > >>> --- > >>> lib/efi_loader/efi_image_loader.c | 7 ++- > >>> 1 file changed, 2 insertions(+), 5 deletions(-) > >>> > >>> diff --git a/lib/efi_loader/efi_image_loader.c > >>> b/lib/efi_loader/efi_image_loader.c > >>> index a18ce0a5705..39902152f3c 100644 > >>> --- a/lib/efi_loader/efi_image_loader.c > >>> +++ b/lib/efi_loader/efi_image_loader.c > >>> @@ -212,7 +212,6 @@ void *efi_load_pe(struct efi_loaded_image_obj > >>> *handle, void *efi, > >>> int rel_idx = IMAGE_DIRECTORY_ENTRY_BASERELOC; > >>> void *entry; > >>> uint64_t image_base; > >>> - uint64_t image_size; > >>> unsigned long virt_size = 0; > >>> int supported = 0; > >>> > >>> @@ -256,7 +255,6 @@ void *efi_load_pe(struct efi_loaded_image_obj > >>> *handle, void *efi, > >>> IMAGE_NT_HEADERS64 *nt64 = (void *)nt; > >>> IMAGE_OPTIONAL_HEADER64 *opt = >OptionalHeader; > >>> image_base = opt->ImageBase; > >>> - image_size = opt->SizeOfImage; > >>> efi_set_code_and_data_type(loaded_image_info, opt->Subsystem); > >>> efi_reloc = efi_alloc(virt_size, > >>> loaded_image_info->image_code_type); > >>> @@ -272,7 +270,6 @@ void *efi_load_pe(struct efi_loaded_image_obj > >>> *handle, void *efi, > >>> } else if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) { > >>> IMAGE_OPTIONAL_HEADER32 *opt = >OptionalHeader; > >>> image_base = opt->ImageBase; > >>> - image_size = opt->SizeOfImage; > >>> efi_set_code_and_data_type(loaded_image_info, opt->Subsystem); > >>> efi_reloc = efi_alloc(virt_size, > >>> loaded_image_info->image_code_type); > >>> @@ -315,10 +312,10 @@ void *efi_load_pe(struct efi_loaded_image_obj > >>> *handle, void *efi, > >>> invalidate_icache_all(); > >>> > >>> /* Populate the loaded image interface bits */ > >>> - loaded_image_info->image_base = efi; > >>> - loaded_image_info->image_size = image_size; > >>> handle->reloc_base = efi_reloc; > >>> handle->reloc_size = virt_size; > >>> + loaded_image_info->image_base = efi_reloc; > >>> + loaded_image_info->image_size = virt_size; > >>> > >>> return entry; > >>> } > >>> > >> > >> With this patch GRUB is not able to load the modules which are included > >> in grubaa64.efi > > > > Oh, really? > > > >> ## Starting EFI application at 4040 ... > >> error: unknown filesystem. > >> Entering rescue mode... > >> grub rescue> > >> > >> Function grub_efi_modules_addr() expects image_base to point to the > >> unrelocated image: > >> > >> header = image->image_base; > > > > Here "image" points to 'grub' itself, right? > > If so, > > > >> coff_header = &(header->coff_header); > >> sections > >> = (struct grub_pe32_section_table *) ((char *) coff_header > >> + sizeof (*coff_header) > >> + > >> coff_header->optional_header_size); > > > > It seems to me that the above code shows that we should also > > copy PE headers, along with sections, after a new location > > is allocated in efi_load_pe(). > > > > Then my patch should work again, I didn't test it though. > > > > Thanks, > > -Takahiro Akashi I think we should carefully use those words like "load" and "relocate". > No, we should not copy more but less. The portable executable protocol > is defines that an executable can be executed without relocation if > loaded at the preferred address. Right if you mean optional header's "ImageBase" by preferred address. > This implies that the relative position > of all sections can remain unchanged Not 'can', but 'must'. This is part of "load" operation, using
[U-Boot] [PATCH 4/7] doc: imx: Reorganize i.MX SoC common documentation
The following documents describe device details according to the i.MX family: - README.imx25 - README.imx27 - README.imx5 - README.imx6 - README.mxs Move all device common related document to doc/imx/common for a better directory structure. Signed-off-by: Breno Lima --- doc/imx/{ => common}/README.imx25 | 0 doc/imx/{ => common}/README.imx27 | 0 doc/imx/{ => common}/README.imx5 | 0 doc/imx/{ => common}/README.imx6 | 0 doc/imx/{ => common}/README.mxs | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename doc/imx/{ => common}/README.imx25 (100%) rename doc/imx/{ => common}/README.imx27 (100%) rename doc/imx/{ => common}/README.imx5 (100%) rename doc/imx/{ => common}/README.imx6 (100%) rename doc/imx/{ => common}/README.mxs (100%) diff --git a/doc/imx/README.imx25 b/doc/imx/common/README.imx25 similarity index 100% rename from doc/imx/README.imx25 rename to doc/imx/common/README.imx25 diff --git a/doc/imx/README.imx27 b/doc/imx/common/README.imx27 similarity index 100% rename from doc/imx/README.imx27 rename to doc/imx/common/README.imx27 diff --git a/doc/imx/README.imx5 b/doc/imx/common/README.imx5 similarity index 100% rename from doc/imx/README.imx5 rename to doc/imx/common/README.imx5 diff --git a/doc/imx/README.imx6 b/doc/imx/common/README.imx6 similarity index 100% rename from doc/imx/README.imx6 rename to doc/imx/common/README.imx6 diff --git a/doc/imx/README.mxs b/doc/imx/common/README.mxs similarity index 100% rename from doc/imx/README.mxs rename to doc/imx/common/README.mxs -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 02/11] efi_loader: Initial HII protocols
Heinrich, On Tue, Oct 09, 2018 at 07:19:58PM +0200, Heinrich Schuchardt wrote: > On 10/09/2018 09:24 AM, AKASHI, Takahiro wrote: > > Do you have any specific idea about what is really missing > > in Leif's/Rob's HII patch? > > (My original question.) > > > > -Takahiro Akashi > > Please, see https://patchwork.ozlabs.org/patch/823807/ Thanks, I didn't notice this thread. > Open topics were: > - usage of bitfields > - incorrect determination of string lengths > - too deep nesting of of loops and ifs Okay, those seem to be easily fixable at a glance. > - incomplete implementation of the protocols That is a matter I'm concerned about. There's no consensus yet about what should be in an "initial" port. BTW, you said there were some missing protocols to run i386 version of Shell: EFI HII font protocol and EFI HII Image protocol. Do you still believe so even after Alex's comment? Thanks, -Takahiro Akashi > As other protocols are based on the HII database protocol we should > start with this protocol in a separate patch. We should have a unit test > in lib/efi_selftest/ for all methods of the protocol. > > Best regards > > Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/7] doc: imx: reorganize i.MX documentation
Currently the U-Boot doc/ directory contains the following files that are only relevant for i.MX devices: - doc/README.imx25 - doc/README.imx27 - doc/README.imx5 - doc/README.imx6 - doc/README.imximage - doc/README.mxc_hab - doc/README.mxs - doc/README.mxsimage - doc/README.sdp Move all content to a common i.MX folder for a better documentation structure. Signed-off-by: Breno Lima --- doc/{ => imx}/README.imx25| 0 doc/{ => imx}/README.imx27| 0 doc/{ => imx}/README.imx5 | 0 doc/{ => imx}/README.imx6 | 0 doc/{ => imx}/README.imximage | 0 doc/{ => imx}/README.mxc_hab | 0 doc/{ => imx}/README.mxs | 0 doc/{ => imx}/README.mxsimage | 0 doc/{ => imx}/README.sdp | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename doc/{ => imx}/README.imx25 (100%) rename doc/{ => imx}/README.imx27 (100%) rename doc/{ => imx}/README.imx5 (100%) rename doc/{ => imx}/README.imx6 (100%) rename doc/{ => imx}/README.imximage (100%) rename doc/{ => imx}/README.mxc_hab (100%) rename doc/{ => imx}/README.mxs (100%) rename doc/{ => imx}/README.mxsimage (100%) rename doc/{ => imx}/README.sdp (100%) diff --git a/doc/README.imx25 b/doc/imx/README.imx25 similarity index 100% rename from doc/README.imx25 rename to doc/imx/README.imx25 diff --git a/doc/README.imx27 b/doc/imx/README.imx27 similarity index 100% rename from doc/README.imx27 rename to doc/imx/README.imx27 diff --git a/doc/README.imx5 b/doc/imx/README.imx5 similarity index 100% rename from doc/README.imx5 rename to doc/imx/README.imx5 diff --git a/doc/README.imx6 b/doc/imx/README.imx6 similarity index 100% rename from doc/README.imx6 rename to doc/imx/README.imx6 diff --git a/doc/README.imximage b/doc/imx/README.imximage similarity index 100% rename from doc/README.imximage rename to doc/imx/README.imximage diff --git a/doc/README.mxc_hab b/doc/imx/README.mxc_hab similarity index 100% rename from doc/README.mxc_hab rename to doc/imx/README.mxc_hab diff --git a/doc/README.mxs b/doc/imx/README.mxs similarity index 100% rename from doc/README.mxs rename to doc/imx/README.mxs diff --git a/doc/README.mxsimage b/doc/imx/README.mxsimage similarity index 100% rename from doc/README.mxsimage rename to doc/imx/README.mxsimage diff --git a/doc/README.sdp b/doc/imx/README.sdp similarity index 100% rename from doc/README.sdp rename to doc/imx/README.sdp -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 6/7] doc: imx: misc: Reorganize miscellaneous documentation
The Serial Download Protocol feature is availible in various i.MX SoCs. Move README.sdp document to imx/misc directory. Signed-off-by: Breno Lima --- doc/imx/{ => misc}/README.sdp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/imx/{ => misc}/README.sdp (100%) diff --git a/doc/imx/README.sdp b/doc/imx/misc/README.sdp similarity index 100% rename from doc/imx/README.sdp rename to doc/imx/misc/README.sdp -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/7] doc: imx: Move SPD related info to the appropriate doc
Currently the Serial Download Protocol tools and procedure are documented in two places: - doc/imx/README.sdp - doc/imx/README.imx6 It is better to consolidate all SDP related information into README.sdp file, so move the content from README.imx6 to README.sdp. Signed-off-by: Breno Lima --- doc/imx/README.imx6 | 25 - doc/imx/README.sdp | 22 -- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/doc/imx/README.imx6 b/doc/imx/README.imx6 index b0644f8491..eab88353f6 100644 --- a/doc/imx/README.imx6 +++ b/doc/imx/README.imx6 @@ -88,28 +88,3 @@ Reading bank 4: Word 0x0002: 9f027772 0004 -2. Using imx_usb_loader for first install with SPL --- - -imx_usb_loader is a very nice tool by Boundary Devices that -allow to install U-Boot without a JTAG debugger, using -the USB boot mode as described in the manual. It is -a replacement for Freescale's MFGTOOLS. - -The sources can be found here: - - https://github.com/boundarydevices/imx_usb_loader.git - -Booting in USB mode, the i.MX6 announces itself to the Linux Host as: - -Bus 001 Device 111: ID 15a2:0061 Freescale Semiconductor, Inc. - -imx_usb_loader is able to download a single file (u-boot.imx) -to the board. For boards without SPL support, it is enough to -issue the command: - - sudo ../imx_usb_loader/imx_usb -v u-boot.imx - -In order to load SPL and u-boot.img via imx_usb_loader tool, -please refer to doc/README.sdp. - diff --git a/doc/imx/README.sdp b/doc/imx/README.sdp index 178ea688a7..6ea6e41395 100644 --- a/doc/imx/README.sdp +++ b/doc/imx/README.sdp @@ -16,14 +16,19 @@ protocols allow to access a USB device without OS specific drivers. The U-Boot implementation has primarly been tested using the open source imx_loader utility (https://github.com/boundarydevices/imx_usb_loader). +imx_usb_loader is a very nice tool by Boundary Devices that allow to +install U-Boot without a JTAG debugger, using the USB boot mode as +described in the manual. It is a replacement for Freescale's +MFGTOOLS. + The host side utilities are typically capable to interpret the i.MX specific image header (see doc/README.imximage). There are extensions for imx_loader's imx_usb utility which allow to interpret the U-Boot specific legacy image format (see mkimage(1)). Also the U-Boot side support beside the i.MX specific header the U-Boot legacy header. -Usage -- +1. Using imx_usb_loader for first install with SPL +-- This implementation can be started in U-Boot using the sdp command (CONFIG_CMD_USB_SDP) or in SPL if Serial Downloader boot mode has been @@ -98,3 +103,16 @@ With that SPL and U-Boot can be downloaded with a single invocation of imx_usb without arguments: # imx_usb + +2. Using imx_usb_loader non-SPL images +--- + +Booting in USB mode, the i.MX6 announces itself to the Linux Host as: + +Bus 001 Device 111: ID 15a2:0061 Freescale Semiconductor, Inc. + +imx_usb_loader is able to download a single file (u-boot.imx) +to the board. For boards without SPL support, it is enough to +issue the command: + + sudo ../imx_usb_loader/imx_usb -v u-boot.imx -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 5/7] doc: imx: hab: Reorganize High Assurance Boot documentation
The current High Assurance Boot document README.mxc_hab include details for the following features in a single file: - HAB Secure Boot - HAB Encrypted Boot Split HAB documentation in a specific directory for a cleaner documentation structure, subsequent patches will include more content in HAB documentation. Signed-off-by: Breno Lima --- doc/imx/hab/habv4/encrypted_boot.txt | 43 ++ .../habv4/secure_boot.txt}| 44 --- 2 files changed, 43 insertions(+), 44 deletions(-) create mode 100644 doc/imx/hab/habv4/encrypted_boot.txt rename doc/imx/{README.mxc_hab => hab/habv4/secure_boot.txt} (68%) diff --git a/doc/imx/hab/habv4/encrypted_boot.txt b/doc/imx/hab/habv4/encrypted_boot.txt new file mode 100644 index 00..c59d204d38 --- /dev/null +++ b/doc/imx/hab/habv4/encrypted_boot.txt @@ -0,0 +1,43 @@ +1. Setup U-Boot Image for Encrypted Boot + +An authenticated U-Boot image is used as starting point for +Encrypted Boot. The image is encrypted by i.MX Code Signing +Tool (CST). The CST replaces only the image data of +u-boot-dtb.imx with the encrypted data. The Initial Vector Table, +DCD, and Boot data, remains in plaintext. + +The image data is encrypted with a Encryption Key (DEK). +Therefore, this key is needed to decrypt the data during the +booting process. The DEK is protected by wrapping it in a Blob, +which needs to be appended to the U-Boot image and specified in +the CSF file. + +The DEK blob is generated by an authenticated U-Boot image with +the dek_blob cmd enabled. The image used for DEK blob generation +needs to have the following configurations enabled in Kconfig: + +CONFIG_SECURE_BOOT=y +CONFIG_CMD_DEKBLOB=y + +Note: The encrypted boot feature is only supported by HABv4 or +greater. + +The dek_blob command then can be used to generate the DEK blob of +a DEK previously loaded in memory. The command is used as follows: + +dek_blob +example: dek_blob 0x1080 0x10801000 192 + +The resulting DEK blob then is used to construct the encrypted +U-Boot image. Note that the blob needs to be transferred back +to the host.Then the following commands are used to construct +the final image. + +cat u-boot-dtb.imx csf-u-boot.bin > u-boot-signed.imx +objcopy -I binary -O binary --pad-to --gap-fill=0x00 \ +u-boot-signed.imx u-boot-signed-pad.bin +cat u-boot-signed-pad.imx DEK_blob.bin > u-boot-encrypted.imx + +NOTE: u-boot-signed.bin needs to be padded to the value +equivalent to the address in which the DEK blob is specified +in the CSF. diff --git a/doc/imx/README.mxc_hab b/doc/imx/hab/habv4/secure_boot.txt similarity index 68% rename from doc/imx/README.mxc_hab rename to doc/imx/hab/habv4/secure_boot.txt index a40ebf3e84..ae68dc8040 100644 --- a/doc/imx/README.mxc_hab +++ b/doc/imx/hab/habv4/secure_boot.txt @@ -98,47 +98,3 @@ cat u-boot-ivt.img csf-u-boot.bin > u-boot-signed.img These two signed binaries can be used on an i.MX in closed configuration when the according SRK Table Hash has been flashed. - -4. Setup U-Boot Image for Encrypted Boot - -An authenticated U-Boot image is used as starting point for -Encrypted Boot. The image is encrypted by i.MX Code Signing -Tool (CST). The CST replaces only the image data of -u-boot-dtb.imx with the encrypted data. The Initial Vector Table, -DCD, and Boot data, remains in plaintext. - -The image data is encrypted with a Encryption Key (DEK). -Therefore, this key is needed to decrypt the data during the -booting process. The DEK is protected by wrapping it in a Blob, -which needs to be appended to the U-Boot image and specified in -the CSF file. - -The DEK blob is generated by an authenticated U-Boot image with -the dek_blob cmd enabled. The image used for DEK blob generation -needs to have the following configurations enabled in Kconfig: - -CONFIG_SECURE_BOOT=y -CONFIG_CMD_DEKBLOB=y - -Note: The encrypted boot feature is only supported by HABv4 or -greater. - -The dek_blob command then can be used to generate the DEK blob of -a DEK previously loaded in memory. The command is used as follows: - -dek_blob -example: dek_blob 0x1080 0x10801000 192 - -The resulting DEK blob then is used to construct the encrypted -U-Boot image. Note that the blob needs to be transferred back -to the host.Then the following commands are used to construct -the final image. - -cat u-boot-dtb.imx csf-u-boot.bin > u-boot-signed.imx -objcopy -I binary -O binary --pad-to --gap-fill=0x00 \ -u-boot-signed.imx u-boot-signed-pad.bin -cat u-boot-signed-pad.imx DEK_blob.bin > u-boot-encrypted.imx - -NOTE: u-boot-signed.bin needs to be padded to the value -equivalent to the address in which the DEK blob is specified -in the CSF. -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 05/11] drivers: serial: mcfuart: add Kconfig option
This patch adds missing CONFIG_MCFUART to Kconfig. Signed-off-by: Angelo Dureghello --- Changes for v2: - better Kconfig help --- drivers/serial/Kconfig | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 5fa27254e3..56dbfd5759 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -499,6 +499,15 @@ config MVEBU_A3700_UART Choose this option to add support for UART driver on the Marvell Armada 3700 SoC. The base address is configured via DT. +config MCFUART + bool "Freescale ColdFire UART support" +default n +help + Choose this option to add support for UART driver on the ColdFire + SoC's family. The serial communication channel provides a full-duplex + asynchronous/synchronous receiver and transmitter deriving an + operating frequency from the internal bus clock or an external clock. + config MXC_UART bool "IMX serial port support" depends on MX5 || MX6 -- 2.19.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 16/17] test: Reduce the number of tests run with sandbox_flattree
We only need to run driver-model tests with this config, since this is the only thing that is different when CONFIG_OF_LIVE is not defined. Filter out the other tests to same time. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to reduce the number of tests run with sandbox_flattree test/run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 15/17] patman: Don't clear progress in tout unless it was used
At present calling Uninit() always called ClearProgress() which outputs a \r character as well as spaces to remove any progress information on the line. This can mess up the normal output of binman and other tools. Fix this by outputing this only when progress information has actually been previous written. Signed-off-by: Simon Glass --- Changes in v2: None tools/patman/tout.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 7/7] doc: imx: Improve i.MX documentation naming
There is no need to have README in all i.MX documents name. Remove README from i.MX docs name and add .txt file extension. Signed-off-by: Breno Lima Reviewed-by: Ye Li --- doc/imx/common/{README.imx25 => imx25.txt}| 0 doc/imx/common/{README.imx27 => imx27.txt}| 0 doc/imx/common/{README.imx5 => imx5.txt} | 0 doc/imx/common/{README.imx6 => imx6.txt} | 0 doc/imx/common/{README.mxs => mxs.txt}| 0 doc/imx/misc/{README.sdp => sdp.txt} | 0 doc/imx/mkimage/{README.imximage => imximage.txt} | 0 doc/imx/mkimage/{README.mxsimage => mxsimage.txt} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename doc/imx/common/{README.imx25 => imx25.txt} (100%) rename doc/imx/common/{README.imx27 => imx27.txt} (100%) rename doc/imx/common/{README.imx5 => imx5.txt} (100%) rename doc/imx/common/{README.imx6 => imx6.txt} (100%) rename doc/imx/common/{README.mxs => mxs.txt} (100%) rename doc/imx/misc/{README.sdp => sdp.txt} (100%) rename doc/imx/mkimage/{README.imximage => imximage.txt} (100%) rename doc/imx/mkimage/{README.mxsimage => mxsimage.txt} (100%) diff --git a/doc/imx/common/README.imx25 b/doc/imx/common/imx25.txt similarity index 100% rename from doc/imx/common/README.imx25 rename to doc/imx/common/imx25.txt diff --git a/doc/imx/common/README.imx27 b/doc/imx/common/imx27.txt similarity index 100% rename from doc/imx/common/README.imx27 rename to doc/imx/common/imx27.txt diff --git a/doc/imx/common/README.imx5 b/doc/imx/common/imx5.txt similarity index 100% rename from doc/imx/common/README.imx5 rename to doc/imx/common/imx5.txt diff --git a/doc/imx/common/README.imx6 b/doc/imx/common/imx6.txt similarity index 100% rename from doc/imx/common/README.imx6 rename to doc/imx/common/imx6.txt diff --git a/doc/imx/common/README.mxs b/doc/imx/common/mxs.txt similarity index 100% rename from doc/imx/common/README.mxs rename to doc/imx/common/mxs.txt diff --git a/doc/imx/misc/README.sdp b/doc/imx/misc/sdp.txt similarity index 100% rename from doc/imx/misc/README.sdp rename to doc/imx/misc/sdp.txt diff --git a/doc/imx/mkimage/README.imximage b/doc/imx/mkimage/imximage.txt similarity index 100% rename from doc/imx/mkimage/README.imximage rename to doc/imx/mkimage/imximage.txt diff --git a/doc/imx/mkimage/README.mxsimage b/doc/imx/mkimage/mxsimage.txt similarity index 100% rename from doc/imx/mkimage/README.mxsimage rename to doc/imx/mkimage/mxsimage.txt -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 0/7] Restructure the i.MX U-Boot documentation
This patch set is restructuring and cleaning up the current i.MX documentation included in the U-Boot doc directory. The current i.MX documentation is in the root directory so we cannot easily check which one is i.MX related: http://git.denx.de/?p=u-boot/u-boot-imx.git;a=tree;f=doc; This series is restructuring the documentation only relevant for i.MX devices in a new imx directory: doc └── imx ├── common │ ├── imx25.txt │ ├── imx27.txt │ ├── imx5.txt │ ├── imx6.txt │ └── mxs.txt ├── hab │ └── habv4 │├── encrypted_boot.txt │└── secure_boot.txt ├── misc │ └── sdp.txt └── mkimage ├── imximage.txt └── mxsimage.txt Subsequent patches will include more content in HAB documentation. Breno Lima (7): doc: imx: reorganize i.MX documentation doc: imx: Move SPD related info to the appropriate doc doc: imx: mkimage: reorganize i.MX mkimage documentation doc: imx: Reorganize i.MX SoC common documentation doc: imx: hab: Reorganize High Assurance Boot documentation doc: imx: misc: Reorganize miscellaneous documentation doc: imx: Improve i.MX documentation naming doc/{README.imx25 => imx/common/imx25.txt}| 0 doc/{README.imx27 => imx/common/imx27.txt}| 0 doc/{README.imx5 => imx/common/imx5.txt} | 0 doc/{README.imx6 => imx/common/imx6.txt} | 25 --- doc/{README.mxs => imx/common/mxs.txt}| 0 doc/imx/hab/habv4/encrypted_boot.txt | 43 ++ .../hab/habv4/secure_boot.txt}| 44 --- doc/{README.sdp => imx/misc/sdp.txt} | 22 +- .../mkimage/imximage.txt} | 0 .../mkimage/mxsimage.txt} | 0 10 files changed, 63 insertions(+), 71 deletions(-) rename doc/{README.imx25 => imx/common/imx25.txt} (100%) rename doc/{README.imx27 => imx/common/imx27.txt} (100%) rename doc/{README.imx5 => imx/common/imx5.txt} (100%) rename doc/{README.imx6 => imx/common/imx6.txt} (73%) rename doc/{README.mxs => imx/common/mxs.txt} (100%) create mode 100644 doc/imx/hab/habv4/encrypted_boot.txt rename doc/{README.mxc_hab => imx/hab/habv4/secure_boot.txt} (68%) rename doc/{README.sdp => imx/misc/sdp.txt} (82%) rename doc/{README.imximage => imx/mkimage/imximage.txt} (100%) rename doc/{README.mxsimage => imx/mkimage/mxsimage.txt} (100%) -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 04/11] drivers: serial: mcfuart: add DT support
This patch adds devicetree support to the mcfuart.c driver and removes non DM code. Signed-off-by: Angelo Dureghello --- Changes for v2: - remove non DM code --- drivers/serial/mcfuart.c | 106 +++ 1 file changed, 28 insertions(+), 78 deletions(-) diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c index 1371049de2..066e5a18d8 100644 --- a/drivers/serial/mcfuart.c +++ b/drivers/serial/mcfuart.c @@ -5,6 +5,9 @@ * * Modified to add device model (DM) support * (C) Copyright 2015 Angelo Dureghello + * + * Modified to add DM and fdt support, removed non DM code + * (C) Copyright 2018 Angelo Dureghello */ /* @@ -78,83 +81,6 @@ static void mcf_serial_setbrg_common(uart_t *uart, int baudrate) writeb(UART_UCR_RX_ENABLED | UART_UCR_TX_ENABLED, >ucr); } -#ifndef CONFIG_DM_SERIAL - -static int mcf_serial_init(void) -{ - uart_t *uart_base; - int port_idx; - - uart_base = (uart_t *)CONFIG_SYS_UART_BASE; - port_idx = CONFIG_SYS_UART_PORT; - - return mcf_serial_init_common(uart_base, port_idx, gd->baudrate); -} - -static void mcf_serial_putc(const char c) -{ - uart_t *uart = (uart_t *)CONFIG_SYS_UART_BASE; - - if (c == '\n') - serial_putc('\r'); - - /* Wait for last character to go. */ - while (!(readb(>usr) & UART_USR_TXRDY)) - ; - - writeb(c, >utb); -} - -static int mcf_serial_getc(void) -{ - uart_t *uart = (uart_t *)CONFIG_SYS_UART_BASE; - - /* Wait for a character to arrive. */ - while (!(readb(>usr) & UART_USR_RXRDY)) - ; - - return readb(>urb); -} - -static void mcf_serial_setbrg(void) -{ - uart_t *uart = (uart_t *)CONFIG_SYS_UART_BASE; - - mcf_serial_setbrg_common(uart, gd->baudrate); -} - -static int mcf_serial_tstc(void) -{ - uart_t *uart = (uart_t *)CONFIG_SYS_UART_BASE; - - return readb(>usr) & UART_USR_RXRDY; -} - -static struct serial_device mcf_serial_drv = { - .name = "mcf_serial", - .start = mcf_serial_init, - .stop = NULL, - .setbrg = mcf_serial_setbrg, - .putc = mcf_serial_putc, - .puts = default_serial_puts, - .getc = mcf_serial_getc, - .tstc = mcf_serial_tstc, -}; - -void mcf_serial_initialize(void) -{ - serial_register(_serial_drv); -} - -__weak struct serial_device *default_serial_console(void) -{ - return _serial_drv; -} - -#endif - -#ifdef CONFIG_DM_SERIAL - static int coldfire_serial_probe(struct udevice *dev) { struct coldfire_serial_platdata *plat = dev->platdata; @@ -212,6 +138,23 @@ static int coldfire_serial_pending(struct udevice *dev, bool input) return 0; } +static int coldfire_ofdata_to_platdata(struct udevice *dev) +{ + struct coldfire_serial_platdata *plat = dev_get_platdata(dev); + fdt_addr_t addr_base; + + addr_base = devfdt_get_addr(dev); + if (addr_base == FDT_ADDR_T_NONE) + return -ENODEV; + + plat->base = (uint32_t)addr_base; + + plat->port = dev->seq; + plat->baudrate = gd->baudrate; + + return 0; +} + static const struct dm_serial_ops coldfire_serial_ops = { .putc = coldfire_serial_putc, .pending = coldfire_serial_pending, @@ -219,11 +162,18 @@ static const struct dm_serial_ops coldfire_serial_ops = { .setbrg = coldfire_serial_setbrg, }; +static const struct udevice_id coldfire_serial_ids[] = { + { .compatible = "fsl,mcf-uart" }, + { } +}; + U_BOOT_DRIVER(serial_coldfire) = { .name = "serial_coldfire", .id = UCLASS_SERIAL, + .of_match = coldfire_serial_ids, + .ofdata_to_platdata = coldfire_ofdata_to_platdata, + .platdata_auto_alloc_size = sizeof(struct coldfire_serial_platdata), .probe = coldfire_serial_probe, .ops = _serial_ops, .flags = DM_FLAG_PRE_RELOC, }; -#endif -- 2.19.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 06/45] spl: input: Allow input in SPL and TPL
In some cases it is necessary to read the keyboard in early phases of U-Boot. Update the config to allow this. Signed-off-by: Simon Glass --- drivers/input/Kconfig | 48 ++ drivers/input/Makefile | 11 ++ drivers/input/input.c | 5 - 3 files changed, 59 insertions(+), 5 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/17] Makefile: Add a 'check' target for make
At present we use 'make tests' to run the tests. For many projects 'make check' is more common, so support that as well. Also add some help to 'make help'. Signed-off-by: Simon Glass --- Changes in v2: None Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 14/17] tools: Set an initial value for indir
This variable is not documented or set up in the module. Fix this. Signed-off-by: Simon Glass --- Changes in v2: None tools/patman/tools.py | 3 +++ 1 file changed, 3 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 01/45] dm: core: Alloc uclass-private data to be cache-aligned
There is no reason why this feature should not be supported for uclass- private data. Update the code accordingly. Signed-off-by: Simon Glass --- drivers/core/device.c | 3 ++- include/dm/uclass.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 13/17] buildman: dtoc: Suppress unwanted output from test
There are a few test cases which print output. Suppress this so that tests can run silently in the normal case. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/test.py | 4 +++- tools/dtoc/test_dtoc.py | 6 -- 2 files changed, 7 insertions(+), 3 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/7] doc: imx: mkimage: reorganize i.MX mkimage documentation
The following documents describe the image type used by the mkimage tool to generate U-Boot images for i.MX devices. - README.imximage - README.mxsimage Move all mkimage related document to doc/imx/mkimage for a better directory structure. Signed-off-by: Breno Lima --- doc/imx/{ => mkimage}/README.imximage | 0 doc/imx/{ => mkimage}/README.mxsimage | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename doc/imx/{ => mkimage}/README.imximage (100%) rename doc/imx/{ => mkimage}/README.mxsimage (100%) diff --git a/doc/imx/README.imximage b/doc/imx/mkimage/README.imximage similarity index 100% rename from doc/imx/README.imximage rename to doc/imx/mkimage/README.imximage diff --git a/doc/imx/README.mxsimage b/doc/imx/mkimage/README.mxsimage similarity index 100% rename from doc/imx/README.mxsimage rename to doc/imx/mkimage/README.mxsimage -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/17] test/py: ignore console read exceptions after test failure
Hi Stephen, On 4 October 2018 at 10:01, Stephen Warren wrote: > On 10/01/2018 09:12 PM, Simon Glass wrote: >> >> From: Stephen Warren >> >> After a test has failed, test/py drains the U-Boot console log to ensure >> that any relevant output is captured. At this point, we don't care about >> detecting any additional errors, since the test is already known to have >> failed, and U-Boot will be restarted. To ensure that the test cleanup code >> is not interrupted, and can correctly terminate the log sections for the >> failed test, ignore any exception that occurs while reading the U-Boot >> console output during this limited period of time. > > > This probably shouldn't be in this series since I sent it separately as a > standalone patch a while ago. Sorry about that. I picked it up and assumed it would fall out when I rebased to master, but I suppose your patch is not yet applied. Regards, Simon Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 18/45] cros: Update cros_ec code to use struct udevice
At present we pass around a private pointer to specify the cros_ec device. With driver model it makes more sense to pass the device. Update the code to do this. Signed-off-by: Simon Glass --- cmd/cros_ec.c | 24 +++--- drivers/misc/cros_ec.c | 147 + drivers/misc/cros_ec_sandbox.c | 4 +- drivers/tpm/tpm-uclass.c | 6 +- include/cros_ec.h | 66 +++ 5 files changed, 122 insertions(+), 125 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 07/11] m68k: add initial dts files for all m68k boards
This patch adds basic dts files for all the m68k boards. Signed-off-by: Angelo Dureghello --- Changes for v2: - new patch --- arch/m68k/dts/M5208EVBE.dts | 22 +++ arch/m68k/dts/M52277EVB.dts | 25 arch/m68k/dts/M52277EVB_stmicro.dts | 22 +++ arch/m68k/dts/M5235EVB.dts| 22 +++ arch/m68k/dts/M5235EVB_Flash32.dts| 22 +++ arch/m68k/dts/M5249EVB.dts| 22 +++ arch/m68k/dts/M5253DEMO.dts | 22 +++ arch/m68k/dts/M5272C3.dts | 22 +++ arch/m68k/dts/M5275EVB.dts| 22 +++ arch/m68k/dts/M5282EVB.dts| 22 +++ arch/m68k/dts/M53017EVB.dts | 22 +++ arch/m68k/dts/M5329AFEE.dts | 22 +++ arch/m68k/dts/M5329BFEE.dts | 22 +++ arch/m68k/dts/M5373EVB.dts| 22 +++ arch/m68k/dts/M54418TWR.dts | 25 arch/m68k/dts/M54418TWR_nand_mii.dts | 25 arch/m68k/dts/M54418TWR_nand_rmii.dts | 25 arch/m68k/dts/M54418TWR_nand_rmii_lowfreq.dts | 25 arch/m68k/dts/M54418TWR_serial_mii.dts| 25 arch/m68k/dts/M54418TWR_serial_rmii.dts | 25 arch/m68k/dts/M54451EVB.dts | 25 arch/m68k/dts/M54451EVB_stmicro.dts | 25 arch/m68k/dts/M54455EVB.dts | 25 arch/m68k/dts/M54455EVB_a66.dts | 25 arch/m68k/dts/M54455EVB_i66.dts | 25 arch/m68k/dts/M54455EVB_intel.dts | 26 + arch/m68k/dts/M54455EVB_stm33.dts | 25 arch/m68k/dts/M5475AFE.dts| 13 + arch/m68k/dts/M5475BFE.dts| 13 + arch/m68k/dts/M5475CFE.dts| 13 + arch/m68k/dts/M5475DFE.dts| 13 + arch/m68k/dts/M5475EFE.dts| 13 + arch/m68k/dts/M5475FFE.dts| 13 + arch/m68k/dts/M5475GFE.dts| 13 + arch/m68k/dts/M5485AFE.dts| 17 ++ arch/m68k/dts/M5485BFE.dts| 17 ++ arch/m68k/dts/M5485CFE.dts| 17 ++ arch/m68k/dts/M5485DFE.dts| 17 ++ arch/m68k/dts/M5485EFE.dts| 17 ++ arch/m68k/dts/M5485FFE.dts| 17 ++ arch/m68k/dts/M5485GFE.dts| 17 ++ arch/m68k/dts/M5485HFE.dts| 17 ++ arch/m68k/dts/Makefile| 58 +++ arch/m68k/dts/amcore.dts | 22 +++ arch/m68k/dts/astro_mcf5373l.dts | 22 +++ arch/m68k/dts/cobra5272.dts | 22 +++ arch/m68k/dts/eb_cpu5282.dts | 22 +++ arch/m68k/dts/eb_cpu5282_internal.dts | 22 +++ arch/m68k/dts/stmark2.dts | 34 +++ 49 files changed, 1066 insertions(+) create mode 100644 arch/m68k/dts/M5208EVBE.dts create mode 100644 arch/m68k/dts/M52277EVB.dts create mode 100644 arch/m68k/dts/M52277EVB_stmicro.dts create mode 100644 arch/m68k/dts/M5235EVB.dts create mode 100644 arch/m68k/dts/M5235EVB_Flash32.dts create mode 100644 arch/m68k/dts/M5249EVB.dts create mode 100644 arch/m68k/dts/M5253DEMO.dts create mode 100644 arch/m68k/dts/M5272C3.dts create mode 100644 arch/m68k/dts/M5275EVB.dts create mode 100644 arch/m68k/dts/M5282EVB.dts create mode 100644 arch/m68k/dts/M53017EVB.dts create mode 100644 arch/m68k/dts/M5329AFEE.dts create mode 100644 arch/m68k/dts/M5329BFEE.dts create mode 100644 arch/m68k/dts/M5373EVB.dts create mode 100644 arch/m68k/dts/M54418TWR.dts create mode 100644 arch/m68k/dts/M54418TWR_nand_mii.dts create mode 100644 arch/m68k/dts/M54418TWR_nand_rmii.dts create mode 100644 arch/m68k/dts/M54418TWR_nand_rmii_lowfreq.dts create mode 100644 arch/m68k/dts/M54418TWR_serial_mii.dts create mode 100644 arch/m68k/dts/M54418TWR_serial_rmii.dts create mode 100644 arch/m68k/dts/M54451EVB.dts create mode 100644 arch/m68k/dts/M54451EVB_stmicro.dts create mode 100644 arch/m68k/dts/M54455EVB.dts create mode 100644 arch/m68k/dts/M54455EVB_a66.dts create mode 100644 arch/m68k/dts/M54455EVB_i66.dts create mode 100644 arch/m68k/dts/M54455EVB_intel.dts create mode 100644 arch/m68k/dts/M54455EVB_stm33.dts create mode 100644 arch/m68k/dts/M5475AFE.dts create mode 100644 arch/m68k/dts/M5475BFE.dts create mode 100644 arch/m68k/dts/M5475CFE.dts create mode 100644 arch/m68k/dts/M5475DFE.dts create mode 100644 arch/m68k/dts/M5475EFE.dts create mode 100644 arch/m68k/dts/M5475FFE.dts create mode 100644 arch/m68k/dts/M5475GFE.dts create mode 100644 arch/m68k/dts/M5485AFE.dts create mode 100644 arch/m68k/dts/M5485BFE.dts create mode 100644 arch/m68k/dts/M5485CFE.dts create mode 100644
Re: [U-Boot] [PATCH 11/45] rtc: Allow use of RTC in SPL and TPL
Add Kconfig options so that the RTC can be used in SPL and TPL. This is helpful for accessing the contents of CMOS RAM, for example. Signed-off-by: Simon Glass --- drivers/rtc/Kconfig | 18 ++ drivers/rtc/Makefile | 2 +- drivers/rtc/rtc-uclass.c | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 12/45] fdt: Document the fact that dtc is now built
This documentation is out of date now that U-Boot builds dtc automatically. Update it. Signed-off-by: Simon Glass --- doc/README.fdt-control | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 08/17] test: Print the name of each test before running it
At present the tests are run without any indication of what is running. For the tests which start with a build this is pretty obvious, but for tools it is not. Add a name for each test we run, and print it before starting the test. Signed-off-by: Simon Glass --- Changes in v2: - Quote @$ correctly so that quoted arguments can be passed to run_test test/run | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 05/45] sf: Avoid allocating memory on every read operation
At present spi_flash_cmd_read_ops() allocates and frees a few bytes of memory every time it is called. It is faster to use the stack for this and this is now supported by the minimum GCC version required by U-Boot. Remove the allocation and use a variable-sized array instead. Signed-off-by: Simon Glass --- drivers/mtd/spi/spi_flash.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/17] buildman: Make the toolchain test more forgiving
The filenames of the toolchains on kernel.org changes every now and then. Fix it for the current change, and make the test use a regex so that it has a better chance of passing with future changes too. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/test.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 20/45] dm: spi: Add logging of some return values
When SPI flash operations fail it is helpful to be able to see the error codes and where they are generated. Add logging to capture this information for read operations. Signed-off-by: Simon Glass --- drivers/mtd/spi/sf-uclass.c | 6 +++--- drivers/mtd/spi/sf_probe.c | 2 +- drivers/mtd/spi/spi_flash.c | 8 drivers/spi/spi-uclass.c| 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 09/17] test: Tidy up comments and variable name
The 'result' variable counts the number of failures in running the tests. Rename it to 'failures' to make this more obvious. Also tidy up a few comments. Signed-off-by: Simon Glass --- Changes in v2: None test/run | 12 1 file changed, 8 insertions(+), 4 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 02/17] sandbox: Unprotect DATA regions in bus tests
On my Ubuntu 18.04.1 machine two driver-model bus tests have started failing recently. The problem appears to be that the DATA region of the executable is protected. This does not seem correct, but perhaps there is a reason. To work around it, unprotect the regions in these tests before accessing them. Signed-off-by: Simon Glass --- Changes in v2: None arch/sandbox/cpu/os.c | 11 +++ include/os.h | 12 test/dm/bus.c | 12 3 files changed, 35 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 33/45] x86: Update mtrr functions to allow leaving cache alone
On Tue, Oct 2, 2018 at 2:24 AM Simon Glass wrote: > > At present the mtrr functions disable the cache before making changes and > enable it again afterwards. This is fine in U-Boot, but does not work if > running in CAR (such as we are in SPL). > > Update the functions so that the caller can request that caches be left > alone. > > Signed-off-by: Simon Glass > --- > > arch/x86/cpu/mtrr.c | 31 +++ > arch/x86/include/asm/mtrr.h | 6 -- > cmd/x86/mtrr.c | 8 > 3 files changed, 31 insertions(+), 14 deletions(-) > Reviewed-by: Bin Meng Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 43/45] video: at91: Adjust vidconsole_position_cursor() to use char pos
On 09.10.2018 06:40, Simon Glass wrote: > Hi Eugen, > > On 2 October 2018 at 01:37, Eugen Hristev wrote: >> >> >> >> On 01.10.2018 23:22, Anatolij Gustschin wrote: >>> >>> Hi Simon, >>> >>> On Mon, 1 Oct 2018 12:22:47 -0600 >>> Simon Glass s...@chromium.org wrote: >>> At present this function uses pixels but it seems more useful for it to position in terms of characters on the screen. This also matches the comment to the function. Update this. Unfortunately there is one user of this function (at91). Have a crack at fixing this, since I cannot test it. >> >> >> Hello Simon, >> >> I will gladly test this for you on at91 board, >> but I am having some issues applying your patch series: >> >> Applying: binman: Move to three-digit test-file numbers >> error: patch failed: tools/binman/entry_test.py:25 >> error: tools/binman/entry_test.py: patch does not apply >> error: patch failed: tools/binman/ftest.py:712 >> error: tools/binman/ftest.py: patch does not apply >> Patch failed at 0026 binman: Move to three-digit test-file numbers >> >> Do you have them in some public tree I can pull from ? > > Yes you can try u-boot-dm/testing > >> >> Also, any specific tests you would like except just checking the video >> console ? > > It looks like this code runs when the board boots up, so just starting > it should be enough. I made a build on your branch and tested it on at91 sama5d2_xplained board, and the logo and text appears on the display. Tested-by: Eugen Hristev Let me know if you want me to do more tests. Eugen > > Thanks, > Simon > > >> >> Eugen >> >> Signed-off-by: Simon Glass >>> >>> >>> Reviewed-by: Anatolij Gustschin >>> --- board/atmel/common/video_display.c | 5 - drivers/video/vidconsole-uclass.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] bootefi selftest on qemu-x86_64
Hi Heinrich, On Wed, Oct 10, 2018 at 12:48 AM Heinrich Schuchardt wrote: > > On 10/09/2018 11:27 AM, Bin Meng wrote: > > Hi Heinrich, > > > > Did you ever get 'bootefi selftest' pass on qemu-x86_64? I got: > > > > => bootefi selftest > > WARNING: booting without device tree > > lib/efi_selftest/efi_selftest.c(242): > > ERROR: Cannot open loaded image protocol > > > > Regards, > > Bin > > > Hello Bin, > > when running qemu-x86_64_defconfig with > > qemu-system-x86_64 -bios denx/u-boot.rom -machine pc-i440fx-2.5 --nographic > > it hangs in an endless loop: > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > U-Boot SPL 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > CPU: x86_64, vendor AMD, device 663h > Trying to boot from SPI > Jumping to 64-bit U-Boot: Note many features are missing > > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > U-Boot SPL 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > CPU: x86_64, vendor AMD, device 663h > Trying to boot from SPI > Jumping to 64-bit U-Boot: Note many features are missing > > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > > > How did you succeed to reach the console? > It is a bug and I noticed this when testing GCC 8.1.0. Patches will be sent soon. > There is a doc/README.x86 but nothing on x86_64. Could you, please, add > the missing information in said README.x86. > Will do. > I could not find qemu-x86_64_defconfig in .travis.yml. Shouldn't we try > to run the target there too? > I tried this but it fails with EFI selftesting. > I am using Debian Buster: > gcc 8.2.0 > qemu 2.12.0 > Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 03/17] patman: Handle unicode in _ProjectConfigParser tests
With Python 2.7.15rc1, ConfigParser.SafeConfigParser has unfortunately started returning unicode, for unknown reasons. Adjust the code to handle this by converting everything to unicode. We cannot convert things to ASCII since email addresses may be encoded with UTF-8. Signed-off-by: Simon Glass --- Changes in v2: None tools/patman/settings.py | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 35/45] cros_ec: Add support for v3 messages on LPC
At present version 3 messages are only supported on SPI. Add support for using LPC as well, as used on samus. Signed-off-by: Simon Glass --- drivers/misc/cros_ec_lpc.c | 33 + 1 file changed, 33 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 10/45] Kconfig: Convert CONFIG_RTC_MC146818 to Kconfig
Move this option to Kconfig and tidy up the two boards which use it. Signed-off-by: Simon Glass --- configs/edison_defconfig | 1 + configs/malta_defconfig | 1 + drivers/rtc/Kconfig | 8 include/configs/edison.h | 1 - include/configs/malta.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 10 insertions(+), 3 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 10/17] binman: Add a default path to libfdt.py
This module is often available in the sandbox_spl build created by 'make check'. Use this as a default path so that just typing 'binman -t' (without setting PYTHONPATH) will generally run the tests. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/binman.py | 2 ++ tools/dtoc/dtoc.py | 5 + 2 files changed, 7 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 24/45] tpm: Tidy up logging in tpm-common.c
At present this file uses logging but it should use the new macros. Update it and add a log message for an error. Signed-off-by: Simon Glass --- lib/tpm-common.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 26/45] binman: Move to three-digit test-file numbers
We now have 99 tests. Before adding any more, rename everything to three digits. This helps to preserve the ordering of tests and makes it easier to find things. Signed-off-by: Simon Glass --- tools/binman/entry_test.py| 2 +- tools/binman/fdt_test.py | 4 +- tools/binman/ftest.py | 224 +- .../test/{01_invalid.dts => 001_invalid.dts} | 0 ..._missing_node.dts => 002_missing_node.dts} | 0 .../test/{03_empty.dts => 003_empty.dts} | 0 ...nvalid_entry.dts => 004_invalid_entry.dts} | 0 .../test/{05_simple.dts => 005_simple.dts}| 0 .../{06_dual_image.dts => 006_dual_image.dts} | 0 .../{07_bad_align.dts => 007_bad_align.dts} | 0 .../binman/test/{08_pack.dts => 008_pack.dts} | 0 .../{09_pack_extra.dts => 009_pack_extra.dts} | 0 ...n_power2.dts => 010_pack_align_power2.dts} | 0 ...er2.dts => 011_pack_align_size_power2.dts} | 0 ...k_inv_align.dts => 012_pack_inv_align.dts} | 0 ..._align.dts => 013_pack_inv_size_align.dts} | 0 ..._pack_overlap.dts => 014_pack_overlap.dts} | 0 ...ack_overflow.dts => 015_pack_overflow.dts} | 0 ...erflow.dts => 016_pack_image_overflow.dts} | 0 ...image_size.dts => 017_pack_image_size.dts} | 0 ...age_align.dts => 018_pack_image_align.dts} | 0 ...align.dts => 019_pack_inv_image_align.dts} | 0 ...ts => 020_pack_inv_image_align_power2.dts} | 0 .../{21_image_pad.dts => 021_image_pad.dts} | 0 .../{22_image_name.dts => 022_image_name.dts} | 0 .../binman/test/{23_blob.dts => 023_blob.dts} | 0 .../test/{24_sorted.dts => 024_sorted.dts}| 0 ...k_zero_size.dts => 025_pack_zero_size.dts} | 0 ...u_boot_dtb.dts => 026_pack_u_boot_dtb.dts} | 0 ...b_no_size.dts => 027_pack_4gb_no_size.dts} | 0 ...b_outside.dts => 028_pack_4gb_outside.dts} | 0 .../test/{29_x86-rom.dts => 029_x86-rom.dts} | 0 ...no-desc.dts => 030_x86-rom-me-no-desc.dts} | 0 .../{31_x86-rom-me.dts => 031_x86-rom-me.dts} | 0 .../{32_intel-vga.dts => 032_intel-vga.dts} | 0 ...33_x86-start16.dts => 033_x86-start16.dts} | 0 .../{34_x86_ucode.dts => 034_x86_ucode.dts} | 0 ...gle_ucode.dts => 035_x86_single_ucode.dts} | 0 .../{36_u_boot_img.dts => 036_u_boot_img.dts} | 0 ..._x86_no_ucode.dts => 037_x86_no_ucode.dts} | 0 ...ode.dts => 038_x86_ucode_missing_node.dts} | 0 ...e2.dts => 039_x86_ucode_missing_node2.dts} | 0 ...age.dts => 040_x86_ucode_not_in_image.dts} | 0 ..._pos_size.dts => 041_unknown_pos_size.dts} | 0 .../{42_intel-fsp.dts => 042_intel-fsp.dts} | 0 .../{43_intel-cmc.dts => 043_intel-cmc.dts} | 0 ...l_ucode.dts => 044_x86_optional_ucode.dts} | 0 .../{45_prop_test.dts => 045_prop_test.dts} | 0 .../{46_intel-vbt.dts => 046_intel-vbt.dts} | 0 ...47_spl_bss_pad.dts => 047_spl_bss_pad.dts} | 0 ...tart16-spl.dts => 048_x86-start16-spl.dts} | 0 ...86_ucode_spl.dts => 049_x86_ucode_spl.dts} | 0 .../{50_intel_mrc.dts => 050_intel_mrc.dts} | 0 ...oot_spl_dtb.dts => 051_u_boot_spl_dtb.dts} | 0 ...spl_nodtb.dts => 052_u_boot_spl_nodtb.dts} | 0 .../test/{53_symbols.dts => 053_symbols.dts} | 0 ..._unit_address.dts => 054_unit_address.dts} | 0 .../{55_sections.dts => 055_sections.dts} | 0 ...56_name_prefix.dts => 056_name_prefix.dts} | 0 ..._contents.dts => 057_unknown_contents.dts} | 0 dts => 058_x86_ucode_spl_needs_retry.dts} | 0 ...59_change_size.dts => 059_change_size.dts} | 0 .../{60_fdt_update.dts => 060_fdt_update.dts} | 0 ..._update_bad.dts => 061_fdt_update_bad.dts} | 0 .../{62_entry_args.dts => 062_entry_args.dts} | 0 ...missing.dts => 063_entry_args_missing.dts} | 0 ...quired.dts => 064_entry_args_required.dts} | 0 ...ts => 065_entry_args_unknown_datatype.dts} | 0 .../binman/test/{66_text.dts => 066_text.dts} | 0 .../binman/test/{67_fmap.dts => 067_fmap.dts} | 0 ...d_by_arg.dts => 068_blob_named_by_arg.dts} | 0 .../binman/test/{69_fill.dts => 069_fill.dts} | 0 ..._fill_no_size.dts => 070_fill_no_size.dts} | 0 tools/binman/test/{71_gbb.dts => 071_gbb.dts} | 0 ...bb_too_small.dts => 072_gbb_too_small.dts} | 0 ...73_gbb_no_size.dts => 073_gbb_no_size.dts} | 0 .../test/{74_vblock.dts => 074_vblock.dts}| 0 ..._content.dts => 075_vblock_no_content.dts} | 0 ...phandle.dts => 076_vblock_bad_phandle.dts} | 0 ...bad_entry.dts => 077_vblock_bad_entry.dts} | 0 .../{78_u_boot_tpl.dts => 078_u_boot_tpl.dts} | 0 .../{79_uses_pos.dts => 079_uses_pos.dts} | 0 .../{80_fill_empty.dts => 080_fill_empty.dts} | 0 ...tart16-tpl.dts => 081_x86-start16-tpl.dts} | 0 ..._update_all.dts => 082_fdt_update_all.dts} | 0 .../{83_compress.dts => 083_compress.dts} | 0 .../test/{84_files.dts => 084_files.dts} | 0 ...es_compress.dts => 085_files_compress.dts} | 0 .../{86_files_none.dts => 086_files_none.dts} | 0 ...o_pattern.dts => 087_files_no_pattern.dts} | 0
Re: [U-Boot] [PATCH 14/45] fdt: Allow indicating a node is for U-Boot proper only
At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Simon Glass --- doc/driver-model/README.txt | 4 +++- drivers/core/ofnode.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-dm
Hi Tom, Here is my attempt at a signed pull request. I've brought in most of the outstanding dm patches. Please let me know if it looks OK. Do you have my public key? The following changes since commit 0a60a81ba3860946551cb79aa6486aa076e357f3: Kconfig: sandbox: enable cmd_avb and dependencies (2018-10-07 13:34:19 -0400) are available in the Git repository at: git://git.denx.de/u-boot-dm.git tags/dm-9oct18 for you to fetch changes up to 41b781ddf1869f5349e05ace888979f3673fe8c6: dtoc: Fix the value of SetInt() (2018-10-09 04:40:27 -0600) Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements Marek Vasut (2): ofnode: Replace of_n_addr_cells with of_n_size_cells ofnode: Add missing address translation into ofnode_get_addr_size() Simon Glass (74): sandbox: Unprotect DATA regions in bus tests patman: Handle unicode in _ProjectConfigParser tests test/py: Fix unicode handling for log filtering buildman: Make the toolchain test more forgiving Makefile: Add a 'check' target for make test: Simplify the PATH setup test: Print the name of each test before running it test: Tidy up comments and variable name binman: Add a default path to libfdt.py binman: Fix up removal of temporary directories binman: Separate out testSplBssPad() buildman: dtoc: Suppress unwanted output from test tools: Set an initial value for indir patman: Don't clear progress in tout unless it was used test: Reduce the number of tests run with sandbox_flattree binman: Run tests concurrently log: Correct definition of log_msg_ret() log: Add helpers for common log levels sandbox: Support file truncation with os_open() sandbox: Add a way to write data to the host filesystem sandbox: spi: Drop command-line SPI option sandbox: Support booting from TPL to SPL sandbox: Add a flag to set the default log level sandbox: Remove the old memory file later sandbox: spi: Add more logging sandbox: video: Speed up video output sandbox: Add a debug UART serial: sandbox: Allow serial output without device tree sandbox: tpm: Tidy up enums and return values sandbox: tpm: Enhance to support the latest Chromium OS dm: spi: Clean up detection of sandbox SPI emulator sandbox: Restore blocking I/O on exit dm: core: Alloc uclass-private data to be cache-aligned dm: core: Update some functions to use const dm: core: Add a function to find the first inactive child dm: core: Update ofnode to read binman-style flash entry sf: Avoid allocating memory on every read operation spl: input: Allow input in SPL and TPL Makefile: Add a warning if SPL/TPL cannot be built blk: Support block drivers in TPL Kconfig: Convert CONFIG_RTC_MC146818 to Kconfig rtc: Allow use of RTC in SPL and TPL fdt: Document the fact that dtc is now built doc: Update docs for device tree in SPL, TPL fdt: Allow indicating a node is for U-Boot proper only tpm: Add support for SPL and TPL serial: Allow serial to be absent in TPL fdt: Allow libfdt in TPL cros: Update cros_ec code to use struct udevice cros: Adjust board_get_cros_ec_dev() to return a udevice dm: spi: Add logging of some return values fdt: Remove fdtdec_decode_region() function video: Adjust video_clear() to return an error tpm: Use livetree and allow children tpm: Tidy up logging in tpm-common.c tpm: Add a few new commands for v1 binman: Move to three-digit test-file numbers log: Add comments to the rest of the log categories Add a header file for strings Rename GPT_HEADER_SIGNATURE to avoid conflict cros: Update ec_commands to latest version x86: Update mtrr functions to allow leaving cache alone cros_ec: Update cros_ec_read_hash() to specify the image cros_ec: Add support for v3 messages on LPC test: panel: Add a test for the panel uclass panel: Expand the backlight support ctags: Minor changes to fix ctags output fdt: Allow C++ comments in link scripts and DT files pci: Add a little more debugging to pci_rom sysreset: Tidy up a few comments and logging sysreset: Add a way to find the last reset video: at91: Adjust vidconsole_position_cursor() to use char pos video: Tidy up a few comments in video.o dtoc: Fix the value of SetInt() .travis.yml |1 + Makefile |8 +- arch/sandbox/cpu/os.c | 85 +- arch/sandbox/cpu/start.c | 19 +- arch/sandbox/cpu/state.c |6 +- arch/sandbox/dts/sandbox.dts | 20 +- arch/sandbox/dts/sandbox64.dts | 20 +- arch/sandbox/dts/sandbox_pmic.dtsi |
Re: [U-Boot] bootefi selftest on qemu-x86_64
Hi Heinrich, On Wed, Oct 10, 2018 at 7:56 AM Bin Meng wrote: > > Hi Heinrich, > > On Wed, Oct 10, 2018 at 12:48 AM Heinrich Schuchardt > wrote: > > > > On 10/09/2018 11:27 AM, Bin Meng wrote: > > > Hi Heinrich, > > > > > > Did you ever get 'bootefi selftest' pass on qemu-x86_64? I got: > > > > > > => bootefi selftest > > > WARNING: booting without device tree > > > lib/efi_selftest/efi_selftest.c(242): > > > ERROR: Cannot open loaded image protocol > > > > > > Regards, > > > Bin > > > > > Hello Bin, > > > > when running qemu-x86_64_defconfig with > > > > qemu-system-x86_64 -bios denx/u-boot.rom -machine pc-i440fx-2.5 --nographic > > > > it hangs in an endless loop: > > > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > > > U-Boot SPL 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > CPU: x86_64, vendor AMD, device 663h > > Trying to boot from SPI > > Jumping to 64-bit U-Boot: Note many features are missing > > > > > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > > > U-Boot SPL 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > CPU: x86_64, vendor AMD, device 663h > > Trying to boot from SPI > > Jumping to 64-bit U-Boot: Note many features are missing > > > > > > U-Boot 2018.11-rc1-00130-g0a60a81ba3 (Oct 09 2018 - 18:23:16 +0200) > > > > QEMU Virtual CPU version 2.5+DRAM: 128 MiB > > > > > > > > How did you succeed to reach the console? > > Forgot to mention, that I searched the ML and did see you and Ivan Gorinov discussed running 'bootefi selftest' on qemu-x86_64 [1] before and there was patch submitted to support "x86 64-bit setjmp/longjmp" needed by EFI. So I assume you guys had figured it out. But my testing shows that the bug (endless reset loop) is still there, and it is related to compiler being used. But I thought you might get a compiler that happened to work for you hence I asked the 'bootefi selftest' status. Anyway I have figured out the root cause, and please try that. > > It is a bug and I noticed this when testing GCC 8.1.0. Patches will be > sent soon. > > > There is a doc/README.x86 but nothing on x86_64. Could you, please, add > > the missing information in said README.x86. > > > > Will do. > > > I could not find qemu-x86_64_defconfig in .travis.yml. Shouldn't we try > > to run the target there too? > > > > I tried this but it fails with EFI selftesting. > > > I am using Debian Buster: > > gcc 8.2.0 > > qemu 2.12.0 > > [1] https://lists.denx.de/pipermail/u-boot/2018-June/331836.html Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 15/45] tpm: Add support for SPL and TPL
At present the tpm can only be used in U-Boot proper. Updated it to work in SPL and TPL also. Signed-off-by: Simon Glass --- drivers/tpm/Makefile | 2 +- lib/Kconfig | 22 ++ lib/Makefile | 10 +++--- 3 files changed, 30 insertions(+), 4 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 12/17] binman: Separate out testSplBssPad()
At present this test runs binman twice, which means that the temporary files from the first run do not get cleaned up. Split this into two tests to fix this problem. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/ftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 39/45] fdt: Allow C++ comments in link scripts and DT files
At present // in a device-tree file or link script causes a warning. But this is used in the standard license header. Update the compiler flags to use C99, which permits this. Signed-off-by: Simon Glass --- Makefile | 2 +- scripts/Makefile.spl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 22/45] video: Adjust video_clear() to return an error
On Mon, 1 Oct 2018 12:22:26 -0600 Simon Glass s...@chromium.org wrote: > All driver-model operation should return an error code. Adjust this > function to do so also. > > Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin -- Anatolij Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 17/17] binman: Run tests concurrently
At present the tests run one after the other using a single CPU. This is not very efficient. Bring in the concurrencytest module and run the tests concurrently, using one process for each CPU by default. A -P option allows this to be overridden, which is necessary for code-coverage to function correctly. This requires fixing a few tests which are currently not fully independent. At some point we might consider doing this across all pytests in U-Boot. There is a pytest version that supports specifying the number of processes to use, but it did not work for me. Signed-off-by: Simon Glass --- Changes in v2: - Add a patch to run binman tests concurrently .travis.yml | 1 + test/py/README.md| 1 + tools/binman/binman.py | 26 +++- tools/binman/cmdline.py | 2 + tools/binman/entry_test.py | 7 +- tools/binman/ftest.py| 34 +++--- tools/concurrencytest/.gitignore | 1 + tools/concurrencytest/README.md | 74 tools/concurrencytest/concurrencytest.py | 144 +++ tools/dtoc/dtoc.py | 2 + tools/dtoc/test_fdt.py | 2 + tools/patman/test_util.py| 2 +- 12 files changed, 274 insertions(+), 22 deletions(-) create mode 100644 tools/concurrencytest/.gitignore create mode 100644 tools/concurrencytest/README.md create mode 100644 tools/concurrencytest/concurrencytest.py Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 19/45] cros: Adjust board_get_cros_ec_dev() to return a udevice
Rather than returning what is effectively an internal data structure, return the cros EC device itself. Signed-off-by: Simon Glass --- common/cros_ec.c | 4 ++-- include/cros_ec.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 13/45] doc: Update docs for device tree in SPL, TPL
Make a few small updates to indicate that device tree can be used in SPL and TPL. Signed-off-by: Simon Glass --- doc/README.fdt-control | 10 ++ doc/driver-model/README.txt | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 17/45] fdt: Allow libfdt in TPL
In some cases (e.g. sandbox with verified boot) it is useful to support libfdt in TPL. Update the Kconfig to handle this. Signed-off-by: Simon Glass --- lib/Kconfig | 10 ++ 1 file changed, 10 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 29/45] malloc_simple: Add logging of allocations
It is sometimes useful to see what memory is being allocated early during boot. Add logging to support this, using a new LOGC_ALLOC category. Signed-off-by: Simon Glass --- common/malloc_simple.c | 58 +++--- include/malloc.h | 1 + 2 files changed, 38 insertions(+), 21 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 03/45] dm: core: Add a function to find the first inactive child
Some devices have children and want to press an existing inactive child into service when needed. Add a function to help with this. Signed-off-by: Simon Glass --- drivers/core/device.c | 18 ++ include/dm/device.h | 15 +++ test/dm/core.c| 31 +++ 3 files changed, 64 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 37/45] panel: Expand the backlight support
At present the panel can be turned on but not off, and the brightness cannot be controlled at run-time. Add a new API function to both the panel and backlight uclasses to handle this. Enhance the PWM backlight driver to deal with custom levels properly and allow the backlight to be turned on and off. Update the test to cover thes new features. Signed-off-by: Simon Glass --- drivers/video/backlight-uclass.c | 10 ++ drivers/video/panel-uclass.c | 18 +++ drivers/video/pwm_backlight.c| 186 +-- drivers/video/simple_panel.c | 20 +++- include/backlight.h | 25 + include/panel.h | 22 +++- test/dm/panel.c | 29 + 7 files changed, 273 insertions(+), 37 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 27/45] binman: Add a test for Intel reference code
Unfortunately the test was not included in the original implementation. Add one. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 7 +++ tools/binman/test/100_intel_refcode.dts | 14 ++ 2 files changed, 21 insertions(+) create mode 100644 tools/binman/test/100_intel_refcode.dts Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 16/45] serial: Allow serial to be absent in TPL
At present this option applies to SPL, but it should be available in TPL also, and separately. Change to using CONFIG_IS_ENABLED(), add a new Kconfig option and fix up hang(). Signed-off-by: Simon Glass --- drivers/serial/Kconfig | 10 ++ drivers/serial/serial-uclass.c | 4 lib/hang.c | 5 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 30/45] Add a header file for strings
Add a string.h header for libraries that expect this to be available, now that U-Boot's version has moved to include/linux. Signed-off-by: Simon Glass --- include/string.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 include/string.h Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 40/45] pci: Add a little more debugging to pci_rom
On Tue, Oct 2, 2018 at 2:48 AM Simon Glass wrote: > > Add some logging on failure. > > Signed-off-by: Simon Glass > --- > > drivers/pci/pci_rom.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 25/45] tpm: Add a few new commands for v1
These are needed for the 2018 version of Chromium OS vboot. Add an implementation for TPM v1, with v2 to come later. Signed-off-by: Simon Glass --- cmd/tpm_test.c | 15 --- include/tpm-v1.h | 28 lib/tpm-v1.c | 68 +--- 3 files changed, 93 insertions(+), 18 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 09/45] blk: Support block drivers in TPL
At present it is not possible to enable/disable block drivers in TPL. This is needed to provide sandbox support. Add a Kconfig option and adjust the Makefile. Signed-off-by: Simon Glass --- drivers/block/Kconfig | 12 drivers/block/Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 38/45] ctags: Minor changes to fix ctags output
At present ctags emits lines with unmatched quotes which means that the output file is invalid. This is with exuberant-ctags version 5.9~svn201103 but I also see it with plain ctags. I am not sure that it is a bug though. Make a few minor changes in the source code to fix this problem. Signed-off-by: Simon Glass --- drivers/video/tegra124/sor.c | 3 ++- include/linux/compiler-gcc.h | 6 -- 2 files changed, 6 insertions(+), 3 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/17] test: Simplify the PATH setup
Use 'export' to avoid repeating the path setup for each command. Signed-off-by: Simon Glass --- Changes in v2: None test/run | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 45/45] dtoc: Fix the value of SetInt()
This does not set the correct value at present. Fix it. Signed-off-by: Simon Glass --- tools/dtoc/fdt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/17] binman: Fix up removal of temporary directories
At present 'make check' leaves some temporary directories around. Part of this is because we call tools.PrepareOutputDir() twice in some cases, without calling tools.FinaliseOutputDir() in between. Fix this. Signed-off-by: Simon Glass --- Changes in v2: None tools/binman/elf_test.py | 5 + tools/binman/entry_test.py | 8 ++-- tools/binman/fdt_test.py | 4 tools/binman/ftest.py | 8 +++- tools/dtoc/test_fdt.py | 10 +++--- 5 files changed, 25 insertions(+), 10 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 02/45] dm: core: Update some functions to use const
Quite a few functions do not actually modify the device that is passed in. Update the function signatures to reflect that. Signed-off-by: Simon Glass --- drivers/core/device.c | 24 include/dm/device.h | 24 2 files changed, 24 insertions(+), 24 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 02/15] sandbox: Support file truncation with os_open()
At present files are not truncated on writing. This is a useful feature. Add support for this. Signed-off-by: Simon Glass --- arch/sandbox/cpu/os.c | 2 ++ include/os.h | 1 + 2 files changed, 3 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/17] test/py: Fix unicode handling for log filtering
On 2.10.2018 05:12, Simon Glass wrote: > At present the unicode filtering seems to get confused at times with > this error: > > UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position > 32: ordinal not in range(128) > > It seems to be due to self._nonprint being interpreted as UTF-8. Fix it > by using ordinals instead of characters, changing the string to set. > > Signed-off-by: Simon Glass > Reviewed-by: Stephen Warren > --- > > Changes in v2: None > > test/py/multiplexed_log.py | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 41/45] sysreset: Tidy up a few comments and logging
Some comments are incorrect or missing pieces. Fix these and use logging to print the error. Signed-off-by: Simon Glass --- drivers/sysreset/sysreset-uclass.c | 4 +++- include/sysreset.h | 4 +++- test/dm/sysreset.c | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 11/15] serial: sandbox: Allow serial output without device tree
At present sandbox assumes that device-tree control is active, but this may not be the case in SPL or TPL. Add some conditions to handle this. Signed-off-by: Simon Glass --- drivers/serial/sandbox.c | 5 + 1 file changed, 5 insertions(+) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 28/45] log: Add comments to the rest of the log categories
At present some of the log categories are missing comments. Add them. Signed-off-by: Simon Glass --- include/log.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Applied to u-boot-dm ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot