Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
Hi Stefan, On Wed, Aug 05, 2015 at 07:19:02AM +0200, Stefan Roese wrote: > (added Stefano as imx custodian) Thanks. > > On 04.08.2015 19:28, Clemens Gruber wrote: > > This allows baseboards without SPI to compile. > > > > Signed-off-by: Clemens Gruber > > Cc: Markus Niebel > > Cc: Tom Rini > > --- > > board/tqc/tqma6/tqma6.c | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > > index 29db838..5c4d104 100644 > > --- a/board/tqc/tqma6/tqma6.c > > +++ b/board/tqc/tqma6/tqma6.c > > @@ -131,6 +131,8 @@ int board_mmc_init(bd_t *bis) > > return 0; > > } > > > > +#if defined(CONFIG_MXC_SPI) > > + > > static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = { > > /* SS1 */ > > NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL), > > @@ -161,6 +163,8 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs) > > (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1; > > } > > > > +#endif /* defined(CONFIG_MXC_SPI) */ > > + > > static struct i2c_pads_info tqma6_i2c3_pads = { > > /* I2C3: on board LM75, M24C64, */ > > .scl = { > > @@ -201,7 +205,9 @@ int board_init(void) > > /* address of boot parameters */ > > gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; > > > > +#if defined(CONFIG_MXC_SPI) > > tqma6_iomuxc_spi(); > > +#endif > > tqma6_setup_i2c(); > > Hmmm. This should not be necessary. Please take a look at the wru4 > baseboard addition that is already in mainline. Especially this > patch: I noticed your patch but then we would still have to define CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS in our board config or include the tqma6.h config, which defines too many things we do not need. The problem is, we have different clocks and more c files, so we use a separate board directory and a separate board config without SPI defines and just use obj-y += ../../tqc/tqma6/tqma6.o in front of our object files in the Makefile. If we don't exclude those SPI parts, we would either have to define those SPI config options (which does not make sense) or move all of our board code in one file under tqc/tqma6 which is not an option, we also define additional clocks via a separate IMX_CONFIG file. Wouldn't it be better to always exclude this code when not using SPI instead of weakly defining the tqma6_iomuxc_spi function? Then small baseboards could be put in tqc/tqma6 and larger projects could still just link to tqma6.o and put all their stuff in a separate board directory. > > commit 34ee786e5b388625e5a0e0891ee69d4bbf34178b > Author: Stefan Roese > Date: Thu Mar 12 13:34:30 2015 +0100 > > arm: mx6: tqma6: Update to optionally configure an alternative SPI setup > > By making the tqma6_iomuxc_spi() weak, this patch adds the possibility to > add a different function for this SPI configuration. This can be used > by other baseboards, that might have a different SPI setup. > > This patch will be used by the upcoming WRU-IV board support which also > uses the TQMa6 SoM. > > Signed-off-by: Stefan Roese > > > This is enough in your baseboard file now: > > void tqma6_iomuxc_spi(void) > { > /* No SPI on this baseboard */ > } > > Thanks, > Stefan > Regards, Clemens ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 2/4] ARM: cache: add an empty stub function for invalidate/flush dcache
Hi, York On 8/4/2015 11:30 PM, York Sun wrote: On 07/26/2015 08:40 PM, Josh Wu wrote: Since some driver like ohci, lcd used dcache functions. But some ARM cpu don't implement the invalidate_dcache_range()/flush_dcache_range() functions. To avoid compiling errors this patch adds an weak empty stub function for all ARM cpu in arch/arm/lib/cache.c. And ARM cpu still can implemnt its own cache functions on the cpu folder. Signed-off-by: Josh Wu --- Changes in v3: - remove the same functions in the cpu/ files as they will use the weak function provided in lib/cache.c Changes in v2: - new added. arch/arm/cpu/arm1136/cpu.c | 8 arch/arm/cpu/arm926ejs/cache.c | 8 arch/arm/cpu/armv7/cache_v7.c | 8 arch/arm/cpu/armv8/cache_v8.c | 8 arch/arm/lib/cache.c | 9 + 5 files changed, 9 insertions(+), 32 deletions(-) diff --git a/arch/arm/cpu/arm1136/cpu.c b/arch/arm/cpu/arm1136/cpu.c index a7aed4b..b4d1d54 100644 --- a/arch/arm/cpu/arm1136/cpu.c +++ b/arch/arm/cpu/arm1136/cpu.c @@ -134,14 +134,6 @@ void flush_dcache_all(void) { } -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} - void flush_cache(unsigned long start, unsigned long size) { } diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c index 8d7873c..99d1a13 100644 --- a/arch/arm/cpu/arm926ejs/cache.c +++ b/arch/arm/cpu/arm926ejs/cache.c @@ -83,14 +83,6 @@ void flush_dcache_all(void) { } -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} - void flush_cache(unsigned long start, unsigned long size) { } diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index e8ee875..4f0e406 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -304,14 +304,6 @@ void flush_dcache_all(void) { } -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} - void arm_init_before_mmu(void) { } diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index c5ec529..f8c17cc 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -149,14 +149,6 @@ void flush_dcache_all(void) { } -void invalidate_dcache_range(unsigned long start, unsigned long stop) -{ -} - -void flush_dcache_range(unsigned long start, unsigned long stop) -{ -} - void dcache_enable(void) { } diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 74cfde6..bc48f53 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -53,6 +53,15 @@ __weak void enable_caches(void) puts("WARNING: Caches not enabled\n"); } +__weak void invalidate_dcache_range(unsigned long start, unsigned long stop) +{ + /* An empty stub, real implementation should be in platform code */ +} +__weak void flush_dcache_range(unsigned long start, unsigned long stop) +{ + /* An empty stub, real implementation should be in platform code */ +} + #ifdef CONFIG_SYS_NONCACHED_MEMORY /* * Reserve one MMU section worth of address space below the malloc() area that Reviewed-by: York Sun Thank you. Best Regards, Josh Wu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 09/28] x86: Add EFI board code
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > From: Ben Stoltz > > Add support for the efi-x86 board, which supports running U-Boot as an > EFI 32-bit application. > > Signed-off-by: Ben Stoltz > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None > Changes in v2: > - Drop unnecessary SYS_CAR_ADDR/SIZE Kconfig options > - Fix text alignment in Kconfig files > > arch/x86/Kconfig | 1 + > board/efi/Kconfig | 19 +++ > board/efi/efi-x86/Kconfig | 15 +++ > board/efi/efi-x86/MAINTAINERS | 6 ++ > board/efi/efi-x86/Makefile| 7 +++ > board/efi/efi-x86/efi.c | 18 ++ > 6 files changed, 66 insertions(+) > create mode 100644 board/efi/Kconfig > create mode 100644 board/efi/efi-x86/Kconfig > create mode 100644 board/efi/efi-x86/MAINTAINERS > create mode 100644 board/efi/efi-x86/Makefile > create mode 100644 board/efi/efi-x86/efi.c > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 7e6e89c..f124d58 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -27,6 +27,7 @@ endchoice > > # board-specific options below > source "board/coreboot/Kconfig" > +source "board/efi/Kconfig" > source "board/emulation/Kconfig" > source "board/google/Kconfig" > source "board/intel/Kconfig" > diff --git a/board/efi/Kconfig b/board/efi/Kconfig > new file mode 100644 > index 000..6f86a48 > --- /dev/null > +++ b/board/efi/Kconfig > @@ -0,0 +1,19 @@ > +if VENDOR_EFI > + > +choice > + prompt "Mainboard model" > + optional > + > +config TARGET_EFI > + bool "efi" > + help > + This target is used for running U-Boot on top of EFI. In > + this case EFI does the early initialisation, and U-Boot > + takes over once the RAM, video and CPU are fully running. > + U-Boot is loaded as an application from EFI. > + > +endchoice > + > +source "board/efi/efi-x86/Kconfig" > + > +endif > diff --git a/board/efi/efi-x86/Kconfig b/board/efi/efi-x86/Kconfig > new file mode 100644 > index 000..fa609ba > --- /dev/null > +++ b/board/efi/efi-x86/Kconfig > @@ -0,0 +1,15 @@ > +if TARGET_EFI > + > +config SYS_BOARD > + default "efi-x86" > + > +config SYS_VENDOR > + default "efi" > + > +config SYS_SOC > + default "efi" > + > +config SYS_CONFIG_NAME > + default "efi-x86" > + > +endif > diff --git a/board/efi/efi-x86/MAINTAINERS b/board/efi/efi-x86/MAINTAINERS > new file mode 100644 > index 000..a44c7c6 > --- /dev/null > +++ b/board/efi/efi-x86/MAINTAINERS > @@ -0,0 +1,6 @@ > +EFI-X86 BOARD > +M: Simon Glass > +S: Maintained > +F: board/efi/efi-x86/ > +F: include/configs/efi-x86.h > +F: configs/efi-x86_defconfig > diff --git a/board/efi/efi-x86/Makefile b/board/efi/efi-x86/Makefile > new file mode 100644 > index 000..9b1e0bd > --- /dev/null > +++ b/board/efi/efi-x86/Makefile > @@ -0,0 +1,7 @@ > +# > +# Copyright (c) 2015 Google, Inc > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-y += efi.o > diff --git a/board/efi/efi-x86/efi.c b/board/efi/efi-x86/efi.c > new file mode 100644 > index 000..08958f9 > --- /dev/null > +++ b/board/efi/efi-x86/efi.c > @@ -0,0 +1,18 @@ > +/* > + * Copyright (C) 2015 Google, Inc > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +#include > +#include > + > +int arch_early_init_r(void) > +{ > + return 0; > +} > + > +void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio) > +{ > + return; > +} > -- Tested on Intel Crown Bay and QEMU Tested-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 10/28] x86: dts: Add a device tree file for EFI
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > This contains just enough to bring up the serial UART. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None > Changes in v2: > - Remove extraneous '+' in comment > - Use "efi,app" instead of "efi,payload" for the compatible string > > arch/x86/dts/Makefile | 1 + > arch/x86/dts/efi.dts | 22 ++ > 2 files changed, 23 insertions(+) > create mode 100644 arch/x86/dts/efi.dts > > diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile > index 44e2829..71595c7 100644 > --- a/arch/x86/dts/Makefile > +++ b/arch/x86/dts/Makefile > @@ -2,6 +2,7 @@ dtb-y += bayleybay.dtb \ > chromebook_link.dtb \ > chromebox_panther.dtb \ > crownbay.dtb \ > + efi.dtb \ > galileo.dtb \ > minnowmax.dtb \ > qemu-x86_i440fx.dtb \ > diff --git a/arch/x86/dts/efi.dts b/arch/x86/dts/efi.dts > new file mode 100644 > index 000..1f50428 > --- /dev/null > +++ b/arch/x86/dts/efi.dts > @@ -0,0 +1,22 @@ > +/* > + * Copyright (c) 2015 Google, Inc > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +/dts-v1/; > + > +/include/ "skeleton.dtsi" > + > +/ { > + model = "EFI"; > + compatible = "efi,app"; > + > + chosen { > + stdout-path = &serial; > + }; > + > + serial: serial { > + compatible = "efi,uart"; > + }; > +}; > -- Tested on Intel Crown Bay and QEMU Tested-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] udoo: Switch to SPL support
Currently we need to build one U-boot image for each of the udoo variants: quad and dual-lite. By switching to SPL we can support all two variants with a single binary. Based on the SPL for wandboard. Tested with OpenELEC (Open Embedded Linux Entertainment Center) on both boards. Signed-off-by: Peter Vicman Cc: Fabio Estevam Cc: Stefano Babic Acked-by: Stefano Babic Acked-by: Fabio Estevam --- Changes in v2: - Correct mail address - Remove loading u-boot.img from a FAT partition arch/arm/Kconfig | 1 + board/udoo/1066mhz_4x256mx16.cfg | 55 board/udoo/MAINTAINERS | 2 +- board/udoo/Makefile | 2 +- board/udoo/clocks.cfg| 32 - board/udoo/ddr-setup.cfg | 87 - board/udoo/udoo.c| 95 -- board/udoo/udoo.cfg | 29 - board/udoo/udoo_spl.c| 271 +++ configs/udoo_defconfig | 6 + configs/udoo_quad_defconfig | 5 - include/configs/udoo.h | 19 ++- 12 files changed, 351 insertions(+), 253 deletions(-) delete mode 100644 board/udoo/1066mhz_4x256mx16.cfg delete mode 100644 board/udoo/clocks.cfg delete mode 100644 board/udoo/ddr-setup.cfg delete mode 100644 board/udoo/udoo.cfg create mode 100644 board/udoo/udoo_spl.c create mode 100644 configs/udoo_defconfig delete mode 100644 configs/udoo_quad_defconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9127ace..a485b01 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -511,6 +511,7 @@ config TARGET_VISION2 config TARGET_UDOO bool "Support udoo" select CPU_V7 + select SUPPORT_SPL config TARGET_WANDBOARD bool "Support wandboard" diff --git a/board/udoo/1066mhz_4x256mx16.cfg b/board/udoo/1066mhz_4x256mx16.cfg deleted file mode 100644 index 1ac0aec..000 --- a/board/udoo/1066mhz_4x256mx16.cfg +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013 Boundary Devices - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -DATA 4, MX6_MMDC_P0_MDPDC, 0x00020036 -DATA 4, MX6_MMDC_P0_MDOTC, 0x09444040 - -DATA 4, MX6_MMDC_P0_MDCFG0, 0x54597955 -DATA 4, MX6_MMDC_P0_MDCFG1, 0xFF328F64 -DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB - -DATA 4, MX6_MMDC_P0_MDMISC, 0x1740 -DATA 4, MX6_MMDC_P0_MDSCR, 0x8000 -DATA 4, MX6_MMDC_P0_MDRWD, 0x26D2 - -DATA 4, MX6_MMDC_P0_MDOR, 0x00591023 -DATA 4, MX6_MMDC_P0_MDASP, 0x0027 -DATA 4, MX6_MMDC_P0_MDCTL, 0x831A - -DATA 4, MX6_MMDC_P0_MDSCR, 0x04088032 -DATA 4, MX6_MMDC_P0_MDSCR, 0x8033 - -DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031 -DATA 4, MX6_MMDC_P0_MDSCR, 0x09408030 -DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040 -DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xA1380003 -DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xA1380003 -DATA 4, MX6_MMDC_P0_MDREF, 0x5800 -DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x0007 -DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x0007 - -DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x43510360 -DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x0342033F -DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x033F033F -DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x03290266 - -DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x4B3E4141 -DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x47413B4A -DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x42404843 -DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x4C3F4C45 - -DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x00350035 -DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F -DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x00010001 -DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x00010001 - -DATA 4, MX6_MMDC_P0_MPMUR0, 0x0800 -DATA 4, MX6_MMDC_P1_MPMUR0, 0x0800 - -DATA 4, MX6_MMDC_P0_MDPDC, 0x00025576 -DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006 -DATA 4, MX6_MMDC_P0_MDSCR, 0x - diff --git a/board/udoo/MAINTAINERS b/board/udoo/MAINTAINERS index ee8b61e..789e98f 100644 --- a/board/udoo/MAINTAINERS +++ b/board/udoo/MAINTAINERS @@ -3,4 +3,4 @@ M: Fabio Estevam S: Maintained F: board/udoo/ F: include/configs/udoo.h -F: configs/udoo_quad_defconfig +F: configs/udoo_defconfig diff --git a/board/udoo/Makefile b/board/udoo/Makefile index 80efada..1d6d9f8 100644 --- a/board/udoo/Makefile +++ b/board/udoo/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := udoo.o +obj-y := udoo.o udoo_spl.o diff --git a/board/udoo/clocks.cfg b/board/udoo/clocks.cfg deleted file mode 100644 index 9cd1af1..000 --- a/board/udoo/clocks.cfg +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2013 Boundary Devices - * - * SPDX-License-Identifier:GPL-2.0+ - * - * Device Configuration Data (DCD) - * - * Each entry must have the format: - * Addr-type AddressValue - * - * where: - * Addr-type register length (1,2 or 4 bytes) - * Address absolute address of the register - * value value to be stored in the register - */ - -/* set the default clock gate to save power */ -DATA 4, CCM_CCGR0, 0x00C03F3F -DATA 4, CCM_CCGR1, 0x0030FC03 -DATA 4, CCM_CCGR2, 0x0FFFC000 -DATA 4, CCM_CCGR3, 0x3FF0 -DATA
Re: [U-Boot] [PATCH v3 01/28] Add a way to skip relocation
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > When running U-Boot as an EFI application we cannot relocate since we do not > have relocation information. U-Boot has already been relocated to a suitable > address. > > Add a global_data flag to control skipping relocation. > > Signed-off-by: Simon Glass > --- > > Changes in v3: None > Changes in v2: None > > common/board_f.c | 7 +++ > include/asm-generic/global_data.h | 1 + > 2 files changed, 8 insertions(+) > > diff --git a/common/board_f.c b/common/board_f.c > index 6d922b8..c596083 100644 > --- a/common/board_f.c > +++ b/common/board_f.c > @@ -664,6 +664,11 @@ static int reloc_fdt(void) > > static int setup_reloc(void) > { > + if (gd->flags & GD_FLG_SKIP_RELOC) { > + debug("Skipping relocation due to flag\n"); > + return 0; > + } > + > #ifdef CONFIG_SYS_TEXT_BASE > gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; > #ifdef CONFIG_M68K > @@ -689,6 +694,8 @@ static int setup_reloc(void) > > static int jump_to_copy(void) > { > + if (gd->flags & GD_FLG_SKIP_RELOC) > + return 0; > /* > * x86 is special, but in a nice way. It uses a trampoline which > * enables the dcache if possible. > diff --git a/include/asm-generic/global_data.h > b/include/asm-generic/global_data.h > index 9f5db0f..2155265 100644 > --- a/include/asm-generic/global_data.h > +++ b/include/asm-generic/global_data.h > @@ -117,5 +117,6 @@ typedef struct global_data { > #define GD_FLG_SERIAL_READY0x00100 /* Pre-reloc serial console ready */ > #define GD_FLG_FULL_MALLOC_INIT0x00200 /* Full malloc() is ready > */ > #define GD_FLG_SPL_INIT0x00400 /* spl_init() has been called > */ > +#define GD_FLG_SKIP_RELOC 0x00800 /* Don't relocate */ > > #endif /* __ASM_GENERIC_GBL_DATA_H */ > -- Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 05/28] efi: Support building a u-boot-app.efi executable
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > Add support for building U-Boot as an EFI application with a .efi suffix. > This can be loaded by EFI provided that EFI has the same bit width (32- > or 64-bit) as U-Boot. This unfortunate limitation is imposed by EFI. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Move the rename to u-boot-app.efi into this patch > - Update the patch subject > > Changes in v2: > - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP > > Makefile | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/Makefile b/Makefile > index 1b03357..620c18f 100644 > --- a/Makefile > +++ b/Makefile > @@ -754,6 +754,7 @@ ifneq ($(CONFIG_SPL_TARGET),) > ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) > endif > ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf > +ALL-$(CONFIG_EFI_APP) += u-boot-app.efi > > ifneq ($(BUILD_ROM),) > ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom > @@ -1082,6 +1083,10 @@ u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin > dts/dt.dtb FORCE > endif > endif > > +OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI) > +u-boot-app.efi: u-boot FORCE > + $(call if_changed,zobjcopy) > + > u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE > $(call if_changed,cat) > > -- Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 04/28] x86: Set up toolchain flags for running as EFI application
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > From: Ben Stoltz > > Adjust the toolchain flags to build U-Boot as a relocatable shared library, > as required by EFI. > > Signed-off-by: Ben Stoltz > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Add spaces around EFIARCH= > - Drop LDFLAGS_EFI from this patch > - Move '-m elf_i386' into the common PLATFORM_LDFLAGS > > Changes in v2: > - Add a comment as to where LDFLAGS_EFI is used > - Drop duplicate OBJCOPYFLAGS_EFI > - Drop no-red-zone as it is not needed for i386 > - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP > - Use toolchain instead of tool chain > > arch/x86/config.mk | 30 +++--- > 1 file changed, 27 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/config.mk b/arch/x86/config.mk > index 999143e..e27f84a 100644 > --- a/arch/x86/config.mk > +++ b/arch/x86/config.mk > @@ -8,19 +8,43 @@ > CONFIG_STANDALONE_LOAD_ADDR ?= 0x4 > > PLATFORM_CPPFLAGS += -fno-strict-aliasing > -PLATFORM_CPPFLAGS += -mregparm=3 > PLATFORM_CPPFLAGS += -fomit-frame-pointer > PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \ >$(call cc-option, -fno-unit-at-a-time)) \ > $(call cc-option, -mpreferred-stack-boundary=2) > + > PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) > PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm > PLATFORM_CPPFLAGS += -march=i386 -m32 > > PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden > > -PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386 > +PLATFORM_LDFLAGS += -Bsymbolic -Bsymbolic-functions -m elf_i386 > > -LDFLAGS_FINAL += --gc-sections -pie > LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 > LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 > + > +OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ > + -j .rel -j .rela -j .reloc > + > +CFLAGS_NON_EFI := -mregparm=3 > +CFLAGS_EFI := -fpic -fshort-wchar > + > +EFIARCH = ia32 > + > +LDSCRIPT_EFI := $(srctree)/$(CPUDIR)/efi/elf_$(EFIARCH)_efi.lds > +OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH) > + > +ifeq ($(CONFIG_EFI_APP),y) > + > +PLATFORM_CPPFLAGS += $(CFLAGS_EFI) > +LDFLAGS_FINAL += -znocombreloc -shared > +LDSCRIPT := $(LDSCRIPT_EFI) > + > +else > + > +PLATFORM_CPPFLAGS += $(CFLAGS_NON_EFI) > +PLATFORM_LDFLAGS += --emit-relocs > +LDFLAGS_FINAL += --gc-sections -pie > + > +endif > -- Reviewed-by: Bin Meng Tested-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 08/28] x86: Add support for U-Boot as an EFI application
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > From: Ben Stoltz > > Add the required x86 glue code. This includes the initial start-up, > relocation and jumping to efi_main(). We also need to avoid fiddling with > interrupts. > > Signed-off-by: Ben Stoltz > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Move u-boot-app.efi Makefile change to the earlier patch > - Use "BSD-2-Clause" for the SPDX license > > Changes in v2: > - Add ALIGN() before .dynamic in the linker script > - Add a blank line before return in the _relocate() function > - Add a comment as to why .hash has to be first in the linker script > - Add a comment as to why interrupt_init() must be skipped for EFI > - Drop unused DECLARE_GLOBAL_DATA_INIT > - Drop unused board_eth_init() > - Drop use of CONFIG_X86_64 since we don't support a 64-bit EFI application > yet > - Fix spacing around operators > - Move 64-bit crt0 to a later patch > - Move crt0 and reloc files into arch/x86/lib/efi/ > - Remove KEEP in the EFI linker script since garbage collection is not enabled > - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP > - Rename ImageBase to image_base > - Use SPDX for the EFI start and relocation code > - Use u-boot-app.efi instead of u-boot.efi > > arch/x86/Kconfig | 3 ++ > arch/x86/Makefile| 2 + > arch/x86/cpu/Makefile| 1 + > arch/x86/cpu/efi/Makefile| 8 +++ > arch/x86/cpu/efi/efi.c | 42 > arch/x86/cpu/efi/elf_ia32_efi.lds| 94 > > arch/x86/cpu/efi/sdram.c | 29 +++ > arch/x86/cpu/interrupts.c| 6 +++ > arch/x86/include/asm/arch-efi/gpio.h | 10 > arch/x86/lib/efi/crt0-efi-ia32.S | 52 > arch/x86/lib/efi/reloc_ia32.c| 72 +++ > 11 files changed, 319 insertions(+) > create mode 100644 arch/x86/cpu/efi/Makefile > create mode 100644 arch/x86/cpu/efi/efi.c > create mode 100644 arch/x86/cpu/efi/elf_ia32_efi.lds > create mode 100644 arch/x86/cpu/efi/sdram.c > create mode 100644 arch/x86/include/asm/arch-efi/gpio.h > create mode 100644 arch/x86/lib/efi/crt0-efi-ia32.S > create mode 100644 arch/x86/lib/efi/reloc_ia32.c > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index e8968a7..7e6e89c 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -11,6 +11,9 @@ choice > config VENDOR_COREBOOT > bool "coreboot" > > +config VENDOR_EFI > + bool "efi" > + > config VENDOR_EMULATION > bool "emulation" > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > index 36a6018..d104a49 100644 > --- a/arch/x86/Makefile > +++ b/arch/x86/Makefile > @@ -2,7 +2,9 @@ > # SPDX-License-Identifier: GPL-2.0+ > # > > +ifeq ($(CONFIG_EFI_APP),) > head-y := arch/x86/cpu/start.o > +endif > ifeq ($(CONFIG_SPL_BUILD),y) > head-y += arch/x86/cpu/start16.o > head-y += arch/x86/cpu/resetvec.o > diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile > index 8a8e63e..5e058c0 100644 > --- a/arch/x86/cpu/Makefile > +++ b/arch/x86/cpu/Makefile > @@ -14,6 +14,7 @@ obj-y += interrupts.o cpu.o cpu_x86.o call64.o > > obj-$(CONFIG_INTEL_BAYTRAIL) += baytrail/ > obj-$(CONFIG_SYS_COREBOOT) += coreboot/ > +obj-$(CONFIG_EFI_APP) += efi/ > obj-$(CONFIG_QEMU) += qemu/ > obj-$(CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE) += ivybridge/ > obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/ > diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile > new file mode 100644 > index 000..e091637 > --- /dev/null > +++ b/arch/x86/cpu/efi/Makefile > @@ -0,0 +1,8 @@ > +# > +# Copyright (c) 2015 Google, Inc > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-y += efi.o > +obj-y += sdram.o > diff --git a/arch/x86/cpu/efi/efi.c b/arch/x86/cpu/efi/efi.c > new file mode 100644 > index 000..75ba0d4 > --- /dev/null > +++ b/arch/x86/cpu/efi/efi.c > @@ -0,0 +1,42 @@ > +/* > + * Copyright (c) 2015 Google, Inc > + * > + * SPDX-License-Identifier:GPL-2.0+ > + */ > + > +#include > +#include > +#include > + > +int arch_cpu_init(void) > +{ > +#ifdef CONFIG_SYS_X86_TSC_TIMER > + timer_set_base(rdtsc()); > +#endif > + > + return 0; > +} > + > +int board_early_init_f(void) > +{ > + return 0; > +} > + > +int print_cpuinfo(void) > +{ > + return default_print_cpuinfo(); > +} > + > +void board_final_cleanup(void) > +{ > +} > + > +int misc_init_r(void) > +{ > + return 0; > +} > + > +int arch_misc_init(void) > +{ > + return 0; > +} > diff --git a/arch/x86/cpu/efi/elf_ia32_efi.lds > b/arch/x86/cpu/efi/elf_ia32_efi.lds > new file mode 100644 > index 000..cd3b0a9 > --- /dev/null > +++ b/arch/x86/cpu/efi/elf_ia32_efi.lds > @@ -0,0 +1,94 @@ > +/* > + * U-Boot EFI linker script > + * > + * SPDX-License-Identifier:BSD-2-Clause > + * > + * Modified from usr/lib32/elf_ia32_efi.lds in gnu-efi > + */ > + > +#include > + > +OUTPUT_FORMAT("elf32-i386",
Re: [U-Boot] [PATCH v3 06/28] x86: Support skipping relocation for EFI
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > When running as an EFI application we must skip relocation. Add support for > this in the x86 relocation code. > > Signed-off-by: Simon Glass > --- > > Changes in v3: None > Changes in v2: > - Return early in copy_uboot_to_ram() and clear_bbs() when relocation disabled > > arch/x86/lib/relocate.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c > index 1a62142..9e748d2 100644 > --- a/arch/x86/lib/relocate.c > +++ b/arch/x86/lib/relocate.c > @@ -28,6 +28,8 @@ int copy_uboot_to_ram(void) > { > size_t len = (size_t)&__data_end - (size_t)&__text_start; > > + if (gd->flags & GD_FLG_SKIP_RELOC) > + return 0; > memcpy((void *)gd->relocaddr, (void *)&__text_start, len); > > return 0; > @@ -38,6 +40,8 @@ int clear_bss(void) > ulong dst_addr = (ulong)&__bss_start + gd->reloc_off; > size_t len = (size_t)&__bss_end - (size_t)&__bss_start; > > + if (gd->flags & GD_FLG_SKIP_RELOC) > + return 0; > memset((void *)dst_addr, 0x00, len); > > return 0; > @@ -58,6 +62,8 @@ int do_elf_reloc_fixups(void) > /* The size of the region of u-boot that runs out of RAM. */ > uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start; > > + if (gd->flags & GD_FLG_SKIP_RELOC) > + return 0; > if (re_src == re_end) > panic("No relocation data"); > > -- Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] sunxi: display: Replace #ifdef-ery with helper functions
On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: > All the #ifdef-ery in selecting the default and fallback monitor type > is > becoming unyielding and makes the code hard to read, replace it with > a few > helper functions. > > This will also be useful with the upcoming CHIP board which has > display > adapter daughterboards which should be runtime detectable. > > Signed-off-by: Hans de Goede I couldn't quite convince myself there was "no semantic change" here, but either way it's an improvement so: Acked-by: Ian Campbell ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] sunxi: display: Correct clk_delay calculations for lcd displays
On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: > We should only substract 2 from the vblank time when using tcon1. "subtract" > Signed-off-by: Hans de Goede Acked-by: Ian Campbell ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] sunxi: display: Add a few extra register and constant defines
On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: > Add a few extra sunxi display registers and constant defines. + "Also rename some existing defines (e.g. dropping _GCTRL) and make some more generic (e.g. dropping the 2x scaling from SUNXI_LCDC_TCON1_TIMING_V_TOTAL)." > This is a preparation patch for adding composite video out support. > > Signed-off-by: Hans de Goede Acked-by: Ian Campbell > --- > arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 2 +- > arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 1 + > arch/arm/include/asm/arch-sunxi/display.h | 45 > --- > drivers/video/sunxi_display.c | 8 ++--- > 4 files changed, 46 insertions(+), 10 deletions(-) > > diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h > b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h > index 01d3e28..a7e25f4 100644 > --- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h > +++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h > @@ -291,7 +291,7 @@ struct sunxi_ccm_reg { > #define CCM_LCD_CH0_CTRL_GATE(0x1 << 31) > > #define CCM_LCD_CH1_CTRL_M(n)n) - 1) & 0xf) << 0) > -/* We leave bit 11 set to 0, so sclk1 == sclk2 */ > +#define CCM_LCD_CH1_CTRL_HALF_SCLK1 (1 << 11) > #define CCM_LCD_CH1_CTRL_PLL3(0 << 24) > #define CCM_LCD_CH1_CTRL_PLL7(1 << 24) > #define CCM_LCD_CH1_CTRL_PLL3_2X (2 << 24) > diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > index 8a26b9f..06c6feb 100644 > --- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > +++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h > @@ -290,6 +290,7 @@ struct sunxi_ccm_reg { > #define CCM_LCD_CH0_CTRL_GATE(0x1 << 31) > > #define CCM_LCD_CH1_CTRL_M(n)n) - 1) & 0xf) << 0) > +#define CCM_LCD_CH1_CTRL_HALF_SCLK1 0 /* no seperate sclk1 & 2 > on sun6i */ > #define CCM_LCD_CH1_CTRL_PLL3(0 << 24) > #define CCM_LCD_CH1_CTRL_PLL7(1 << 24) > #define CCM_LCD_CH1_CTRL_PLL3_2X (2 << 24) > diff --git a/arch/arm/include/asm/arch-sunxi/display.h > b/arch/arm/include/asm/arch-sunxi/display.h > index ae95417..830ec42 100644 > --- a/arch/arm/include/asm/arch-sunxi/display.h > +++ b/arch/arm/include/asm/arch-sunxi/display.h > @@ -151,6 +151,10 @@ struct sunxi_de_be_reg { > u32 layer1_attr1_ctrl; /* 0x8a4 */ > u32 layer2_attr1_ctrl; /* 0x8a8 */ > u32 layer3_attr1_ctrl; /* 0x8ac */ > + u8 res5[0x110]; /* 0x8b0 */ > + u32 output_color_ctrl; /* 0x9c0 */ > + u8 res6[0xc]; /* 0x9c4 */ > + u32 output_color_coef[12]; /* 0x9d0 */ > }; > > struct sunxi_lcdc_reg { > @@ -298,7 +302,7 @@ struct sunxi_tve_reg { > u32 cbr_level; /* 0x10c */ > u32 burst_phase;/* 0x110 */ > u32 burst_width;/* 0x114 */ > - u8 res2[0x04]; /* 0x118 */ > + u32 unknown2; /* 0x118 */ > u32 sync_vbi_level; /* 0x11c */ > u32 white_level;/* 0x120 */ > u32 active_num; /* 0x124 */ > @@ -331,11 +335,14 @@ struct sunxi_tve_reg { > #define SUNXI_DE_BE_HEIGHT(y)(((y) - 1) << 16) > #define SUNXI_DE_BE_MODE_ENABLE (1 << 0) > #define SUNXI_DE_BE_MODE_START (1 << 1) > +#define SUNXI_DE_BE_MODE_DEFLICKER_ENABLE(1 << 4) > #define SUNXI_DE_BE_MODE_LAYER0_ENABLE (1 << 8) > +#define SUNXI_DE_BE_MODE_INTERLACE_ENABLE(1 << 28) > #define SUNXI_DE_BE_LAYER_STRIDE(x) ((x) << 5) > #define SUNXI_DE_BE_REG_CTRL_LOAD_REGS (1 << 0) > #define SUNXI_DE_BE_LAYER_ATTR0_SRC_FE0 0x0002 > #define SUNXI_DE_BE_LAYER_ATTR1_FMT_XRGB (0x09 << 8) > +#define SUNXI_DE_BE_OUTPUT_COLOR_CTRL_ENABLE 1 > > /* > * LCDC register constants. > @@ -372,11 +379,12 @@ struct sunxi_tve_reg { > #define SUNXI_LCDC_TCON0_LVDS_INTF_ENABLE(1 << 31) > #define SUNXI_LCDC_TCON0_IO_POL_DCLK_PHASE(x)((x) << 28) > #define SUNXI_LCDC_TCON1_CTRL_CLK_DELAY(n) (((n) & 0x1f) << 4) > +#define SUNXI_LCDC_TCON1_CTRL_INTERLACE(n) ((n) << 20) > #define SUNXI_LCDC_TCON1_CTRL_ENABLE (1 << 31) > #define SUNXI_LCDC_TCON1_TIMING_H_BP(n) (((n) - 1) > << 0) > #define SUNXI_LCDC_TCON1_TIMING_H_TOTAL(n) (((n) - 1) << 16) > #define SUNXI_LCDC_TCON1_TIMING_V_BP(n) (((n) - 1) > << 0) > -#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) (((n) * 2) << 16) > +#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) ((n) << 16) > #ifdef CONFIG_SUNXI_GEN_SUN6I > #define SUNXI_LCDC_LVDS_ANA0 0x40040320 > #define SUNXI_LCDC_LVDS_ANA0_EN_MB (1 << 31) > @@ -494,9 +502,22 @@ struct sunxi_tve_reg { > */ > #define SUNXI_TVE_GCTRL_DAC_INPUT_MASK(dac) (0xf << ((
Re: [U-Boot] [PATCH] udoo: Switch to SPL support
Hi Peter, On 05/08/2015 09:40, Peter Vicman wrote: > Currently we need to build one U-boot image for each of the udoo > variants: quad and dual-lite. > > By switching to SPL we can support all two variants with a single binary. > > Based on the SPL for wandboard. > > Tested with OpenELEC (Open Embedded Linux Entertainment Center) > on both boards. > > Signed-off-by: Peter Vicman > Cc: Fabio Estevam > Cc: Stefano Babic > Acked-by: Stefano Babic > Acked-by: Fabio Estevam > --- > > Changes in v2: > - Correct mail address I have already applied the patch, fixing the mail addresses. > - Remove loading u-boot.img from a FAT partition Please send a follow-up patch based on current u-boot-imx. Best regards, Stefano Babic > > arch/arm/Kconfig | 1 + > board/udoo/1066mhz_4x256mx16.cfg | 55 > board/udoo/MAINTAINERS | 2 +- > board/udoo/Makefile | 2 +- > board/udoo/clocks.cfg| 32 - > board/udoo/ddr-setup.cfg | 87 - > board/udoo/udoo.c| 95 -- > board/udoo/udoo.cfg | 29 - > board/udoo/udoo_spl.c| 271 > +++ > configs/udoo_defconfig | 6 + > configs/udoo_quad_defconfig | 5 - > include/configs/udoo.h | 19 ++- > 12 files changed, 351 insertions(+), 253 deletions(-) > delete mode 100644 board/udoo/1066mhz_4x256mx16.cfg > delete mode 100644 board/udoo/clocks.cfg > delete mode 100644 board/udoo/ddr-setup.cfg > delete mode 100644 board/udoo/udoo.cfg > create mode 100644 board/udoo/udoo_spl.c > create mode 100644 configs/udoo_defconfig > delete mode 100644 configs/udoo_quad_defconfig > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 9127ace..a485b01 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -511,6 +511,7 @@ config TARGET_VISION2 > config TARGET_UDOO > bool "Support udoo" > select CPU_V7 > + select SUPPORT_SPL > > config TARGET_WANDBOARD > bool "Support wandboard" > diff --git a/board/udoo/1066mhz_4x256mx16.cfg > b/board/udoo/1066mhz_4x256mx16.cfg > deleted file mode 100644 > index 1ac0aec..000 > --- a/board/udoo/1066mhz_4x256mx16.cfg > +++ /dev/null > @@ -1,55 +0,0 @@ > -/* > - * Copyright (C) 2013 Boundary Devices > - * > - * SPDX-License-Identifier: GPL-2.0+ > - */ > - > -DATA 4, MX6_MMDC_P0_MDPDC, 0x00020036 > -DATA 4, MX6_MMDC_P0_MDOTC, 0x09444040 > - > -DATA 4, MX6_MMDC_P0_MDCFG0, 0x54597955 > -DATA 4, MX6_MMDC_P0_MDCFG1, 0xFF328F64 > -DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB > - > -DATA 4, MX6_MMDC_P0_MDMISC, 0x1740 > -DATA 4, MX6_MMDC_P0_MDSCR, 0x8000 > -DATA 4, MX6_MMDC_P0_MDRWD, 0x26D2 > - > -DATA 4, MX6_MMDC_P0_MDOR, 0x00591023 > -DATA 4, MX6_MMDC_P0_MDASP, 0x0027 > -DATA 4, MX6_MMDC_P0_MDCTL, 0x831A > - > -DATA 4, MX6_MMDC_P0_MDSCR, 0x04088032 > -DATA 4, MX6_MMDC_P0_MDSCR, 0x8033 > - > -DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031 > -DATA 4, MX6_MMDC_P0_MDSCR, 0x09408030 > -DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040 > -DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xA1380003 > -DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xA1380003 > -DATA 4, MX6_MMDC_P0_MDREF, 0x5800 > -DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x0007 > -DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x0007 > - > -DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x43510360 > -DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x0342033F > -DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x033F033F > -DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x03290266 > - > -DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x4B3E4141 > -DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x47413B4A > -DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x42404843 > -DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x4C3F4C45 > - > -DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x00350035 > -DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F > -DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x00010001 > -DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x00010001 > - > -DATA 4, MX6_MMDC_P0_MPMUR0, 0x0800 > -DATA 4, MX6_MMDC_P1_MPMUR0, 0x0800 > - > -DATA 4, MX6_MMDC_P0_MDPDC, 0x00025576 > -DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006 > -DATA 4, MX6_MMDC_P0_MDSCR, 0x > - > diff --git a/board/udoo/MAINTAINERS b/board/udoo/MAINTAINERS > index ee8b61e..789e98f 100644 > --- a/board/udoo/MAINTAINERS > +++ b/board/udoo/MAINTAINERS > @@ -3,4 +3,4 @@ M:Fabio Estevam > S: Maintained > F: board/udoo/ > F: include/configs/udoo.h > -F: configs/udoo_quad_defconfig > +F: configs/udoo_defconfig > diff --git a/board/udoo/Makefile b/board/udoo/Makefile > index 80efada..1d6d9f8 100644 > --- a/board/udoo/Makefile > +++ b/board/udoo/Makefile > @@ -4,4 +4,4 @@ > # SPDX-License-Identifier: GPL-2.0+ > # > > -obj-y := udoo.o > +obj-y := udoo.o udoo_spl.o > diff --git a/board/udoo/clocks.cfg b/board/udoo/clocks.cfg > deleted file mode 100644 > index 9cd1af1..000 > --- a/board/udoo/clocks.cfg > +++ /dev/null > @@ -1,32 +0,0 @@ > -/* > - * Copyright (C) 2013 Boundary Devices > - * > - * SPDX-License-Identifier: GPL-2.0+ > - * > - * Device C
Re: [U-Boot] [PATCH v3 14/28] efi: Add support for loading U-Boot through an EFI stub
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > It is useful to be able to load U-Boot onto a board even if is it already > running EFI. This can allow access to the U-Boot command interface, flexible > booting options and easier development. > > The easiest way to do this is to build U-Boot as a binary blob and have an > EFI stub copy it into RAM. Add support for this feature, targeting 32-bit > initially. > > Also add a way to detect when U-Boot has been loaded via a stub. This goes > in common.h since it needs to be widely available so that we avoid redoing > initialisation that should be skipped. > > Signed-off-by: Simon Glass > Improvements to how the payload is built: > Signed-off-by: Bin Meng > --- > > Changes in v3: > - Fix calling convention to starting U-Boot in the 32-bit stub > - Rename LDFLAGS_EFI to LDFLAGS_EFI_PAYLOAD and move into this patch > - Use quiet_cmd_xxx to link the payload > > Changes in v2: > - Add a comment as to why we must call exit_boot_services() twice > - Drop \n\t at the end of a one-line asm statement > - Merge in Bin's implementation of adding a U-Boot payload with objcopy > - Remove comment about reset_cpu() returning to EFI in the stub > - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP > > Makefile | 24 + > arch/x86/config.mk | 7 ++ > include/common.h | 7 ++ > include/efi.h | 4 + > lib/efi/Kconfig| 21 > lib/efi/Makefile | 9 ++ > lib/efi/efi_stub.c | 304 > + > 7 files changed, 376 insertions(+) > create mode 100644 lib/efi/efi_stub.c > > diff --git a/Makefile b/Makefile > index 620c18f..752ee0d 100644 > --- a/Makefile > +++ b/Makefile > @@ -755,6 +755,7 @@ ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) > endif > ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf > ALL-$(CONFIG_EFI_APP) += u-boot-app.efi > +ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi > > ifneq ($(BUILD_ROM),) > ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom > @@ -790,6 +791,9 @@ cmd_objcopy = $(OBJCOPY) --gap-fill=0xff $(OBJCOPYFLAGS) \ > quiet_cmd_zobjcopy = OBJCOPY $@ > cmd_zobjcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ > > +quiet_cmd_efipayload = OBJCOPY $@ > +cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B > $(EFIPAYLOAD_BFDARCH) $< $@ > + > quiet_cmd_mkimage = MKIMAGE $@ > cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ > $(if $(KBUILD_VERBOSE:1=), >/dev/null) > @@ -1087,6 +1091,26 @@ OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI) > u-boot-app.efi: u-boot FORCE > $(call if_changed,zobjcopy) > > +u-boot-dtb.bin.o: u-boot-dtb.bin FORCE > + $(call if_changed,efipayload) > + > +u-boot-payload.lds: $(LDSCRIPT_EFI) FORCE > + $(call if_changed_dep,cpp_lds) > + > +# Rule to link the EFI payload which contains a stub and a U-Boot binary > +quiet_cmd_u-boot_payload ?= LD $@ > + cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \ > + -T u-boot-payload.lds \ > + lib/efi/efi.o lib/efi/efi_stub.o u-boot-dtb.bin.o \ > + $(addprefix arch/$(ARCH)/lib/efi/,$(EFISTUB)) > + > +u-boot-payload: u-boot-dtb.bin.o u-boot-payload.lds FORCE > + $(call if_changed,u-boot_payload) > + > +OBJCOPYFLAGS_u-boot-payload.efi := $(OBJCOPYFLAGS_EFI) > +u-boot-payload.efi: u-boot-payload FORCE > + $(call if_changed,zobjcopy) > + > u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE > $(call if_changed,cat) > > diff --git a/arch/x86/config.mk b/arch/x86/config.mk > index e27f84a..334c10b 100644 > --- a/arch/x86/config.mk > +++ b/arch/x86/config.mk > @@ -24,6 +24,10 @@ PLATFORM_LDFLAGS += -Bsymbolic -Bsymbolic-functions -m > elf_i386 > LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 > LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 > > +# This is used in the top-level Makefile which does not include > +# PLATFORM_LDFLAGS > +LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined > + > OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ > -j .rel -j .rela -j .reloc > > @@ -31,6 +35,9 @@ CFLAGS_NON_EFI := -mregparm=3 > CFLAGS_EFI := -fpic -fshort-wchar > > EFIARCH = ia32 > +EFIPAYLOAD_BFDTARGET = elf32-i386 > + > +EFIPAYLOAD_BFDARCH = i386 > > LDSCRIPT_EFI := $(srctree)/$(CPUDIR)/efi/elf_$(EFIARCH)_efi.lds > OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH) > diff --git a/include/common.h b/include/common.h > index 4566bd1..fcc9ae7 100644 > --- a/include/common.h > +++ b/include/common.h > @@ -1021,6 +1021,13 @@ int cpu_release(int nr, int argc, char * const argv[]); > offsetof(struct structure, member) == offset, \ > "`struct " #structure "` offset for `" #member "` is not " #offset) > > +/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ > +#ifdef CONFIG_EFI_STUB > +#define ll_boot_init() false > +#else > +#define ll_boot_init() true > +#endif > + > /* Pull in stuff for the build system */
Re: [U-Boot] [PATCH v3 18/28] efi: Add 64-bit payload support
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > Most EFI implementations use 64-bit. Add a way to build U-Boot as a 64-bit > EFI payload. The payload unpacks a (32-bit) U-Boot and starts it. This can > be enabled for x86 boards at present. > > Signed-off-by: Simon Glass > Improvements to how the payload is built: > Signed-off-by: Bin Meng > --- > > Changes in v3: > - Add spaces around EFIARCH= > - Use CONFIG_SYS_MONITOR_LEN as a more accurate value for U-Boot's size > > Changes in v2: > - Add -no-red-zone for 64-bit only > - Check the GDT selector's base and limit against the target address > - Drop use of CONFIG_X86_64 since we don't support a 64-bit EFI application > yet > - Merge in Bin's implementation of adding a U-Boot payload with objcopy > - Move the 64-bit crt and reloc code into this patch > - Move the 64-bit efi.h additions into this patch > - Rename GDT_4GB to GDT_4KB > > Makefile | 2 +- > arch/x86/config.mk | 10 ++ > arch/x86/include/asm/types.h | 5 ++- > arch/x86/lib/efi/crt0-efi-x86_64.S | 51 ++ > include/efi.h | 7 > lib/efi/efi_stub.c | 74 > +++--- > 6 files changed, 143 insertions(+), 6 deletions(-) > create mode 100644 arch/x86/lib/efi/crt0-efi-x86_64.S > > diff --git a/Makefile b/Makefile > index 752ee0d..bb0ba9f 100644 > --- a/Makefile > +++ b/Makefile > @@ -1100,7 +1100,7 @@ u-boot-payload.lds: $(LDSCRIPT_EFI) FORCE > # Rule to link the EFI payload which contains a stub and a U-Boot binary > quiet_cmd_u-boot_payload ?= LD $@ >cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \ > - -T u-boot-payload.lds \ > + -T u-boot-payload.lds arch/x86/cpu/call32.o \ >lib/efi/efi.o lib/efi/efi_stub.o u-boot-dtb.bin.o \ >$(addprefix arch/$(ARCH)/lib/efi/,$(EFISTUB)) > > diff --git a/arch/x86/config.mk b/arch/x86/config.mk > index 334c10b..d7addd8 100644 > --- a/arch/x86/config.mk > +++ b/arch/x86/config.mk > @@ -34,14 +34,24 @@ OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j > .dynamic -j .dynsym \ > CFLAGS_NON_EFI := -mregparm=3 > CFLAGS_EFI := -fpic -fshort-wchar > > +ifeq ($(CONFIG_EFI_STUB_64BIT),) > +CFLAGS_EFI += $(call cc-option, -mno-red-zone) > EFIARCH = ia32 > EFIPAYLOAD_BFDTARGET = elf32-i386 > +else > +EFIARCH = x86_64 > +EFIPAYLOAD_BFDTARGET = elf64-x86-64 > +endif > > EFIPAYLOAD_BFDARCH = i386 > > LDSCRIPT_EFI := $(srctree)/$(CPUDIR)/efi/elf_$(EFIARCH)_efi.lds > +EFISTUB := crt0-efi-$(EFIARCH).o reloc_$(EFIARCH).o > OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH) > > +CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI) > +CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI) > + > ifeq ($(CONFIG_EFI_APP),y) > > PLATFORM_CPPFLAGS += $(CFLAGS_EFI) > diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h > index e272c90..766617f 100644 > --- a/arch/x86/include/asm/types.h > +++ b/arch/x86/include/asm/types.h > @@ -44,8 +44,11 @@ typedef __INT64_TYPE__ s64; > typedef __UINT64_TYPE__ u64; > #endif > > +#ifdef CONFIG_EFI_STUB_64BIT > +#define BITS_PER_LONG 64 > +#else > #define BITS_PER_LONG 32 > - > +#endif > /* Dma addresses are 32-bits wide. */ > > typedef u32 dma_addr_t; > diff --git a/arch/x86/lib/efi/crt0-efi-x86_64.S > b/arch/x86/lib/efi/crt0-efi-x86_64.S > new file mode 100644 > index 000..c5cbf41 > --- /dev/null > +++ b/arch/x86/lib/efi/crt0-efi-x86_64.S > @@ -0,0 +1,51 @@ > +/* > + * crt0-efi-x86_64.S - x86_64 EFI startup code. > + * Copyright (C) 1999 Hewlett-Packard Co. > + * Contributed by David Mosberger . > + * Copyright (C) 2005 Intel Co. > + * Contributed by Fenghua Yu . > + * > + * All rights reserved. > + * SPDX-License-Identifier:BSD-3-Clause > + */ > + .text > + .align 4 > + > + .globl _start > +_start: > + subq $8, %rsp > + pushq %rcx > + pushq %rdx > + > +0: > + lea image_base(%rip), %rdi > + lea _DYNAMIC(%rip), %rsi > + > + popq %rcx > + popq %rdx > + pushq %rcx > + pushq %rdx > + call _relocate > + > + popq %rdi > + popq %rsi > + > + call efi_main > + addq $8, %rsp > + > +.exit: > + ret > + > + /* > +* hand-craft a dummy .reloc section so EFI knows it's a relocatable > +* executable: > +*/ > + .data > +dummy: .long 0 > + > +#define IMAGE_REL_ABSOLUTE 0 > + .section .reloc, "a" > +label1: > + .long dummy-label1/* Page RVA */ > + .long 10 /* Block Size (2*4+2) > */ > + .word (IMAGE_REL_ABSOLUTE << 12) + 0 /* reloc for dummy */ > diff --git a/include/efi.h b/include/efi.h > index 1470c08..fcafda0 100644 > --- a/include/efi.h > +++ b/include/efi.h > @@ -18,6 +18,13 @@ > #include > #include > > +#ifdef CONFIG_EFI_STUB_64BIT > +/* EFI uses the Microsoft ABI w
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
Hi Clemens, On 05.08.2015 09:28, Clemens Gruber wrote: On 04.08.2015 19:28, Clemens Gruber wrote: This allows baseboards without SPI to compile. Signed-off-by: Clemens Gruber Cc: Markus Niebel Cc: Tom Rini --- board/tqc/tqma6/tqma6.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..5c4d104 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -131,6 +131,8 @@ int board_mmc_init(bd_t *bis) return 0; } +#if defined(CONFIG_MXC_SPI) + static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = { /* SS1 */ NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL), @@ -161,6 +163,8 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs) (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1; } +#endif /* defined(CONFIG_MXC_SPI) */ + static struct i2c_pads_info tqma6_i2c3_pads = { /* I2C3: on board LM75, M24C64, */ .scl = { @@ -201,7 +205,9 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; +#if defined(CONFIG_MXC_SPI) tqma6_iomuxc_spi(); +#endif tqma6_setup_i2c(); Hmmm. This should not be necessary. Please take a look at the wru4 baseboard addition that is already in mainline. Especially this patch: I noticed your patch but then we would still have to define CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS in our board config or include the tqma6.h config, which defines too many things we do not need. I would have expected that all boards using these TQ SoM's include this config header. The problem is, we have different clocks and more c files, so we use a separate board directory and a separate board config without SPI defines and just use obj-y += ../../tqc/tqma6/tqma6.o in front of our object files in the Makefile. If we don't exclude those SPI parts, we would either have to define those SPI config options (which does not make sense) or move all of our board code in one file under tqc/tqma6 which is not an option, we also define additional clocks via a separate IMX_CONFIG file. Wouldn't it be better to always exclude this code when not using SPI instead of weakly defining the tqma6_iomuxc_spi function? Then small baseboards could be put in tqc/tqma6 and larger projects could still just link to tqma6.o and put all their stuff in a separate board directory. How about this patch: diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..345930f 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -28,6 +28,13 @@ #include "tqma6_bb.h" +#ifndef CONFIG_SF_DEFAULT_BUS +#define CONFIG_SF_DEFAULT_BUS 0 +#endif +#ifndef CONFIG_SF_DEFAULT_CS +#define CONFIG_SF_DEFAULT_CS 0 +#endif Does this work for you? Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] sunxi: display: Add support for interlaced modes
On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: > @@ -775,13 +781,18 @@ static void sunxi_lcdc_tcon1_mode_set(const > struct ctfb_res_modes *mode, > > clk_delay = sunxi_lcdc_get_clk_delay(mode, 1); > writel(SUNXI_LCDC_TCON1_CTRL_ENABLE | > +SUNXI_LCDC_TCON1_CTRL_INTERLACE( > + mode->vmode == FB_VMODE_INTERLACED) | I think this would be clearer if SUNXI_LCDC_TCON1_CTRL_INTERLACE was actually the enable bit (perhaps with _ENABLE on the name), rather than a macro which takes a boolean and returns 0 or the single bit, so you could just write mode->vmode == FB_VMODE_INTERLACED ? SUNXI_LCDC_TCON1_CTRL_INTERLACE : 0 (in whichever wrapping style you prefer). I think the macro is the bit style is more common in this code for boolean options too, we mainly use the macro-with-argument style for fields with more than 1 bit to them. But ultimately the code is correct as you have it so either way as you prefer: Acked-by: Ian Campbell Although if you want to keep it the way it is then perhaps the macro sh ould have !!n instead of just n, to prevent surprises if someone uses a bitop rather than a full boolean op as an argument? @@ -1240,6 +1245,9 @@ void *video_hw_init(void) > return NULL; > } > > +>> printf("Setting up a %dx%d %s console\n", mode->xres, > +>>mode->yres, sunxi_get_mon_desc(sunxi_display.monitor)); Is it worth including the string "interlaced" here when appropriate? (Ack stands either way) Ian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] sunxi: display: Add composite video out support
On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: > Add composite video out support. > > This only gets enabled on the Mele M3 for now, since that is were it > was tested. It will be enabled on more boards after testing. > > Signed-off-by: Hans de Goede Acked-by: Ian Campbell ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 28/28] Allow device tree relocation to be disabled
Hi Simon, On Wed, Aug 5, 2015 at 11:38 AM, Simon Glass wrote: > Hi Bin, > > On 4 August 2015 at 12:34, Simon Glass wrote: >> This was missed in the patch 'Add a way to skip relocation'. Add it in now. >> >> I hope to squash this patch into the earlier one before sending to mainline. >> >> Signed-off-by: Simon Glass Reviewed-by: Bin Meng >> --- >> >> Changes in v3: >> - Add new patch to allow device tree relocation to be disabled >> >> Changes in v2: None >> >> common/board_f.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/common/board_f.c b/common/board_f.c >> index c596083..c7cc67c 100644 >> --- a/common/board_f.c >> +++ b/common/board_f.c >> @@ -654,6 +654,8 @@ static int setup_dram_config(void) >> >> static int reloc_fdt(void) >> { >> + if (gd->flags & GD_FLG_SKIP_RELOC) >> + return 0; >> if (gd->new_fdt) { >> memcpy(gd->new_fdt, gd->fdt_blob, gd->fdt_size); >> gd->fdt_blob = gd->new_fdt; >> -- >> 2.5.0.rc2.392.g76e840b >> > > I should have just squashed this in before sending the series. Anyway, > I can do it either in the next version, or when applying. > Yep, I think this needs to be squashed in v3 [01/28] patch: http://patchwork.ozlabs.org/patch/503752/ Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Enable musb in host mode on the Jesurun Q5
On Tue, 2015-08-04 at 23:51 +0200, Hans de Goede wrote: > The Jesurun Q5 has the musb hooked up to an usb-a receptacle, enable it > in host-only mode. > > Signed-off-by: Hans de Goede [..] > @@ -2,6 +2,7 @@ CONFIG_ARM=y > CONFIG_ARCH_SUNXI=y > CONFIG_MACH_SUN4I=y > CONFIG_DRAM_CLK=312 > +CONFIG_VIDEO_COMPOSITE=y Did you intend this to be in one of the composite mode patches I just looked at, or maybe a separate patch in that series? It doesn't seem to belong here anyway. > @@ -10,3 +11,5 @@ > CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(19)" > # CONFIG_CMD_FLASH is not set > # CONFIG_CMD_FPGA is not set > CONFIG_USB_EHCI_HCD=y > +CONFIG_USB_MUSB_HOST=y > +CONFIG_USB0_VBUS_PIN="PB9" With the above commit message this hunk: Acked-by: Ian Campbell ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
On 5 August 2015 at 13:35, Stefan Roese wrote: > Hi Clemens, > > > On 05.08.2015 09:28, Clemens Gruber wrote: >>> >>> On 04.08.2015 19:28, Clemens Gruber wrote: This allows baseboards without SPI to compile. Signed-off-by: Clemens Gruber Cc: Markus Niebel Cc: Tom Rini --- board/tqc/tqma6/tqma6.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..5c4d104 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -131,6 +131,8 @@ int board_mmc_init(bd_t *bis) return 0; } +#if defined(CONFIG_MXC_SPI) + static iomux_v3_cfg_t const tqma6_ecspi1_pads[] = { /* SS1 */ NEW_PAD_CTRL(MX6_PAD_EIM_D19__GPIO3_IO19, SPI_PAD_CTRL), @@ -161,6 +163,8 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs) (cs == CONFIG_SF_DEFAULT_CS)) ? TQMA6_SF_CS_GPIO : -1; } +#endif /* defined(CONFIG_MXC_SPI) */ + static struct i2c_pads_info tqma6_i2c3_pads = { /* I2C3: on board LM75, M24C64, */ .scl = { @@ -201,7 +205,9 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; +#if defined(CONFIG_MXC_SPI) tqma6_iomuxc_spi(); +#endif tqma6_setup_i2c(); >>> >>> >>> Hmmm. This should not be necessary. Please take a look at the wru4 >>> baseboard addition that is already in mainline. Especially this >>> patch: >> >> >> I noticed your patch but then we would still have to define >> CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS in our board config or >> include >> the tqma6.h config, which defines too many things we do not need. > > > I would have expected that all boards using these TQ SoM's include this > config header. > >> The problem is, we have different clocks and more c files, so we use a >> separate >> board directory and a separate board config without SPI defines and just >> use >> obj-y += ../../tqc/tqma6/tqma6.o in front of our object files in the >> Makefile. >> >> If we don't exclude those SPI parts, we would either have to define those >> SPI >> config options (which does not make sense) or move all of our board code >> in one >> file under tqc/tqma6 which is not an option, we also define additional >> clocks >> via a separate IMX_CONFIG file. >> >> Wouldn't it be better to always exclude this code when not using SPI >> instead of >> weakly defining the tqma6_iomuxc_spi function? >> Then small baseboards could be put in tqc/tqma6 and larger projects could >> still >> just link to tqma6.o and put all their stuff in a separate board >> directory. > > > How about this patch: > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > index 29db838..345930f 100644 > --- a/board/tqc/tqma6/tqma6.c > +++ b/board/tqc/tqma6/tqma6.c > @@ -28,6 +28,13 @@ > > #include "tqma6_bb.h" > > +#ifndef CONFIG_SF_DEFAULT_BUS > +#define CONFIG_SF_DEFAULT_BUS 0 > +#endif > +#ifndef CONFIG_SF_DEFAULT_CS > +#define CONFIG_SF_DEFAULT_CS 0 > +#endif Why would need this - it's already part of spi_flash.h > > Does this work for you? thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
Hi Stefan, On Wed, Aug 05, 2015 at 10:05:10AM +0200, Stefan Roese wrote: > How about this patch: > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > index 29db838..345930f 100644 > --- a/board/tqc/tqma6/tqma6.c > +++ b/board/tqc/tqma6/tqma6.c > @@ -28,6 +28,13 @@ > > #include "tqma6_bb.h" > > +#ifndef CONFIG_SF_DEFAULT_BUS > +#define CONFIG_SF_DEFAULT_BUS 0 > +#endif > +#ifndef CONFIG_SF_DEFAULT_CS > +#define CONFIG_SF_DEFAULT_CS 0 > +#endif > > Does this work for you? This should work, but wouldn't it be cleaner to just exclude the SPI parts? Why add 7 LOC when 4 LOC are enough to exclude the SPI parts? Besides that, it reduces the binary size. Then we could also remove the empty SPI function from all board files, if SPI is not used. > > Thanks, > Stefan Regards, Clemens ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 25/28] x86: qemu: Support operation as an EFI payload
On Wed, Aug 5, 2015 at 2:34 AM, Simon Glass wrote: > Disable a few things which interfere with the EFI init. This allows QEMU to > to boot into EFI, load a U-Boot payload then boot to the U-Boot prompt. > > Signed-off-by: Simon Glass > Reviewed-by: Bin Meng > --- > > Changes in v3: None > Changes in v2: > - Fix indenting in board/emulation/qemu-x86/Kconfig > > arch/x86/cpu/qemu/Makefile | 5 - > arch/x86/cpu/qemu/qemu.c | 2 ++ > board/emulation/qemu-x86/Kconfig | 5 +++-- > 3 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile > index be79723..9a66b16 100644 > --- a/arch/x86/cpu/qemu/Makefile > +++ b/arch/x86/cpu/qemu/Makefile > @@ -4,5 +4,8 @@ > # SPDX-License-Identifier: GPL-2.0+ > # > > -obj-y += car.o dram.o qemu.o > +ifndef CONFIG_EFI_STUB > +obj-y += car.o dram.o > +endif > +obj-y += qemu.o > obj-$(CONFIG_PCI) += pci.o > diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c > index 930d2b6..64634a9 100644 > --- a/arch/x86/cpu/qemu/qemu.c > +++ b/arch/x86/cpu/qemu/qemu.c > @@ -25,11 +25,13 @@ int arch_cpu_init(void) > return 0; > } > > +#ifndef CONFIG_EFI_STUB > int print_cpuinfo(void) > { > post_code(POST_CPU_INFO); > return default_print_cpuinfo(); > } > +#endif > > void reset_cpu(ulong addr) > { > diff --git a/board/emulation/qemu-x86/Kconfig > b/board/emulation/qemu-x86/Kconfig > index e777ef4..c9181fc 100644 > --- a/board/emulation/qemu-x86/Kconfig > +++ b/board/emulation/qemu-x86/Kconfig > @@ -13,11 +13,12 @@ config SYS_CONFIG_NAME > default "qemu-x86" > > config SYS_TEXT_BASE > - default 0xfff0 > + default 0xfff0 if !EFI_STUB > + default 0x0111 if EFI_STUB > > config BOARD_SPECIFIC_OPTIONS # dummy > def_bool y > - select X86_RESET_VECTOR > + select X86_RESET_VECTOR if !EFI_STUB > select QEMU > select BOARD_ROMSIZE_KB_1024 > > -- Tested on QEMU 32-bit and 64-bit Tested-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sf: Make 4K sector support configurable
On 3 August 2015 at 04:58, Marek Vasut wrote: > Make the support for 4K subpage I/O on a SPI NOR flash configurable. > A board which requires the SPI NOR to be accessed in larger 32KiB > or 64KiB pages can disable the 4K subpage support, but by default, > the support for 4K subpage I/O is enabled. The functionality of this > option is the same as CONFIG_MTD_SPI_NOR_USE_4K_SECTORS in Linux. > > This is extremely useful in case one uses UBI on a SPI NOR flash. > UBI needs at least 15k EBs and can not work on a flash which uses > 4k ones, so disabling the support for 4k subpages lets UBI work on > such flash. > > Signed-off-by: Marek Vasut > Cc: Jagan Teki > --- > drivers/mtd/spi/Kconfig | 15 +++ > drivers/mtd/spi/sf_internal.h | 4 > 2 files changed, 19 insertions(+) > > diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig > index 8b730ff..3f7433c 100644 > --- a/drivers/mtd/spi/Kconfig > +++ b/drivers/mtd/spi/Kconfig > @@ -86,6 +86,21 @@ config SPI_FLASH_WINBOND > > endif > > +config SPI_FLASH_USE_4K_SECTORS > + bool "Use small 4096 B erase sectors" > + depends on SPI_FLASH > + default y > + help > + Many flash memories support erasing small (4096 B) sectors. > Depending > + on the usage this feature may provide performance gain in comparison > + to erasing whole blocks (32/64 KiB). > + Changing a small part of the flash's contents is usually faster with > + small sectors. On the other hand erasing should be faster when using > + 64 KiB block instead of 16 × 4 KiB sectors. > + > + Please note that some tools/drivers/filesystems may not work with > + 4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum). > + > config SPI_FLASH_DATAFLASH > bool "AT45xxx DataFlash support" > depends on SPI_FLASH && DM_SPI_FLASH > diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h > index 9fb5557..9c95d56 100644 > --- a/drivers/mtd/spi/sf_internal.h > +++ b/drivers/mtd/spi/sf_internal.h > @@ -37,7 +37,11 @@ enum spi_read_cmds { > > /* sf param flags */ > enum { > +#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS > SECT_4K = 1 << 0, > +#else > + SECT_4K = 0 << 0, > +#endif > SECT_32K= 1 << 1, > E_FSR = 1 << 2, > SST_BP = 1 << 3, > -- > 2.1.4 Reviewed-by: Jagan Teki thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
On Wed, Aug 05, 2015 at 01:46:42PM +0530, Jagan Teki wrote: > On 5 August 2015 at 13:35, Stefan Roese wrote: > > How about this patch: > > > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > > index 29db838..345930f 100644 > > --- a/board/tqc/tqma6/tqma6.c > > +++ b/board/tqc/tqma6/tqma6.c > > @@ -28,6 +28,13 @@ > > > > #include "tqma6_bb.h" > > > > +#ifndef CONFIG_SF_DEFAULT_BUS > > +#define CONFIG_SF_DEFAULT_BUS 0 > > +#endif > > +#ifndef CONFIG_SF_DEFAULT_CS > > +#define CONFIG_SF_DEFAULT_CS 0 > > +#endif > > Why would need this - it's already part of spi_flash.h I am also wondering about commit f85764cc1f6ab01ffc60dd78de9c4de4cff2b5ce, which defines CONFIG_SPI_FLASH in the WRU4 defconfig file, even though it does not need SPI flash support, just to work around undefined reference errors regarding spi_flash_free, etc. Couldn't those workarounds be avoided by excluding the SPI parts via ifdefs, as I did in my patch today? > > > > > Does this work for you? > > thanks! > -- > Jagan | openedev. Thanks, Clemens ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tegra: spi: Move TEGRA114_SPI switch to defconfigs
On 31 July 2015 at 03:03, Simon Glass wrote: > On 30 July 2015 at 14:57, Tom Warren wrote: >> All T114+ Tegra boards should be using the Kconfig >> TEGRA114_SPI switch. Remove it from include/config >> and put it into defconfig. Also removed unused >> TEGRA114_SPI_CTRLS from T114+ configs. >> >> All Tegra SoCs build OK with this change. >> >> Signed-off-by: Tom Warren >> --- >> configs/dalmore_defconfig| 1 + >> configs/jetson-tk1_defconfig | 1 + >> configs/nyan-big_defconfig | 1 + >> configs/p2571_defconfig | 1 + >> configs/venice2_defconfig| 1 + >> include/configs/dalmore.h| 2 -- >> include/configs/jetson-tk1.h | 2 -- >> include/configs/nyan-big.h | 2 -- >> include/configs/p2571.h | 2 -- >> include/configs/venice2.h| 2 -- >> 10 files changed, 5 insertions(+), 10 deletions(-) > > Reviewed-by: Simon Glass Reviewed-by: Jagan Teki I couldn't find this patch on patchwork, pls- provide the link? thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sf: Make 4K sector support configurable
On 5 August 2015 at 13:50, Jagan Teki wrote: > On 3 August 2015 at 04:58, Marek Vasut wrote: >> Make the support for 4K subpage I/O on a SPI NOR flash configurable. >> A board which requires the SPI NOR to be accessed in larger 32KiB >> or 64KiB pages can disable the 4K subpage support, but by default, >> the support for 4K subpage I/O is enabled. The functionality of this >> option is the same as CONFIG_MTD_SPI_NOR_USE_4K_SECTORS in Linux. >> >> This is extremely useful in case one uses UBI on a SPI NOR flash. >> UBI needs at least 15k EBs and can not work on a flash which uses >> 4k ones, so disabling the support for 4k subpages lets UBI work on >> such flash. >> >> Signed-off-by: Marek Vasut >> Cc: Jagan Teki >> --- >> drivers/mtd/spi/Kconfig | 15 +++ >> drivers/mtd/spi/sf_internal.h | 4 >> 2 files changed, 19 insertions(+) >> >> diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig >> index 8b730ff..3f7433c 100644 >> --- a/drivers/mtd/spi/Kconfig >> +++ b/drivers/mtd/spi/Kconfig >> @@ -86,6 +86,21 @@ config SPI_FLASH_WINBOND >> >> endif >> >> +config SPI_FLASH_USE_4K_SECTORS >> + bool "Use small 4096 B erase sectors" >> + depends on SPI_FLASH >> + default y >> + help >> + Many flash memories support erasing small (4096 B) sectors. >> Depending >> + on the usage this feature may provide performance gain in >> comparison >> + to erasing whole blocks (32/64 KiB). >> + Changing a small part of the flash's contents is usually faster >> with >> + small sectors. On the other hand erasing should be faster when >> using >> + 64 KiB block instead of 16 × 4 KiB sectors. >> + >> + Please note that some tools/drivers/filesystems may not work with >> + 4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum). >> + >> config SPI_FLASH_DATAFLASH >> bool "AT45xxx DataFlash support" >> depends on SPI_FLASH && DM_SPI_FLASH >> diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h >> index 9fb5557..9c95d56 100644 >> --- a/drivers/mtd/spi/sf_internal.h >> +++ b/drivers/mtd/spi/sf_internal.h >> @@ -37,7 +37,11 @@ enum spi_read_cmds { >> >> /* sf param flags */ >> enum { >> +#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS >> SECT_4K = 1 << 0, >> +#else >> + SECT_4K = 0 << 0, >> +#endif >> SECT_32K= 1 << 1, >> E_FSR = 1 << 2, >> SST_BP = 1 << 3, >> -- >> 2.1.4 > > Reviewed-by: Jagan Teki Applied to u-boot-spi/master thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
Hi Clemens, On 05.08.2015 10:17, Clemens Gruber wrote: On Wed, Aug 05, 2015 at 10:05:10AM +0200, Stefan Roese wrote: How about this patch: diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..345930f 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -28,6 +28,13 @@ #include "tqma6_bb.h" +#ifndef CONFIG_SF_DEFAULT_BUS +#define CONFIG_SF_DEFAULT_BUS 0 +#endif +#ifndef CONFIG_SF_DEFAULT_CS +#define CONFIG_SF_DEFAULT_CS 0 +#endif Does this work for you? This should work, but wouldn't it be cleaner to just exclude the SPI parts? Why add 7 LOC when 4 LOC are enough to exclude the SPI parts? Besides that, it reduces the binary size. The binary size should be the same (I didn't check this). The linker should remove the not referenced functions / variables. As for the added 7 LOC, Jagans suggestion to include "spi_flash.h" should also work instead. This seems to be a nice solution for me that doesn't add any new #ifdef's to the code. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config
On 05.08.2015 10:33, Clemens Gruber wrote: On Wed, Aug 05, 2015 at 01:46:42PM +0530, Jagan Teki wrote: On 5 August 2015 at 13:35, Stefan Roese wrote: How about this patch: diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..345930f 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -28,6 +28,13 @@ #include "tqma6_bb.h" +#ifndef CONFIG_SF_DEFAULT_BUS +#define CONFIG_SF_DEFAULT_BUS 0 +#endif +#ifndef CONFIG_SF_DEFAULT_CS +#define CONFIG_SF_DEFAULT_CS 0 +#endif Why would need this - it's already part of spi_flash.h I am also wondering about commit f85764cc1f6ab01ffc60dd78de9c4de4cff2b5ce, which defines CONFIG_SPI_FLASH in the WRU4 defconfig file, even though it does not need SPI flash support, just to work around undefined reference errors regarding spi_flash_free, etc. Couldn't those workarounds be avoided by excluding the SPI parts via ifdefs, as I did in my patch today? Right. But as mentioned before I really would like to avoid those ifdef's. So let me check if I can get this done in a more clean way. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] spi: omap3_spi: add am43xx support to omap3_spi
On 31 July 2015 at 02:26, Nikita Kiryanov wrote: > Add support for AM43XX to the omap3_spi driver. > > Cc: Jagan Teki > Cc: Igor Grinberg > Signed-off-by: Nikita Kiryanov > --- > drivers/spi/omap3_spi.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/omap3_spi.h b/drivers/spi/omap3_spi.h > index ab7cd84..4af22c1 100644 > --- a/drivers/spi/omap3_spi.h > +++ b/drivers/spi/omap3_spi.h > @@ -14,7 +14,7 @@ > #ifndef _OMAP3_SPI_H_ > #define _OMAP3_SPI_H_ > > -#ifdef CONFIG_AM33XX > +#if defined(CONFIG_AM33XX) || defined(CONFIG_AM43XX) > #define OMAP3_MCSPI1_BASE 0x48030100 > #define OMAP3_MCSPI2_BASE 0x481A0100 > #else > -- > 1.9.1 Reviewed-by: Jagan Teki thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] arm: am43xx: enable spi clock
On 31 July 2015 at 02:26, Nikita Kiryanov wrote: > Add spi clock to the list of am43xx basic clocks to make the SPI > subsystem available on am43xx systems. > > Cc: Albert Aribaud > Cc: Igor Grinberg > Signed-off-by: Nikita Kiryanov > --- > arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c > b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c > index b1c0025..b639694 100644 > --- a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c > +++ b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c > @@ -115,6 +115,7 @@ void enable_basic_clocks(void) > &cmper->usbphyocp2scp0clkctrl, > &cmper->usb1clkctrl, > &cmper->usbphyocp2scp1clkctrl, > + &cmper->spi0clkctrl, > 0 > }; > > -- > 1.9.1 Reviewed-by: Jagan Teki thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] driver model is not smp safe
Hi Simon, Tom, On Tue, Aug 4, 2015 at 3:27 AM, Simon Glass wrote: > Hi Tom, > > On 3 August 2015 at 13:06, Tom Rini wrote: >> On Mon, Aug 03, 2015 at 12:52:19PM -0600, Simon Glass wrote: >>> Hi Tom, >>> >>> On 31 July 2015 at 08:31, Tom Rini wrote: >>> > On Thu, Jul 30, 2015 at 12:12:03PM +0800, Bin Meng wrote: >>> > >>> >> Hi Simon, >>> >> >>> >> When adding x86 multi-cpu initialization on a board with 4 cores, I >>> >> found: >>> >> >>> >> => cpu list >>> >> 0: cpu@0 Genuine Intel(R) CPU @ 1.58GHz >>> >> 1: cpu@1 Genuine Intel(R) CPU @ 1.58GHz >>> >> 2: cpu@2 Genuine Intel(R) CPU @ 1.58GHz >>> >> 2: cpu@3 Genuine Intel(R) CPU @ 1.58GHz >>> >> >>> >> cpu@2 and cpu@3 have the same sequence number, which indicates they >>> >> are running parallelly to get the same sequence number. The call chain >>> >> on an ap is: mp_init_cpu() -> device_probe() -> uclass_resolve_seq(). >>> >> Apparently ap2 and ap3 are running at the same time to get the same >>> >> number. >>> >> >>> >> Note so far all x86 boards that we have enabled x86 multi-cpu >>> >> initialization on only have 2 cores, which will not expose such issue >>> >> as there is no parallel execution among aps. >>> > >>> > So what exactly are we doing with these additional cores? My >>> > recollection of what we do on other arches when we even deal with other >>> > cores is that we bring them "up" and then usually put them in a holding >>> > pattern for the real OS to deal with _or_ it's one of those cases where >>> > we have multiple OSes running and we do what we need to load and release >>> > those other OSes. >>> >>> In this case they end up at stop_this_cpu() which is just a hlt >>> instruction in each case. >> >> So do we really have to be doing anything here? Or is this just >> pre-emptive work for an async MP type setup down the road? We could >> probably live with this with a big comment noting why we know it's >> misbehaving. > > I think we should fix it - I suggested some options above and Bin may > have ideas also. Bin may be able to send a patch since he can repeat > the problem. > Yes we should fix it. But IMHO, just fixing the seq number only resolves the surface problem. What concerns me is that multiple cpu running the same piece of codes (in this case, the DM core codes) without any protection. I have no idea whether these core structures (like the device list) still look good from the DM core perspective. Although right now it seems that it only exposes the seq number issue, we don't know if there are other potential DM issues. Thus I was thinking fundamentally we are using DM CPU uclass in a wrong way. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
This patch removes the SPI support from the WRU-IV baseboard as its not used at all. Signed-off-by: Stefan Roese Cc: Clemens Gruber Cc: Markus Niebel Cc: Stefano Babic --- board/tqc/tqma6/tqma6.c | 1 + configs/tqma6s_wru4_mmc_defconfig | 3 --- include/configs/tqma6_wru4.h | 8 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 29db838..8656782 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "tqma6_bb.h" diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig index 66ac0b1..e30b130 100644 --- a/configs/tqma6s_wru4_mmc_defconfig +++ b/configs/tqma6s_wru4_mmc_defconfig @@ -3,11 +3,8 @@ CONFIG_ARCH_MX6=y CONFIG_TARGET_TQMA6=y CONFIG_TQMA6S=y CONFIG_WRU4=y -CONFIG_CMD_SETEXPR=y -CONFIG_CMD_NET=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter password in %d seconds to stop autoboot\n" CONFIG_AUTOBOOT_ENCRYPTION=y CONFIG_AUTOBOOT_STOP_STR_SHA256="36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" CONFIG_PCA9551_LED=y -CONFIG_SPI_FLASH=y diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h index 1c86bc0..1330a0a 100644 --- a/include/configs/tqma6_wru4.h +++ b/include/configs/tqma6_wru4.h @@ -68,4 +68,12 @@ #define CONFIG_SYS_BOOTCOUNT_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_BOOTCOUNT_BE +/* + * Remove all unused interfaces / commands that are defined in + * the common header tqms6.h + */ +#undef CONFIG_CMD_SF +#undef CONFIG_CMD_SPI +#undef CONFIG_MXC_SPI + #endif /* __CONFIG_TQMA6_WRU4_H */ -- 2.4.8 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ddr: altera: sequencer: add RW_MGR_MEM_NUMBER_OF_RANKS
On Wednesday, August 05, 2015 at 05:12:32 AM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Fix build error for socfpga_cyclone5_defconfig: > > board/altera/socfpga/wrap_sdram_config.c:245:26: error: > ‘RW_MGR_MEM_NUMBER_OF_RANKS’ undeclared here (not in a function) make[2]: > *** [spl/board/altera/socfpga/wrap_sdram_config.o] Error 1 > > Signed-off-by: Dinh Nguyen > --- > Hi Marek, > > This patch is based on your 02-ddr-part3 branch. It is also applicable to > the wip/boards branch as well. Hi, Ouch, thanks for spotting this! Acked-by: Marek Vasut btw. did you have time to skim through [PATCH 00/28] socfpga: sdram.c cleanups please ? I'd like to apply that to master, put on the sequencer cleanups and this patch and then submit a PR :) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
Hi Stefan, Clemens, On 05/08/2015 10:50, Stefan Roese wrote: > This patch removes the SPI support from the WRU-IV baseboard as its > not used at all. > > Signed-off-by: Stefan Roese > Cc: Clemens Gruber > Cc: Markus Niebel > Cc: Stefano Babic > --- > board/tqc/tqma6/tqma6.c | 1 + > configs/tqma6s_wru4_mmc_defconfig | 3 --- > include/configs/tqma6_wru4.h | 8 > 3 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > index 29db838..8656782 100644 > --- a/board/tqc/tqma6/tqma6.c > +++ b/board/tqc/tqma6/tqma6.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > > #include "tqma6_bb.h" > > diff --git a/configs/tqma6s_wru4_mmc_defconfig > b/configs/tqma6s_wru4_mmc_defconfig > index 66ac0b1..e30b130 100644 > --- a/configs/tqma6s_wru4_mmc_defconfig > +++ b/configs/tqma6s_wru4_mmc_defconfig > @@ -3,11 +3,8 @@ CONFIG_ARCH_MX6=y > CONFIG_TARGET_TQMA6=y > CONFIG_TQMA6S=y > CONFIG_WRU4=y > -CONFIG_CMD_SETEXPR=y > -CONFIG_CMD_NET=y > CONFIG_AUTOBOOT_KEYED=y > CONFIG_AUTOBOOT_PROMPT="Enter password in %d seconds to stop autoboot\n" > CONFIG_AUTOBOOT_ENCRYPTION=y > > CONFIG_AUTOBOOT_STOP_STR_SHA256="36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" > CONFIG_PCA9551_LED=y > -CONFIG_SPI_FLASH=y > diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h > index 1c86bc0..1330a0a 100644 > --- a/include/configs/tqma6_wru4.h > +++ b/include/configs/tqma6_wru4.h > @@ -68,4 +68,12 @@ > #define CONFIG_SYS_BOOTCOUNT_ADDRIRAM_BASE_ADDR > #define CONFIG_SYS_BOOTCOUNT_BE > > +/* > + * Remove all unused interfaces / commands that are defined in > + * the common header tqms6.h > + */ > +#undef CONFIG_CMD_SF > +#undef CONFIG_CMD_SPI > +#undef CONFIG_MXC_SPI > + > #endif /* __CONFIG_TQMA6_WRU4_H */ > I read the thread - Clemens, can you send your Tested-by after you tested with success the patch ? I will apply it, then.. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
Hi Stefano, Hi Stefan, On Wed, Aug 05, 2015 at 11:00:56AM +0200, Stefano Babic wrote: > Hi Stefan, Clemens, > > I read the thread - Clemens, can you send your Tested-by after you > tested with success the patch ? I will apply it, then.. > > Best regards, > Stefano Babic Although I am not convinced that ifdefs are as bad as Stefan thinks they are, the new patch works fine too. Thank you! Tested-by: Clemens Gruber Regards, Clemens ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] sf: sf_dataflash: Remove inline property of function dataflash_status
On 20 July 2015 at 11:26, Wang Haikun wrote: > On 7/2/2015 5:17 PM, Haikun Wang wrote: >> Signed-off-by: Haikun Wang >> --- >> drivers/mtd/spi/sf_dataflash.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c >> index 3111f4f..f83f994 100644 >> --- a/drivers/mtd/spi/sf_dataflash.c >> +++ b/drivers/mtd/spi/sf_dataflash.c >> @@ -67,7 +67,6 @@ >> #define OP_WRITE_SECURITY_REVC 0x9A >> #define OP_WRITE_SECURITY 0x9B/* revision D */ >> >> - >> struct dataflash { >> uint8_t command[16]; >> unsigned short page_offset;/* offset in flash address */ >> @@ -76,7 +75,7 @@ struct dataflash { >> /* >>* Return the status of the DataFlash device. >>*/ >> -static inline int dataflash_status(struct spi_slave *spi) >> +static int dataflash_status(struct spi_slave *spi) >> { >> int ret; >> u8 status; >> > Update my email address. Looks fines with the series, but please update commit message on all patches and send next version series. thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
Hi Clemens, On 05/08/2015 11:28, Clemens Gruber wrote: > Hi Stefano, Hi Stefan, > > On Wed, Aug 05, 2015 at 11:00:56AM +0200, Stefano Babic wrote: >> Hi Stefan, Clemens, >> >> I read the thread - Clemens, can you send your Tested-by after you >> tested with success the patch ? I will apply it, then.. >> >> Best regards, >> Stefano Babic > > Although I am not convinced that ifdefs are as bad as Stefan thinks they are, > the new patch works fine too. Thank you! > We are trying to get rid of #ifdef as much as possible. > Tested-by: Clemens Gruber > Ok, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
On 5 August 2015 at 14:20, Stefan Roese wrote: > This patch removes the SPI support from the WRU-IV baseboard as its > not used at all. > > Signed-off-by: Stefan Roese > Cc: Clemens Gruber > Cc: Markus Niebel > Cc: Stefano Babic Reviewed-by: Jagan Teki > --- > board/tqc/tqma6/tqma6.c | 1 + > configs/tqma6s_wru4_mmc_defconfig | 3 --- > include/configs/tqma6_wru4.h | 8 > 3 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c > index 29db838..8656782 100644 > --- a/board/tqc/tqma6/tqma6.c > +++ b/board/tqc/tqma6/tqma6.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > > #include "tqma6_bb.h" > > diff --git a/configs/tqma6s_wru4_mmc_defconfig > b/configs/tqma6s_wru4_mmc_defconfig > index 66ac0b1..e30b130 100644 > --- a/configs/tqma6s_wru4_mmc_defconfig > +++ b/configs/tqma6s_wru4_mmc_defconfig > @@ -3,11 +3,8 @@ CONFIG_ARCH_MX6=y > CONFIG_TARGET_TQMA6=y > CONFIG_TQMA6S=y > CONFIG_WRU4=y > -CONFIG_CMD_SETEXPR=y > -CONFIG_CMD_NET=y > CONFIG_AUTOBOOT_KEYED=y > CONFIG_AUTOBOOT_PROMPT="Enter password in %d seconds to stop autoboot\n" > CONFIG_AUTOBOOT_ENCRYPTION=y > > CONFIG_AUTOBOOT_STOP_STR_SHA256="36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" > CONFIG_PCA9551_LED=y > -CONFIG_SPI_FLASH=y > diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h > index 1c86bc0..1330a0a 100644 > --- a/include/configs/tqma6_wru4.h > +++ b/include/configs/tqma6_wru4.h > @@ -68,4 +68,12 @@ > #define CONFIG_SYS_BOOTCOUNT_ADDR IRAM_BASE_ADDR > #define CONFIG_SYS_BOOTCOUNT_BE > > +/* > + * Remove all unused interfaces / commands that are defined in > + * the common header tqms6.h > + */ > +#undef CONFIG_CMD_SF > +#undef CONFIG_CMD_SPI > +#undef CONFIG_MXC_SPI > + > #endif /* __CONFIG_TQMA6_WRU4_H */ > -- > 2.4.8 > thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: mx6: Remove SPI support from WRU-IV baseboard
On 5 August 2015 at 15:06, Stefano Babic wrote: > Hi Clemens, > > On 05/08/2015 11:28, Clemens Gruber wrote: >> Hi Stefano, Hi Stefan, >> >> On Wed, Aug 05, 2015 at 11:00:56AM +0200, Stefano Babic wrote: >>> Hi Stefan, Clemens, >>> >>> I read the thread - Clemens, can you send your Tested-by after you >>> tested with success the patch ? I will apply it, then.. >>> >>> Best regards, >>> Stefano Babic >> >> Although I am not convinced that ifdefs are as bad as Stefan thinks they are, >> the new patch works fine too. Thank you! >> > > We are trying to get rid of #ifdef as much as possible. Agreed Stefano, this is u-boot on-going development goal. > >> Tested-by: Clemens Gruber >> > > > Ok, thanks ! > thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] udoo: Remove SPL fat support
Use dd'ed SPL and u-boot.img by default. Signed-off-by: Peter Vicman Cc: Fabio Estevam Cc: Stefano Babic --- include/configs/udoo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/udoo.h b/include/configs/udoo.h index f93b67a..8ec073d 100644 --- a/include/configs/udoo.h +++ b/include/configs/udoo.h @@ -11,8 +11,8 @@ #include "mx6_common.h" +#define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SPL_FAT_SUPPORT #include "imx6_spl.h" #define MACH_TYPE_UDOO 4800 -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] udoo: Remove SPL fat support
On 05/08/2015 12:37, Peter Vicman wrote: > Use dd'ed SPL and u-boot.img by default. > > Signed-off-by: Peter Vicman > Cc: Fabio Estevam > Cc: Stefano Babic > --- > include/configs/udoo.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/configs/udoo.h b/include/configs/udoo.h > index f93b67a..8ec073d 100644 > --- a/include/configs/udoo.h > +++ b/include/configs/udoo.h > @@ -11,8 +11,8 @@ > > #include "mx6_common.h" > > +#define CONFIG_SPL_LIBCOMMON_SUPPORT > #define CONFIG_SPL_MMC_SUPPORT > -#define CONFIG_SPL_FAT_SUPPORT > #include "imx6_spl.h" > > #define MACH_TYPE_UDOO 4800 > Reviewed-by: Stefano Babic Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 5/5] usb: lpc32xx: add host USB driver
Hi Marek, Is it OK to only submit the patch that need to be update as a new version or I always have to resubmit the complete set of patches? See comments and question below. Sylvain > -Original Message- > From: Marek Vasut [mailto:ma...@denx.de] > > On Tuesday, August 04, 2015 at 11:04:42 PM, slemieux.t...@gmail.com wrote: > > From: Sylvain Lemieux > > > > Incorporate USB driver from legacy LPCLinux NXP BSP. > > The files taken from the legacy patch are: > > - lpc32xx USB driver > > - lpc3250 header file USB registers definition. > > > > The legacy driver was updated and clean-up as part > > of the integration with the latest u-boot. > > > > Signed-off-by: Sylvain Lemieux > > --- > > Hi! > > > +static int wait_for_bit(void *reg, const uint32_t mask, bool set) > > +{ > > + unsigned int timeout = 100; > > + uint32_t val; > > + > > + while (--timeout) { > > Where did the get_timer() stuff disappear ? :'-( I reused the "wait_for_bit()" from " drivers/usb/host/dwc2.c"; this implement does not use "get_timer()". Should I update this driver implementation of "wait_for_bit()" to use "get_timer()" or keep it the same as the implementation from "dwc2.c"? > > > + val = readl(reg); > > + if (!set) > > + val = ~val; > > + > > + if ((val & mask) == mask) > > + return 0; > > + > > + udelay(1); > > + } > > + > > + debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", > > + __func__, reg, mask, set); > > + > > + return -ETIMEDOUT; > > +} > > [...] > > > +static int usbpll_setup(void) > > +{ > > + uint32_t ret; > > u32, please fix all around. Will do. > > > + /* make sure clocks are disabled */ > > + clrbits_le32(&clk_pwr->usb_ctrl, > > +CLK_USBCTRL_CLK_EN1 | CLK_USBCTRL_CLK_EN2); > > + > > + /* start PLL clock input */ > > + setbits_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_CLK_EN1); > > + > > + /* Setup PLL. */ > > + setbits_le32(&clk_pwr->usb_ctrl, > > +CLK_USBCTRL_FDBK_PLUS1(192 - 1)); > > + setbits_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_POSTDIV_2POW(0x01)); > > + setbits_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_PLL_PWRUP); > > + > > + ret = wait_for_bit(&clk_pwr->usb_ctrl, CLK_USBCTRL_PLL_STS, 1); > > + if (ret) > > + return -1; > > + > > + /* enable PLL output */ > > + setbits_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_CLK_EN2); > > + > > + return 0; > > +} > > [...] > > > + ret = wait_for_bit(&otg->otg_clk_sts, mask, 1); > > + if (ret) > > + return -1; > > return ret; should be just find in these cases. > Will do. > > + setbits_le32(&otg->otg_sts_ctrl, OTG_HOST_EN); > > + isp1301_set_value(ISP1301_I2C_OTG_CONTROL_1_SET, OTG1_VBUS_DRV); > > + > > + return 0; > > +} > > + > > +int usb_cpu_stop(void) > > +{ > > + /* vbus off */ > > + isp1301_set_value(ISP1301_I2C_OTG_CONTROL_1_SET, OTG1_VBUS_DRV); > > + > > + clrbits_le32(&otg->otg_sts_ctrl, OTG_HOST_EN); > > + > > + clrbits_le32(&clk_pwr->usb_ctrl, CLK_USBCTRL_HCLK_EN); > > + > > + return 0; > > +} > > + > > +int usb_cpu_init_fail(void) > > +{ > > + return usb_cpu_stop(); > > +} This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/5] dma: lpc32xx: add DMA driver
Hi Marek, See comment and question below. > -Original Message- > From: Marek Vasut [mailto:ma...@denx.de] > Sent: 4-Aug-15 5:32 PM > > On Tuesday, August 04, 2015 at 11:04:38 PM, slemieux.t...@gmail.com wrote: > > From: Sylvain Lemieux > > > > Incorporate DMA driver from legacy LPCLinux NXP BSP. > > The files taken from the legacy patch are: > > - lpc32xx DMA driver > > - lpc3250 header file DMA registers definition. > > > > The legacy driver was updated and clean-up as part of the integration with > > the latest u-boot. > > > > Signed-off-by: Sylvain Lemieux > > [...] > > > + > > +/* > > + * The "dmac_ll" structure is mapping the DMA channel register, > > + * as per UM10326, "LPC32x0 and LPC32x0/01 User manual" - Rev. 3 > > + * tables 84, 85, 86 & 87. > > + * > > + * The DMA client (ex. NAND SLC) can use this macro to write the > > + * next DMA linked list item address. > > + */ > > +#define lpc32xx_dmac_next_lli(x) (uint32_t)x > > Ew, and it's not even used :-) This is used inside "drivers/mtd/nand/lpc32xx_nand_slc.c"; Refer to this patch for details: https://patchwork.ozlabs.org/patch/503815/ Are we OK to keep this define there? > > > +/* DMA linked list structure used with a channel's LLI register */ > > +struct lpc32xx_dmac_ll { > > + u32 dma_src; > > + u32 dma_dest; > > + u32 next_lli; > > + u32 next_ctrl; > > +}; > > [...] > > > +int lpc32xx_dma_wait_status(int channel) > > +{ > > + unsigned long start; > > + > > + start = get_timer(0); > > + while (1) { > > Here , you can do > > reg = readl(); > reg |= readl(); > if (reg & BIT_MASK()) > break; > Will update the patch. > > + if (((readl(&dma->raw_tc_stat) | readl(dma->raw_err_stat)) > > +& BIT_MASK(channel)) != 0) > > + break; > > + > > + if (get_timer(start) > 1) > > + return -1; > > + > > + udelay(1); > > + } > > + > > + if (unlikely(readl(&dma->raw_err_stat) & BIT_MASK(channel))) { > > + setbits_le32(&dma->int_err_clear, BIT_MASK(channel)); > > + setbits_le32(&dma->raw_err_stat, BIT_MASK(channel)); > > + return -1; > > + } > > + setbits_le32(&dma->int_tc_clear, BIT_MASK(channel)); > > + setbits_le32(&dma->raw_tc_stat, BIT_MASK(channel)); > > + return 0; > > +} > > Other than that, > > Acked-by: Marek Vasut This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] udoo: Remove SPL fat support
On Wed, Aug 5, 2015 at 7:37 AM, Peter Vicman wrote: > Use dd'ed SPL and u-boot.img by default. > > Signed-off-by: Peter Vicman > Cc: Fabio Estevam > Cc: Stefano Babic Acked-by: Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 15/28] x86: Support building the EFI stub
On Wed, Aug 5, 2015 at 2:33 AM, Simon Glass wrote: > Add support for building a 32/64-bit EFI stub for x86. This involves > building the startup and relocation code for either i386 or x86_64. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Move 64-bit comment to just above the 64-bit flag adjustments > > Changes in v2: > - Add a comment as to why the AFLAGS_REMOVE_.. lines are needed > - Move the crt and reloc files into arch/x86/lib/efi/ > > arch/x86/lib/Makefile | 2 +- > arch/x86/lib/efi/Makefile | 24 > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 arch/x86/lib/efi/Makefile > > diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile > index 43489fd..09c236b 100644 > --- a/arch/x86/lib/Makefile > +++ b/arch/x86/lib/Makefile > @@ -34,7 +34,7 @@ obj-$(CONFIG_SYS_X86_TSC_TIMER) += tsc_timer.o > obj-$(CONFIG_CMD_ZBOOT)+= zimage.o > obj-$(CONFIG_HAVE_FSP) += fsp/ > > -extra-$(CONFIG_USE_PRIVATE_LIBGCC) := lib.a > +extra-$(CONFIG_USE_PRIVATE_LIBGCC) += lib.a > > NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name) > OBJCOPYFLAGS := --prefix-symbols=__normal_ > diff --git a/arch/x86/lib/efi/Makefile b/arch/x86/lib/efi/Makefile > new file mode 100644 > index 000..bb7b95b > --- /dev/null > +++ b/arch/x86/lib/efi/Makefile > @@ -0,0 +1,24 @@ > +# > +# (C) Copyright 2002-2006 > +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-$(CONFIG_EFI_APP) += crt0-efi-ia32.o reloc_ia32.o > + > +ifneq ($(CONFIG_EFI_STUB),) > + > +CFLAGS_REMOVE_reloc_ia32.o += -mregparm=3 > +CFLAGS_reloc_ia32.o += -fpic -fshort-wchar > + > +# When building for 64-bit we must remove the i386-specific flags > +CFLAGS_REMOVE_reloc_x86_64.o += -mregparm=3 -march=i386 -m32 > +CFLAGS_reloc_x86_64.o += -fpic -fshort-wchar > + > +AFLAGS_REMOVE_crt0-efi-x86_64.o += -mregparm=3 -march=i386 -m32 > +AFLAGS_crt0-efi-x86_64.o += -fpic -fshort-wchar > + > +extra-$(CONFIG_EFI_STUB_32BIT) += crt0-efi-ia32.o reloc_ia32.o > +extra-$(CONFIG_EFI_STUB_64BIT) += crt0-efi-x86_64.o reloc_x86_64.o > +endif > -- Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: zynqmp: Add platform specific arch_get_page_table
Based on the patch: "armv8: caches: Added routine to set non cacheable region" (sha1: dad17fd51027ad02ac8f02deed186d08109d61fd) it is necessary to add platform specific hook. Signed-off-by: Michal Simek --- arch/arm/cpu/armv8/zynqmp/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index 60d7d20e17c8..f90cca36aa72 100644 --- a/arch/arm/cpu/armv8/zynqmp/cpu.c +++ b/arch/arm/cpu/armv8/zynqmp/cpu.c @@ -191,4 +191,9 @@ void enable_caches(void) set_sctlr(get_sctlr() | CR_C); } + +u64 *arch_get_page_table(void) +{ + return (u64 *)(gd->arch.tlb_addr + 0x3000); +} #endif -- 2.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/5] dma: lpc32xx: add DMA driver
On Wednesday, August 05, 2015 at 01:00:03 PM, LEMIEUX, SYLVAIN wrote: > Hi Marek, Hi! > See comment and question below. > > > -Original Message- > > From: Marek Vasut [mailto:ma...@denx.de] > > Sent: 4-Aug-15 5:32 PM > > > > On Tuesday, August 04, 2015 at 11:04:38 PM, slemieux.t...@gmail.com wrote: > > > From: Sylvain Lemieux > > > > > > Incorporate DMA driver from legacy LPCLinux NXP BSP. > > > The files taken from the legacy patch are: > > > - lpc32xx DMA driver > > > - lpc3250 header file DMA registers definition. > > > > > > The legacy driver was updated and clean-up as part of the integration > > > with the latest u-boot. > > > > > > Signed-off-by: Sylvain Lemieux > > > > [...] > > > > > + > > > +/* > > > + * The "dmac_ll" structure is mapping the DMA channel register, > > > + * as per UM10326, "LPC32x0 and LPC32x0/01 User manual" - Rev. 3 > > > + * tables 84, 85, 86 & 87. > > > + * > > > + * The DMA client (ex. NAND SLC) can use this macro to write the > > > + * next DMA linked list item address. > > > + */ > > > +#define lpc32xx_dmac_next_lli(x) (uint32_t)x > > > > Ew, and it's not even used :-) > > This is used inside "drivers/mtd/nand/lpc32xx_nand_slc.c"; > Refer to this patch for details: https://patchwork.ozlabs.org/patch/503815/ > > Are we OK to keep this define there? Sorry, I didn't realize that. But in that case, just use (x) in lpc32xx_nand_slc.c ? The macro is only obfuscating the code. Also, the macro is wrong, not only does it do explicit cast (not a very nice thing to do), but it also doens't put parenthesis around the x, which can have ugly impacts. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 5/5] usb: lpc32xx: add host USB driver
On Wednesday, August 05, 2015 at 12:54:38 PM, LEMIEUX, SYLVAIN wrote: > Hi Marek, > > Is it OK to only submit the patch that need to be update as a new > version or I always have to resubmit the complete set of patches? It's OK to submit just the patch, see "Sending updated patch versions" at http://www.denx.de/wiki/U-Boot/Patches#General_Patch_Submission_Rules > See comments and question below. > > > Sylvain > > > -Original Message- > > From: Marek Vasut [mailto:ma...@denx.de] > > > > On Tuesday, August 04, 2015 at 11:04:42 PM, slemieux.t...@gmail.com wrote: > > > From: Sylvain Lemieux > > > > > > Incorporate USB driver from legacy LPCLinux NXP BSP. > > > The files taken from the legacy patch are: > > > - lpc32xx USB driver > > > - lpc3250 header file USB registers definition. > > > > > > The legacy driver was updated and clean-up as part > > > of the integration with the latest u-boot. > > > > > > Signed-off-by: Sylvain Lemieux > > > --- > > > > Hi! > > > > > +static int wait_for_bit(void *reg, const uint32_t mask, bool set) > > > +{ > > > + unsigned int timeout = 100; > > > + uint32_t val; > > > + > > > + while (--timeout) { > > > > Where did the get_timer() stuff disappear ? :'-( > > I reused the "wait_for_bit()" from " drivers/usb/host/dwc2.c"; > this implement does not use "get_timer()". > > Should I update this driver implementation of "wait_for_bit()" to use > "get_timer()" or keep it the same as the implementation from "dwc2.c"? If you feel like it, that'd be nice. Sorry for not being explicit about keeping the get_timer() . > > > + val = readl(reg); > > > + if (!set) > > > + val = ~val; > > > + > > > + if ((val & mask) == mask) > > > + return 0; > > > + > > > + udelay(1); > > > + } > > > + > > > + debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", > > > + __func__, reg, mask, set); > > > + > > > + return -ETIMEDOUT; > > > +} > > [...] ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ddr: altera: sequencer: add RW_MGR_MEM_NUMBER_OF_RANKS
On 8/5/15 3:57 AM, Marek Vasut wrote: > > btw. did you have time to skim through [PATCH 00/28] socfpga: sdram.c cleanups > please ? I'd like to apply that to master, put on the sequencer cleanups and > this patch and then submit a PR :) > Oh, I didn't see this series come in. You've been so quiet, :). I'll look for it. Thanks, Dinh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ddr: altera: sequencer: add RW_MGR_MEM_NUMBER_OF_RANKS
On Wednesday, August 05, 2015 at 03:22:04 PM, Dinh Nguyen wrote: > On 8/5/15 3:57 AM, Marek Vasut wrote: > > btw. did you have time to skim through [PATCH 00/28] socfpga: sdram.c > > cleanups please ? I'd like to apply that to master, put on the sequencer > > cleanups and this patch and then submit a PR :) > > Oh, I didn't see this series come in. You've been so quiet, :). I'll > look for it. Maybe the spam filter in Altera blocked me for a while there :-) Thanks! Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: Fix device detection code
Hi, On 05-08-15 03:19, Marek Vasut wrote: The code in question polls an USB port status via USB_REQ_GET_STATUS to determine whether there is a device on the port or not. The way to figure that out is to check two bits. Those are wPortChange[0] and wPortStatus[0]. The wPortChange[0] indicates whether some kind of a connection status change happened on a port (a device was plugged or unplugged). The wPortStatus[0] bit indicates the status of the connection (plugged or unplugged). The current code tests whether wPortChange[0] == wPortStatus[0] and if that's the case, considers the loop polling for the presence of a USB device on port finished. This works for most USB sticks, since they come up really quickly and trigger the USB port change detection before the first iteration of the detection loop happens. Thus, both wPortChange[0] and wPortStatus[0] are set to 1 and thus equal. The loop is existed in it's first iteration and the stick is detected correctly. The problem is with some obscure USB sticks, which take some time before they pop up on the bus after the port was enabled. In this case, both the wPortChange[0] and wPortStatus[0] are 0. They are equal again, so the loop again exits in the first iteration, but this is incorrect, as such USB stick didn't have the opportunity to get detected on the bus. Rework the code such, that it checks for wPortChange[0] first to test if any connection change happened at all. If no change occured, keep polling. If a change did occur, test the wPortStatus[0] to see there is some device present on the port and only if this is the case, break out of the polling loop. This patch also trims down the duration of the polling loop from 10s per port to 1s per port. This is still annoyingly long, but there is no better option in case of U-Boot unfortunatelly. This change will most likely increase the duration of 'usb start' on some platforms, but this is needed to fix a bug. Signed-off-by: Marek Vasut Cc: Simon Glass Cc: Hans de Goede Looks good to me: Reviewed-by: Hans de Goede Regards, Hans --- common/usb_hub.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index f621ddb..652a104 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -489,11 +489,15 @@ static int usb_hub_configure(struct usb_device *dev) portstatus = le16_to_cpu(portsts->wPortStatus); portchange = le16_to_cpu(portsts->wPortChange); - if ((portchange & USB_PORT_STAT_C_CONNECTION) == - (portstatus & USB_PORT_STAT_CONNECTION)) + /* No connection change happened, wait a bit more. */ + if (!(portchange & USB_PORT_STAT_C_CONNECTION)) + continue; + + /* Test if the connection came up, and if so, exit. */ + if (portstatus & USB_PORT_STAT_CONNECTION) break; - } while (get_timer(start) < CONFIG_SYS_HZ * 10); + } while (get_timer(start) < CONFIG_SYS_HZ * 1); if (ret < 0) continue; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sf: Make 4K sector support configurable
On Wednesday, August 05, 2015 at 10:36:31 AM, Jagan Teki wrote: > On 5 August 2015 at 13:50, Jagan Teki wrote: > > On 3 August 2015 at 04:58, Marek Vasut wrote: > >> Make the support for 4K subpage I/O on a SPI NOR flash configurable. > >> A board which requires the SPI NOR to be accessed in larger 32KiB > >> or 64KiB pages can disable the 4K subpage support, but by default, > >> the support for 4K subpage I/O is enabled. The functionality of this > >> option is the same as CONFIG_MTD_SPI_NOR_USE_4K_SECTORS in Linux. > >> > >> This is extremely useful in case one uses UBI on a SPI NOR flash. > >> UBI needs at least 15k EBs and can not work on a flash which uses > >> 4k ones, so disabling the support for 4k subpages lets UBI work on > >> such flash. > >> > >> Signed-off-by: Marek Vasut > >> Cc: Jagan Teki > >> --- > >> > >> drivers/mtd/spi/Kconfig | 15 +++ > >> drivers/mtd/spi/sf_internal.h | 4 > >> 2 files changed, 19 insertions(+) > >> > >> diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig > >> index 8b730ff..3f7433c 100644 > >> --- a/drivers/mtd/spi/Kconfig > >> +++ b/drivers/mtd/spi/Kconfig > >> @@ -86,6 +86,21 @@ config SPI_FLASH_WINBOND > >> > >> endif > >> > >> +config SPI_FLASH_USE_4K_SECTORS > >> + bool "Use small 4096 B erase sectors" > >> + depends on SPI_FLASH > >> + default y > >> + help > >> + Many flash memories support erasing small (4096 B) sectors. > >> Depending + on the usage this feature may provide performance > >> gain in comparison + to erasing whole blocks (32/64 KiB). > >> + Changing a small part of the flash's contents is usually > >> faster with + small sectors. On the other hand erasing should > >> be faster when using + 64 KiB block instead of 16 × 4 KiB > >> sectors. > >> + > >> + Please note that some tools/drivers/filesystems may not work > >> with + 4096 B erase size (e.g. UBIFS requires 15 KiB as a > >> minimum). + > >> > >> config SPI_FLASH_DATAFLASH > >> > >> bool "AT45xxx DataFlash support" > >> depends on SPI_FLASH && DM_SPI_FLASH > >> > >> diff --git a/drivers/mtd/spi/sf_internal.h > >> b/drivers/mtd/spi/sf_internal.h index 9fb5557..9c95d56 100644 > >> --- a/drivers/mtd/spi/sf_internal.h > >> +++ b/drivers/mtd/spi/sf_internal.h > >> @@ -37,7 +37,11 @@ enum spi_read_cmds { > >> > >> /* sf param flags */ > >> enum { > >> > >> +#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS > >> > >> SECT_4K = 1 << 0, > >> > >> +#else > >> + SECT_4K = 0 << 0, > >> +#endif > >> > >> SECT_32K= 1 << 1, > >> E_FSR = 1 << 2, > >> SST_BP = 1 << 3, > >> > >> -- > >> 2.1.4 > > > > Reviewed-by: Jagan Teki > > Applied to u-boot-spi/master Excellent, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/19] dm: pmic: max77686: Support all BUCK regulators
Hello Simon, On 08/03/2015 04:19 PM, Simon Glass wrote: Add support for all BUCK regulators, now that the correct register is accessed for each. Signed-off-by: Simon Glass --- Changes in v2: - Add a comment about DVS in the driver drivers/power/regulator/max77686.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c index 21173fc..946b87c 100644 --- a/drivers/power/regulator/max77686.c +++ b/drivers/power/regulator/max77686.c @@ -81,13 +81,15 @@ static int max77686_buck_volt2hex(int buck, int uV) /* hex = (uV - 60) / 12500; */ hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP; hex_max = MAX77686_BUCK234_VOLT_MAX_HEX; - /** -* Those use voltage scaller - temporary not implemented -* so return just 0 -*/ - return -ENOSYS; + break; default: - /* hex = (uV - 75) / 5; */ + /* +* hex = (uV - 75) / 5. We assume that dynamic voltage +* scaling via GPIOs is not enabled and don't support that. +* If this is enabled then the driver will need to take that +* into account anrd check different registers depending on and check +* the current setting See the datasheet for details. setting. See ... snip ... Best regards, -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marc...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 09/19] exynos: Add common board code for exynos5 boards that use device tree
Hello Simon, On 08/03/2015 04:19 PM, Simon Glass wrote: Some boards use device tree for almost all board-specific configuration. They therefore do not need their own separate board code, but can all use the same version. Add a common version of the board code. It uses the PMIC, regulator and video bridge uclasses. This will support smdk5250, smdk5420, snow, spring, pit and pi. Signed-off-by: Simon Glass --- Changes in v2: None board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++ 2 files changed, 363 insertions(+) create mode 100644 board/samsung/common/exynos5-dt.c diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile index 5fb01ce..6cbd906 100644 --- a/board/samsung/common/Makefile +++ b/board/samsung/common/Makefile @@ -11,4 +11,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON)+= board.o +obj-$(CONFIG_EXYNOS5_DT) += exynos5-dt.o endif diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c new file mode 100644 index 000..7d1b88a --- /dev/null +++ b/board/samsung/common/exynos5-dt.c @@ -0,0 +1,362 @@ +/* + * Copyright (C) 2012 Samsung Electronics + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static void board_enable_audio_codec(void) +{ + int node, ret; + struct gpio_desc en_gpio; + + node = fdtdec_next_compatible(gd->fdt_blob, 0, + COMPAT_SAMSUNG_EXYNOS5_SOUND); + if (node <= 0) + return; + + ret = gpio_request_by_name_nodev(gd->fdt_blob, node, +"codec-enable-gpio", 0, &en_gpio, +GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + if (ret == -FDT_ERR_NOTFOUND) + return; + + /* Turn on the GPIO which connects to the codec's "enable" line. */ + gpio_set_pull(gpio_get_number(&en_gpio), S5P_GPIO_PULL_NONE); + +#ifdef CONFIG_SOUND_MAX98095 + /* Enable MAX98095 Codec */ + gpio_request(EXYNOS5_GPIO_X17, "max98095_enable"); + gpio_direction_output(EXYNOS5_GPIO_X17, 1); + gpio_set_pull(EXYNOS5_GPIO_X17, S5P_GPIO_PULL_NONE); +#endif +} + +int exynos_init(void) +{ + board_enable_audio_codec(); + + return 0; +} + +static int exynos_set_regulator(const char *name, uint uv) +{ + struct udevice *dev; + int ret; + + ret = regulator_get_by_platname(name, &dev); + if (ret) { + debug("%s: Cannot find regulator %s\n", __func__, name); + return ret; + } + ret = regulator_set_value(dev, uv); + if (ret) { + debug("%s: Cannot set regulator %s\n", __func__, name); + return ret; + } + + return 0; +} + +int exynos_power_init(void) +{ + struct udevice *dev; + int ret; + + ret = pmic_get("max77686", &dev); + if (!ret) { + /* TODO(s...@chromium.org): Move into the clock/pmic API */ + ret = pmic_clrsetbits(dev, MAX77686_REG_PMIC_32KHZ, 0, + MAX77686_32KHCP_EN); + if (ret) + return ret; + ret = pmic_clrsetbits(dev, MAX77686_REG_PMIC_BBAT, 0, + MAX77686_BBCHOSTEN | MAX77686_BBCVS_3_5V); + if (ret) + return ret; + } else { + ret = pmic_get("s5m8767-pmic", &dev); + /* TODO(s...@chromium.org): Use driver model to access clock */ +#ifdef CONFIG_PMIC_S5M8767 What about: "if (dev)" or "if (!ret && dev)", instead of #ifdef? + if (!ret) + s5m8767_enable_32khz_cp(dev); +#endif ... snip ... Best regards -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marc...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 00/19] dm: exynos: Driver model improvements leading to spring support
Hello Simon, On 08/03/2015 04:19 PM, Simon Glass wrote: This series adds a number of fixes and improvements to driver model as well as two new uclasses (video bridges and I2c muxes). The series is aimed at adding support for spring (HP 11 Chromebook). Since it is very similar to other ARM Chromebooks, some effory is made to use common code rather than duplicating functionality. In fact spring uses the same code as several other boards, just with a different device tree and a few configuration changes. Audio works correctly on pit, pi, spring and snow with this series. A bug in the I2C driver broken this recently. The exynos implementation still has a few rough areas - e.g. some hard-coded GPIOs and the old-style SPL. Also it does not yet support CPU frequency scaling and power management. Spring has some oddities and they are hard to handle with U-Boot's old way of doing drivers. With driver model these can be implemented cleanly and this sort of problem was the original motivation for my interest in driver model. This series is available at u-boot-dm in branch spring-working. It is based on the previous set of driver model changes in branch clk-working. Changes in v2: - Add a README explaining the algorithm and update the commit message - Add a comment about DVS in the driver - Add a new patch to hold off the need for driver model pinctrl - Add new patch to correct LDO and BUCK naming - Rebase to dm/master - Update commit message and header file to better explain select()/deselect() Simon Glass (19): exynos: dts: Correct LDO and BUCK naming video: Work around lack of pinctrl dm: i2c: Add support for multiplexed I2C buses i2c: Add a mux for GPIO-based I2C bus arbitration dm: cros_ec: Convert the I2C tunnel code to use driver model cros_ec: Support the LDO access method used by spring dm: pmic: max77686: Support all BUCK regulators exynos: dts: Drop the old TPS65090 I2C node exynos: Add common board code for exynos5 boards that use device tree exynos: Enable new features for exynos5 boards exynos: config: Move common options to the common headers and tidy up exynos: Drop old exynos5420-specific board code exynos: Drop old exynos5250-specific board code power: Remove old TPS65090 drivers cros_ec: Remove the old tunnel code video: Remove the old parade driver dts: Drop unused compatible ID for the NXP video bridge exynos: video: Remove non-device-tree code exynos: Add support for spring arch/arm/cpu/armv7/exynos/Kconfig | 6 + arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos4412-odroid.dts | 56 +-- arch/arm/dts/exynos4412-trats2.dts | 70 ++-- arch/arm/dts/exynos5250-snow.dts | 16 - arch/arm/dts/exynos5250-spring.dts | 588 + arch/arm/include/asm/arch-exynos/dp_info.h | 2 - board/samsung/common/Makefile | 1 + board/samsung/common/exynos5-dt.c | 362 ++ board/samsung/smdk5250/Kconfig | 13 + board/samsung/smdk5250/MAINTAINERS | 6 + board/samsung/smdk5250/Makefile| 4 - board/samsung/smdk5250/exynos5-dt.c| 306 --- board/samsung/smdk5420/Makefile| 4 - board/samsung/smdk5420/smdk5420.c | 143 --- configs/arndale_defconfig | 2 + configs/odroid-xu3_defconfig | 6 + configs/peach-pi_defconfig | 19 + configs/peach-pit_defconfig| 19 + configs/smdk5250_defconfig | 10 + configs/smdk5420_defconfig | 6 + configs/snow_defconfig | 23 ++ configs/spring_defconfig | 42 +++ doc/README.i2c | 60 +++ doc/device-tree-bindings/i2c/i2c-mux.txt | 60 +++ drivers/i2c/Kconfig| 26 ++ drivers/i2c/Makefile | 4 + drivers/i2c/cros_ec_ldo.c | 77 drivers/i2c/cros_ec_tunnel.c | 41 ++ drivers/i2c/muxes/Kconfig | 17 + drivers/i2c/muxes/Makefile | 7 + drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 147 drivers/i2c/muxes/i2c-mux-uclass.c | 198 ++ drivers/misc/cros_ec.c | 288 +++--- drivers/power/pmic/Makefile| 2 - drivers/power/pmic/pmic_tps65090.c | 310 --- drivers/power/pmic/pmic_tps65090_ec.c | 218 --- drivers/power/regulator/max77686.c | 18 +- drivers/video/Makefile | 1 - drivers/video/bridge/video-bridge-uclass.c | 28 +- drivers/video/exynos_dp.c | 22 -- drivers/video/parade.c | 231 include/configs/arndale.h | 18 +- include/configs/exynos5-common.h | 13 +- include/configs/exy
Re: [U-Boot] [PATCH 2/2] Tegra: PLL: use per-SoC pllinfo table instead of PLL_DIVM/N/P, etc.
On Tue, 2015-08-04 at 15:36 +, Tom Warren wrote: > Thanks. My T20/T30 boards are moth-balled, so I don't test on them. > T210 USB is fine. > If you can provide CAR register dumps (0x60006000 - 0x60006FFF) on > T20 I can take a look. I had a look at it. Looks like you missed the cpcon stuff for PLLX both on T20 as well as T30 but while the former's PLLX won't even lock any more the later seems to still lock OK. Nonetheless I will send a patch to fix this for both shortly. > Appreciate any testing you can do. This won't go in to u-boot-tegra > until you are satisified. Your patience with us remaining T20/T30 users is highly appreciated as we still hope to be selling those Colibris for another 10 resp. 13 years! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] net: fec: do not access reserved register for i.MX6UL
Hi Peng, On 08/03/2015 01:06 PM, Peng Fan wrote: The MIB RAM and FIFO receive start register does not exist on i.MX6UL. Accessing these register will cause enet not work well. Signed-off-by: Peng Fan Signed-off-by: Fugang Duan Cc: Joe Hershberger --- drivers/net/fec_mxc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index c5dcbbb..7fb1d5f 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -520,8 +520,10 @@ static int fec_open(struct eth_device *edev) static int fec_init(struct eth_device *dev, bd_t* bd) { struct fec_priv *fec = (struct fec_priv *)dev->priv; +#if !defined(CONFIG_MX6UL) uint32_t mib_ptr = (uint32_t)&fec->eth->rmon_t_drop; int i; +#endif /* Initialize MAC address */ fec_set_hwaddr(dev); @@ -551,12 +553,14 @@ static int fec_init(struct eth_device *dev, bd_t* bd) writel(0x, &fec->eth->gaddr2); +#if !defined(CONFIG_MX6UL) /* clear MIB RAM */ for (i = mib_ptr; i <= mib_ptr + 0xfc; i += 4) writel(0, i); /* FIFO receive start register */ writel(0x520, &fec->eth->r_fstart); +#endif /* size and address of each buffer */ writel(FEC_MAX_PKT_SIZE, &fec->eth->emrbr); Is it possible to do runtime check for the SoC type, instead of ifdefs? Regards, Nikolay ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tegra: pll: fix pllx cpcon in pllinfo table for t20/t30
From: Marcel Ziswiler Fix CPCON mask and shift of PLLX for T20 as well as T30. While the former's PLLX did not even lock any more resulting is super slow operation the later seemed to still lock OK. Nonetheless I this patch fixes it for both. Signed-off-by: Marcel Ziswiler --- Note: This patch requires Tom's two Tegra PLL patches being applied first. arch/arm/mach-tegra/tegra20/clock.c | 2 +- arch/arm/mach-tegra/tegra30/clock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c index df9f412..dea459b 100644 --- a/arch/arm/mach-tegra/tegra20/clock.c +++ b/arch/arm/mach-tegra/tegra20/clock.c @@ -379,7 +379,7 @@ struct clk_pll_info tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD */ { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x0F, - .lock_ena = 18, .lock_det = 27, .kcp_shift = 0, .kcp_mask = 0, .kvco_shift = 0, .kvco_mask = 0 }, /* PLLX */ + .lock_ena = 18, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 0, .kvco_mask = 0 }, /* PLLX */ { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift = 0, .p_mask = 0, .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, .kvco_shift = 0, .kvco_mask = 1 }, /* PLLE */ { .m_shift = 0, .m_mask = 0x0F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c index 4267bb2..3ce508b 100644 --- a/arch/arm/mach-tegra/tegra30/clock.c +++ b/arch/arm/mach-tegra/tegra30/clock.c @@ -428,7 +428,7 @@ struct clk_pll_info tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD */ { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift = 20, .p_mask = 0x0F, - .lock_ena = 18, .lock_det = 27, .kcp_shift = 0, .kcp_mask = 0, .kvco_shift = 0, .kvco_mask = 0 }, /* PLLX */ + .lock_ena = 18, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 0, .kvco_mask = 0 }, /* PLLX */ { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift = 0, .p_mask = 0, .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, .kvco_shift = 0, .kvco_mask = 1 }, /* PLLE */ { .m_shift = 0, .m_mask = 0x0F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] common: Display >=4GiB memory bank size
On 2 August 2015 at 21:33, Bin Meng wrote: > bd->bi_dram[] has both start address and size defined as 32-bit, > which is not the case on some platforms where >=4GiB memory bank > is used. Change them to support such memory banks. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - Drop patches which are already applied > - Change start to phys_addr_t > - Change debug output to either %016llx or %08lx > > common/board_f.c | 9 - > include/asm-generic/u-boot.h | 4 ++-- > 2 files changed, 10 insertions(+), 3 deletions(-) Acked-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] gpio: Add DW APB GPIO driver
Hi Marek, On 2 August 2015 at 18:16, Marek Vasut wrote: > On Monday, August 03, 2015 at 01:38:28 AM, Simon Glass wrote: >> Hi Marek, > > Hi Simon, > > [...] > >> >> > + if (!fdtdec_get_bool(blob, node, "gpio-controller")) >> >> > + continue; >> >> > + >> >> > + plat = NULL; >> >> > + plat = calloc(1, sizeof(*plat)); >> >> >> >> I suppose this should use devm_alloc() now. >> > >> > Is that even in u-boot/master ? Also, I'm not sure it's a good idea to >> > put this in if I use this driver in SPL. >> >> Yes it's very new. Only in dm/master. >> >> It's only compiled in when enabled, so you can still use it in SPL. >> >> Up to you. At some point I think we should convert all driver allocs >> to use devm so that we know what allocation is going on. > > When is this landing in master ? I don't mind either way, but I can do > a linting pass on the socfpga when things settle down too. Hopefully I'll have a pull request out on Friday. > >> >> > + if (!plat) >> >> > + return -ENOMEM; >> >> > + >> >> > + plat->base = base; >> >> > + plat->bank = bank; >> >> > + plat->pins = fdtdec_get_int(blob, node, >> >> > "snps,nr-gpios", 0); + snprintf(plat->name, >> >> > sizeof(plat->name) - 1, "%s-bank%i-", +name, >> >> > bank); >> >> >> >> Why such a long name? That's going to be a pain to type in the 'gpio' >> >> command. >> > >> > Do you have a suggestion please ? >> >> A, B, C is good if you have <=26 banks. Tegra does that. >> >> Exynos does PA0, PA1, PB0, PC0, PC1, etc. > > How do I identify which one is PA0/PA1/PA2 , shall I perform some > transformation > on the register address of the GPIO block or example ? But how can I assure > that > if the next SoCFPGA has these addresses completely different, these GPIO > numbers > will be stable ? Isn't it better to be explicit about the GPIO block ID then ? It's up to you. Normally each bank has a name and the datasheet specifies it. In your case if not you could think about a naming scheme. > > Also, remember that I have an FPGA in the same package, which has a lot of > I/O. > >> > Also, I can as well use "gpio N" , where N is a number. > > What about this ? How does indexing the GPIOs with plain number fit into the > picture please ? Driver model GPIO handles this automatically. If you can add different numbers of GPIO blocks you might consider adding them as different GPIO banks with their own names. The global number depends on the probe order which depends on the bind order (i.e. device tree node order). But names are safer than numbers - a small change can change all the numbers. There is a function to get the global number given a GPIO device and offset. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] x86: queensbay: Support pre-relocation dm pci
Hi Bin, On 2 August 2015 at 19:52, Bin Meng wrote: > Hi Simon, > > On Mon, Aug 3, 2015 at 6:31 AM, Simon Glass wrote: >> Hi Bin, >> >> On 27 July 2015 at 01:33, Bin Meng wrote: >>> Increase CONFIG_MALLOC_F_LEN so that dm pci does not fail with -ENOMEM >>> before relocation. This makes pci uart work again on Intel Crown Bay. >>> >>> Signed-off-by: Bin Meng >>> --- >>> >>> arch/x86/cpu/queensbay/Kconfig | 3 +++ >>> arch/x86/cpu/queensbay/tnc.c | 13 + >>> arch/x86/dts/crownbay.dts | 2 -- >>> 3 files changed, 16 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/x86/cpu/queensbay/Kconfig b/arch/x86/cpu/queensbay/Kconfig >>> index fbf85f2..8eb619c 100644 >>> --- a/arch/x86/cpu/queensbay/Kconfig >>> +++ b/arch/x86/cpu/queensbay/Kconfig >>> @@ -42,4 +42,7 @@ config CPU_ADDR_BITS >>> int >>> default 32 >>> >>> +config SYS_MALLOC_F_LEN >>> + default 0x8000 >> >> 32KB? Wow that's a huge amount. How much does it actually use? Perhaps >> we should change PCI so that it respects the u-boot,dm-pre-reloc >> property? >> > > I just add a zero to the original value :) I did not measure the > actual memory consumption since after fsp_init() we have plenty of > memory to be used as the stack. For queensbay platform, it has lots of > pci devices each of which will need allocate some memory for dm pci to > use. I think it is worth checking this and using a value closer to what you need. board_init_f.c has a debug output for it I think. Also I wonder if we can avoid creating PCI devices for everything pre-relocation, when we only need serial? Regards, SImon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] x86: Explicitly trigger pci bus configuration with driver model
Hi Bin, On 2 August 2015 at 19:54, Bin Meng wrote: > Hi Simon, > > On Mon, Aug 3, 2015 at 6:31 AM, Simon Glass wrote: >> Hi Bin, >> >> On 27 July 2015 at 01:33, Bin Meng wrote: >>> With driver model, probing pci bus is all done on a lazy basis, >>> as needed. On x86, pci bus is the fundamental device that needs >>> to work before any other peripherals. In order to have a working >>> pci before any other pci devices can be initialized, we need >>> explicitly trigger the pci bus configuration. >>> >>> Signed-off-by: Bin Meng >>> --- >>> >>> common/board_r.c | 16 >>> 1 file changed, 16 insertions(+) >>> >>> diff --git a/common/board_r.c b/common/board_r.c >>> index bf6c725..4263e47 100644 >>> --- a/common/board_r.c >>> +++ b/common/board_r.c >>> @@ -233,6 +233,22 @@ static int initr_pci(void) >>> { >>> #ifndef CONFIG_DM_PCI >>> pci_init(); >>> +#else >>> +#ifdef CONFIG_X86 >>> + /* >>> +* With driver model, probing pci bus is all done on a lazy basis, >>> +* as needed. On x86, pci bus is the fundamental device that needs >>> +* to work before any other peripherals. In order to have a working >>> +* pci before any other pci devices can be initialized, we need >>> +* explicitly trigger the pci bus configuration. >>> +*/ >>> + struct udevice *dev; >>> + int ret; >>> + >>> + ret = uclass_first_device(UCLASS_PCI, &dev); >>> + if (ret) >>> + return ret; >> >> Won't this happen anyway when you first access a PCI device? >> > > Unfortunately no. The pci bus configuration will not be triggered when > calling pci config read/write. > > [snip] We should be able to use the dm_pci_config..() functions and by just getting hold of the bus device it should probe the bus before doing any config. Then it would be auto-triggered. In general we should try to make use of automatic probing - it was supposed to be a key feature of driver model. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] pci: Remove DEBUG from pci_compat.c
On 2 August 2015 at 21:33, Bin Meng wrote: > Remove DEBUG in drivers/pci/pci_compat.c. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - New patch to remove DEBUG from pci_compat.c > > drivers/pci/pci_compat.c | 1 - > 1 file changed, 1 deletion(-) Acked-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 25/47] efi: Support building a u-boot.efi executable
Hi Bin, On 3 August 2015 at 09:51, Bin Meng wrote: > Hi Simon, > > On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass wrote: >> Add support for building U-Boot as an EFI application with a .efi suffix. >> This can be loaded by EFI provided that EFI has the same bit width (32- >> or 64-bit) as U-Boot. This unfortunate limitation is imposed by EFI. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: >> - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP >> >> Makefile | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/Makefile b/Makefile >> index 2a3119e..3fb006b 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -750,6 +750,7 @@ ifneq ($(CONFIG_SPL_TARGET),) >> ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) >> endif >> ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf >> +ALL-$(CONFIG_EFI_APP) += u-boot.efi > > u-boot-app.efi? > >> >> ifneq ($(BUILD_ROM),) >> ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom >> @@ -1078,6 +1079,10 @@ u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin >> dts/dt.dtb FORCE >> endif >> endif >> >> +OBJCOPYFLAGS_u-boot.efi := $(OBJCOPYFLAGS_EFI) > > u-boot-app.efi? > >> +u-boot.efi: u-boot FORCE > > u-boot-app.efi? > >> + $(call if_changed,zobjcopy) >> + >> u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE >> $(call if_changed,cat) >> >> -- Ah, that ended up in a different patch. I'll move it. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 1/2] ARM: tegra: Add e2220-1170 board
On 31 July 2015 at 17:21, Stephen Warren wrote: > > From: Stephen Warren > > E2220-1170 is a Tegra210 bringup board with onboard SoC, DRAM, > eMMC, SD card slot, HDMI, USB micro-B port, and sockets for various > expansion modules. > > Signed-off-by: Stephen Warren > --- > v3: > * More descriptions. > * Add auto-generation notice to pinmux header. > * Incorporate equivalent cleanups to those made to p2571. > v2: Use named constants for PMIC I2C and register addresses. > --- > arch/arm/dts/Makefile | 1 + > arch/arm/dts/tegra210-e2220-1170.dts | 58 + > arch/arm/mach-tegra/tegra210/Kconfig | 8 + > board/nvidia/e2220-1170/Kconfig| 12 + > board/nvidia/e2220-1170/MAINTAINERS| 6 + > board/nvidia/e2220-1170/Makefile | 8 + > board/nvidia/e2220-1170/e2220-1170.c | 51 > board/nvidia/e2220-1170/pinmux-config-e2220-1170.h | 277 > + > configs/e2220-1170_defconfig | 17 ++ > include/configs/e2220-1170.h | 69 + > 10 files changed, 507 insertions(+) > create mode 100644 arch/arm/dts/tegra210-e2220-1170.dts > create mode 100644 board/nvidia/e2220-1170/Kconfig > create mode 100644 board/nvidia/e2220-1170/MAINTAINERS > create mode 100644 board/nvidia/e2220-1170/Makefile > create mode 100644 board/nvidia/e2220-1170/e2220-1170.c > create mode 100644 board/nvidia/e2220-1170/pinmux-config-e2220-1170.h > create mode 100644 configs/e2220-1170_defconfig > create mode 100644 include/configs/e2220-1170.h Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] x86: Document how to write PIRQ information in the device tree
On 2 August 2015 at 21:33, Bin Meng wrote: > Document the development flow on figuring out PIRQ information > during the U-Boot porting. > > Signed-off-by: Bin Meng > > --- > > Changes in v2: > - New patch to document how to write PIRQ information in the device tree > > doc/README.x86 | 41 + > 1 file changed, 41 insertions(+) Excellent. Thanks. Acked-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 2/2] ARM: tegra: Add p2371-0000 board
Hi Stephen, On 31 July 2015 at 17:21, Stephen Warren wrote: > From: Stephen Warren > > P2371- is a P2581 or P2530 CPU board married to a P2595 I/O > board. The combination contains SoC, DRAM, eMMC, SD card slot, > HDMI, USB micro-B port, Ethernet via USB3, USB3 host port, SATA, > a GPIO expansion header, and an analog audio jack. > > Signed-off-by: Stephen Warren > v3: > * More descriptions. > * Add auto-generation notice to pinmux header. > * Incorporate equivalent cleanups to those made to p2571. > v2: Use named constants for PMIC I2C and register addresses. > --- > arch/arm/dts/Makefile | 1 + > arch/arm/dts/tegra210-p2371-.dts | 59 + > arch/arm/mach-tegra/tegra210/Kconfig | 9 + > board/nvidia/p2371-/Kconfig| 12 + > board/nvidia/p2371-/MAINTAINERS| 6 + > board/nvidia/p2371-/Makefile | 8 + > board/nvidia/p2371-/p2371-.c | 51 > board/nvidia/p2371-/pinmux-config-p2371-.h | 268 > + > configs/p2371-_defconfig | 17 ++ > include/configs/p2371-.h | 69 ++ > 10 files changed, 500 insertions(+) > create mode 100644 arch/arm/dts/tegra210-p2371-.dts > create mode 100644 board/nvidia/p2371-/Kconfig > create mode 100644 board/nvidia/p2371-/MAINTAINERS > create mode 100644 board/nvidia/p2371-/Makefile > create mode 100644 board/nvidia/p2371-/p2371-.c > create mode 100644 board/nvidia/p2371-/pinmux-config-p2371-.h > create mode 100644 configs/p2371-_defconfig > create mode 100644 include/configs/p2371-.h > [snip] > diff --git a/board/nvidia/p2371-/p2371-.c > b/board/nvidia/p2371-/p2371-.c > new file mode 100644 > index ..9df543a4c9e8 > --- /dev/null > +++ b/board/nvidia/p2371-/p2371-.c > @@ -0,0 +1,51 @@ > +/* > + * (C) Copyright 2013-2015 > + * NVIDIA Corporation > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#include > +#include > +#include > +#include > +#include "../p2571/max77620_init.h" This is a consequence of not having a proper driver. > +#include "pinmux-config-p2371-.h" > + > +void pin_mux_mmc(void) > +{ > + struct udevice *dev; > + uchar val; > + int ret; > + > + /* Turn on MAX77620 LDO2 to 3.3V for SD card power */ > + debug("%s: Set LDO2 for VDDIO_SDMMC_AP power to 3.3V\n", __func__); > + ret = i2c_get_chip_for_busnum(0, MAX77620_I2C_ADDR_7BIT, 1, &dev); > + if (ret) { > + printf("%s: Cannot find MAX77620 I2C chip\n", __func__); > + return; > + } > + /* 0xF2 for 3.3v, enabled: bit7:6 = 11 = enable, bit5:0 = voltage */ > + val = 0xF2; > + ret = dm_i2c_write(dev, MAX77620_CNFG1_L2_REG, &val, 1); > + if (ret) > + printf("i2c_write 0 0x3c 0x27 failed: %d\n", ret); > +} > + > +/* > + * Routine: pinmux_init > + * Description: Do individual peripheral pinmux configs > + */ > +void pinmux_init(void) > +{ > + pinmux_clear_tristate_input_clamping(); > + > + gpio_config_table(p2371__gpio_inits, > + ARRAY_SIZE(p2371__gpio_inits)); > + > + pinmux_config_pingrp_table(p2371__pingrps, > + ARRAY_SIZE(p2371__pingrps)); > + > + pinmux_config_drvgrp_table(p2371__drvgrps, > + ARRAY_SIZE(p2371__drvgrps)); > +} [snip] > diff --git a/include/configs/p2371-.h b/include/configs/p2371-.h > new file mode 100644 > index ..016aa16d1422 > --- /dev/null > +++ b/include/configs/p2371-.h > @@ -0,0 +1,69 @@ > +/* > + * (C) Copyright 2013-2015 > + * NVIDIA Corporation > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#ifndef _P2371__H > +#define _P2371__H > + > +#include > + > +/* enable PMIC */ > +#define CONFIG_MAX77620_POWER That should go in Kconfig. > + > +#include "tegra210-common.h" > + > +/* High-level configuration options */ > +#define V_PROMPT "Tegra210 (P2371-) # " > +#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P2371-" > + > +/* Board-specific serial config */ > +#define CONFIG_SERIAL_MULTI Is that used? > +#define CONFIG_TEGRA_ENABLE_UARTA > + > +/* I2C */ > +#define CONFIG_SYS_I2C_TEGRA > +#define CONFIG_CMD_I2C > + > +/* SD/MMC */ > +#define CONFIG_MMC > +#define CONFIG_GENERIC_MMC > +#define CONFIG_TEGRA_MMC > +#define CONFIG_CMD_MMC > + > +/* Environment in eMMC, at the end of 2nd "boot sector" */ > +#define CONFIG_ENV_IS_IN_MMC > +#define CONFIG_SYS_MMC_ENV_DEV 0 > +#define CONFIG_SYS_MMC_ENV_PART2 > +#define CONFIG_ENV_OFFSET (-CONFIG_ENV_SIZE) > + > +/* SPI */ > +#define CONFIG_SPI_FLASH_WINBOND > +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 > +#define CONFIG_SF_DE
[U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
From: Marcel Ziswiler The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes. commit 69559093f6173dcfcb041df0995063bdbd07d49b dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle. Signed-off-by: Marcel Ziswiler --- Changes in v2: Fix commit message as pointed out by Simon. common/cmd_usb.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 0ade775..6874af7 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -530,13 +530,16 @@ static void do_usb_start(void) /* try to recognize storage devices immediately */ usb_stor_curr_dev = usb_stor_scan(1); #endif +#endif #ifdef CONFIG_USB_HOST_ETHER # ifdef CONFIG_DM_ETH -# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" -# endif +# ifndef CONFIG_DM_USB +# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" +# endif +# else /* try to recognize ethernet devices immediately */ usb_ether_curr_dev = usb_host_eth_scan(1); -#endif +# endif #endif #ifdef CONFIG_USB_KEYBOARD drv_usb_kbd_init(); -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Enable musb in host mode on the Jesurun Q5
Hi, On 05-08-15 10:09, Ian Campbell wrote: On Tue, 2015-08-04 at 23:51 +0200, Hans de Goede wrote: The Jesurun Q5 has the musb hooked up to an usb-a receptacle, enable it in host-only mode. Signed-off-by: Hans de Goede [..] @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_MACH_SUN4I=y CONFIG_DRAM_CLK=312 +CONFIG_VIDEO_COMPOSITE=y Did you intend this to be in one of the composite mode patches I just looked at, or maybe a separate patch in that series? It doesn't seem to belong here anyway. Oops, dropped this from this commit as it indeed does not belong here. @@ -10,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(19)" # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set CONFIG_USB_EHCI_HCD=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB0_VBUS_PIN="PB9" With the above commit message this hunk: Acked-by: Ian Campbell Thanks & Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] sunxi: display: Add a few extra register and constant defines
Hi, On 05-08-15 09:57, Ian Campbell wrote: On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: Add a few extra sunxi display registers and constant defines. + "Also rename some existing defines (e.g. dropping _GCTRL) and make some more generic (e.g. dropping the 2x scaling from SUNXI_LCDC_TCON1_TIMING_V_TOTAL)." Added to the commit msg, thanks for the reviews. Regards, Hans This is a preparation patch for adding composite video out support. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 2 +- arch/arm/include/asm/arch-sunxi/clock_sun6i.h | 1 + arch/arm/include/asm/arch-sunxi/display.h | 45 --- drivers/video/sunxi_display.c | 8 ++--- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h index 01d3e28..a7e25f4 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h @@ -291,7 +291,7 @@ struct sunxi_ccm_reg { #define CCM_LCD_CH0_CTRL_GATE (0x1 << 31) #define CCM_LCD_CH1_CTRL_M(n) n) - 1) & 0xf) << 0) -/* We leave bit 11 set to 0, so sclk1 == sclk2 */ +#define CCM_LCD_CH1_CTRL_HALF_SCLK1(1 << 11) #define CCM_LCD_CH1_CTRL_PLL3 (0 << 24) #define CCM_LCD_CH1_CTRL_PLL7 (1 << 24) #define CCM_LCD_CH1_CTRL_PLL3_2X (2 << 24) diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h index 8a26b9f..06c6feb 100644 --- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h +++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h @@ -290,6 +290,7 @@ struct sunxi_ccm_reg { #define CCM_LCD_CH0_CTRL_GATE (0x1 << 31) #define CCM_LCD_CH1_CTRL_M(n) n) - 1) & 0xf) << 0) +#define CCM_LCD_CH1_CTRL_HALF_SCLK10 /* no seperate sclk1 & 2 on sun6i */ #define CCM_LCD_CH1_CTRL_PLL3 (0 << 24) #define CCM_LCD_CH1_CTRL_PLL7 (1 << 24) #define CCM_LCD_CH1_CTRL_PLL3_2X (2 << 24) diff --git a/arch/arm/include/asm/arch-sunxi/display.h b/arch/arm/include/asm/arch-sunxi/display.h index ae95417..830ec42 100644 --- a/arch/arm/include/asm/arch-sunxi/display.h +++ b/arch/arm/include/asm/arch-sunxi/display.h @@ -151,6 +151,10 @@ struct sunxi_de_be_reg { u32 layer1_attr1_ctrl; /* 0x8a4 */ u32 layer2_attr1_ctrl; /* 0x8a8 */ u32 layer3_attr1_ctrl; /* 0x8ac */ + u8 res5[0x110]; /* 0x8b0 */ + u32 output_color_ctrl; /* 0x9c0 */ + u8 res6[0xc]; /* 0x9c4 */ + u32 output_color_coef[12]; /* 0x9d0 */ }; struct sunxi_lcdc_reg { @@ -298,7 +302,7 @@ struct sunxi_tve_reg { u32 cbr_level; /* 0x10c */ u32 burst_phase;/* 0x110 */ u32 burst_width;/* 0x114 */ - u8 res2[0x04]; /* 0x118 */ + u32 unknown2; /* 0x118 */ u32 sync_vbi_level; /* 0x11c */ u32 white_level;/* 0x120 */ u32 active_num; /* 0x124 */ @@ -331,11 +335,14 @@ struct sunxi_tve_reg { #define SUNXI_DE_BE_HEIGHT(y) (((y) - 1) << 16) #define SUNXI_DE_BE_MODE_ENABLE (1 << 0) #define SUNXI_DE_BE_MODE_START(1 << 1) +#define SUNXI_DE_BE_MODE_DEFLICKER_ENABLE (1 << 4) #define SUNXI_DE_BE_MODE_LAYER0_ENABLE(1 << 8) +#define SUNXI_DE_BE_MODE_INTERLACE_ENABLE (1 << 28) #define SUNXI_DE_BE_LAYER_STRIDE(x) ((x) << 5) #define SUNXI_DE_BE_REG_CTRL_LOAD_REGS(1 << 0) #define SUNXI_DE_BE_LAYER_ATTR0_SRC_FE0 0x0002 #define SUNXI_DE_BE_LAYER_ATTR1_FMT_XRGB (0x09 << 8) +#define SUNXI_DE_BE_OUTPUT_COLOR_CTRL_ENABLE 1 /* * LCDC register constants. @@ -372,11 +379,12 @@ struct sunxi_tve_reg { #define SUNXI_LCDC_TCON0_LVDS_INTF_ENABLE (1 << 31) #define SUNXI_LCDC_TCON0_IO_POL_DCLK_PHASE(x) ((x) << 28) #define SUNXI_LCDC_TCON1_CTRL_CLK_DELAY(n)(((n) & 0x1f) << 4) +#define SUNXI_LCDC_TCON1_CTRL_INTERLACE(n) ((n) << 20) #define SUNXI_LCDC_TCON1_CTRL_ENABLE (1 << 31) #define SUNXI_LCDC_TCON1_TIMING_H_BP(n) (((n) - 1) << 0) #define SUNXI_LCDC_TCON1_TIMING_H_TOTAL(n)(((n) - 1) << 16) #define SUNXI_LCDC_TCON1_TIMING_V_BP(n) (((n) - 1) << 0) -#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) (((n) * 2) << 16) +#define SUNXI_LCDC_TCON1_TIMING_V_TOTAL(n) ((n) << 16) #ifdef CONFIG_SUNXI_GEN_SUN6I #define SUNXI_LCDC_LVDS_ANA0 0x40040320 #define SUNXI_LCDC_LVDS_ANA0_EN_MB(1 << 31) @@ -494,9 +502,22 @@ struct sunxi_tve_reg { */ #define SUNXI_TVE_GCTRL_DAC_INPUT_MASK(dac) (0xf << (((dac) + 1) * 4)) #define SUNXI_TVE_GCTRL_DAC_INPUT(da
Re: [U-Boot] [PATCH 4/5] sunxi: display: Add support for interlaced modes
Hi, On 05-08-15 10:05, Ian Campbell wrote: On Mon, 2015-08-03 at 23:54 +0200, Hans de Goede wrote: @@ -775,13 +781,18 @@ static void sunxi_lcdc_tcon1_mode_set(const struct ctfb_res_modes *mode, clk_delay = sunxi_lcdc_get_clk_delay(mode, 1); writel(SUNXI_LCDC_TCON1_CTRL_ENABLE | + SUNXI_LCDC_TCON1_CTRL_INTERLACE( + mode->vmode == FB_VMODE_INTERLACED) | I think this would be clearer if SUNXI_LCDC_TCON1_CTRL_INTERLACE was actually the enable bit (perhaps with _ENABLE on the name), rather than a macro which takes a boolean and returns 0 or the single bit, so you could just write mode->vmode == FB_VMODE_INTERLACED ? SUNXI_LCDC_TCON1_CTRL_INTERLACE : 0 (in whichever wrapping style you prefer). I think the macro is the bit style is more common in this code for boolean options too, we mainly use the macro-with-argument style for fields with more than 1 bit to them. Agreed, fixed. But ultimately the code is correct as you have it so either way as you prefer: Acked-by: Ian Campbell Although if you want to keep it the way it is then perhaps the macro sh ould have !!n instead of just n, to prevent surprises if someone uses a bitop rather than a full boolean op as an argument? @@ -1240,6 +1245,9 @@ void *video_hw_init(void) return NULL; } +> > printf("Setting up a %dx%d %s console\n", mode->xres, +> >mode->yres, sunxi_get_mon_desc(sunxi_display.monitor)); Is it worth including the string "interlaced" here when appropriate? (Ack stands either way) Also fixed. Thanks, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] fs/fs.c: read up to EOF when len would read past EOF
From: Max Krummenacher http://lists.denx.de/pipermail/u-boot/2012-September/134347.html allows for reading files in chunks from the shell. When this feature is used to read past the end of a file an error was returned instead of returning the bytes read up to the end of file. Thus the following fails in the shell: offset = 0 len = chunksize do read file, offset, len write data until bytes_read < len The patch changes the behaviour to printing an informational message and returning the actual read number of bytes aka read(2) behaviour for convenient use in U-Boot scripts. Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Acked-by: Marek Vasut --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v2: mention read(2) behaviour as suggested by Marek fs/fs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/fs.c b/fs/fs.c index ac0897d..827b143 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -301,10 +301,8 @@ int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len, unmap_sysmem(buf); /* If we requested a specific number of bytes, check we got it */ - if (ret == 0 && len && *actread != len) { - printf("** Unable to read file %s **\n", filename); - ret = -1; - } + if (ret == 0 && len && *actread != len) + printf("** %s shorter than offset + len **\n", filename); fs_close(); return ret; -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] colibri_vf: remove spurious new line
From: Marcel Ziswiler Remove spurious new line in configuration file. Signed-off-by: Marcel Ziswiler Tested-by: Marek Vasut Acked-by: Marek Vasut --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek include/configs/colibri_vf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index ab8d293..e4a0c66 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -69,7 +69,6 @@ "512k(u-boot-env)," \ "-(ubi)" - #define CONFIG_MMC #define CONFIG_FSL_ESDHC #define CONFIG_SYS_FSL_ESDHC_ADDR 0 -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] cfbconsole: Add support for stride != width
cfbconsole currently assumes that the width and stride of the framebuffer are the same, in most places where stride matters it uses a VIDEO_LINE_LEN helper macro. This commit changes the few places not using VIDEO_LINE_LEN to also use VIDEO_LINE_LEN, and protects the default VIDEO_LINE_LEN with a #ifndef guard, allowing the boards config.h to override and, and thus support cases where stride != width. Signed-off-by: Hans de Goede --- drivers/video/cfb_console.c | 72 +++-- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index d122ef7..30e0317 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -283,9 +283,10 @@ void console_cursor(int state); #define VIDEO_COLS VIDEO_VISIBLE_COLS #define VIDEO_ROWS VIDEO_VISIBLE_ROWS -#define VIDEO_SIZE (VIDEO_ROWS*VIDEO_COLS*VIDEO_PIXEL_SIZE) -#define VIDEO_PIX_BLOCKS (VIDEO_SIZE >> 2) -#define VIDEO_LINE_LEN (VIDEO_COLS*VIDEO_PIXEL_SIZE) +#ifndef VIDEO_LINE_LEN +#define VIDEO_LINE_LEN (VIDEO_COLS * VIDEO_PIXEL_SIZE) +#endif +#define VIDEO_SIZE (VIDEO_ROWS * VIDEO_LINE_LEN) #define VIDEO_BURST_LEN(VIDEO_COLS/8) #ifdef CONFIG_VIDEO_LOGO @@ -1306,7 +1307,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, struct palette p[256]; struct bmp_color_table_entry cte; int green_shift, red_off; - int limit = VIDEO_COLS * VIDEO_ROWS; + int limit = (VIDEO_LINE_LEN / VIDEO_PIXEL_SIZE) * VIDEO_ROWS; int pixels = 0; x = 0; @@ -1314,7 +1315,8 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, ncolors = __le32_to_cpu(img->header.colors_used); bpp = VIDEO_PIXEL_SIZE; fbp = (unsigned char *) ((unsigned int) video_fb_address + -(((y + yoff) * VIDEO_COLS) + xoff) * bpp); +(y + yoff) * VIDEO_LINE_LEN + +xoff * bpp); bm = (uchar *) img + __le32_to_cpu(img->header.data_offset); @@ -1368,8 +1370,8 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, y--; fbp = (unsigned char *) ((unsigned int) video_fb_address + -(((y + yoff) * VIDEO_COLS) + - xoff) * bpp); +(y + yoff) * VIDEO_LINE_LEN + +xoff * bpp); continue; case 1: /* end of bitmap data marker */ @@ -1381,8 +1383,8 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, y -= bm[3]; fbp = (unsigned char *) ((unsigned int) video_fb_address + -(((y + yoff) * VIDEO_COLS) + - x + xoff) * bpp); +(y + yoff) * VIDEO_LINE_LEN + +xoff * bpp); bm += 4; break; default: @@ -1561,7 +1563,7 @@ int video_display_bitmap(ulong bmp_image, int x, int y) bmap = (uchar *) bmp + le32_to_cpu(bmp->header.data_offset); fb = (uchar *) (video_fb_address + - ((y + height - 1) * VIDEO_COLS * VIDEO_PIXEL_SIZE) + + ((y + height - 1) * VIDEO_LINE_LEN) + x * VIDEO_PIXEL_SIZE); #ifdef CONFIG_VIDEO_BMP_RLE8 @@ -1597,7 +1599,7 @@ int video_display_bitmap(ulong bmp_image, int x, int y) cte.blue); } bmap += padded_line; - fb -= (VIDEO_VISIBLE_COLS + width) * + fb -= VIDEO_LINE_LEN + width * VIDEO_PIXEL_SIZE; } break; @@ -1628,8 +1630,8 @@ int video_display_bitmap(ulong bmp_image, int x, int y) *fb++ = *bmap++; } bmap += padded_line; - fb -= (VIDEO_VISIBLE_COLS + width) * - VIDEO_PIXEL_SIZE; + fb -= VIDEO_LINE_LEN + width * + VIDEO_PIXEL_SIZE; } break; case GDF__8BIT_332RGB: @@ -1642,8 +1644,8 @@ int video_di
[U-Boot] [PATCH 0/3] sunxi: display: Add overscan correction
Hi Anatolij, Ian, This series sits on top of the composite video out series Ian has just reviewed. The first 2 patches are preparation patches adding support for stride != width to the cfbconsole code. Anatolij, can you either merge these 2 through your tree, or give us your ack for merging these through the sunxi tree ? Thanks & Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] mtd/nand/ubi: assortment of alignment fixes
From: Marcel Ziswiler Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer alignment into account which led to failures of the following form: ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108 ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108 Signed-off-by: Marcel Ziswiler Reviewed-by: Simon Glass Acked-by: Scott Wood --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v4: move wrapper to common.h as suggested by Scott Changes in v3: introduce malloc_cache_aligned() as suggested by Scott Changes in v2: run it through checkpatch.pl and fix long lines common/cmd_ubi.c | 2 +- drivers/mtd/nand/nand_util.c | 2 +- fs/ubifs/super.c | 5 +++-- fs/ubifs/ubifs.c | 4 ++-- include/common.h | 7 +++ lib/gzip.c | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c index cbc10c5..10eea65 100644 --- a/common/cmd_ubi.c +++ b/common/cmd_ubi.c @@ -363,7 +363,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size) tbuf_size = vol->usable_leb_size; if (size < tbuf_size) tbuf_size = ALIGN(size, ubi->min_io_size); - tbuf = malloc(tbuf_size); + tbuf = malloc_cache_aligned(tbuf_size); if (!tbuf) { printf("NO MEM\n"); return ENOMEM; diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index ee2c24d..21b4a61 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -839,7 +839,7 @@ int nand_torture(nand_info_t *nand, loff_t offset) patt_count = ARRAY_SIZE(patterns); - buf = malloc(nand->erasesize); + buf = malloc_cache_aligned(nand->erasesize); if (buf == NULL) { puts("Out of memory for erase block buffer\n"); return -ENOMEM; diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 10f8fff..0bf52db 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -57,7 +57,8 @@ struct inode *iget_locked(struct super_block *sb, unsigned long ino) { struct inode *inode; - inode = (struct inode *)malloc(sizeof(struct ubifs_inode)); + inode = (struct inode *)malloc_cache_aligned( + sizeof(struct ubifs_inode)); if (inode) { inode->i_ino = ino; inode->i_sb = sb; @@ -104,7 +105,7 @@ void iput(struct inode *inode) /* * Allocate and use new inode */ - ino = (struct inode *)malloc(sizeof(struct ubifs_inode)); + ino = (struct inode *)malloc_cache_aligned(sizeof(struct ubifs_inode)); memcpy(ino, inode, sizeof(struct ubifs_inode)); /* diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 6dd6174..4daa7fa 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -108,7 +108,7 @@ static inline struct crypto_comp *crypto_alloc_comp(const char *alg_name, struct crypto_comp *ptr; int i = 0; - ptr = malloc(sizeof(struct crypto_comp)); + ptr = malloc_cache_aligned(sizeof(struct crypto_comp)); while (i < UBIFS_COMPR_TYPES_CNT) { comp = ubifs_compressors[i]; if (!comp) { @@ -723,7 +723,7 @@ static int do_readpage(struct ubifs_info *c, struct inode *inode, * destination area to a multiple of * UBIFS_BLOCK_SIZE. */ - buff = malloc(UBIFS_BLOCK_SIZE); + buff = malloc_cache_aligned(UBIFS_BLOCK_SIZE); if (!buff) { printf("%s: Error, malloc fails!\n", __func__); diff --git a/include/common.h b/include/common.h index 4566bd1..3f02e82 100644 --- a/include/common.h +++ b/include/common.h @@ -1010,6 +1010,13 @@ int cpu_release(int nr, int argc, char * const argv[]); #define DEFINE_CACHE_ALIGN_BUFFER(type, name, size)\ DEFINE_ALIGN_BUFFER(type, name, size, ARCH_DMA_MINALIGN) +#include + +static inline void *malloc_cache_aligned(size_t size) +{ + return memalign(ARCH_DMA_MINALIGN, ALIGN(size, ARCH_DMA_MINALIGN)); +} + /* * check_member() - Check the offset of a structure member * diff --git a/lib/gzip.c b/lib/gzip.c index ff37d4f..cd8e9fe 100644 --- a/lib/gzip.c +++ b/lib/gzip.c @@ -25,7 +25,7 @@ static void *zalloc(void *x, unsigned items, unsigned size) size *= items; size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1); - p = malloc (size); + p = malloc_cache_aligned(size); return (p); } -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] cfbconsole: Remove width argument from the logo functions
The passed in width is always VIDEO_COLS. This is a preparation patch for adding stride != width support to the cfbconsole code. Signed-off-by: Hans de Goede --- drivers/video/cfb_console.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 7f2ddc1..d122ef7 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1826,20 +1826,16 @@ int video_display_bitmap(ulong bmp_image, int x, int y) static int video_logo_xpos; static int video_logo_ypos; -static void plot_logo_or_black(void *screen, int width, int x, int y, \ - int black); +static void plot_logo_or_black(void *screen, int x, int y, int black); -static void logo_plot(void *screen, int width, int x, int y) +static void logo_plot(void *screen, int x, int y) { - plot_logo_or_black(screen, width, x, y, 0); + plot_logo_or_black(screen, x, y, 0); } static void logo_black(void) { - plot_logo_or_black(video_fb_address, \ - VIDEO_COLS, \ - video_logo_xpos, \ - video_logo_ypos, \ + plot_logo_or_black(video_fb_address, video_logo_xpos, video_logo_ypos, 1); } @@ -1858,11 +1854,11 @@ U_BOOT_CMD( " " ); -static void plot_logo_or_black(void *screen, int width, int x, int y, int black) +static void plot_logo_or_black(void *screen, int x, int y, int black) { int xcount, i; - int skip = (width - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE; + int skip = (VIDEO_COLS - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE; int ycount = video_logo_height; unsigned char r, g, b, *logo_red, *logo_blue, *logo_green; unsigned char *source; @@ -1880,7 +1876,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT + y + 1)); #endif /* CONFIG_SPLASH_SCREEN_ALIGN */ - dest = (unsigned char *)screen + (y * width + x) * VIDEO_PIXEL_SIZE; + dest = (unsigned char *)screen + (y * VIDEO_COLS + x) * VIDEO_PIXEL_SIZE; #ifdef CONFIG_VIDEO_BMP_LOGO source = bmp_logo_bitmap; @@ -2009,8 +2005,7 @@ static void *video_logo(void) } #endif /* CONFIG_SPLASH_SCREEN */ - logo_plot(video_fb_address, VIDEO_COLS, - video_logo_xpos, video_logo_ypos); + logo_plot(video_fb_address, video_logo_xpos, video_logo_ypos); #ifdef CONFIG_SPLASH_SCREEN_ALIGN /* -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] sunxi: display: Add overscan correction
Add support for making the visual area of the framebuffer smaller and drawing a black border around it. This is intended for use with overscanning monitors (esp. with composite video out), to avoid part of the picture being invisible. Signed-off-by: Hans de Goede --- doc/README.video | 5 + drivers/video/sunxi_display.c | 48 +- include/configs/sunxi-common.h | 1 + 3 files changed, 44 insertions(+), 10 deletions(-) diff --git a/doc/README.video b/doc/README.video index 4f7a4b5..62ac17b 100644 --- a/doc/README.video +++ b/doc/README.video @@ -68,6 +68,11 @@ The sunxi u-boot driver supports the following video-mode options: overrides the xres, yres and refresh from the video-mode env. variable. Defaults to edid=1. +- overscan_x/overscan_y= - Set x/y overscan value + This configures a black border on the left and right resp. top and bottom + to deal with overscanning displays. Defaults to overscan_x=32 and + overscan_y=20 for composite monitors, 0 for other monitors. + For example to always use the hdmi connector, even if no cable is inserted, using edid info when available and otherwise initalizing it at 1024x768@60Hz, use: "setenv video-mode sunxi:1024x768-24@60,monitor=dvi,hpd=0,edid=1". diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c index 1868185..1449e0d 100644 --- a/drivers/video/sunxi_display.c +++ b/drivers/video/sunxi_display.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "videomodes.h" #include "hitachi_tx18d42vm_lcd.h" @@ -51,6 +52,7 @@ struct sunxi_display { GraphicDevice graphic_device; enum sunxi_monitor monitor; unsigned int depth; + unsigned int fb_addr; unsigned int fb_size; } sunxi_display; @@ -1297,9 +1299,10 @@ void *video_hw_init(void) #ifdef CONFIG_VIDEO_HDMI int ret, hpd, hpd_delay, edid; #endif + int i, overscan_offset, overscan_x, overscan_y; + unsigned int fb_dma_addr; char mon[16]; char *lcd_mode = CONFIG_VIDEO_LCD_MODE; - int i; memset(&sunxi_display, 0, sizeof(struct sunxi_display)); @@ -1310,6 +1313,8 @@ void *video_hw_init(void) hpd_delay = video_get_option_int(options, "hpd_delay", 500); edid = video_get_option_int(options, "edid", 1); #endif + overscan_x = video_get_option_int(options, "overscan_x", -1); + overscan_y = video_get_option_int(options, "overscan_y", -1); sunxi_display.monitor = sunxi_get_default_mon(true); video_get_option_string(options, "monitor", mon, sizeof(mon), sunxi_get_mon_desc(sunxi_display.monitor)); @@ -1386,8 +1391,20 @@ void *video_hw_init(void) break; } + /* Yes these defaults are quite high, overscan on composite sucks... */ + if (overscan_x == -1) + overscan_x = sunxi_is_composite() ? 32 : 0; + if (overscan_y == -1) + overscan_y = sunxi_is_composite() ? 20 : 0; + sunxi_display.fb_size = (mode->xres * mode->yres * 4 + 0xfff) & ~0xfff; + overscan_offset = (overscan_y * mode->xres + overscan_x) * 4; + /* We want to keep the fb_base for simplefb page aligned, where as +* the sunxi dma engines will happily accept an unaligned address. */ + if (overscan_offset) + sunxi_display.fb_size += 0x1000; + if (sunxi_display.fb_size > CONFIG_SUNXI_MAX_FB_SIZE) { printf("Error need %dkB for fb, but only %dkB is reserved\n", sunxi_display.fb_size >> 10, @@ -1395,25 +1412,37 @@ void *video_hw_init(void) return NULL; } - printf("Setting up a %dx%d%s %s console\n", mode->xres, mode->yres, + printf("Setting up a %dx%d%s %s console (overscan %dx%d)\n", + mode->xres, mode->yres, (mode->vmode == FB_VMODE_INTERLACED) ? "i" : "", - sunxi_get_mon_desc(sunxi_display.monitor)); + sunxi_get_mon_desc(sunxi_display.monitor), + overscan_x, overscan_y); gd->fb_base = gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - sunxi_display.fb_size; sunxi_engines_init(); - sunxi_mode_set(mode, gd->fb_base - CONFIG_SYS_SDRAM_BASE); + + fb_dma_addr = gd->fb_base - CONFIG_SYS_SDRAM_BASE; + sunxi_display.fb_addr = gd->fb_base; + if (overscan_offset) { + fb_dma_addr += 0x1000 - (overscan_offset & 0xfff); + sunxi_display.fb_addr += (overscan_offset + 0xfff) & ~0xfff; + memset((void *)gd->fb_base, 0, sunxi_display.fb_size); + flush_cache(gd->fb_base, sunxi_display.fb_size); + } + sunxi_mode_set(mode, fb_dma_addr); /* * These are the only members of this structure that are used. All the * others are driver specific. There is nothing to decribe p
[U-Boot] [RESEND PATCH v5] net: asix: fix operation without eeprom
From: Marcel Ziswiler This patch fixes operation of our on-board AX88772B chip without EEPROM but with a ethaddr coming from the regular U-Boot environment. This is a forward port of some remaining parts initially implemented by Antmicro. Signed-off-by: Marcel Ziswiler Acked-by: Marek Vasut --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v3 as suggested by Marek: - introduce ctl variable - fix comment style - use mdelay Changes in v2: - run it through checkpatch.pl as suggested by Marek and Joe - cleanup comments and use VID/PID defines as suggested by Marek - dug out an AX88772 (not B) dongle again and verified operation - AX88772 (not B) indeed does not work with B modifications (e.g. VID/PID based differentiation is indeed required) - dug out another AX88772B dongle as well and verified operation drivers/usb/eth/asix.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c index 72ec41e..8a43e7c 100644 --- a/drivers/usb/eth/asix.c +++ b/drivers/usb/eth/asix.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2011 The Chromium OS Authors. * + * Patched for AX88772B by Antmicro Ltd + * * SPDX-License-Identifier:GPL-2.0+ */ @@ -64,8 +66,11 @@ AX_MEDIUM_AC | AX_MEDIUM_RE) /* AX88772 & AX88178 RX_CTL values */ -#define AX_RX_CTL_SO 0x0080 -#define AX_RX_CTL_AB 0x0008 +#define AX_RX_CTL_RH2M 0x0200 /* 32-bit aligned RX IP header */ +#define AX_RX_CTL_RH1M 0x0100 /* Enable RX header format type 1 */ +#define AX_RX_CTL_SO 0x0080 +#define AX_RX_CTL_AB 0x0008 +#define AX_RX_HEADER_DEFAULT (AX_RX_CTL_RH1M | AX_RX_CTL_RH2M) #define AX_DEFAULT_RX_CTL \ (AX_RX_CTL_SO | AX_RX_CTL_AB) @@ -92,6 +97,8 @@ #define FLAG_TYPE_AX88772B (1U << 2) #define FLAG_EEPROM_MAC(1U << 3) /* initial mac address in eeprom */ +#define ASIX_USB_VENDOR_ID 0x0b95 +#define AX88772B_USB_PRODUCT_ID0x772b /* driver private */ struct asix_private { @@ -418,15 +425,23 @@ static int asix_basic_reset(struct ueth_data *dev) return 0; } -static int asix_init_common(struct ueth_data *dev) +static int asix_init_common(struct ueth_data *dev, uint8_t *enetaddr) { int timeout = 0; #define TIMEOUT_RESOLUTION 50 /* ms */ int link_detected; + u32 ctl = AX_DEFAULT_RX_CTL; debug("** %s()\n", __func__); - if (asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL) < 0) + if ((dev->pusb_dev->descriptor.idVendor == ASIX_USB_VENDOR_ID) && + (dev->pusb_dev->descriptor.idProduct == AX88772B_USB_PRODUCT_ID)) + ctl |= AX_RX_HEADER_DEFAULT; + + if (asix_write_rx_ctl(dev, ctl) < 0) + goto out_err; + + if (asix_write_hwaddr_common(dev, enetaddr) < 0) goto out_err; do { @@ -447,6 +462,12 @@ static int asix_init_common(struct ueth_data *dev) goto out_err; } + /* +* Wait some more to avoid timeout on first transfer +* (e.g. EHCI timed out on TD - token=0x8008d80) +*/ + mdelay(25); + return 0; out_err: return -1; @@ -488,7 +509,7 @@ static int asix_init(struct eth_device *eth, bd_t *bd) { struct ueth_data *dev = (struct ueth_data *)eth->priv; - return asix_init_common(dev); + return asix_init_common(dev, eth->enetaddr); } static int asix_send(struct eth_device *eth, void *packet, int length) @@ -550,6 +571,12 @@ static int asix_recv(struct eth_device *eth) return -1; } + if ((dev->pusb_dev->descriptor.idVendor == +ASIX_USB_VENDOR_ID) && + (dev->pusb_dev->descriptor.idProduct == +AX88772B_USB_PRODUCT_ID)) + buf_ptr += 2; + /* Notify net stack */ net_process_received_packet(buf_ptr + sizeof(packet_len), packet_len); @@ -729,9 +756,10 @@ int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss, #ifdef CONFIG_DM_ETH static int asix_eth_start(struct udevice *dev) { + struct eth_pdata *pdata = dev_get_platdata(dev); struct asix_private *priv = dev_get_priv(dev); - return asix_init_common(&priv->ueth); + return asix_init_common(&priv->ueth, pdata->enetaddr); } void asix_eth_stop(struct udevice *dev) -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] image-fdt.c: store returned error value
From: Max Krummenacher This fixes the following warning (and the runtime error reporting): ../common/image-fdt.c:491:4: warning: 'fdt_ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Acked-by: Marek Vasut Acked-by: Simon Glass --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v2: run it through checkpatch.pl and replace spaces with tab common/image-fdt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/image-fdt.c b/common/image-fdt.c index 80e3e63..5180a03 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -492,7 +492,8 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, } } if (IMAGE_OF_SYSTEM_SETUP) { - if (ft_system_setup(blob, gd->bd)) { + fdt_ret = ft_system_setup(blob, gd->bd); + if (fdt_ret) { printf("ERROR: system-specific fdt fixup failed: %s\n", fdt_strerror(fdt_ret)); goto err; -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] tftp.c: fix CONFIG_TFTP_TSIZE for small files
From: Max Krummenacher CONFIG_TFTP_TSIZE should limit a tftp downloads progress to 50 '#' chars. Make this work also for small files. If the file size is small, i.e. smaller than 2 tftp block sizes the number of '#' can get much larger. i.e. with a 1 byte file 65000 characters are printed, with a 512 byte file around 500. When using CONFIG TFTP BLOCKSIZE together with CONFIG_IP_DEFRAG the issue is more notable. Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Reviewed-by: Marek Vasut --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v2: run it through checkpatch.pl and fix missing space in if clause as suggested by Marek net/tftp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tftp.c b/net/tftp.c index 3e99e73..89be32a 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -249,6 +249,8 @@ static void show_block_marker(void) if (tftp_tsize) { ulong pos = tftp_cur_block * tftp_block_size + tftp_block_wrap_offset; + if (pos > tftp_tsize) + pos = tftp_tsize; while (tftp_tsize_num_hash < pos * 50 / tftp_tsize) { putc('#'); -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
On Wednesday, August 05, 2015 at 04:58:17 PM, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > The following commit enforces CONFIG_DM_ETH for USB Ethernet which > breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH > which this patch fixes. > > commit 69559093f6173dcfcb041df0995063bdbd07d49b > dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH > > Tested on Colibri T20/T30 as well as Apalis T30 with > CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne > USB-0301 ASIX AX88772 dongle. > > Signed-off-by: Marcel Ziswiler > --- > Changes in v2: Fix commit message as pointed out by Simon. > > common/cmd_usb.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Dumb question -- won't it make more sense to add USB_HOST_ETHER Kconfig option and make it depend on CONFIG_DM_USB ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tegra: spi: Move TEGRA114_SPI switch to defconfigs
Jagan, > -Original Message- > From: Jagan Teki [mailto:jt...@openedev.com] > Sent: Wednesday, August 05, 2015 1:35 AM > To: Simon Glass > Cc: Tom Warren; U-Boot Mailing List; Stephen Warren; Tom Warren > Subject: Re: [U-Boot] [PATCH] Tegra: spi: Move TEGRA114_SPI switch to > defconfigs > > On 31 July 2015 at 03:03, Simon Glass wrote: > > On 30 July 2015 at 14:57, Tom Warren wrote: > >> All T114+ Tegra boards should be using the Kconfig TEGRA114_SPI > >> switch. Remove it from include/config and put it into defconfig. Also > >> removed unused TEGRA114_SPI_CTRLS from T114+ configs. > >> > >> All Tegra SoCs build OK with this change. > >> > >> Signed-off-by: Tom Warren > >> --- > >> configs/dalmore_defconfig| 1 + > >> configs/jetson-tk1_defconfig | 1 + > >> configs/nyan-big_defconfig | 1 + > >> configs/p2571_defconfig | 1 + > >> configs/venice2_defconfig| 1 + > >> include/configs/dalmore.h| 2 -- > >> include/configs/jetson-tk1.h | 2 -- > >> include/configs/nyan-big.h | 2 -- > >> include/configs/p2571.h | 2 -- > >> include/configs/venice2.h| 2 -- > >> 10 files changed, 5 insertions(+), 10 deletions(-) > > > > Reviewed-by: Simon Glass > > Reviewed-by: Jagan Teki > > I couldn't find this patch on patchwork, pls- provide the link? I don't see it in patchworks, either (nor do I see my P2571 cleanup patch that was sent the same day/time). Maybe patchwork was down/busy that day and dropped it? Are you OK with my taking this in via u-boot-tegra, or do you want to take it in via u-boot-spi? Tom -- nvpublic > > thanks! > -- > Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND PATCH v5] net: asix: fix operation without eeprom
On Wednesday, August 05, 2015 at 05:16:59 PM, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > This patch fixes operation of our on-board AX88772B chip without EEPROM > but with a ethaddr coming from the regular U-Boot environment. This is > a forward port of some remaining parts initially implemented by > Antmicro. > > Signed-off-by: Marcel Ziswiler > Acked-by: Marek Vasut Applied to u-boot-usb/master, thanks! Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] generic-board: allow showing custom board info
From: Marcel Ziswiler Allow showing custom board info from a checkboard() function being implemented if CONFIG_CUSTOM_BOARDINFO is specified. Previously the device tree model was always displayed not taking any CONFIG_CUSTOM_BOARDINFO into account. Signed-off-by: Marcel Ziswiler Reviewed-by: Simon Glass --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek Changes in v2: reword commit message as requested by Simon common/board_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_info.c b/common/board_info.c index 4e5a1f7..839fa5a 100644 --- a/common/board_info.c +++ b/common/board_info.c @@ -18,7 +18,7 @@ int __weak checkboard(void) */ int show_board_info(void) { -#ifdef CONFIG_OF_CONTROL +#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_CUSTOM_BOARDINFO) DECLARE_GLOBAL_DATA_PTR; const char *model; -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: pll: fix pllx cpcon in pllinfo table for t20/t30
Marcel, > -Original Message- > From: Marcel Ziswiler [mailto:mar...@ziswiler.com] > Sent: Wednesday, August 05, 2015 7:37 AM > To: u-boot@lists.denx.de > Cc: Tom Warren; Tom Warren; Albert Aribaud; Tom Rini; Thierry Reding; Simon > Glass; Stephen Warren; Masahiro Yamada; Marcel Ziswiler > Subject: [PATCH] tegra: pll: fix pllx cpcon in pllinfo table for t20/t30 > > From: Marcel Ziswiler > > Fix CPCON mask and shift of PLLX for T20 as well as T30. While the former's > PLLX > did not even lock any more resulting is super slow operation the later seemed > to still lock OK. Nonetheless I this patch fixes it for both. > > Signed-off-by: Marcel Ziswiler > --- > Note: This patch requires Tom's two Tegra PLL patches being applied first. Do you mind if I just roll this into my pllinfo patch when I apply it to u-boot-tegra/master and send the PR? I'll be sure to credit your work! Tom -- nvpublic > > arch/arm/mach-tegra/tegra20/clock.c | 2 +- arch/arm/mach- > tegra/tegra30/clock.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach- > tegra/tegra20/clock.c > index df9f412..dea459b 100644 > --- a/arch/arm/mach-tegra/tegra20/clock.c > +++ b/arch/arm/mach-tegra/tegra20/clock.c > @@ -379,7 +379,7 @@ struct clk_pll_info > tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { > { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift > = > 20, .p_mask = 0x07, > .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, > .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD */ > { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift > = 20, .p_mask = 0x0F, > - .lock_ena = 18, .lock_det = 27, .kcp_shift = 0, .kcp_mask = 0, > .kvco_shift = 0, .kvco_mask = 0 },/* PLLX */ > + .lock_ena = 18, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, > .kvco_shift = 0, .kvco_mask = 0 },/* PLLX */ > { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift > = > 0, .p_mask = 0, > .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, > .kvco_shift = 0, .kvco_mask = 1 },/* PLLE */ > { .m_shift = 0, .m_mask = 0x0F, .n_shift = 8, .n_mask = 0x3FF, .p_shift > = > 20, .p_mask = 0x07, diff --git a/arch/arm/mach-tegra/tegra30/clock.c > b/arch/arm/mach-tegra/tegra30/clock.c > index 4267bb2..3ce508b 100644 > --- a/arch/arm/mach-tegra/tegra30/clock.c > +++ b/arch/arm/mach-tegra/tegra30/clock.c > @@ -428,7 +428,7 @@ struct clk_pll_info > tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { > { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift > = > 20, .p_mask = 0x07, > .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, > .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD */ > { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift > = > 20, .p_mask = 0x0F, > - .lock_ena = 18, .lock_det = 27, .kcp_shift = 0, .kcp_mask = 0, > .kvco_shift = 0, .kvco_mask = 0 },/* PLLX */ > + .lock_ena = 18, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, > .kvco_shift = 0, .kvco_mask = 0 },/* PLLX */ > { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift > = > 0, .p_mask = 0, > .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, > .kvco_shift = 0, .kvco_mask = 1 },/* PLLE */ > { .m_shift = 0, .m_mask = 0x0F, .n_shift = 8, .n_mask = 0x3FF, .p_shift > = > 20, .p_mask = 0x07, > -- > 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
Hi Marcel, On 5 August 2015 at 08:58, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > The following commit enforces CONFIG_DM_ETH for USB Ethernet which > breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH > which this patch fixes. > > commit 69559093f6173dcfcb041df0995063bdbd07d49b > dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH > > Tested on Colibri T20/T30 as well as Apalis T30 with > CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne > USB-0301 ASIX AX88772 dongle. > > Signed-off-by: Marcel Ziswiler > --- > Changes in v2: Fix commit message as pointed out by Simon. > > common/cmd_usb.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Acked-by: Simon Glass What do you think about changing Tegra over to CONFIG_DM_ETH? Do you have any leads on the problem you found? > > diff --git a/common/cmd_usb.c b/common/cmd_usb.c > index 0ade775..6874af7 100644 > --- a/common/cmd_usb.c > +++ b/common/cmd_usb.c > @@ -530,13 +530,16 @@ static void do_usb_start(void) > /* try to recognize storage devices immediately */ > usb_stor_curr_dev = usb_stor_scan(1); > #endif > +#endif > #ifdef CONFIG_USB_HOST_ETHER > # ifdef CONFIG_DM_ETH > -# error "You must use CONFIG_DM_USB if you want to use > CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" > -# endif > +# ifndef CONFIG_DM_USB > +# error "You must use CONFIG_DM_USB if you want to use > CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" > +# endif > +# else > /* try to recognize ethernet devices immediately */ > usb_ether_curr_dev = usb_host_eth_scan(1); > -#endif > +# endif > #endif > #ifdef CONFIG_USB_KEYBOARD > drv_usb_kbd_init(); > -- > 2.4.3 > Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH v5] logos: add Toradex logo
From: Stefan Agner Use the boot loader splash screen from WinCE which matches our wallpapers position wise. Although the logo is an 8-bit indexed BMP as well colours looked odd at first in U-Boot. After converting to full RGB palette and converting back to an indexed BMP using imagemagick the Logo showed up properly. $ convert tools/logos/toradex-rgb.bmp -type Palette -colors 256 \ -compress none -verbose BMP3:tools/logos/toradex.bmp Signed-off-by: Stefan Agner Signed-off-by: Marcel Ziswiler --- Changes in v5: split up into separate patches to be picked up by the various subsystem maintainers as suggested by Marek tools/logos/toradex.bmp | Bin 0 -> 24982 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tools/logos/toradex.bmp diff --git a/tools/logos/toradex.bmp b/tools/logos/toradex.bmp new file mode 100644 index ..3e2dcf23358dd46fc7b1bb0dae70d3ba985606ee GIT binary patch literal 24982 zcmeHPy>H~k6(3!0Ppji;#g)jt)k#_{wd9K2#Q*^=NL&Xlg21U<8%UaK+}lmcz@3r8 zfPpKV!nJ|?0|wHjaPQK8fh$)A3?uJj-pr63?s8A3a}M4CL=NZUy*Iyk^WK{wSAYD= z=YLa_e*aLZ5_0byDD@|}AE+Uf|Mdf`X=FOvUf4RF-9GwOXm?&!4O0&+n+q7w@T?zki_KefM4U z{`>E%7cX9@4?p}+ee}^sYW=T|)$^Ax)NlX&5B0nM{8Rnmzn`m5KKVp_`st_Yv(G+L zFJHb?UwrX}`tr*!)mLAArM~|9YxT`H->7fD{Z@VV-FNEy@4r_+{P2VN@y8$4Pe1*n ze*XDq7JPr*Bd|wckH8**|6c?$-BY$WuXH)>+4$GltT&d^Dw`HM`*ot!Z`8f993j0- z)2$!rUtO!-SQ0X^-mmg*71<5T=*=whD64cerzMc+B?zC=6_$mH3O3tvSK1oT@|n=0S?u4y2i3urHi;E<0ZADLN604a@3Vdz+-S{=(3z(U(17X znYN6Qr7kB^4V;ov=iHE?rY_KKnQ&(-KGM5~6zSz0hL2#*Gz!F5#Bx;SV790BUc(Z0 zTv-Oqn?tM$W9kcC%w|iVo9ld5RfuJ#p|YwFOR0^@Y6e(ik%uM7P-H~~(yr6y$P3UnRR#$JdDh!I0)kSeB$piwli zoMCm70SR_rmkN-I^b~gactsR=W&uNkn%r4}ZY+6frZ7yS2_kA?G+<#9tYAS&ASQ!Xr0*K!x; z-B@Ca2s%}0dokq%Dw5+IL1Ak-Q^#^bYnnQ9HPUNgiS<~)g3>jFWrb^jJ7eblQ;MrE z)6qmnQw<9XREmU~Rys%ZlDn0p6HB%TK#rXgjEoIrxH=TwAO&Jie; z)Q0qODds^L?T!Li5>?ehFKKd;GEPKY4c z%LW6(=k?zrh`(^O6LjJbQQ{RaBrJ{1v)0XWhaD~?jQcR00xyjh7%-bxT%;)~_XILD z4)U`x!I9$#ZS55Ku~W9hJ-tlHbmll6VMZ|t%HkSRf%G%k+1?)ry5jMn^Xzu~;8BGGmm#Aww#h0|+q!!~# zh|6L4E_wD6s9=nX)w<58B1W(%tX?KylBO^-gk@Fbvl2(-1+b38edRD5!c^it(YUM= z&?yoTHYX)2pWGqK$-{CAf%pV=G}I6#1ou6-z#`n_PzLusJYp>30La$jzNfJSJwFaq zKm^)M>pG)S7+EYcbZEv&!Tt+&L*&AU0c{3E`1`wSgXK;f9G3NNJg|BhJ$V&%C8XMV z5yY1`2fL>_nce%}xkrI(bJujQSb{aBV0~vme{n2hSa*5*k3x3Z=X%$Oek)4R(1N?Q9!%p}udsM_`Y@9)Udq zdj$3f>=D=_ut#7g1dfhR;S1NZ)A5s?x@~D3CDUxNSX@uy!IqYx>XUQ^oo}Y;rl8-k z7=~y_Sua}B_%8Q{<7bywk}ggk??@{yFtzrODuu13q}y2?kiiZ1p`)-cw+LQpOIj5Z z04l;B4L0~ifuwSd2hyR`rbVrW3!=CJq+MoTP@vA;FTe!r(UZj3!T>|jGMM;$+WZJ`o<&4SvVQNwDa-T z<7W*d;ql_QMSep;2+PAci{oD_Pqx7=*0e{#Y~UESmGXFnWe&^1b*qhrGv#Iq(lXQf zlqs~-fQucgCe4oLCl_rfp=8|AJX9RO5?%qd(+Xdqn6weglu&CDsMc6w2RIC|(E3_9 zn0wk#aH6`tJ>lvbX5vjUl#jSe*F-lMxW~s~D6g(|(9AZLL(!`;pQh<#RuBvzw*_+( zmZ`K}&L?U5^rnV}U}>R*PnL*<;6HbRgItRiH(OT><{=Aezw*Gorfj*`qM$+Z&qhgvy6h#B*+ScX{~va&91Fxx?ENy%`S;1p|o7f&f+Y<=Z6HCt{0 z7w*8k>>Fn`v1EhZig%1j=OJ`r8Ig5d*S!G@Lo}1uI7bOB7DJvd(J7|2Ewtfqz;KLs z`QWD{yQL=%xKOUIVm7d3ohijsI+3^?1JH>jW7hP>K*ZQN!ZISw53pdZk`LrMX*ro7 zHz?Mqi}bGCcL~rI6{QGg|H0Iu3O_AE_y_a1f*7F&|1n`ReJ zw7PJ_a$iWnvawt9Nq6PzVY(b-n1Iuq5si7VbNH%Pe6k{w?X9pnmK?1GMLHxG&s$%j z(*})f$l9EU)rDs^82W8s!E?k|vOUV@fy86-!pOU&p7V=}$AXKBQ!fhEZqR4v|Bu+lMT ztx#@AAzpj!!z6k&OsF*xAPwsxW6A2fjTQ~Tclocdfdm@$Ak*P$ayB+1cHNf-maGn~ za|cJk(MSjZt8Yg{KSM%=k^<5A(GdQ8DhfQZp`Kk_uO zg=GJu^#+y$4(Ho&@X%xgjEy@tG(z%BxMMSsoedf_mPR7^p{(uB%3u$7%!xwFG_qTm+isjWo0#(%*I zKhw37FCv*>Ywp|{)fn9?e@!8b5_ztv4LK;BVm3h38(A`LUu@b4cC z3*$J5vBlEpuLfEa{|9IpLSn{^?F{%e;oN=i0F#g1y1V%`Z7kt8dnQ%IVv)<)lDtWk z&a&44MDoR=SeeaKWV8^D0I*mVt~PJGOmE9#<+EV64omZv35q*tnIPTyZuW`Z5)f&7 z-0QnZcMjrbfb_@#o*NK0+sFpH85hr<%SLUPny zE|XoV@k7oK<8Ll8?R>UQf{oje5g!dZu{Y;JSgM3SvvA_W*F$cfAp}RVe5D=yyJ@w83nXkzX3_A8 zHL<%Nj>fWqygWbM5y|ixM_$oHzUW)u&fB58h?8WuMhmOl+nmPNO9K@AHaUbOvk-H- zE*B{p0Wza?ECHRF&|1}KMT;Vb)I5kuu`n;XMHbOJ?nlSt)6?fxM>5Rcrs}hTgJj-f-H;$3}Oild(o;>{w1C^VEN|7>B92OOY%w_ zdFLhp+AEQGeVyJeER(d6*cUDur4n_#KA3t@db_ZcO^xrQ1NkjBvKKI~(CF>L(rs!2 z2-+e!9eV{h?$qTi!_w>wENsEd9?O0z;Wo@c7^!gG3~>69zH_U$O)phkc7Ir6YWyAU RodMc`0Q`TRs=7z!{{x@?rvLx| literal 0 HcmV?d1 -- 2.4.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: pll: fix pllx cpcon in pllinfo table for t20/t30
On Wed, 2015-08-05 at 15:23 +, Tom Warren wrote: > Do you mind if I just roll this into my pllinfo patch when I apply it > to u-boot-tegra/master and send the PR? I'll be sure to credit your > work! Fine with me and no need for any further credits. Thanks Tom. BTW: We are currently planning our ELCE trip to Dublin. Will any of you NVIDIA open-source maintainers make it there as well (e.g. to the U -Boot Summit)? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
On Wed, 2015-08-05 at 17:19 +0200, Marek Vasut wrote: > Dumb question -- won't it make more sense to add USB_HOST_ETHER > Kconfig > option and make it depend on CONFIG_DM_USB ? I don't think it depends on this. As I understand currently one would be able to run a) USB_HOST_ETHER either without DM_USB at all, b) with just DM_USB (e.g. as currently the case on Colibri T20/T30) or c) later even with DM_ETH which then might depend on DM_USB as well. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] u-boot-usb/master
The following changes since commit e22b1a54942d9003b10564325a34e3cf767556ce: Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq (2015-08-04 12:21:45 -0400) are available in the git repository at: git://git.denx.de/u-boot-usb.git HEAD for you to fetch changes up to dcc7dbc73169bb4e39f27c1d95bbf031ccfc1744: usb: Fix device detection code (2015-08-05 17:22:43 +0200) Hans de Goede (1): sunxi: Drop our own copy of the USB_KEYBOARD options Marcel Ziswiler (1): net: asix: fix operation without eeprom Marek Vasut (1): usb: Fix device detection code Maxime Ripard (1): musb: sunxi: Force EP0 on re-enable Paul Kocialkowski (8): usb: USB_ARCH_HAS_HCD Kconfig option removal usb: Generic USB Kconfig option, that fits both host and gadget and comments usb: musb-new: CONFIG_MUSB prefix replacement with CONFIG_USB_MUSB usb: musb-new: Kconfig support for USB_MUSB_HOST and USB_MUSB_GADGET sunxi: usb: USB_MUSB_SUNXI move to musb-new Kconfig sunxi: config update to stick with Kconfig changes sunxi: MUSB gadget config provisions, with fastboot and USB mass storage support usb: USB storage-specific part ifdef in uclass Peter Griffin (1): usb: dwc2: Call board_usb_init() from usb_lowlevel_init() arch/arm/Kconfig | 1 + arch/arm/cpu/armv7/am33xx/board.c| 2 +- arch/arm/include/asm/arch-sunxi/usb_phy.h| 2 +- board/birdland/bav335x/board.c | 2 +- board/compulab/cm_t3517/cm_t3517.c | 6 +++--- board/logicpd/am3517evm/am3517evm.c | 8 board/phytec/pcm051/board.c | 2 +- board/siemens/draco/board.c | 2 +- board/siemens/pxm2/board.c | 2 +- board/siemens/rut/board.c| 2 +- board/sunxi/Kconfig | 16 board/ti/am335x/board.c | 2 +- board/ti/beagle/beagle.c | 8 board/vscom/baltos/board.c | 2 +- common/usb_hub.c | 10 +++--- configs/Ainol_AW1_defconfig | 2 +- configs/Ampe_A76_defconfig | 2 +- configs/CSQ_CS908_defconfig | 2 +- configs/Chuwi_V7_CW0825_defconfig| 2 +- configs/Et_q8_v1_6_defconfig | 2 +- configs/Hyundai_A7HD_defconfig | 2 +- configs/Ippo_q8h_v1_2_a33_1024x600_defconfig | 2 +- configs/Ippo_q8h_v1_2_defconfig | 2 +- configs/Ippo_q8h_v5_defconfig| 2 +- configs/MSI_Primo81_defconfig| 2 +- configs/Mele_A1000G_quad_defconfig | 2 +- configs/Mini-X_defconfig | 2 +- configs/TZX-Q8-713B7_defconfig | 2 +- configs/UTOO_P66_defconfig | 2 +- configs/Yones_Toptech_BD1078_defconfig | 2 +- configs/ba10_tv_box_defconfig| 2 +- configs/forfun_q88db_defconfig | 2 +- configs/ga10h_v1_1_defconfig | 2 +- configs/iNet_3F_defconfig| 2 +- configs/iNet_3W_defconfig| 2 +- configs/iNet_86VS_defconfig | 2 +- drivers/usb/Kconfig | 20 ++-- drivers/usb/eth/asix.c | 40 ++-- drivers/usb/gadget/gadget_chips.h| 2 +- drivers/usb/host/dwc2.c | 4 drivers/usb/host/usb-uclass.c| 2 ++ drivers/usb/musb-new/Kconfig | 28 drivers/usb/musb-new/Makefile| 6 +++--- drivers/usb/musb-new/musb_core.c | 12 ++-- drivers/usb/musb-new/musb_core.h | 4 ++-- drivers/usb/musb-new/musb_dma.h | 2 +- drivers/usb/musb-new/musb_gadget.c | 4 ++-- drivers/usb/musb-new/musb_uboot.c| 12 ++-- drivers/usb/musb-new/sunxi.c | 9 ++--- drivers/usb/musb/Makefile| 4 ++-- drivers/usb/musb/musb_core.c | 8 drivers/usb/musb/musb_hcd.c | 6 +++--- drivers/usb/musb/musb_hcd.h | 4 ++-- include/configs/am335x_evm.h | 16 include/configs/am3517_crane.h | 14 +++--- include/configs/am3517_evm.h | 16 include/configs/baltos.h | 16 include/configs/bav335x.h| 16 include/configs/bf526-ezbrd.h| 4 ++-- include/configs/bf527-ezkit.h| 4 ++-- include/configs/bf548-ezkit.h| 4 ++-- include/configs/cam_enc_4xx.h| 2 +- include/configs/cm_t35.h
Re: [U-Boot] [PATCH] usb: Fix device detection code
On Wednesday, August 05, 2015 at 03:42:11 PM, Hans de Goede wrote: > Hi, > > On 05-08-15 03:19, Marek Vasut wrote: > > The code in question polls an USB port status via USB_REQ_GET_STATUS > > to determine whether there is a device on the port or not. The way to > > figure that out is to check two bits. Those are wPortChange[0] and > > wPortStatus[0]. > > > > The wPortChange[0] indicates whether some kind of a connection status > > change happened on a port (a device was plugged or unplugged). The > > wPortStatus[0] bit indicates the status of the connection (plugged or > > unplugged). > > > > The current code tests whether wPortChange[0] == wPortStatus[0] and > > if that's the case, considers the loop polling for the presence of a > > USB device on port finished. > > > > This works for most USB sticks, since they come up really quickly and > > trigger the USB port change detection before the first iteration of the > > detection loop happens. Thus, both wPortChange[0] and wPortStatus[0] > > are set to 1 and thus equal. The loop is existed in it's first iteration > > and the stick is detected correctly. > > > > The problem is with some obscure USB sticks, which take some time before > > they pop up on the bus after the port was enabled. In this case, both > > the wPortChange[0] and wPortStatus[0] are 0. They are equal again, so > > the loop again exits in the first iteration, but this is incorrect, as > > such USB stick didn't have the opportunity to get detected on the bus. > > > > Rework the code such, that it checks for wPortChange[0] first to test > > if any connection change happened at all. If no change occured, keep > > polling. If a change did occur, test the wPortStatus[0] to see there is > > some device present on the port and only if this is the case, break out > > of the polling loop. > > > > This patch also trims down the duration of the polling loop from 10s > > per port to 1s per port. This is still annoyingly long, but there is > > no better option in case of U-Boot unfortunatelly. This change will > > most likely increase the duration of 'usb start' on some platforms, > > but this is needed to fix a bug. > > > > Signed-off-by: Marek Vasut > > Cc: Simon Glass > > Cc: Hans de Goede > > Looks good to me: > > Reviewed-by: Hans de Goede OK, let's apply it and see if anyone complains :) Thanks for checking it! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
On Wed, 2015-08-05 at 09:29 -0600, Simon Glass wrote: > Acked-by: Simon Glass > > What do you think about changing Tegra over to CONFIG_DM_ETH? Sure, once it actually works (;-p). Right now I would just be happy if it works at all again (e.g. reason for this patch). > Do you > have any leads on the problem you found? No, not yet. Sorry, too many other cans of worms currently (e.g. chasing why upon watchdog reset on T20 one gets stuck in the SPL unfortunately no mainline watchdog driver for T20 yet so using downstream L4T kernel). ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression
On Wednesday, August 05, 2015 at 05:25:35 PM, Marcel Ziswiler wrote: > On Wed, 2015-08-05 at 17:19 +0200, Marek Vasut wrote: > > Dumb question -- won't it make more sense to add USB_HOST_ETHER > > Kconfig > > option and make it depend on CONFIG_DM_USB ? > > I don't think it depends on this. As I understand currently one would > be able to run a) USB_HOST_ETHER either without DM_USB at all, b) with > just DM_USB (e.g. as currently the case on Colibri T20/T30) or c) later > even with DM_ETH which then might depend on DM_USB as well. OK, I see, makes sense. Thanks for clarifying this chaos :) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 16/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4
On 8/1/15 4:34 PM, Marek Vasut wrote: > Merge sdr_set_*() functions which are just setting registers among > the sea of register setting in sdram_mmr_init_full(). There is no > need to keep them separate this way, there is nothing special about > them. > > Signed-off-by: Marek Vasut > --- > drivers/ddr/altera/sdram.c | 98 > +- > 1 file changed, 36 insertions(+), 62 deletions(-) > > diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c > index 595f2a4..199e8b8 100644 > --- a/drivers/ddr/altera/sdram.c > +++ b/drivers/ddr/altera/sdram.c > @@ -501,24 +501,6 @@ static void set_sdr_ctrlcfg(struct socfpga_sdram_config > *cfg) > writel(ctrl_cfg, &sdr_ctrl->ctrl_cfg); > } > > @@ -586,7 +530,22 @@ unsigned sdram_mmr_init_full(unsigned int sdr_phy_reg) > writel(rows, &sysmgr_regs->iswgrp_handoff[4]); > > set_sdr_ctrlcfg(cfg); > - set_sdr_dram_timing(cfg); > + > + debug("Configuring DRAMTIMING1\n"); > + writel(cfg->dram_timing1, &sdr_ctrl->dram_timing1); > + > + debug("Configuring DRAMTIMING2\n"); > + writel(cfg->dram_timing2, &sdr_ctrl->dram_timing2); > + > + debug("Configuring DRAMTIMING3\n"); > + writel(cfg->dram_timing3, &sdr_ctrl->dram_timing3); > + > + debug("Configuring DRAMTIMING4\n"); > + writel(cfg->dram_timing4, &sdr_ctrl->dram_timing4); > + > + debug("Configuring LOWPWRTIMING\n"); > + writel(cfg->lowpwr_timing, &sdr_ctrl->lowpwr_timing); > + I don't think we need all of these debug prints? Dinh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/1] arm: mxs: make inline function compatible for GCC 5
GCC 5 uses C99 inline semantics. To generate external visibility in C99 for the lowlevel_init() function must be declared with extern inline [1]. The GNU89 inline semantic is the same as C99 extern inline. Use the __GNUC_STDC_INLINE__ macro to detect if C99 inline semantic will be used by GCC. Fixes the build error "undefined reference to `lowlevel_init'" for mx28 based targets. [1] "Different semantics for inline functions" https://gcc.gnu.org/gcc-5/porting_to.html Signed-off-by: Jörg Krause --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index ef130ae..439396b 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -24,6 +24,9 @@ DECLARE_GLOBAL_DATA_PTR; /* Lowlevel init isn't used on i.MX28, so just have a dummy here */ +#if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x default */ +extern +#endif inline void lowlevel_init(void) {} void reset_cpu(ulong ignored) __attribute__((noreturn)); -- 2.5.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tegra: spi: Move TEGRA114_SPI switch to defconfigs
On 5 August 2015 at 20:50, Tom Warren wrote: > Jagan, > >> -Original Message- >> From: Jagan Teki [mailto:jt...@openedev.com] >> Sent: Wednesday, August 05, 2015 1:35 AM >> To: Simon Glass >> Cc: Tom Warren; U-Boot Mailing List; Stephen Warren; Tom Warren >> Subject: Re: [U-Boot] [PATCH] Tegra: spi: Move TEGRA114_SPI switch to >> defconfigs >> >> On 31 July 2015 at 03:03, Simon Glass wrote: >> > On 30 July 2015 at 14:57, Tom Warren wrote: >> >> All T114+ Tegra boards should be using the Kconfig TEGRA114_SPI >> >> switch. Remove it from include/config and put it into defconfig. Also >> >> removed unused TEGRA114_SPI_CTRLS from T114+ configs. >> >> >> >> All Tegra SoCs build OK with this change. >> >> >> >> Signed-off-by: Tom Warren >> >> --- >> >> configs/dalmore_defconfig| 1 + >> >> configs/jetson-tk1_defconfig | 1 + >> >> configs/nyan-big_defconfig | 1 + >> >> configs/p2571_defconfig | 1 + >> >> configs/venice2_defconfig| 1 + >> >> include/configs/dalmore.h| 2 -- >> >> include/configs/jetson-tk1.h | 2 -- >> >> include/configs/nyan-big.h | 2 -- >> >> include/configs/p2571.h | 2 -- >> >> include/configs/venice2.h| 2 -- >> >> 10 files changed, 5 insertions(+), 10 deletions(-) >> > >> > Reviewed-by: Simon Glass >> >> Reviewed-by: Jagan Teki >> >> I couldn't find this patch on patchwork, pls- provide the link? > I don't see it in patchworks, either (nor do I see my P2571 cleanup patch > that was sent the same day/time). Maybe patchwork was down/busy that day and > dropped it? > > Are you OK with my taking this in via u-boot-tegra, or do you want to take it > in via u-boot-spi? You can take it, no issues. thanks! -- Jagan | openedev. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 16/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4
On Wednesday, August 05, 2015 at 05:59:56 PM, Dinh Nguyen wrote: > On 8/1/15 4:34 PM, Marek Vasut wrote: > > Merge sdr_set_*() functions which are just setting registers among > > the sea of register setting in sdram_mmr_init_full(). There is no > > need to keep them separate this way, there is nothing special about > > them. > > > > Signed-off-by: Marek Vasut > > --- > > > > drivers/ddr/altera/sdram.c | 98 > > +- 1 file changed, 36 > > insertions(+), 62 deletions(-) > > > > diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c > > index 595f2a4..199e8b8 100644 > > --- a/drivers/ddr/altera/sdram.c > > +++ b/drivers/ddr/altera/sdram.c > > @@ -501,24 +501,6 @@ static void set_sdr_ctrlcfg(struct > > socfpga_sdram_config *cfg) > > > > writel(ctrl_cfg, &sdr_ctrl->ctrl_cfg); > > > > } > > > > > @@ -586,7 +530,22 @@ unsigned sdram_mmr_init_full(unsigned int > > sdr_phy_reg) > > > > writel(rows, &sysmgr_regs->iswgrp_handoff[4]); > > > > set_sdr_ctrlcfg(cfg); > > > > - set_sdr_dram_timing(cfg); > > + > > + debug("Configuring DRAMTIMING1\n"); > > + writel(cfg->dram_timing1, &sdr_ctrl->dram_timing1); > > + > > + debug("Configuring DRAMTIMING2\n"); > > + writel(cfg->dram_timing2, &sdr_ctrl->dram_timing2); > > + > > + debug("Configuring DRAMTIMING3\n"); > > + writel(cfg->dram_timing3, &sdr_ctrl->dram_timing3); > > + > > + debug("Configuring DRAMTIMING4\n"); > > + writel(cfg->dram_timing4, &sdr_ctrl->dram_timing4); > > + > > + debug("Configuring LOWPWRTIMING\n"); > > + writel(cfg->lowpwr_timing, &sdr_ctrl->lowpwr_timing); > > + > > I don't think we need all of these debug prints? Me neither ;-) I think there's wy too many (useless) debug() prints throughout the entire DDR driver, not only here. I tried to preserve the debug prints in their pristine state so far. I think that in sequencer.c, the debug prints cause even more mess, since there is a lot of code only to cater for printing debug stuff. All kinda of variables get computed only to be used in some debug() print and then discarded. I think a lot of code could be removed from there if we discard those debug() prints. I'd be happy if someone does a debug() print cleanup once things settle. Would you like to prepare the patches ? :-) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot