Re: [U-Boot] [PATCH v2] cmd: dfu: Add error handling for board_usb_init
Hello Michal, Am 30.08.2016 um 15:32 schrieb Michal Simek: board_usb_init() can failed and error should be handled properly. Signed-off-by: Michal Simek--- Changes in v2: - Fix type in return error value common/dfu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Heiko Schocher bye, Heiko diff --git a/common/dfu.c b/common/dfu.c index 4c529f7c36f9..0e9f5f59c80a 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) bool dfu_reset = false; int ret, i = 0; - board_usb_init(usbctrl_index, USB_INIT_DEVICE); + ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE); + if (ret) { + error("board usb init failed\n"); + return CMD_RET_FAILURE; + } g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_gadget); if (ret) { -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd: dfu: Add error handling for board_usb_init
Hello Michal, Am 30.08.2016 um 15:18 schrieb Michal Simek: board_usb_init() can failed and error should be handled properly. Signed-off-by: Michal Simek--- common/dfu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Heiko Schocher bye, Heiko diff --git a/common/dfu.c b/common/dfu.c index 4c529f7c36f9..e384873f66ed 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) bool dfu_reset = false; int ret, i = 0; - board_usb_init(usbctrl_index, USB_INIT_DEVICE); + ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE); + if (ret) { + error("board usb init failed\n"); + return CMD_REG_FAILURE; + } g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_gadget); if (ret) { -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: Rework and correct barrier definitions
On 08/01/2016 03:54 PM, Tom Rini wrote: > As part of testing booting Linux kernels on Rockchip devices, it was > discovered by Ziyuan Xu and Sandy Patterson that we had multiple and for > some cases incomplete isb definitions. This was causing a failure to > boot of the Linux kernel. > > In order to solve this problem as well as cover any corner cases that we > may also have had a number of changes are made in order to consolidate > things. First, now becomes the source of isb/dsb/dmb > definitions. This however introduces another complexity. Due to > needing to build SPL for 32bit tegra with -march=armv4 we need to borrow > the __LINUX_ARM_ARCH__ logic from the Linux Kernel in a more complete > form. Move this from arch/arm/lib/Makefile to arch/arm/Makefile and add > a comment about it. Now that we can always know what the target CPU is > capable off we can get always do the correct thing for the barrier. The > final part of this is that need to be consistent everywhere and call > isb()/dsb()/dmb() and NOT call ISB/DSB/DMB in some cases and the > function names in others. > > Reported-by: Ziyuan Xu> Reported-by: Sandy Patterson > Signed-off-by: Tom Rini > --- > Good work on figuring this out guys. Please test and ack this on your > hardware as well. I've given this a boot test on one of my platforms > and built it for all ARM targets. > --- > arch/arm/include/asm/barriers.h| 11 +-- > arch/arm/include/asm/io.h | 4 ++-- > diff --git a/arch/arm/include/asm/barriers.h b/arch/arm/include/asm/barriers.h > index 37870f9..04784b7 100644 > --- a/arch/arm/include/asm/barriers.h > +++ b/arch/arm/include/asm/barriers.h > @@ -30,15 +30,22 @@ > > #endif /* !CONFIG_ARM64 */ > > -#if defined(__ARM_ARCH_7A__) || defined(CONFIG_ARM64) > +#if __LINUX_ARM_ARCH__ >= 7 > #define ISB asm volatile ("isb sy" : : : "memory") > #define DSB asm volatile ("dsb sy" : : : "memory") > #define DMB asm volatile ("dmb sy" : : : "memory") > -#else > +#elif __LINUX_ARM_ARCH__ == 6 > #define ISB CP15ISB > #define DSB CP15DSB > #define DMB CP15DMB > +#else > +#define ISB asm volatile ("" : : : "memory") > +#define DSB CP15DSB > +#define DMB asm volatile ("" : : : "memory") > #endif > > +#define isb()ISB > +#define dsb()DSB > +#define dmb()DMB > #endif /* __ASSEMBLY__ */ > #endif /* __BARRIERS_H__ */ > diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h > index 6121f1d..5834f5b 100644 > --- a/arch/arm/include/asm/io.h > +++ b/arch/arm/include/asm/io.h > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #if 0/* XXX###XXX */ > #include > #endif /* XXX###XXX */ > @@ -136,8 +137,7 @@ static inline void __raw_readsl(unsigned long addr, void > *data, int longlen) > * TODO: The kernel offers some more advanced versions of barriers, it might > * have some advantages to use them instead of the simple one here. > */ > -#define mb() asm volatile("dsb sy" : : : "memory") > -#define dmb()__asm__ __volatile__ ("" : : : "memory") > +#define mb() dsb() Tom, The replacement of dmb() broke ls2080ardb_nand, the spl boot part. I don't quite understand why dmb() was "", and why "dmb" is broken for spl. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 10/10] defconfig: Add a config for AM335x High Security EVM with SD Boot support
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > Add a new defconfig file for the AM335x High Security EVM. This config > is specific for the case of SD card booting, we the boot types to be > seperate defconfigs as some options change depending on boot type, in > addition this allows us to trim the SPL size as we only need to support > one boot media. > > This defconfig is the same as for the non-secure part, except for: > CONFIG_TI_SECURE_DEVICE option set to 'y' > CONFIG_ISW_ENTRY_ADDR updated for secure images. > CONFIG_FIT_IMAGE_POST_PROCESS option set to 'y' > CONFIG_SPL_FIT_IMAGE_POST_PROCESS option set to 'y' > CONFIG_SPL_SD_BOOT option set to 'y' so we will build an MMC > compatible SPL > CONFIG_USE_TINY_PRINTF option set to 'y' to reduce SPL size > NAND removed from CONFIG_SYS_EXTRA_OPTIONS as this adds NAND > support to SPL, not just U-Boot proper, when this is fixed > this can be added back Acked-by: Lokesh VutlaThanks and regards, Lokesh > > Signed-off-by: Andrew F. Davis > --- > configs/am335x_hs_evm_mmc_defconfig | 58 > + > 1 file changed, 58 insertions(+) > create mode 100644 configs/am335x_hs_evm_mmc_defconfig > > diff --git a/configs/am335x_hs_evm_mmc_defconfig > b/configs/am335x_hs_evm_mmc_defconfig > new file mode 100644 > index 000..d10faaa > --- /dev/null > +++ b/configs/am335x_hs_evm_mmc_defconfig > @@ -0,0 +1,58 @@ > +CONFIG_ARM=y > +CONFIG_AM33XX=y > +CONFIG_TI_SECURE_DEVICE=y > +CONFIG_TARGET_AM335X_EVM=y > +CONFIG_SPL_STACK_R_ADDR=0x8200 > +CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" > +CONFIG_SPL=y > +CONFIG_ISW_ENTRY_ADDR=0x40301750 > +CONFIG_SPL_STACK_R=y > +CONFIG_HUSH_PARSER=y > +CONFIG_CMD_BOOTZ=y > +# CONFIG_CMD_IMLS is not set > +CONFIG_CMD_ASKENV=y > +# CONFIG_CMD_FLASH is not set > +CONFIG_CMD_MMC=y > +CONFIG_CMD_SF=y > +CONFIG_CMD_SPI=y > +CONFIG_CMD_I2C=y > +CONFIG_CMD_USB=y > +CONFIG_CMD_DFU=y > +CONFIG_CMD_GPIO=y > +# CONFIG_CMD_SETEXPR is not set > +CONFIG_CMD_DHCP=y > +CONFIG_CMD_MII=y > +CONFIG_CMD_PING=y > +CONFIG_CMD_EXT2=y > +CONFIG_CMD_EXT4=y > +CONFIG_CMD_EXT4_WRITE=y > +CONFIG_CMD_FAT=y > +CONFIG_CMD_FS_GENERIC=y > +CONFIG_OF_CONTROL=y > +CONFIG_DM_MMC=y > +CONFIG_SPI_FLASH=y > +CONFIG_SPI_FLASH_WINBOND=y > +CONFIG_DM_ETH=y > +CONFIG_SYS_NS16550=y > +CONFIG_TIMER=y > +CONFIG_OMAP_TIMER=y > +CONFIG_USB=y > +CONFIG_USB_MUSB_HOST=y > +CONFIG_USB_MUSB_GADGET=y > +CONFIG_USB_GADGET=y > +CONFIG_USB_GADGET_DOWNLOAD=y > +CONFIG_G_DNL_MANUFACTURER="Texas Instruments" > +CONFIG_G_DNL_VENDOR_NUM=0x0451 > +CONFIG_G_DNL_PRODUCT_NUM=0xd022 > +CONFIG_OF_LIBFDT=y > +CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL" > +CONFIG_RSA=y > +CONFIG_FIT=y > +CONFIG_SPL_OF_LIBFDT=y > +CONFIG_SPL_LOAD_FIT=y > +CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y > +CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk > am335x-bonegreen am335x-icev2" > +CONFIG_DM_I2C=y > +CONFIG_FIT_IMAGE_POST_PROCESS=y > +CONFIG_SPL_SD_BOOT=y > +CONFIG_USE_TINY_PRINTF=y > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 09/10] ti_armv7_common: Disable Falcon Mode on HS devices
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > Authentication of images in Falcon Mode is not supported. Do not enable > SPL_OS_BOOT when TI_SECURE_DEVICE is enabled. This prevents attempting > to directly load kernel images which will fail, for security reasons, > on HS devices, the board is locked if a non-authenticatable image load > is attempted, so we disable attempting Falcon Mode. > > Signed-off-by: Andrew F. Davis> Reviewed-by: Tom Rini Acked-by: Lokesh Vutla Just make sure Falcon boot is supported eventually. Thanks and regards, Lokesh > --- > include/configs/ti_armv7_common.h | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/include/configs/ti_armv7_common.h > b/include/configs/ti_armv7_common.h > index 9f947ee..949b6d1 100644 > --- a/include/configs/ti_armv7_common.h > +++ b/include/configs/ti_armv7_common.h > @@ -198,16 +198,21 @@ > > /* > * Our platforms make use of SPL to initalize the hardware (primarily > - * memory) enough for full U-Boot to be loaded. We also support Falcon > - * Mode so that the Linux kernel can be booted directly from SPL > - * instead, if desired. We make use of the general SPL framework found > - * under common/spl/. Given our generally common memory map, we set a > - * number of related defaults and sizes here. > + * memory) enough for full U-Boot to be loaded. We make use of the general > + * SPL framework found under common/spl/. Given our generally common memory > + * map, we set a number of related defaults and sizes here. > */ > #if !defined(CONFIG_NOR_BOOT) && \ > !(defined(CONFIG_QSPI_BOOT) && defined(CONFIG_AM43XX)) > #define CONFIG_SPL_FRAMEWORK > + > +/* > + * We also support Falcon Mode so that the Linux kernel can be booted > + * directly from SPL. This is not currently available on HS devices. > + */ > +#if !defined(CONFIG_TI_SECURE_DEVICE) > #define CONFIG_SPL_OS_BOOT > +#endif > > /* > * Place the image at the start of the ROM defined image space (per > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 07/10] am335x: configs: Use ISW_ENTRY_ADDR to set SPL_TEXT_BASE
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > The SPL load address changes based on boot time in HS devices, > ISW_ENTRY_ADDR is used to set this address for AM43xx based SoCs > for similar reasons. Add this same logic for AM33xx devices. > > Also make the default value for ISW_ENTRY_ADDR correct for GP > devices based on SoC, HS devices already pick the correct > value in their defconfig. > > Signed-off-by: Andrew F. DavisAcked-by: Lokesh Vutla Thanks and regards, Lokesh > --- > arch/arm/cpu/armv7/am33xx/Kconfig | 3 ++- > include/configs/ti_am335x_common.h | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig > b/arch/arm/cpu/armv7/am33xx/Kconfig > index e57e6fb..79c05dd 100644 > --- a/arch/arm/cpu/armv7/am33xx/Kconfig > +++ b/arch/arm/cpu/armv7/am33xx/Kconfig > @@ -108,7 +108,8 @@ config ISW_ENTRY_ADDR > point address depending on the device type > (secure/non-secure), boot media (xip/non-xip) and > image headers. > - default 0x402F4000 > + default 0x402F4000 if AM43XX > + default 0x402F0400 if AM33XX > > config PUB_ROM_DATA_SIZE > hex "Size in bytes of the L3 SRAM reserved by ROM to store data" > diff --git a/include/configs/ti_am335x_common.h > b/include/configs/ti_am335x_common.h > index 349d410..dba40fc 100644 > --- a/include/configs/ti_am335x_common.h > +++ b/include/configs/ti_am335x_common.h > @@ -56,7 +56,7 @@ > * supports X-MODEM loading via UART, and we leverage this and then use > * Y-MODEM to load u-boot.img, when booted over UART. > */ > -#define CONFIG_SPL_TEXT_BASE 0x402F0400 > +#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR > #define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) > #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ >(128 << 20)) > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 08/10] config: Remove usage of CONFIG_STORAGE_EMMC
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > This config option seems to be unused and is probably vestigial. > Remove it. > > Signed-off-by: Andrew F. Davis> Reviewed-by: Tom Rini Acked-by: Lokesh Vutla Thanks and regards, Lokesh > --- > include/configs/am335x_evm.h | 2 -- > include/configs/am335x_shc.h | 2 -- > include/configs/am335x_sl50.h | 2 -- > include/configs/bav335x.h | 2 -- > 4 files changed, 8 deletions(-) > > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h > index ba4c215..23ee75c 100644 > --- a/include/configs/am335x_evm.h > +++ b/include/configs/am335x_evm.h > @@ -301,8 +301,6 @@ > #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR > #define CONFIG_FASTBOOT_BUF_SIZE 0x0700 > > -/* To support eMMC booting */ > -#define CONFIG_STORAGE_EMMC > #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 > #endif > > diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h > index f2484cb..8708c91 100644 > --- a/include/configs/am335x_shc.h > +++ b/include/configs/am335x_shc.h > @@ -287,8 +287,6 @@ > #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" > > #ifndef CONFIG_SPL_USBETH_SUPPORT > -/* To support eMMC booting */ > -#define CONFIG_STORAGE_EMMC > #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 > #endif > > diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h > index 8454872..06ce4e9 100644 > --- a/include/configs/am335x_sl50.h > +++ b/include/configs/am335x_sl50.h > @@ -91,8 +91,6 @@ > #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" > > #ifndef CONFIG_SPL_USBETH_SUPPORT > -/* To support eMMC booting */ > -#define CONFIG_STORAGE_EMMC > #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 > #endif > > diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h > index e391c91..05fc6d9 100644 > --- a/include/configs/bav335x.h > +++ b/include/configs/bav335x.h > @@ -451,8 +451,6 @@ DEFAULT_LINUX_BOOT_ENV \ > #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR > #define CONFIG_FASTBOOT_BUF_SIZE 0x0700 > > -/* To support eMMC booting */ > -#define CONFIG_STORAGE_EMMC > #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 > #endif > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 06/10] ti: omap-common: Allow AM33xx devices to be built securely
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > Like OMAP54xx and AM43xx family SoCs, AM33xx based SoCs have high > security enabled models. Allow AM33xx devices to be built with > HS Device Type Support. > > Signed-off-by: Andrew F. Davis> Reviewed-by: Tom Rini Acked-by: Lokesh Vutla Thanks and regards, Lokesh > --- > arch/arm/cpu/armv7/omap-common/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/cpu/armv7/omap-common/Kconfig > b/arch/arm/cpu/armv7/omap-common/Kconfig > index 7b39506..4daccd9 100644 > --- a/arch/arm/cpu/armv7/omap-common/Kconfig > +++ b/arch/arm/cpu/armv7/omap-common/Kconfig > @@ -1,6 +1,6 @@ > config TI_SECURE_DEVICE > bool "HS Device Type Support" > - depends on OMAP54XX || AM43XX > + depends on OMAP54XX || AM43XX || AM33XX > help > If a high secure (HS) device type is being used, this config > must be set. This option impacts various aspects of the > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 04/10] am33xx: config.mk: Fix option used to enable SPI SPL image type
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > The option SPL_SPI_SUPPORT is used to enable support in SPL for loading > images from SPI flash, it should not be used to determine the build type > of the SPL image itself. The ability to read images from SPI flash does > not imply the SPL will be booted from SPI flash. > > Unconditionally build SPI flash compatible SPL images. Acked-by: Lokesh VutlaThanks and regards, Lokesh > > Signed-off-by: Andrew F. Davis > --- > arch/arm/cpu/armv7/am33xx/config.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/cpu/armv7/am33xx/config.mk > b/arch/arm/cpu/armv7/am33xx/config.mk > index 431cf62..87b76d9 100644 > --- a/arch/arm/cpu/armv7/am33xx/config.mk > +++ b/arch/arm/cpu/armv7/am33xx/config.mk > @@ -31,13 +31,13 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) > # Refer to README.ti-secure for more info > # > ALL-y+= u-boot-spl_HS_ISSW > -ALL-$(CONFIG_SPL_SPI_SUPPORT) += u-boot-spl_HS_SPI_X-LOADER > +ALL-y += u-boot-spl_HS_SPI_X-LOADER > ALL-y += u-boot-spl_HS_X-LOADER > ALL-y += u-boot-spl_HS_MLO > ALL-y += u-boot-spl_HS_2ND > else > ALL-y+= MLO > -ALL-$(CONFIG_SPL_SPI_SUPPORT) += MLO.byteswap > +ALL-y += MLO.byteswap > endif > else > ifeq ($(CONFIG_TI_SECURE_DEVICE),y) > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 05/10] board: am33xx-hs: Allow post-processing of FIT image on AM33xx
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS > is enabled board_fit_image_post_process will be called, add this > function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to > verify the loaded image. Acked-by: Lokesh VutlaThanks and regards, Lokesh > > Signed-off-by: Andrew F. Davis > Reviewed-by: Tom Rini > --- > board/ti/am335x/board.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c > index 56f4984..0ed16ca 100644 > --- a/board/ti/am335x/board.c > +++ b/board/ti/am335x/board.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -775,3 +776,10 @@ int board_fit_config_name_match(const char *name) > return -1; > } > #endif > + > +#ifdef CONFIG_TI_SECURE_DEVICE > +void board_fit_image_post_process(void **p_image, size_t *p_size) > +{ > + secure_boot_verify_image(p_image, p_size); > +} > +#endif > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/10] Kconfig: Separate AM33XX SOC config from target board config
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > The config option AM33XX is used in several boards and should be > defined as a stand-alone option for this SOC. We break this out > from target boards that use this SoC and common headers then enable > AM33XX on in all the boards that used these targets to eliminate any > functional change with this patch. > > This is similar to what has already been done in > 9de852642cae ("arm: Kconfig: Add support for AM43xx SoC specific Kconfig") > and is done for the same reasons. > Acked-by: Lokesh VutlaThanks and regards, Lokesh > Signed-off-by: Andrew F. Davis > --- > arch/arm/Kconfig | 98 > -- > arch/arm/cpu/armv7/am33xx/Kconfig | 86 ++ > configs/am335x_baltos_defconfig| 1 + > configs/am335x_boneblack_defconfig | 1 + > configs/am335x_boneblack_vboot_defconfig | 1 + > configs/am335x_evm_defconfig | 1 + > configs/am335x_evm_nor_defconfig | 1 + > configs/am335x_evm_norboot_defconfig | 1 + > configs/am335x_evm_spiboot_defconfig | 1 + > configs/am335x_evm_usbspl_defconfig| 1 + > configs/am335x_igep0033_defconfig | 1 + > configs/am335x_shc_defconfig | 1 + > configs/am335x_shc_ict_defconfig | 1 + > configs/am335x_shc_netboot_defconfig | 1 + > configs/am335x_shc_prompt_defconfig| 1 + > configs/am335x_shc_sdboot_defconfig| 1 + > configs/am335x_shc_sdboot_prompt_defconfig | 1 + > configs/am335x_sl50_defconfig | 1 + > configs/birdland_bav335a_defconfig | 1 + > configs/birdland_bav335b_defconfig | 1 + > configs/cm_t335_defconfig | 1 + > configs/pcm051_rev1_defconfig | 1 + > configs/pcm051_rev3_defconfig | 1 + > configs/pengwyn_defconfig | 1 + > configs/pepper_defconfig | 1 + > include/configs/ti_am335x_common.h | 1 - > 26 files changed, 120 insertions(+), 88 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index c871eaf..1d6ba37 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -341,38 +341,6 @@ config TARGET_BRPPT1 > select CPU_V7 > select SUPPORT_SPL > > -config TARGET_CM_T335 > - bool "Support cm_t335" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_PEPPER > - bool "Support pepper" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_AM335X_IGEP0033 > - bool "Support am335x_igep0033" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_PCM051 > - bool "Support pcm051" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > config TARGET_DRACO > bool "Support draco" > select CPU_V7 > @@ -421,61 +389,6 @@ config TARGET_RUT > select DM_SERIAL > select DM_GPIO > > -config TARGET_PENGWYN > - bool "Support pengwyn" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_AM335X_BALTOS > - bool "Support am335x_baltos" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_AM335X_EVM > - bool "Support am335x_evm" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - select TI_I2C_BOARD_DETECT > - > -config TARGET_AM335X_SHC > - bool "Support am335x based shc board from bosch" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - select DM_GPIO > - > -config TARGET_AM335X_SL50 > - bool "Support am335x_sl50" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - > -config TARGET_BAV335X > - bool "Support bav335x" > - select CPU_V7 > - select SUPPORT_SPL > - select DM > - select DM_SERIAL > - help > - The BAV335x OEM Network Processor integrates all the functions of an > - embedded network computer in a small, easy to use SODIMM module which > - incorporates the popular Texas Instruments Sitara 32bit ARM Coretex-A8 > - processor, with fast DDR3 512MB SDRAM, 4GB of embedded MMC and a > Gigabit > - ethernet with simple connection to external connectors. > - > - For more information, visit: http://birdland.com/oem > - > config TARGET_TI814X_EVM > bool "Support ti814x_evm" > select CPU_V7 > @@ -605,6 +518,17 @@ config AM43XX > protocols, dual camera
Re: [U-Boot] [PATCH v4 02/10] am33xx: config.mk: Add support for additional secure boot image types
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > Depending on the boot media, different images are needed > for secure devices. The build generates u-boot*_HS_* files > as appropriate for the different boot modes. > > For AM33xx devices additional image types are needed for > various SPL boot modes as the ROM checks for the name of > the boot mode in the file it loads. > > Signed-off-by: Andrew F. Davis> Reviewed-by: Tom Rini Acked-by: Lokesh Vutla Thanks and regards, Lokesh > --- > arch/arm/cpu/armv7/am33xx/config.mk | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/cpu/armv7/am33xx/config.mk > b/arch/arm/cpu/armv7/am33xx/config.mk > index d4eb21c..431cf62 100644 > --- a/arch/arm/cpu/armv7/am33xx/config.mk > +++ b/arch/arm/cpu/armv7/am33xx/config.mk > @@ -12,13 +12,29 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) > # For booting from SPI use > # u-boot-spl_HS_SPI_X-LOADER to program flash > # > -# For booting spl from all other media > -# use u-boot-spl_HS_ISSW > +# On AM43XX: > +# > +# For booting spl from all other media use > +# u-boot-spl_HS_ISSW > +# > +# On AM33XX: > +# > +# For booting spl from NAND flash use > +# u-boot-spl_HS_X-LOADER > +# > +# For booting spl from SD/MMC/eMMC media use > +# u-boot-spl_HS_MLO > +# > +# For booting spl over UART, USB, or Ethernet use > +# u-boot-spl_HS_2ND > # > # Refer to README.ti-secure for more info > # > ALL-y+= u-boot-spl_HS_ISSW > ALL-$(CONFIG_SPL_SPI_SUPPORT) += u-boot-spl_HS_SPI_X-LOADER > +ALL-y += u-boot-spl_HS_X-LOADER > +ALL-y += u-boot-spl_HS_MLO > +ALL-y += u-boot-spl_HS_2ND > else > ALL-y+= MLO > ALL-$(CONFIG_SPL_SPI_SUPPORT) += MLO.byteswap > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 03/10] doc: Update info on using AM33xx secure devices from TI
On Wednesday 31 August 2016 12:36 AM, Andrew F. Davis wrote: > Add a section describing the additional boot types used on AM33xx > secure devices. > > Signed-off-by: Andrew F. Davis> Reviewed-by: Tom Rini Acked-by: Lokesh Vutla Thanks and regards, Lokesh > --- > doc/README.ti-secure | 32 > 1 file changed, 32 insertions(+) > > diff --git a/doc/README.ti-secure b/doc/README.ti-secure > index 54c996d..9b0fbf9 100644 > --- a/doc/README.ti-secure > +++ b/doc/README.ti-secure > @@ -43,6 +43,38 @@ Booting of U-Boot SPL > The script is basically the only required interface to the TI SECDEV > package for creating a bootable SPL image for secure TI devices. > > + Invoking the script for AM33xx Secure Devices > + = > + > + create-boot-image.sh \ > + > + > + is a value that specifies the type of the image to > + generate OR the action the image generation tool will take. Valid > + values are: > + SPI_X-LOADER - Generates an image for SPI flash (byte swapped) > + X-LOADER - Generates an image for non-XIP flash > + MLO - Generates an image for SD/MMC/eMMC media > + 2ND - Generates an image for USB, UART and Ethernet > + XIP_X-LOADER - Generates a single stage u-boot for NOR/QSPI XiP > + > + is the full path and filename of the public world boot > + loaderbinary file (depending on the boot media, this is usually > + either u-boot-spl.bin or u-boot.bin). > + > + is the full path and filename of the final secure > + image. The output binary images should be used in place of the standard > + non-secure binary images (see the platform-specific user's guides and > + releases notes for how the non-secure images are typically used) > + u-boot-spl_HS_SPI_X-LOADER - byte swapped boot image for SPI flash > + u-boot-spl_HS_X-LOADER - boot image for NAND or SD/MMC/eMMC rawmode > + u-boot-spl_HS_MLO - boot image for SD/MMC/eMMC media > + u-boot-spl_HS_2ND - boot image for USB, UART and Ethernet > + u-boot_HS_XIP_X-LOADER - boot image for NOR or QSPI Xip flash > + > + is the address at which SOC ROM should load the > + > + > Invoking the script for AM43xx Secure Devices > = > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] SZ_* errors compiling mmc master branch
Hi Stephen, On 08/31/2016 01:11 AM, Stephen Warren wrote: > Jaehoon, > > When building git://git.denx.de/u-boot-mmc.git master for sandbox, I see the > following error, and many more like it: Thanks for pointing out. I'm testing the building with buildman. I knew that there is buildman in u-boot. After checking this, i will do to request pull. (Actually, i don't know exactly how to use the buildman. So i'm checking this.) This way is right? Anyway, i will check this and fix everything until today. Best Regards, Jaehoon Chung > >> Building current source for 3 boards (3 threads, 4 jobs per thread) >>sandbox: + sandbox_noblk >> +drivers/mmc/mmc.c:25:6: error: ‘SZ_16K’ undeclared here (not in a function) >> + 0, SZ_16K / 512, SZ_32K / 512, >> + ^ >> +drivers/mmc/mmc.c:25:21: error: ‘SZ_32K’ undeclared here (not in a function) >> + ^ > > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] usb: dwc3: add support for 16 bit UTMI+ interface
On 08/30/2016 05:21 AM, Kever Yang wrote: > Hi Marek, > > On 08/29/2016 09:01 AM, Marek Vasut wrote: >> On 08/29/2016 02:55 AM, Kever Yang wrote: >>> Hi Marek, >>> >>> On 08/26/2016 05:09 PM, Marek Vasut wrote: On 08/25/2016 03:17 AM, Kever Yang wrote: > Hi Marek, > > On 08/24/2016 07:38 PM, Marek Vasut wrote: >> On 08/24/2016 05:46 AM, Kever Yang wrote: >>> The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY, >>> add one variable in dwc3/dwc3_device struct to support 16 bit >>> UTMI+ interface on some SoCs like Rockchip rk3399. >>> >>> Signed-off-by: Kever Yang>>> --- >>> >>> Changes in v2: >>> - use a variable to identify utmi+ bus width instead of CONFIG MACRO >>> >>> drivers/usb/dwc3/core.c | 6 ++ >>> drivers/usb/dwc3/core.h | 12 >>> include/dwc3-uboot.h| 1 + >>> 3 files changed, 19 insertions(+) >>> >>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c >>> index 85cc96a..0613508 100644 >>> --- a/drivers/usb/dwc3/core.c >>> +++ b/drivers/usb/dwc3/core.c >>> @@ -388,6 +388,11 @@ static void dwc3_phy_setup(struct dwc3 *dwc) >>> if (dwc->dis_u2_susphy_quirk) >>> reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; >>> +if (dwc->usb2_phyif_utmi_width == 16) { >>> +reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK; >>> +reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT; >>> +reg |= DWC3_GUSB2PHYCFG_PHYIF_16BIT; >>> +} >> Didn't we agree to pull this info from OF ? > Yes, the dwc->usb2_phyif_utmi_width is from OF, but I make the DT > parse > in board file instead of in the dwc3 driver, see my patch: > [PATCH v2 2/4] board: evb-rk3399: add api to support dwc3 gadget So this is basically a passing of platform data ? >>> Yes, this is what other platform do, I just extend one more setting. >> Platform data should go away in favor of the DT probing. >> > I think implement in this way won't affect other soc also using dwc3 > controller, > the DT parse would cost some time which may not necessary for other > soc. The time needed to run the DT parsing is completely insignificant. This sounds like a premature optimization. >>> Which way of implement this DT parse do you prefer and more reasonable, >>> in dwc3 driver or in board init and dwc3 driver use it as platform data? >> Driver should parse the DT. > > I'm going to parse the DT for this new 16bit UTMI+ interface, and keep > other part "as is" > because the dwc3 device node for different SoC are different now. > > Does this make sense to you? That's fine, I'll complain if the code looks crappy tho ;-) -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ARM: tegra: Add support for TK1-SOM board from Colorado Engineering
The Colorado TK1 SOM is a small form factor board similar to the Jetson TK1. The main differences lie in the pinmux, and in that the PCIe controller is set to use in 4lanes+1lane, rather than 2+2. The pinmux header here was generated from a spreadsheet provided by Colorado Engineering using the tegra-pinmux scripts. The spreadsheet was converted from v09 to v11 by me. Signed-off-by: Peter ChubbAcked-by: Stephen Warren --- arch/arm/dts/Makefile | 1 + arch/arm/dts/tegra124-cei-tk1-som.dts | 477 ++ arch/arm/mach-tegra/tegra124/Kconfig | 12 + board/cei/cei-tk1-som/Kconfig | 12 + board/cei/cei-tk1-som/MAINTAINERS | 6 + board/cei/cei-tk1-som/Makefile| 9 + board/cei/cei-tk1-som/cei-tk1-som.c | 65 +++ board/cei/cei-tk1-som/pinmux-config-cei-tk1-som.h | 301 ++ board/nvidia/venice2/as3722_init.h| 8 +- configs/cei-tk1-som_defconfig | 47 +++ include/configs/cei-tk1-som.h | 73 11 files changed, 1007 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/tegra124-cei-tk1-som.dts create mode 100644 board/cei/cei-tk1-som/Kconfig create mode 100644 board/cei/cei-tk1-som/MAINTAINERS create mode 100644 board/cei/cei-tk1-som/Makefile create mode 100644 board/cei/cei-tk1-som/cei-tk1-som.c create mode 100644 board/cei/cei-tk1-som/pinmux-config-cei-tk1-som.h create mode 100644 configs/cei-tk1-som_defconfig create mode 100644 include/configs/cei-tk1-som.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 7d1944f..25fc22f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -57,6 +57,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra114-dalmore.dtb \ tegra124-jetson-tk1.dtb \ tegra124-nyan-big.dtb \ + tegra124-cei-tk1-som.dtb \ tegra124-venice2.dtb \ tegra186-p2771--a02.dtb \ tegra186-p2771--b00.dtb \ diff --git a/arch/arm/dts/tegra124-cei-tk1-som.dts b/arch/arm/dts/tegra124-cei-tk1-som.dts new file mode 100644 index 000..d22c0ca --- /dev/null +++ b/arch/arm/dts/tegra124-cei-tk1-som.dts @@ -0,0 +1,477 @@ +/dts-v1/; + +#include "tegra124.dtsi" + +/ { + model = "Colorado Engineering TK1-SOM"; + compatible = "nvidia,cei-tk1-som", "nvidia,tegra124"; + + chosen { + stdout-path = + }; + + aliases { + i2c0 = "/i2c@7000d000"; + i2c1 = "/i2c@7000c000"; + i2c2 = "/i2c@7000c400"; + i2c3 = "/i2c@7000c500"; + i2c4 = "/i2c@7000c700"; + sdhci0 = "/sdhci@700b0600"; + sdhci1 = "/sdhci@700b0400"; + spi0 = "/spi@7000d400"; + spi1 = "/spi@7000da00"; + usb0 = "/usb@7d00"; + usb1 = "/usb@7d008000"; + }; + + memory { + device_type = "memory"; + reg = <0x8000 0x8000>; + }; + + pcie-controller@01003000 { + status = "okay"; + + avddio-pex-supply = <_1v05_run>; + dvddio-pex-supply = <_1v05_run>; + avdd-pex-pll-supply = <_1v05_run>; + hvdd-pex-supply = <_3v3_lp0>; + hvdd-pex-pll-e-supply = <_3v3_lp0>; + vddio-pex-ctl-supply = <_3v3_lp0>; + avdd-pll-erefe-supply = <_1v05_run>; + + pci@1,0 { + status = "okay"; + nvidia,num-lanes = <4>; + }; + + pci@2,0 { + status = "okay"; + }; + }; + + i2c@7000c000 { + status = "okay"; + clock-frequency = <10>; + }; + + i2c@7000c400 { + status = "okay"; + clock-frequency = <10>; + }; + + i2c@7000c500 { + status = "okay"; + clock-frequency = <10>; + }; + + i2c@7000c700 { + status = "okay"; + clock-frequency = <10>; + }; + + /* Expansion PWR_I2C_*, on-board components */ + i2c@7000d000 { + status = "okay"; + clock-frequency = <40>; + + pmic: pmic@40 { + compatible = "ams,as3722"; + reg = <0x40>; + interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; + + ams,system-power-controller; + + #interrupt-cells = <2>; + interrupt-controller; + + gpio-controller; + #gpio-cells = <2>; + + pinctrl-names = "default"; + pinctrl-0 = <_default>; + + as3722_default: pinmux { +
Re: [U-Boot] [PATCH] ARM: Rework and correct barrier definitions
Resend (Somehow this mail didn't reach mailing list, again) On 08/01/2016 03:54 PM, Tom Rini wrote: > As part of testing booting Linux kernels on Rockchip devices, it was > discovered by Ziyuan Xu and Sandy Patterson that we had multiple and for > some cases incomplete isb definitions. This was causing a failure to > boot of the Linux kernel. > > In order to solve this problem as well as cover any corner cases that we > may also have had a number of changes are made in order to consolidate > things. First, now becomes the source of isb/dsb/dmb > definitions. This however introduces another complexity. Due to > needing to build SPL for 32bit tegra with -march=armv4 we need to borrow > the __LINUX_ARM_ARCH__ logic from the Linux Kernel in a more complete > form. Move this from arch/arm/lib/Makefile to arch/arm/Makefile and add > a comment about it. Now that we can always know what the target CPU is > capable off we can get always do the correct thing for the barrier. The > final part of this is that need to be consistent everywhere and call > isb()/dsb()/dmb() and NOT call ISB/DSB/DMB in some cases and the > function names in others. > > Reported-by: Ziyuan Xu> Reported-by: Sandy Patterson > Signed-off-by: Tom Rini > --- > Good work on figuring this out guys. Please test and ack this on your > hardware as well. I've given this a boot test on one of my platforms > and built it for all ARM targets. > --- > arch/arm/include/asm/barriers.h| 11 +-- > arch/arm/include/asm/io.h | 4 ++-- > diff --git a/arch/arm/include/asm/barriers.h b/arch/arm/include/asm/barriers.h > index 37870f9..04784b7 100644 > --- a/arch/arm/include/asm/barriers.h > +++ b/arch/arm/include/asm/barriers.h > @@ -30,15 +30,22 @@ > > #endif /* !CONFIG_ARM64 */ > > -#if defined(__ARM_ARCH_7A__) || defined(CONFIG_ARM64) > +#if __LINUX_ARM_ARCH__ >= 7 > #define ISB asm volatile ("isb sy" : : : "memory") > #define DSB asm volatile ("dsb sy" : : : "memory") > #define DMB asm volatile ("dmb sy" : : : "memory") > -#else > +#elif __LINUX_ARM_ARCH__ == 6 > #define ISB CP15ISB > #define DSB CP15DSB > #define DMB CP15DMB > +#else > +#define ISB asm volatile ("" : : : "memory") > +#define DSB CP15DSB > +#define DMB asm volatile ("" : : : "memory") > #endif > > +#define isb()ISB > +#define dsb()DSB > +#define dmb()DMB > #endif /* __ASSEMBLY__ */ > #endif /* __BARRIERS_H__ */ > diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h > index 6121f1d..5834f5b 100644 > --- a/arch/arm/include/asm/io.h > +++ b/arch/arm/include/asm/io.h > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #if 0/* XXX###XXX */ > #include > #endif /* XXX###XXX */ > @@ -136,8 +137,7 @@ static inline void __raw_readsl(unsigned long addr, void > *data, int longlen) > * TODO: The kernel offers some more advanced versions of barriers, it might > * have some advantages to use them instead of the simple one here. > */ > -#define mb() asm volatile("dsb sy" : : : "memory") > -#define dmb()__asm__ __volatile__ ("" : : : "memory") > +#define mb() dsb() Tom, The replacement of dmb() broke ls2080ardb_nand, the spl boot part. I don't quite understand why dmb() was "", and why "dmb" is broken for spl. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: Add support for TK1-SOM board from Colorado Engineering
> "Stephen" == Stephen Warrenwrites: Stephen> On 08/29/2016 06:51 PM, peter.ch...@data61.csiro.au wrote: >> The Colorado TK1 SOM is a small form factor board similar to the >> Jetson TK1. The main differences lie in the pinmux, and in that >> the PCIe controller is set to use in 4lanes+1lane, rather than 2+2. >> >> The pinmux header here was generated from a spreadsheet provided by >> Colorado Engineering using the tegra-pinmux scripts. The >> spreadsheet was converted from v09 to v11 by me. >> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig >> b/arch/arm/mach-tegra/tegra124/Kconfig >> +config TARGET_CEI_TK1_SOM + bool "Colorado/NVIDIA Tegra124 TK1-som >> board" Stephen> I think that should say: Stephen>bool "Colorado Engineering Inc TK1-som board" Stephen> I assume that NVIDIA had no part in creating this derivative; Stephen> they simply created the board it was based on. As far a I know that's the case. It's an NVIDIA SoC though. >> diff --git a/include/configs/cei-tk1-som.h >> b/include/configs/cei-tk1-som.h >> + * (C) Copyright 2016 Peter Chubb >> + * Based on the jetson-tk1.h which is Stephen> There's trailing whitespace on that line. Stephen> I might suggest adding a : to the end of the line, so it's Stephen> more obvious (when looking at just the added lines) that it's Stephen> referring to the next line rather than a statement that Stephen> wasn't finished. OK. I need to fix the copyright header too (my employer wants a mention, which is fair enough as they're paying for me to do this work)) Stephen> Is that true? I'd like to see a patch for Stephen> tegra-pinmux-scripts that adds the config file for this board Stephen> too. It's on its way. I'm currently trying to get the Linux DTS part working. Stephen> Aside from those minor issues, Acked-by: Stephen Warren Stephen> Thanks. -- Dr Peter Chubb Tel: +61 2 9490 5852 http://www.data61.csiro.au http://ts.data61.csiro.au Software Systems Research Group/NICTA/Data61 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: Rework and correct barrier definitions
On 08/05/2016 05:57 PM, Tom Rini wrote: > On Mon, Aug 01, 2016 at 06:54:53PM -0400, Tom Rini wrote: > >> As part of testing booting Linux kernels on Rockchip devices, it was >> discovered by Ziyuan Xu and Sandy Patterson that we had multiple and for >> some cases incomplete isb definitions. This was causing a failure to >> boot of the Linux kernel. >> >> In order to solve this problem as well as cover any corner cases that we >> may also have had a number of changes are made in order to consolidate >> things. First, now becomes the source of isb/dsb/dmb >> definitions. This however introduces another complexity. Due to >> needing to build SPL for 32bit tegra with -march=armv4 we need to borrow >> the __LINUX_ARM_ARCH__ logic from the Linux Kernel in a more complete >> form. Move this from arch/arm/lib/Makefile to arch/arm/Makefile and add >> a comment about it. Now that we can always know what the target CPU is >> capable off we can get always do the correct thing for the barrier. The >> final part of this is that need to be consistent everywhere and call >> isb()/dsb()/dmb() and NOT call ISB/DSB/DMB in some cases and the >> function names in others. >> >> Reported-by: Ziyuan Xu>> Reported-by: Sandy Patterson >> Signed-off-by: Tom Rini > > Applied to u-boot/master, thanks! > Tom, Today I found ls2080ardb_nand is broken and git bisect points to this commit a78cd86. I am trying to pin point the root cause. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] ARM: tegra: remove wrong dependency on SPL_BUILD
2016-08-31 4:43 GMT+09:00 Stephen Warren: > On 08/30/2016 01:13 PM, Masahiro Yamada wrote: >> >> 2016-08-31 1:25 GMT+09:00 Stephen Warren : >>> >>> On 08/30/2016 12:56 AM, Masahiro Yamada wrote: SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true. >>> >>> >>> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig >>> >>> >>> config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" - select CPU_V7_HAS_NONSEC if !SPL_BUILD - select CPU_V7_HAS_VIRT if !SPL_BUILD + select CPU_V7_HAS_NONSEC + select CPU_V7_HAS_VIRT >>> >>> >>> >>> Shouldn't this dependency be replaced with the correct dependency, rather >>> than simply removed? I'm fairly sure those options should not be defined >>> for >>> SPL. >>> >> >> These lines were added by Ian. >> I was not sure if he meant "!SPL" here. >> >> SPL is select'ed by TEGRA_ARMV7_COMMON, >> so it is not configurable. >> >> config TEGRA_ARMV7_COMMON >> bool "Tegra 32-bit common options" >> select CPU_V7 >> select SPL > > > CONFIG_SPL (selected immediately above) means the configuration has a > separate SPL and "main" build. CONFIG_SPL_BUILD (in the patch quoted further > above) means the code is currently being compiled for SPL. > I know this. (CONFIG_SPL_BUILD is not a config option in the first place. Its CONFIG_ prefix is misleading.) You mentioned to replace "if !SPL_BUILD" rather than delete. Then, I thought you were suggesting to fix config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" select CPU_V7_HAS_NONSEC if !SPL_BUILD select CPU_V7_HAS_VIRT if !SPL_BUILD to config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" select CPU_V7_HAS_NONSEC if !SPL select CPU_V7_HAS_VIRT if !SPL in case Ian maybe misunderstood the difference between SPL and SPL_BUILD. Even if so, SPL can not be disabled for Tegra. So, I could not find a replacement. If you have an idea, please let me know. I hope Ian can comment on this. I could not figure out his intention. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] omap3_pandora: Only set bootargs if distro_bootcmd failed to load.
As bootargs is hard-coded for the default behavior on the omap3_pandora, only set the bootargs if distro_bootcmd fails to load. This leaves distro_bootcmd free to use alternate boot arguments. Signed-off-by: Vagrant Cascadian--- include/configs/omap3_pandora.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index fd51811..b664319 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -88,6 +88,7 @@ #define CONFIG_BOOTCOMMAND \ "run distro_bootcmd; " \ + "setenv bootargs ${bootargs_ubi}; " \ "if mmc rescan && load mmc 0:1 ${loadaddr} autoboot.scr; then " \ "source ${loadaddr}; " \ "fi; " \ @@ -102,7 +103,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ "usbtty=cdc_acm\0" \ - "bootargs=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ + "bootargs_ubi=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \ "mtdparts=" MTDPARTS_DEFAULT "\0" \ BOOTENV \ -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] Add support for config_distro_bootcmd to the omap3_pandora target.
The first patch enables distro bootcmd support. The second patch only sets the bootargs if distro_bootcmd loading failed. This is based on the patch series submitted yesterday fixing the mmc boot syntax for omap3_pandora, though could easily be merged together into a single patch series if that is preferred. Vagrant Cascadian (2): omap3_pandora: Switch to use config_distro_bootcmd. omap3_pandora: Only set bootargs if distro_bootcmd failed to load. include/configs/omap3_pandora.h | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] omap3_pandora: Switch to use config_distro_bootcmd.
Add support for using distro_bootcmd to the omap3_pandora target, falling back to prior behavior. Signed-off-by: Vagrant Cascadian--- include/configs/omap3_pandora.h | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 728a4e5..fd51811 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -85,20 +85,28 @@ #define MTDPARTS_DEFAULT #endif -#define CONFIG_EXTRA_ENV_SETTINGS \ - DEFAULT_LINUX_BOOT_ENV \ - "usbtty=cdc_acm\0" \ - "bootargs=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ - "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \ - "mtdparts=" MTDPARTS_DEFAULT "\0" \ #define CONFIG_BOOTCOMMAND \ + "run distro_bootcmd; " \ "if mmc rescan && load mmc 0:1 ${loadaddr} autoboot.scr; then " \ "source ${loadaddr}; " \ "fi; " \ "ubi part boot && ubifsmount ubi:boot && " \ "ubifsload ${loadaddr} uImage && bootm ${loadaddr}" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + +#include + +#define CONFIG_EXTRA_ENV_SETTINGS \ + DEFAULT_LINUX_BOOT_ENV \ + "usbtty=cdc_acm\0" \ + "bootargs=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ + "rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + BOOTENV \ + /* memtest works on */ #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: Add support for TK1-SOM board from Colorado Engineering
On 08/29/2016 06:51 PM, peter.ch...@data61.csiro.au wrote: The Colorado TK1 SOM is a small form factor board similar to the Jetson TK1. The main differences lie in the pinmux, and in that the PCIe controller is set to use in 4lanes+1lane, rather than 2+2. The pinmux header here was generated from a spreadsheet provided by Colorado Engineering using the tegra-pinmux scripts. The spreadsheet was converted from v09 to v11 by me. diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig +config TARGET_CEI_TK1_SOM + bool "Colorado/NVIDIA Tegra124 TK1-som board" I think that should say: bool "Colorado Engineering Inc TK1-som board" I assume that NVIDIA had no part in creating this derivative; they simply created the board it was based on. diff --git a/include/configs/cei-tk1-som.h b/include/configs/cei-tk1-som.h + * (C) Copyright 2016 Peter Chubb + * Based on the jetson-tk1.h which is There's trailing whitespace on that line. I might suggest adding a : to the end of the line, so it's more obvious (when looking at just the added lines) that it's referring to the next line rather than a statement that wasn't finished. diff --git a/board/cei/cei-tk1-som/pinmux-config-cei-tk1-som.h b/board/cei/cei-tk1-som/pinmux-config-cei-tk1-som.h +/* + * THIS FILE IS AUTO-GENERATED - DO NOT EDIT! + * + * To generate this file, use the tegra-pinmux-scripts tool available from + * https://github.com/NVIDIA/tegra-pinmux-scripts + * Run "board-to-uboot.py cei-tk1-som". + */ Is that true? I'd like to see a patch for tegra-pinmux-scripts that adds the config file for this board too. Aside from those minor issues, Acked-by: Stephen Warren___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] ARM: tegra: remove wrong dependency on SPL_BUILD
On 08/30/2016 01:13 PM, Masahiro Yamada wrote: 2016-08-31 1:25 GMT+09:00 Stephen Warren: On 08/30/2016 12:56 AM, Masahiro Yamada wrote: SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true. diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" - select CPU_V7_HAS_NONSEC if !SPL_BUILD - select CPU_V7_HAS_VIRT if !SPL_BUILD + select CPU_V7_HAS_NONSEC + select CPU_V7_HAS_VIRT Shouldn't this dependency be replaced with the correct dependency, rather than simply removed? I'm fairly sure those options should not be defined for SPL. These lines were added by Ian. I was not sure if he meant "!SPL" here. SPL is select'ed by TEGRA_ARMV7_COMMON, so it is not configurable. config TEGRA_ARMV7_COMMON bool "Tegra 32-bit common options" select CPU_V7 select SPL CONFIG_SPL (selected immediately above) means the configuration has a separate SPL and "main" build. CONFIG_SPL_BUILD (in the patch quoted further above) means the code is currently being compiled for SPL. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] ARM: tegra: remove wrong dependency on SPL_BUILD
2016-08-31 1:25 GMT+09:00 Stephen Warren: > On 08/30/2016 12:56 AM, Masahiro Yamada wrote: >> >> SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true. > > >> diff --git a/arch/arm/mach-tegra/tegra124/Kconfig >> b/arch/arm/mach-tegra/tegra124/Kconfig > > >> config TARGET_JETSON_TK1 >> bool "NVIDIA Tegra124 Jetson TK1 board" >> - select CPU_V7_HAS_NONSEC if !SPL_BUILD >> - select CPU_V7_HAS_VIRT if !SPL_BUILD >> + select CPU_V7_HAS_NONSEC >> + select CPU_V7_HAS_VIRT > > > Shouldn't this dependency be replaced with the correct dependency, rather > than simply removed? I'm fairly sure those options should not be defined for > SPL. > These lines were added by Ian. I was not sure if he meant "!SPL" here. SPL is select'ed by TEGRA_ARMV7_COMMON, so it is not configurable. config TEGRA_ARMV7_COMMON bool "Tegra 32-bit common options" select CPU_V7 select SPL select SUPPORT_SPL select TEGRA_COMMON select TEGRA_GPIO -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 01/10] Kconfig: Separate AM33XX SOC config from target board config
The config option AM33XX is used in several boards and should be defined as a stand-alone option for this SOC. We break this out from target boards that use this SoC and common headers then enable AM33XX on in all the boards that used these targets to eliminate any functional change with this patch. This is similar to what has already been done in 9de852642cae ("arm: Kconfig: Add support for AM43xx SoC specific Kconfig") and is done for the same reasons. Signed-off-by: Andrew F. Davis--- arch/arm/Kconfig | 98 -- arch/arm/cpu/armv7/am33xx/Kconfig | 86 ++ configs/am335x_baltos_defconfig| 1 + configs/am335x_boneblack_defconfig | 1 + configs/am335x_boneblack_vboot_defconfig | 1 + configs/am335x_evm_defconfig | 1 + configs/am335x_evm_nor_defconfig | 1 + configs/am335x_evm_norboot_defconfig | 1 + configs/am335x_evm_spiboot_defconfig | 1 + configs/am335x_evm_usbspl_defconfig| 1 + configs/am335x_igep0033_defconfig | 1 + configs/am335x_shc_defconfig | 1 + configs/am335x_shc_ict_defconfig | 1 + configs/am335x_shc_netboot_defconfig | 1 + configs/am335x_shc_prompt_defconfig| 1 + configs/am335x_shc_sdboot_defconfig| 1 + configs/am335x_shc_sdboot_prompt_defconfig | 1 + configs/am335x_sl50_defconfig | 1 + configs/birdland_bav335a_defconfig | 1 + configs/birdland_bav335b_defconfig | 1 + configs/cm_t335_defconfig | 1 + configs/pcm051_rev1_defconfig | 1 + configs/pcm051_rev3_defconfig | 1 + configs/pengwyn_defconfig | 1 + configs/pepper_defconfig | 1 + include/configs/ti_am335x_common.h | 1 - 26 files changed, 120 insertions(+), 88 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c871eaf..1d6ba37 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -341,38 +341,6 @@ config TARGET_BRPPT1 select CPU_V7 select SUPPORT_SPL -config TARGET_CM_T335 - bool "Support cm_t335" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_PEPPER - bool "Support pepper" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_AM335X_IGEP0033 - bool "Support am335x_igep0033" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_PCM051 - bool "Support pcm051" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - config TARGET_DRACO bool "Support draco" select CPU_V7 @@ -421,61 +389,6 @@ config TARGET_RUT select DM_SERIAL select DM_GPIO -config TARGET_PENGWYN - bool "Support pengwyn" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_AM335X_BALTOS - bool "Support am335x_baltos" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_AM335X_EVM - bool "Support am335x_evm" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - select TI_I2C_BOARD_DETECT - -config TARGET_AM335X_SHC - bool "Support am335x based shc board from bosch" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - -config TARGET_AM335X_SL50 - bool "Support am335x_sl50" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - -config TARGET_BAV335X - bool "Support bav335x" - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - help - The BAV335x OEM Network Processor integrates all the functions of an - embedded network computer in a small, easy to use SODIMM module which - incorporates the popular Texas Instruments Sitara 32bit ARM Coretex-A8 - processor, with fast DDR3 512MB SDRAM, 4GB of embedded MMC and a Gigabit - ethernet with simple connection to external connectors. - - For more information, visit: http://birdland.com/oem - config TARGET_TI814X_EVM bool "Support ti814x_evm" select CPU_V7 @@ -605,6 +518,17 @@ config AM43XX protocols, dual camera support, optional 3D graphics and an optional customer programmable secure boot. +config AM33XX + bool "AM33XX SoC" + select CPU_V7 + select SUPPORT_SPL + help + Support for AM335x SOC from Texas Instruments. + The AM335x high performance
[U-Boot] [PATCH v4 05/10] board: am33xx-hs: Allow post-processing of FIT image on AM33xx
When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS is enabled board_fit_image_post_process will be called, add this function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to verify the loaded image. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- board/ti/am335x/board.c | 8 1 file changed, 8 insertions(+) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 56f4984..0ed16ca 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -775,3 +776,10 @@ int board_fit_config_name_match(const char *name) return -1; } #endif + +#ifdef CONFIG_TI_SECURE_DEVICE +void board_fit_image_post_process(void **p_image, size_t *p_size) +{ + secure_boot_verify_image(p_image, p_size); +} +#endif -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 02/10] am33xx: config.mk: Add support for additional secure boot image types
Depending on the boot media, different images are needed for secure devices. The build generates u-boot*_HS_* files as appropriate for the different boot modes. For AM33xx devices additional image types are needed for various SPL boot modes as the ROM checks for the name of the boot mode in the file it loads. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- arch/arm/cpu/armv7/am33xx/config.mk | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/cpu/armv7/am33xx/config.mk index d4eb21c..431cf62 100644 --- a/arch/arm/cpu/armv7/am33xx/config.mk +++ b/arch/arm/cpu/armv7/am33xx/config.mk @@ -12,13 +12,29 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) # For booting from SPI use # u-boot-spl_HS_SPI_X-LOADER to program flash # -# For booting spl from all other media -# use u-boot-spl_HS_ISSW +# On AM43XX: +# +# For booting spl from all other media use +# u-boot-spl_HS_ISSW +# +# On AM33XX: +# +# For booting spl from NAND flash use +# u-boot-spl_HS_X-LOADER +# +# For booting spl from SD/MMC/eMMC media use +# u-boot-spl_HS_MLO +# +# For booting spl over UART, USB, or Ethernet use +# u-boot-spl_HS_2ND # # Refer to README.ti-secure for more info # ALL-y += u-boot-spl_HS_ISSW ALL-$(CONFIG_SPL_SPI_SUPPORT) += u-boot-spl_HS_SPI_X-LOADER +ALL-y += u-boot-spl_HS_X-LOADER +ALL-y += u-boot-spl_HS_MLO +ALL-y += u-boot-spl_HS_2ND else ALL-y += MLO ALL-$(CONFIG_SPL_SPI_SUPPORT) += MLO.byteswap -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 06/10] ti: omap-common: Allow AM33xx devices to be built securely
Like OMAP54xx and AM43xx family SoCs, AM33xx based SoCs have high security enabled models. Allow AM33xx devices to be built with HS Device Type Support. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- arch/arm/cpu/armv7/omap-common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/omap-common/Kconfig b/arch/arm/cpu/armv7/omap-common/Kconfig index 7b39506..4daccd9 100644 --- a/arch/arm/cpu/armv7/omap-common/Kconfig +++ b/arch/arm/cpu/armv7/omap-common/Kconfig @@ -1,6 +1,6 @@ config TI_SECURE_DEVICE bool "HS Device Type Support" - depends on OMAP54XX || AM43XX + depends on OMAP54XX || AM43XX || AM33XX help If a high secure (HS) device type is being used, this config must be set. This option impacts various aspects of the -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 00/10] Allow secure boot on AM33xx devices
Hello all, I've recently been tasked with enabling authenticated boot for AM33xx based devices. This work is similar to what has already been done for the AM43xx and AM57xx SoCs and leverages much of the infrastructure from them. The big difference here is the size of SRAM available on AM33xx being much less than on the other SoCs, when performing a secure boot this limits the maximum size of the SPL to just ~41k, the SPL currently generated for AM33xx SoCs is ~70k. I have added a defconfig for booting from mmc, but it is RFC for now as the generated SPL is still much too large to fit into SRAM on HS devices. If you would like to help out you can build this defconfig and it will report by how much we have overflowed SRAM, any help reducing this would be greatly appreciated. Thanks, Andrew Changes from v3: - Drop SPL_*_BOOT patches as these do not get used by almost anyone so we can just work to remove them completly. - Fixed defaults for ISW_ENTRY_ADDR. Changes from v2: - Dropping the SPL_*_SUPPORT patches as Simon is already way ahead of me on this front[0]. - Minor re-organization of the patches, dropped a couple that I didn't feel were important enough to continue working right now. Changes from v1: - I've moved the cleanup patches to the end of the series and now consider them RFCs. I also do not move any Kconfig options over as this can be performed automatically but will need to be done by someone who understands the build system better than me. - Separate additional AM33xx SOC based boards out from the SoC definition in patch #1. [0] https://www.mail-archive.com/u-boot@lists.denx.de/msg222736.html Andrew F. Davis (10): Kconfig: Separate AM33XX SOC config from target board config am33xx: config.mk: Add support for additional secure boot image types doc: Update info on using AM33xx secure devices from TI am33xx: config.mk: Fix option used to enable SPI SPL image type board: am33xx-hs: Allow post-processing of FIT image on AM33xx ti: omap-common: Allow AM33xx devices to be built securely am335x: configs: Use ISW_ENTRY_ADDR to set SPL_TEXT_BASE config: Remove usage of CONFIG_STORAGE_EMMC ti_armv7_common: Disable Falcon Mode on HS devices defconfig: Add a config for AM335x High Security EVM with SD Boot support arch/arm/Kconfig | 98 +++--- arch/arm/cpu/armv7/am33xx/Kconfig | 89 +++- arch/arm/cpu/armv7/am33xx/config.mk| 24 +- arch/arm/cpu/armv7/omap-common/Kconfig | 2 +- board/ti/am335x/board.c| 8 ++ configs/am335x_baltos_defconfig| 1 + configs/am335x_boneblack_defconfig | 1 + configs/am335x_boneblack_vboot_defconfig | 1 + configs/am335x_evm_defconfig | 1 + configs/am335x_evm_nor_defconfig | 1 + configs/am335x_evm_norboot_defconfig | 1 + configs/am335x_evm_spiboot_defconfig | 1 + configs/am335x_evm_usbspl_defconfig| 1 + ...x_evm_defconfig => am335x_hs_evm_mmc_defconfig} | 8 +- configs/am335x_igep0033_defconfig | 1 + configs/am335x_shc_defconfig | 1 + configs/am335x_shc_ict_defconfig | 1 + configs/am335x_shc_netboot_defconfig | 1 + configs/am335x_shc_prompt_defconfig| 1 + configs/am335x_shc_sdboot_defconfig| 1 + configs/am335x_shc_sdboot_prompt_defconfig | 1 + configs/am335x_sl50_defconfig | 1 + configs/birdland_bav335a_defconfig | 1 + configs/birdland_bav335b_defconfig | 1 + configs/cm_t335_defconfig | 1 + configs/pcm051_rev1_defconfig | 1 + configs/pcm051_rev3_defconfig | 1 + configs/pengwyn_defconfig | 1 + configs/pepper_defconfig | 1 + doc/README.ti-secure | 32 +++ include/configs/am335x_evm.h | 2 - include/configs/am335x_shc.h | 2 - include/configs/am335x_sl50.h | 2 - include/configs/bav335x.h | 2 - include/configs/ti_am335x_common.h | 3 +- include/configs/ti_armv7_common.h | 15 ++-- 36 files changed, 201 insertions(+), 109 deletions(-) copy configs/{am335x_evm_defconfig => am335x_hs_evm_mmc_defconfig} (86%) -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 07/10] am335x: configs: Use ISW_ENTRY_ADDR to set SPL_TEXT_BASE
The SPL load address changes based on boot time in HS devices, ISW_ENTRY_ADDR is used to set this address for AM43xx based SoCs for similar reasons. Add this same logic for AM33xx devices. Also make the default value for ISW_ENTRY_ADDR correct for GP devices based on SoC, HS devices already pick the correct value in their defconfig. Signed-off-by: Andrew F. Davis--- arch/arm/cpu/armv7/am33xx/Kconfig | 3 ++- include/configs/ti_am335x_common.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig index e57e6fb..79c05dd 100644 --- a/arch/arm/cpu/armv7/am33xx/Kconfig +++ b/arch/arm/cpu/armv7/am33xx/Kconfig @@ -108,7 +108,8 @@ config ISW_ENTRY_ADDR point address depending on the device type (secure/non-secure), boot media (xip/non-xip) and image headers. - default 0x402F4000 + default 0x402F4000 if AM43XX + default 0x402F0400 if AM33XX config PUB_ROM_DATA_SIZE hex "Size in bytes of the L3 SRAM reserved by ROM to store data" diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index 349d410..dba40fc 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -56,7 +56,7 @@ * supports X-MODEM loading via UART, and we leverage this and then use * Y-MODEM to load u-boot.img, when booted over UART. */ -#define CONFIG_SPL_TEXT_BASE 0x402F0400 +#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR #define CONFIG_SPL_MAX_SIZE(0x4030B800 - CONFIG_SPL_TEXT_BASE) #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ (128 << 20)) -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 10/10] defconfig: Add a config for AM335x High Security EVM with SD Boot support
Add a new defconfig file for the AM335x High Security EVM. This config is specific for the case of SD card booting, we the boot types to be seperate defconfigs as some options change depending on boot type, in addition this allows us to trim the SPL size as we only need to support one boot media. This defconfig is the same as for the non-secure part, except for: CONFIG_TI_SECURE_DEVICE option set to 'y' CONFIG_ISW_ENTRY_ADDR updated for secure images. CONFIG_FIT_IMAGE_POST_PROCESS option set to 'y' CONFIG_SPL_FIT_IMAGE_POST_PROCESS option set to 'y' CONFIG_SPL_SD_BOOT option set to 'y' so we will build an MMC compatible SPL CONFIG_USE_TINY_PRINTF option set to 'y' to reduce SPL size NAND removed from CONFIG_SYS_EXTRA_OPTIONS as this adds NAND support to SPL, not just U-Boot proper, when this is fixed this can be added back Signed-off-by: Andrew F. Davis--- configs/am335x_hs_evm_mmc_defconfig | 58 + 1 file changed, 58 insertions(+) create mode 100644 configs/am335x_hs_evm_mmc_defconfig diff --git a/configs/am335x_hs_evm_mmc_defconfig b/configs/am335x_hs_evm_mmc_defconfig new file mode 100644 index 000..d10faaa --- /dev/null +++ b/configs/am335x_hs_evm_mmc_defconfig @@ -0,0 +1,58 @@ +CONFIG_ARM=y +CONFIG_AM33XX=y +CONFIG_TI_SECURE_DEVICE=y +CONFIG_TARGET_AM335X_EVM=y +CONFIG_SPL_STACK_R_ADDR=0x8200 +CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" +CONFIG_SPL=y +CONFIG_ISW_ENTRY_ADDR=0x40301750 +CONFIG_SPL_STACK_R=y +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_ASKENV=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y +CONFIG_CMD_DFU=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_OF_CONTROL=y +CONFIG_DM_MMC=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM_ETH=y +CONFIG_SYS_NS16550=y +CONFIG_TIMER=y +CONFIG_OMAP_TIMER=y +CONFIG_USB=y +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_G_DNL_MANUFACTURER="Texas Instruments" +CONFIG_G_DNL_VENDOR_NUM=0x0451 +CONFIG_G_DNL_PRODUCT_NUM=0xd022 +CONFIG_OF_LIBFDT=y +CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL" +CONFIG_RSA=y +CONFIG_FIT=y +CONFIG_SPL_OF_LIBFDT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2" +CONFIG_DM_I2C=y +CONFIG_FIT_IMAGE_POST_PROCESS=y +CONFIG_SPL_SD_BOOT=y +CONFIG_USE_TINY_PRINTF=y -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 08/10] config: Remove usage of CONFIG_STORAGE_EMMC
This config option seems to be unused and is probably vestigial. Remove it. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- include/configs/am335x_evm.h | 2 -- include/configs/am335x_shc.h | 2 -- include/configs/am335x_sl50.h | 2 -- include/configs/bav335x.h | 2 -- 4 files changed, 8 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index ba4c215..23ee75c 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -301,8 +301,6 @@ #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_FASTBOOT_BUF_SIZE 0x0700 -/* To support eMMC booting */ -#define CONFIG_STORAGE_EMMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h index f2484cb..8708c91 100644 --- a/include/configs/am335x_shc.h +++ b/include/configs/am335x_shc.h @@ -287,8 +287,6 @@ #define CONFIG_SPL_LDSCRIPT"$(CPUDIR)/am33xx/u-boot-spl.lds" #ifndef CONFIG_SPL_USBETH_SUPPORT -/* To support eMMC booting */ -#define CONFIG_STORAGE_EMMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h index 8454872..06ce4e9 100644 --- a/include/configs/am335x_sl50.h +++ b/include/configs/am335x_sl50.h @@ -91,8 +91,6 @@ #define CONFIG_SPL_LDSCRIPT"$(CPUDIR)/am33xx/u-boot-spl.lds" #ifndef CONFIG_SPL_USBETH_SUPPORT -/* To support eMMC booting */ -#define CONFIG_STORAGE_EMMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h index e391c91..05fc6d9 100644 --- a/include/configs/bav335x.h +++ b/include/configs/bav335x.h @@ -451,8 +451,6 @@ DEFAULT_LINUX_BOOT_ENV \ #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR #define CONFIG_FASTBOOT_BUF_SIZE 0x0700 -/* To support eMMC booting */ -#define CONFIG_STORAGE_EMMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 1 #endif -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 04/10] am33xx: config.mk: Fix option used to enable SPI SPL image type
The option SPL_SPI_SUPPORT is used to enable support in SPL for loading images from SPI flash, it should not be used to determine the build type of the SPL image itself. The ability to read images from SPI flash does not imply the SPL will be booted from SPI flash. Unconditionally build SPI flash compatible SPL images. Signed-off-by: Andrew F. Davis--- arch/arm/cpu/armv7/am33xx/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/cpu/armv7/am33xx/config.mk index 431cf62..87b76d9 100644 --- a/arch/arm/cpu/armv7/am33xx/config.mk +++ b/arch/arm/cpu/armv7/am33xx/config.mk @@ -31,13 +31,13 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y) # Refer to README.ti-secure for more info # ALL-y += u-boot-spl_HS_ISSW -ALL-$(CONFIG_SPL_SPI_SUPPORT) += u-boot-spl_HS_SPI_X-LOADER +ALL-y += u-boot-spl_HS_SPI_X-LOADER ALL-y += u-boot-spl_HS_X-LOADER ALL-y += u-boot-spl_HS_MLO ALL-y += u-boot-spl_HS_2ND else ALL-y += MLO -ALL-$(CONFIG_SPL_SPI_SUPPORT) += MLO.byteswap +ALL-y += MLO.byteswap endif else ifeq ($(CONFIG_TI_SECURE_DEVICE),y) -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 09/10] ti_armv7_common: Disable Falcon Mode on HS devices
Authentication of images in Falcon Mode is not supported. Do not enable SPL_OS_BOOT when TI_SECURE_DEVICE is enabled. This prevents attempting to directly load kernel images which will fail, for security reasons, on HS devices, the board is locked if a non-authenticatable image load is attempted, so we disable attempting Falcon Mode. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- include/configs/ti_armv7_common.h | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 9f947ee..949b6d1 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -198,16 +198,21 @@ /* * Our platforms make use of SPL to initalize the hardware (primarily - * memory) enough for full U-Boot to be loaded. We also support Falcon - * Mode so that the Linux kernel can be booted directly from SPL - * instead, if desired. We make use of the general SPL framework found - * under common/spl/. Given our generally common memory map, we set a - * number of related defaults and sizes here. + * memory) enough for full U-Boot to be loaded. We make use of the general + * SPL framework found under common/spl/. Given our generally common memory + * map, we set a number of related defaults and sizes here. */ #if !defined(CONFIG_NOR_BOOT) && \ !(defined(CONFIG_QSPI_BOOT) && defined(CONFIG_AM43XX)) #define CONFIG_SPL_FRAMEWORK + +/* + * We also support Falcon Mode so that the Linux kernel can be booted + * directly from SPL. This is not currently available on HS devices. + */ +#if !defined(CONFIG_TI_SECURE_DEVICE) #define CONFIG_SPL_OS_BOOT +#endif /* * Place the image at the start of the ROM defined image space (per -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 03/10] doc: Update info on using AM33xx secure devices from TI
Add a section describing the additional boot types used on AM33xx secure devices. Signed-off-by: Andrew F. DavisReviewed-by: Tom Rini --- doc/README.ti-secure | 32 1 file changed, 32 insertions(+) diff --git a/doc/README.ti-secure b/doc/README.ti-secure index 54c996d..9b0fbf9 100644 --- a/doc/README.ti-secure +++ b/doc/README.ti-secure @@ -43,6 +43,38 @@ Booting of U-Boot SPL The script is basically the only required interface to the TI SECDEV package for creating a bootable SPL image for secure TI devices. + Invoking the script for AM33xx Secure Devices + = + + create-boot-image.sh \ + + +is a value that specifies the type of the image to + generate OR the action the image generation tool will take. Valid + values are: + SPI_X-LOADER - Generates an image for SPI flash (byte swapped) + X-LOADER - Generates an image for non-XIP flash + MLO - Generates an image for SD/MMC/eMMC media + 2ND - Generates an image for USB, UART and Ethernet + XIP_X-LOADER - Generates a single stage u-boot for NOR/QSPI XiP + +is the full path and filename of the public world boot + loaderbinary file (depending on the boot media, this is usually + either u-boot-spl.bin or u-boot.bin). + +is the full path and filename of the final secure + image. The output binary images should be used in place of the standard + non-secure binary images (see the platform-specific user's guides and + releases notes for how the non-secure images are typically used) + u-boot-spl_HS_SPI_X-LOADER - byte swapped boot image for SPI flash + u-boot-spl_HS_X-LOADER - boot image for NAND or SD/MMC/eMMC rawmode + u-boot-spl_HS_MLO - boot image for SD/MMC/eMMC media + u-boot-spl_HS_2ND - boot image for USB, UART and Ethernet + u-boot_HS_XIP_X-LOADER - boot image for NOR or QSPI Xip flash + +is the address at which SOC ROM should load the + + Invoking the script for AM43xx Secure Devices = -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 21/44] Convert CONFIG_SPL_GPIO_SUPPORT to Kconfig
Hi Masahiro, On 29 August 2016 at 21:25, Masahiro Yamadawrote: > 2016-08-30 9:21 GMT+09:00 Simon Glass : >> Move this option to Kconfig and tidy up existing uses. >> >> Signed-off-by: Simon Glass > >> >> diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig >> b/arch/arm/cpu/armv7/am33xx/Kconfig >> index efbc219..54474c2 100644 >> --- a/arch/arm/cpu/armv7/am33xx/Kconfig >> +++ b/arch/arm/cpu/armv7/am33xx/Kconfig >> @@ -3,6 +3,9 @@ if AM43XX >> config SPL_EXT_SUPPORT >> default y >> >> +config SPL_GPIO_SUPPORT >> + default y >> + >> config TARGET_AM43XX_EVM >> bool "Support am43xx_evm" >> select TI_I2C_BOARD_DETECT >> diff --git a/arch/arm/cpu/armv7/omap3/Kconfig >> b/arch/arm/cpu/armv7/omap3/Kconfig >> index de65ac6..e1c981e 100644 >> --- a/arch/arm/cpu/armv7/omap3/Kconfig >> +++ b/arch/arm/cpu/armv7/omap3/Kconfig >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT >> config SPL_FAT_SUPPORT >> default y >> >> +config SPL_GPIO_SUPPORT >> + default y >> + >> choice >> prompt "OMAP3 board select" >> optional >> diff --git a/arch/arm/cpu/armv7/omap4/Kconfig >> b/arch/arm/cpu/armv7/omap4/Kconfig >> index 92eb2f4..48ce9d3 100644 >> --- a/arch/arm/cpu/armv7/omap4/Kconfig >> +++ b/arch/arm/cpu/armv7/omap4/Kconfig >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT >> config SPL_FAT_SUPPORT >> default y >> >> +config SPL_GPIO_SUPPORT >> + default y >> + >> choice >> prompt "OMAP4 board select" >> optional >> diff --git a/arch/arm/cpu/armv7/omap5/Kconfig >> b/arch/arm/cpu/armv7/omap5/Kconfig >> index e367828..5b049ad 100644 >> --- a/arch/arm/cpu/armv7/omap5/Kconfig >> +++ b/arch/arm/cpu/armv7/omap5/Kconfig >> @@ -6,6 +6,9 @@ config SPL_EXT_SUPPORT >> config SPL_FAT_SUPPORT >> default y >> >> +config SPL_GPIO_SUPPORT >> + default y >> + >> choice >> prompt "OMAP5 board select" >> optional >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig >> index c25fcf3..d4a5bc9 100644 >> --- a/arch/arm/mach-exynos/Kconfig >> +++ b/arch/arm/mach-exynos/Kconfig >> @@ -61,6 +61,9 @@ endif >> >> if ARCH_EXYNOS5 >> >> +config SPL_GPIO_SUPPORT >> + default y >> + > > > As we discussed before, > we decided to not do this. Tom was keen to avoid changing every defconfig file. It is there another way to express common defaults? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 08/11] am335x: configs: Use ISW_ENTRY_ADDR to set SPL_TEXT_BASE
On 08/26/2016 12:01 AM, Lokesh Vutla wrote: > > > On Friday 26 August 2016 03:15 AM, Andrew F. Davis wrote: >> The SPL load address changes based on boot time in HS devices, >> ISW_ENTRY_ADDR is used to set this address for AM43xx based SoCs >> for similar reasons. Add this same logic for AM33xx devices. >> >> Signed-off-by: Andrew F. Davis>> --- >> include/configs/ti_am335x_common.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/configs/ti_am335x_common.h >> b/include/configs/ti_am335x_common.h >> index a0a60d4..52f4ed6 100644 >> --- a/include/configs/ti_am335x_common.h >> +++ b/include/configs/ti_am335x_common.h >> @@ -57,7 +57,7 @@ >> * supports X-MODEM loading via UART, and we leverage this and then use >> * Y-MODEM to load u-boot.img, when booted over UART. >> */ >> -#define CONFIG_SPL_TEXT_BASE0x402F0400 >> +#define CONFIG_SPL_TEXT_BASECONFIG_ISW_ENTRY_ADDR > > Please include the below change as well or else am33xx gp boot might > break as fefault address is different. > > diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig > b/arch/arm/cpu/armv7/am33xx/Kconfig > index dc51e9b..3a48664 100644 > --- a/arch/arm/cpu/armv7/am33xx/Kconfig > +++ b/arch/arm/cpu/armv7/am33xx/Kconfig > @@ -22,7 +22,8 @@ config ISW_ENTRY_ADDR > point address depending on the device type > (secure/non-secure), boot media (xip/non-xip) and > image headers. > - default 0x402F4000 > + default 0x402F4000 if AM43XX > + default 0x402F0400 if AM33XX > Good eye, for some reason I mistook them for the same value, will fix. > config PUB_ROM_DATA_SIZE > hex "Size in bytes of the L3 SRAM reserved by ROM to store data" > > > Thanks and regards, > Lokesh > >> #define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) >> #define CONFIG_SYS_SPL_ARGS_ADDR(CONFIG_SYS_SDRAM_BASE + \ >> (128 << 20)) >> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/2] clk: at91: Add .ops callback for clk_generic
On 08/30/2016 02:11 AM, Wenyou Yang wrote: To avoid the wild pointer as NULL->of_xlate, add an empty .ops callback for the clk_generic driver. This shouldn't be needed. If this driver isn't a clock provider, and it cannot be a clock provider without implementing and clock ops, then nothing should be calling of_xlate through its ops pointer, and the driver shouldn't be a UCLASS_CLK. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/2] clk: at91: Fix at91-pmc and at91-sckc's class ID
On 08/30/2016 02:11 AM, Wenyou Yang wrote: The at91-pmc and at91-sckc aren't the clock providers, change their class ID from UCLASS_CLK to UCLASS_SIMPLE_BUS, they also don't need to bind the child nodes explicitly, the .post_bind callback of simple_bus uclass will do it for them. This patch, Acked-by: Stephen Warren___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] ARM: tegra: remove wrong dependency on SPL_BUILD
On 08/30/2016 12:56 AM, Masahiro Yamada wrote: SPL_BUILD is not a CONFIG in Kconfig, so !SPL_BUILD is always true. diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" - select CPU_V7_HAS_NONSEC if !SPL_BUILD - select CPU_V7_HAS_VIRT if !SPL_BUILD + select CPU_V7_HAS_NONSEC + select CPU_V7_HAS_VIRT Shouldn't this dependency be replaced with the correct dependency, rather than simply removed? I'm fairly sure those options should not be defined for SPL. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] ARM: tegra: use numeric versioning for p2771-0000
From: Stephen WarrenThe board ID EEPROM and board ID stickers on p2771- will use a numeric versioning scheme, with version numbers such as 000/100/200/300/400/500. Within NVIDIA, these versions are also known as A00/A01/A02/A03/A04/B00. However, that numbering scheme is not easily visible outside of NVIDIA, and so does not make much sense to use. Convert U-Boot to use the readily visible numeric scheme. Also, it turns out that the current A02 DT actually applies to board versions 000/100/200 (A00..A02). Consequently rename this to 000 not 200 so that all U-Boot builds are named after the first version of the HW they support. Signed-off-by: Stephen Warren --- V2: Fix DT model property too. --- arch/arm/dts/Makefile | 4 ++-- .../dts/{tegra186-p2771--a02.dts => tegra186-p2771--000.dts} | 4 ++-- .../dts/{tegra186-p2771--b00.dts => tegra186-p2771--500.dts} | 4 ++-- configs/{p2771--b00_defconfig => p2771--000_defconfig}| 4 ++-- configs/{p2771--a02_defconfig => p2771--500_defconfig}| 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename arch/arm/dts/{tegra186-p2771--a02.dts => tegra186-p2771--000.dts} (82%) rename arch/arm/dts/{tegra186-p2771--b00.dts => tegra186-p2771--500.dts} (83%) rename configs/{p2771--b00_defconfig => p2771--000_defconfig} (87%) rename configs/{p2771--a02_defconfig => p2771--500_defconfig} (87%) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 223124e791b6..93165877029e 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -58,8 +58,8 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra124-jetson-tk1.dtb \ tegra124-nyan-big.dtb \ tegra124-venice2.dtb \ - tegra186-p2771--a02.dtb \ - tegra186-p2771--b00.dtb \ + tegra186-p2771--000.dtb \ + tegra186-p2771--500.dtb \ tegra210-e2220-1170.dtb \ tegra210-p2371-.dtb \ tegra210-p2371-2180.dtb \ diff --git a/arch/arm/dts/tegra186-p2771--a02.dts b/arch/arm/dts/tegra186-p2771--000.dts similarity index 82% rename from arch/arm/dts/tegra186-p2771--a02.dts rename to arch/arm/dts/tegra186-p2771--000.dts index 36a3c21a55de..d97c6fd3d09a 100644 --- a/arch/arm/dts/tegra186-p2771--a02.dts +++ b/arch/arm/dts/tegra186-p2771--000.dts @@ -3,8 +3,8 @@ #include "tegra186-p2771-.dtsi" / { - model = "NVIDIA P2771- A02"; - compatible = "nvidia,p2771--a02", "nvidia,p2771-", "nvidia,tegra186"; + model = "NVIDIA P2771--000"; + compatible = "nvidia,p2771--000", "nvidia,p2771-", "nvidia,tegra186"; sdhci@340 { cd-gpios = <_main TEGRA_MAIN_GPIO(P, 6) GPIO_ACTIVE_LOW>; diff --git a/arch/arm/dts/tegra186-p2771--b00.dts b/arch/arm/dts/tegra186-p2771--500.dts similarity index 83% rename from arch/arm/dts/tegra186-p2771--b00.dts rename to arch/arm/dts/tegra186-p2771--500.dts index 0f1d0e83e80d..393a8b246a0b 100644 --- a/arch/arm/dts/tegra186-p2771--b00.dts +++ b/arch/arm/dts/tegra186-p2771--500.dts @@ -3,8 +3,8 @@ #include "tegra186-p2771-.dtsi" / { - model = "NVIDIA P2771- B00"; - compatible = "nvidia,p2771--b00", "nvidia,p2771-", "nvidia,tegra186"; + model = "NVIDIA P2771--500"; + compatible = "nvidia,p2771--500", "nvidia,p2771-", "nvidia,tegra186"; sdhci@340 { cd-gpios = <_main TEGRA_MAIN_GPIO(P, 5) GPIO_ACTIVE_LOW>; diff --git a/configs/p2771--b00_defconfig b/configs/p2771--000_defconfig similarity index 87% rename from configs/p2771--b00_defconfig rename to configs/p2771--000_defconfig index 27393f3a5d46..25ff8ae7a7f0 100644 --- a/configs/p2771--b00_defconfig +++ b/configs/p2771--000_defconfig @@ -2,10 +2,10 @@ CONFIG_ARM=y CONFIG_TEGRA=y CONFIG_TEGRA186=y CONFIG_TARGET_P2771_=y -CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771--b00" +CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771--000" CONFIG_OF_SYSTEM_SETUP=y CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="Tegra186 (P2771- B00) # " +CONFIG_SYS_PROMPT="Tegra186 (P2771--000) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set diff --git a/configs/p2771--a02_defconfig b/configs/p2771--500_defconfig similarity index 87% rename from configs/p2771--a02_defconfig rename to configs/p2771--500_defconfig index 5ce369c6d330..9432a13bcc8e 100644 --- a/configs/p2771--a02_defconfig +++ b/configs/p2771--500_defconfig @@ -2,10 +2,10 @@ CONFIG_ARM=y CONFIG_TEGRA=y CONFIG_TEGRA186=y CONFIG_TARGET_P2771_=y -CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771--a02" +CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771--500" CONFIG_OF_SYSTEM_SETUP=y CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="Tegra186 (P2771-
[U-Boot] SZ_* errors compiling mmc master branch
Jaehoon, When building git://git.denx.de/u-boot-mmc.git master for sandbox, I see the following error, and many more like it: Building current source for 3 boards (3 threads, 4 jobs per thread) sandbox: + sandbox_noblk +drivers/mmc/mmc.c:25:6: error: ‘SZ_16K’ undeclared here (not in a function) + 0, SZ_16K / 512, SZ_32K / 512, + ^ +drivers/mmc/mmc.c:25:21: error: ‘SZ_32K’ undeclared here (not in a function) + ^ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: tegra: use numeric versioning for p2771-0000
On 08/29/2016 02:45 PM, Stephen Warren wrote: From: Stephen WarrenThe board ID EEPROM and board ID stickers on p2771- will use a numeric versioning scheme, with version numbers such as 000/100/200/300/400/500. Within NVIDIA, these versions are also known as A00/A01/A02/A03/A04/B00. However, that numbering scheme is not easily visible outside of NVIDIA, and so does not make much sense to use. Convert U-Boot to use the readily visible numeric scheme. Also, it turns out that the current A02 DT actually applies to board versions 000/100/200 (A00..A02). Consequently rename this to 000 not 200 so that all U-Boot builds are named after the first version of the HW they support. diff --git a/arch/arm/dts/tegra186-p2771--a02.dts b/arch/arm/dts/tegra186-p2771--000.dts similarity index 88% rename from arch/arm/dts/tegra186-p2771--a02.dts rename to arch/arm/dts/tegra186-p2771--000.dts index 36a3c21a55de..d2664bd596b6 100644 --- a/arch/arm/dts/tegra186-p2771--a02.dts +++ b/arch/arm/dts/tegra186-p2771--000.dts @@ -4,7 +4,7 @@ / { model = "NVIDIA P2771- A02"; I need to post a v2 to update the model property too. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode
Hi Ziyuan, It was rk3036-kylin board. This bug will make distro_boot failed. 2016-08-30 22:11 GMT+08:00 Ziyuan Xu: > > > On 2016年08月30日 21:56, 陈豪 wrote: >> >> Hi jaehoon, >> >> >> 2016-08-30 17:54 GMT+08:00 Jaehoon Chung : >>> >>> Hi Jacob, >>> >>> On 08/30/2016 02:26 AM, Jacob Chen wrote: From: "jacob2.chen" The former implement have a bug. It will cause wrong data reading sometimes. >>> >>> Could you explain what bug is there? >> >> This bug affects data reading and make board fail to boot. >> There will be some errors like, >> "Warning - bad CRC, using the default environmen" > > > It's not cause by mmc device, U-Boot will read env from media device, and do > CRC checking. > >> "ERROR: Can 't read GPT header" > > > Which board do you use? RK3288 use DMA-mode for dw_mmc, not pio. I'm > interest in it, show me more information. > > >> >> Actually I am not very familiar with the MMC hardware and i don't know >> why former implemen will cause this bug. >> I just rewrite it according to the driver in kernel. >> Signed-off-by: jacob2.chen >>> >>> Could you change from jacob2.chen to your name? >>> --- drivers/mmc/dw_mmc.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index afc674d..f072739 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data) if (host->fifo_mode && size) { len = 0; - if (data->flags == MMC_DATA_READ) { - if ((dwmci_readl(host, DWMCI_RINTSTS) & - DWMCI_INTMSK_RXDR)) { + if (data->flags == MMC_DATA_READ && + (mask & DWMCI_INTMSK_RXDR)) { + while (size) { len = dwmci_readl(host, DWMCI_STATUS); len = (len >> DWMCI_FIFO_SHIFT) & - DWMCI_FIFO_MASK; + DWMCI_FIFO_MASK; >>> >>> this changing is related with bug? >>> len = min(size, len); for (i = 0; i < len; i++) *buf++ = - dwmci_readl(host, DWMCI_DATA); - dwmci_writel(host, DWMCI_RINTSTS, - DWMCI_INTMSK_RXDR); + dwmci_readl(host, + DWMCI_DATA); + size = size > len ? (size - len) : 0; } - } else { - if ((dwmci_readl(host, DWMCI_RINTSTS) & - DWMCI_INTMSK_TXDR)) { + dwmci_writel(host, DWMCI_RINTSTS, + DWMCI_INTMSK_RXDR); + } else if (data->flags == MMC_DATA_WRITE && +(mask & DWMCI_INTMSK_TXDR)) { >>> >>> data->flags == MMC_DATA_WRITE doesn't need..flags are only two.. >>> one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE. >> >> The reason why i write it so strange is that it warning "Too many >> leading tabs" >> + while (size) { len = dwmci_readl(host, DWMCI_STATUS); len = fifo_depth - ((len >> -DWMCI_FIFO_SHIFT) & -DWMCI_FIFO_MASK); + DWMCI_FIFO_SHIFT) & + DWMCI_FIFO_MASK); >>> >>> ditto. >>> >>> Best Regards, >>> Jaehoon Chung >>> len = min(size, len); for (i = 0; i < len; i++) dwmci_writel(host, DWMCI_DATA, *buf++); - dwmci_writel(host, DWMCI_RINTSTS, - DWMCI_INTMSK_TXDR); + size = size > len ? (size - len) : 0; } + dwmci_writel(host, DWMCI_RINTSTS, +
Re: [U-Boot] mx7: ums command does not mount SD card partitions
Hi Fabio, On 8/25/2016 8:18 PM, Fabio Estevam wrote: > Hi Ye Li, > > On Thu, Aug 25, 2016 at 3:25 AM, Ye Liwrote: >> Hi Fabio, >> >>I just tried 'ums' on mx7d sabresd with latest u-boot-imx codes. It works >> well on my board. I don't see your issue. My SD card has a FAT partition. I >> can access it from my host after running the "ums 0 mmc 0". > Thanks for trying it on your side. > > Could you please try "ums 0 mmc 0" several times in a row? > > I notice that sometimes the partitions mount automatically, sometimes not. > > Thanks > I tried with 20 times, no issue found. Could you change a USB cable and try again. Best regards, Ye Li ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] cmd: dfu: Add error handling for board_usb_init
Hi Michal, > board_usb_init() can failed and error should be handled properly. > > Signed-off-by: Michal Simek> --- > > Changes in v2: > - Fix type in return error value > > common/dfu.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/common/dfu.c b/common/dfu.c > index 4c529f7c36f9..0e9f5f59c80a 100644 > --- a/common/dfu.c > +++ b/common/dfu.c > @@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char > *usb_dnl_gadget) bool dfu_reset = false; > int ret, i = 0; > > - board_usb_init(usbctrl_index, USB_INIT_DEVICE); > + ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE); > + if (ret) { > + error("board usb init failed\n"); > + return CMD_RET_FAILURE; > + } > g_dnl_clear_detach(); > ret = g_dnl_register(usb_dnl_gadget); > if (ret) { Acked-by: Lukasz Majewski Thanks for the patch. -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode
On 2016年08月30日 21:56, 陈豪 wrote: Hi jaehoon, 2016-08-30 17:54 GMT+08:00 Jaehoon Chung: Hi Jacob, On 08/30/2016 02:26 AM, Jacob Chen wrote: From: "jacob2.chen" The former implement have a bug. It will cause wrong data reading sometimes. Could you explain what bug is there? This bug affects data reading and make board fail to boot. There will be some errors like, "Warning - bad CRC, using the default environmen" It's not cause by mmc device, U-Boot will read env from media device, and do CRC checking. "ERROR: Can 't read GPT header" Which board do you use? RK3288 use DMA-mode for dw_mmc, not pio. I'm interest in it, show me more information. Actually I am not very familiar with the MMC hardware and i don't know why former implemen will cause this bug. I just rewrite it according to the driver in kernel. Signed-off-by: jacob2.chen Could you change from jacob2.chen to your name? --- drivers/mmc/dw_mmc.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index afc674d..f072739 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data) if (host->fifo_mode && size) { len = 0; - if (data->flags == MMC_DATA_READ) { - if ((dwmci_readl(host, DWMCI_RINTSTS) & - DWMCI_INTMSK_RXDR)) { + if (data->flags == MMC_DATA_READ && + (mask & DWMCI_INTMSK_RXDR)) { + while (size) { len = dwmci_readl(host, DWMCI_STATUS); len = (len >> DWMCI_FIFO_SHIFT) & - DWMCI_FIFO_MASK; + DWMCI_FIFO_MASK; this changing is related with bug? len = min(size, len); for (i = 0; i < len; i++) *buf++ = - dwmci_readl(host, DWMCI_DATA); - dwmci_writel(host, DWMCI_RINTSTS, - DWMCI_INTMSK_RXDR); + dwmci_readl(host, + DWMCI_DATA); + size = size > len ? (size - len) : 0; } - } else { - if ((dwmci_readl(host, DWMCI_RINTSTS) & - DWMCI_INTMSK_TXDR)) { + dwmci_writel(host, DWMCI_RINTSTS, + DWMCI_INTMSK_RXDR); + } else if (data->flags == MMC_DATA_WRITE && +(mask & DWMCI_INTMSK_TXDR)) { data->flags == MMC_DATA_WRITE doesn't need..flags are only two.. one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE. The reason why i write it so strange is that it warning "Too many leading tabs" + while (size) { len = dwmci_readl(host, DWMCI_STATUS); len = fifo_depth - ((len >> -DWMCI_FIFO_SHIFT) & -DWMCI_FIFO_MASK); + DWMCI_FIFO_SHIFT) & + DWMCI_FIFO_MASK); ditto. Best Regards, Jaehoon Chung len = min(size, len); for (i = 0; i < len; i++) dwmci_writel(host, DWMCI_DATA, *buf++); - dwmci_writel(host, DWMCI_RINTSTS, - DWMCI_INTMSK_TXDR); + size = size > len ? (size - len) : 0; } + dwmci_writel(host, DWMCI_RINTSTS, + DWMCI_INTMSK_TXDR); } - size = size > len ? (size - len) : 0; } /* Data arrived correctly. */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode
Hi jaehoon, 2016-08-30 17:54 GMT+08:00 Jaehoon Chung: > Hi Jacob, > > On 08/30/2016 02:26 AM, Jacob Chen wrote: >> From: "jacob2.chen" >> >> The former implement have a bug. >> It will cause wrong data reading sometimes. > > Could you explain what bug is there? This bug affects data reading and make board fail to boot. There will be some errors like, "Warning - bad CRC, using the default environmen" "ERROR: Can 't read GPT header" Actually I am not very familiar with the MMC hardware and i don't know why former implemen will cause this bug. I just rewrite it according to the driver in kernel. >> >> >> Signed-off-by: jacob2.chen > > Could you change from jacob2.chen to your name? > >> --- >> >> drivers/mmc/dw_mmc.c | 32 +--- >> 1 file changed, 17 insertions(+), 15 deletions(-) >> >> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c >> index afc674d..f072739 100644 >> --- a/drivers/mmc/dw_mmc.c >> +++ b/drivers/mmc/dw_mmc.c >> @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host >> *host, struct mmc_data *data) >> >> if (host->fifo_mode && size) { >> len = 0; >> - if (data->flags == MMC_DATA_READ) { >> - if ((dwmci_readl(host, DWMCI_RINTSTS) & >> - DWMCI_INTMSK_RXDR)) { >> + if (data->flags == MMC_DATA_READ && >> + (mask & DWMCI_INTMSK_RXDR)) { >> + while (size) { >> len = dwmci_readl(host, DWMCI_STATUS); >> len = (len >> DWMCI_FIFO_SHIFT) & >> - DWMCI_FIFO_MASK; >> + DWMCI_FIFO_MASK; > > this changing is related with bug? > >> len = min(size, len); >> for (i = 0; i < len; i++) >> *buf++ = >> - dwmci_readl(host, DWMCI_DATA); >> - dwmci_writel(host, DWMCI_RINTSTS, >> - DWMCI_INTMSK_RXDR); >> + dwmci_readl(host, >> + DWMCI_DATA); >> + size = size > len ? (size - len) : 0; >> } >> - } else { >> - if ((dwmci_readl(host, DWMCI_RINTSTS) & >> - DWMCI_INTMSK_TXDR)) { >> + dwmci_writel(host, DWMCI_RINTSTS, >> + DWMCI_INTMSK_RXDR); >> + } else if (data->flags == MMC_DATA_WRITE && >> +(mask & DWMCI_INTMSK_TXDR)) { > > data->flags == MMC_DATA_WRITE doesn't need..flags are only two.. > one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE. The reason why i write it so strange is that it warning "Too many leading tabs" > >> + while (size) { >> len = dwmci_readl(host, DWMCI_STATUS); >> len = fifo_depth - ((len >> >> -DWMCI_FIFO_SHIFT) & >> -DWMCI_FIFO_MASK); >> + DWMCI_FIFO_SHIFT) >> & >> + DWMCI_FIFO_MASK); > > ditto. > > Best Regards, > Jaehoon Chung > >> len = min(size, len); >> for (i = 0; i < len; i++) >> dwmci_writel(host, DWMCI_DATA, >>*buf++); >> - dwmci_writel(host, DWMCI_RINTSTS, >> - DWMCI_INTMSK_TXDR); >> + size = size > len ? (size - len) : 0; >> } >> + dwmci_writel(host, DWMCI_RINTSTS, >> + DWMCI_INTMSK_TXDR); >> } >> - size = size > len ? (size - len) : 0; >> } >> >> /* Data arrived correctly. */ >> > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] cmd: dfu: Add error handling for board_usb_init
board_usb_init() can failed and error should be handled properly. Signed-off-by: Michal Simek--- Changes in v2: - Fix type in return error value common/dfu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/dfu.c b/common/dfu.c index 4c529f7c36f9..0e9f5f59c80a 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) bool dfu_reset = false; int ret, i = 0; - board_usb_init(usbctrl_index, USB_INIT_DEVICE); + ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE); + if (ret) { + error("board usb init failed\n"); + return CMD_RET_FAILURE; + } g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_gadget); if (ret) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cmd: dfu: Add error handling for board_usb_init
board_usb_init() can failed and error should be handled properly. Signed-off-by: Michal Simek--- common/dfu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/dfu.c b/common/dfu.c index 4c529f7c36f9..e384873f66ed 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -24,7 +24,11 @@ int run_usb_dnl_gadget(int usbctrl_index, char *usb_dnl_gadget) bool dfu_reset = false; int ret, i = 0; - board_usb_init(usbctrl_index, USB_INIT_DEVICE); + ret = board_usb_init(usbctrl_index, USB_INIT_DEVICE); + if (ret) { + error("board usb init failed\n"); + return CMD_REG_FAILURE; + } g_dnl_clear_detach(); ret = g_dnl_register(usb_dnl_gadget); if (ret) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Permission denied make: *** [core-dependencies] Error 126 in Buildroot-2015.08.1
> "pc" == pc ramachandrawrites: > Hai, > I am using buildroot-2015.08.1 tool, Mainly i am used Buildroot questions should go to the Buildroot list (buildr...@buildroot.org). > make distclean > make xilinx_zc706_defconfig > make menuconfig > make > then these error occurred below things > root@caravel:/home/ram/Desktop/buildroot-2015.08.1# make > make: execvp: > /home/ram/Desktop/buildroot-2015.08.1/support/scripts/setlocalversion: > Permission denied > /bin/bash: support/gnuconfig/config.guess: Permission denied > /bin/bash: support/dependencies/check-host-tar.sh: Permission denied > /bin/bash: support/dependencies/check-host-xzcat.sh: Permission denied > /bin/bash: > /home/ram/Desktop/buildroot-2015.08.1/support/dependencies/dependencies.sh: > Permission denied It sounds like your permissions are screwed up. -- Bye, Peter Korsgaard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] Kconfig: Added new kconfig entry for IDENT_STRING
On Tue, Aug 30, 2016 at 01:25:42PM +0200, Michal Simek wrote: > Hi Tom > > On 30.8.2016 13:21, Tom Rini wrote: > > On Tue, Aug 30, 2016 at 08:49:33AM +0200, Michal Simek wrote: > > > >> Hi Tom, > >> > >> 2016-08-01 6:49 GMT+02:00 Siva Durga Prasad Paladugu < > >> siva.durga.palad...@xilinx.com>: > >> > >>> Added new Kconfig entry for config IDENT_STRING. > >>> > >>> Signed-off-by: Siva Durga Prasad Paladugu> >>> --- > >>> Changes for v2: > >>> - Updated patch description to be more clear > >>> - Updated help for newly added kconfig entry > >>> --- > >>> common/Kconfig | 6 ++ > >>> 1 file changed, 6 insertions(+) > >>> > >>> diff --git a/common/Kconfig b/common/Kconfig > >>> index 46e7173..cb46391 100644 > >>> --- a/common/Kconfig > >>> +++ b/common/Kconfig > >>> @@ -198,6 +198,12 @@ config CONSOLE_RECORD_IN_SIZE > >>> The buffer is allocated immediately after the malloc() region is > >>> ready. > >>> > >>> +config IDENT_STRING > >>> + string "String to be added to uboot version" > >>> + help > >>> + This string will be added to the U-Boot version > >>> + information (U_BOOT_VERSION). > >>> + > >>> config SYS_NO_FLASH > >>> bool "Disable support for parallel NOR flash" > >>> default n > >>> -- > >>> 2.7.4 > >>> > >> > >> Any problem with this patch? > > > > Reviewed-by: Tom Rini > > do you want to take it directly? If not, I will add it to my tree. Go ahead and take it and if you don't deal with doing a moveconfig.py I will afterwards. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] Kconfig: Added new kconfig entry for IDENT_STRING
Hi Tom On 30.8.2016 13:21, Tom Rini wrote: > On Tue, Aug 30, 2016 at 08:49:33AM +0200, Michal Simek wrote: > >> Hi Tom, >> >> 2016-08-01 6:49 GMT+02:00 Siva Durga Prasad Paladugu < >> siva.durga.palad...@xilinx.com>: >> >>> Added new Kconfig entry for config IDENT_STRING. >>> >>> Signed-off-by: Siva Durga Prasad Paladugu>>> --- >>> Changes for v2: >>> - Updated patch description to be more clear >>> - Updated help for newly added kconfig entry >>> --- >>> common/Kconfig | 6 ++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/common/Kconfig b/common/Kconfig >>> index 46e7173..cb46391 100644 >>> --- a/common/Kconfig >>> +++ b/common/Kconfig >>> @@ -198,6 +198,12 @@ config CONSOLE_RECORD_IN_SIZE >>> The buffer is allocated immediately after the malloc() region is >>> ready. >>> >>> +config IDENT_STRING >>> + string "String to be added to uboot version" >>> + help >>> + This string will be added to the U-Boot version >>> + information (U_BOOT_VERSION). >>> + >>> config SYS_NO_FLASH >>> bool "Disable support for parallel NOR flash" >>> default n >>> -- >>> 2.7.4 >>> >> >> Any problem with this patch? > > Reviewed-by: Tom Rini do you want to take it directly? If not, I will add it to my tree. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] ARM: am57xx_evm: enable DFU support
On Tue, Aug 30, 2016 at 04:55:35PM +0530, Sekhar Nori wrote: > On Tuesday 30 August 2016 04:50 PM, Tom Rini wrote: > > On Tue, Aug 30, 2016 at 12:03:32PM +0530, Sekhar Nori wrote: > >> Hi Tom, > >> > >> On Saturday 27 August 2016 02:31 AM, Tom Rini wrote: > >>> This is another example of needing to find a place and a way to put > >>> vendor specific stuff somewhere. Along with needing to figure out how > >>> to move environment stuff out of include/configs/ if we can. The half > >>> idea I'm toying with right now is include/environment/ and making > >>> various fragments be included in env_default.h. > >>> > >>> I suppose to start with, we could move the TI-as-vendor-suggested DFU > >>> args there, once we have board/ti/Kconfig for the other > >>> TI-as-vendor-suggested stuff :) > >> > >> To be clear, you are asking for a new file > >> "include/environment/ti/omap.h" to be created and DFU args for TI's > >> OMAP-style platforms consolidated there in v2 of this patch series. Right? > > > > Something inside of include/environment/ should be created, yes. For > > the exact name(s), I think a re-read of all of the environment bits in > > include/configs/ti_* needs to be taken into consideration too, and the > > possibly used combinations there-of. My first thought is that you'd > > want a dfu.h for the DFU related parts. And something-else.h for other > > things and so forth. > > Alright, I will start with dfu.h, and I guess over time we can move over > rest of the environment bits? Yeah, we don't have to do all of the environment stuff at first, but it does need to be moved as that's kind of the final blocker to 100% Kconfig migration, long term :) -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] ARM: am57xx_evm: enable DFU support
On Tuesday 30 August 2016 04:50 PM, Tom Rini wrote: > On Tue, Aug 30, 2016 at 12:03:32PM +0530, Sekhar Nori wrote: >> Hi Tom, >> >> On Saturday 27 August 2016 02:31 AM, Tom Rini wrote: >>> This is another example of needing to find a place and a way to put >>> vendor specific stuff somewhere. Along with needing to figure out how >>> to move environment stuff out of include/configs/ if we can. The half >>> idea I'm toying with right now is include/environment/ and making >>> various fragments be included in env_default.h. >>> >>> I suppose to start with, we could move the TI-as-vendor-suggested DFU >>> args there, once we have board/ti/Kconfig for the other >>> TI-as-vendor-suggested stuff :) >> >> To be clear, you are asking for a new file >> "include/environment/ti/omap.h" to be created and DFU args for TI's >> OMAP-style platforms consolidated there in v2 of this patch series. Right? > > Something inside of include/environment/ should be created, yes. For > the exact name(s), I think a re-read of all of the environment bits in > include/configs/ti_* needs to be taken into consideration too, and the > possibly used combinations there-of. My first thought is that you'd > want a dfu.h for the DFU related parts. And something-else.h for other > things and so forth. Alright, I will start with dfu.h, and I guess over time we can move over rest of the environment bits? Thanks, Sekhar ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] UPM Configuration in P4080DS
Hi, I have p4080ds board. I want to use NOR flash is in page mode. I have learned that by default elbc is in GPCM mode which does not support page mode access. In order to use page mode access UPM mode should be defined and configured. So What steps I should follow in uboot? Best regards -- View this message in context: http://u-boot.10912.n7.nabble.com/UPM-Configuration-in-P4080DS-tp265726.html Sent from the U-Boot mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] Kconfig: Added new kconfig entry for IDENT_STRING
On Tue, Aug 30, 2016 at 08:49:33AM +0200, Michal Simek wrote: > Hi Tom, > > 2016-08-01 6:49 GMT+02:00 Siva Durga Prasad Paladugu < > siva.durga.palad...@xilinx.com>: > > > Added new Kconfig entry for config IDENT_STRING. > > > > Signed-off-by: Siva Durga Prasad Paladugu> > --- > > Changes for v2: > > - Updated patch description to be more clear > > - Updated help for newly added kconfig entry > > --- > > common/Kconfig | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/common/Kconfig b/common/Kconfig > > index 46e7173..cb46391 100644 > > --- a/common/Kconfig > > +++ b/common/Kconfig > > @@ -198,6 +198,12 @@ config CONSOLE_RECORD_IN_SIZE > > The buffer is allocated immediately after the malloc() region is > > ready. > > > > +config IDENT_STRING > > + string "String to be added to uboot version" > > + help > > + This string will be added to the U-Boot version > > + information (U_BOOT_VERSION). > > + > > config SYS_NO_FLASH > > bool "Disable support for parallel NOR flash" > > default n > > -- > > 2.7.4 > > > > Any problem with this patch? Reviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] board: k2g: Enable ECC byte lane
On Sat, Aug 27, 2016 at 05:19:16PM +0530, Lokesh Vutla wrote: > Enable ECC byte lane for k2g-evm > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] board: ks2: Enable ECC using detected DDR size
On Sat, Aug 27, 2016 at 05:19:15PM +0530, Lokesh Vutla wrote: > EEC is being enabled based on the ddr size populated by SPD data. > But not all keystone platforms have SPD data to detect ddr3 size. > So, enable ECC using the detected DDR size. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] ARM: TI: Enable DISPLAY_BOARDINFO on all boards
On Tue, Aug 30, 2016 at 11:01:34AM +0530, Lokesh Vutla wrote: > Delete board specific Kconfig entries for DISPLAY_BOARDINFO and create a > common > entry. Select it for all TI SoCs and the boards that already has Kconfig > entry. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] ARM: TI: Enable DISPLAY_CPUINFO on all SoCs
On Tue, Aug 30, 2016 at 11:01:33AM +0530, Lokesh Vutla wrote: > Create a common Kconfig entry for DISPLAY_CPUINFO and select it for all > TI SoCs. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] ARM: AM437X: Add Silicon ID support
On Tue, Aug 30, 2016 at 11:01:32AM +0530, Lokesh Vutla wrote: > Add silicon ID code for AM437x silicon. This can be used to print > the cpu info using CONFIG_DISPLAY_CPUINFO. > Also printing "CPU :" along with cpu name in order to be consistent > with other OMAP platforms. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] ARM: am57xx_evm: enable DFU support
On Tue, Aug 30, 2016 at 12:03:32PM +0530, Sekhar Nori wrote: > Hi Tom, > > On Saturday 27 August 2016 02:31 AM, Tom Rini wrote: > > This is another example of needing to find a place and a way to put > > vendor specific stuff somewhere. Along with needing to figure out how > > to move environment stuff out of include/configs/ if we can. The half > > idea I'm toying with right now is include/environment/ and making > > various fragments be included in env_default.h. > > > > I suppose to start with, we could move the TI-as-vendor-suggested DFU > > args there, once we have board/ti/Kconfig for the other > > TI-as-vendor-suggested stuff :) > > To be clear, you are asking for a new file > "include/environment/ti/omap.h" to be created and DFU args for TI's > OMAP-style platforms consolidated there in v2 of this patch series. Right? Something inside of include/environment/ should be created, yes. For the exact name(s), I think a re-read of all of the environment bits in include/configs/ti_* needs to be taken into consideration too, and the possibly used combinations there-of. My first thought is that you'd want a dfu.h for the DFU related parts. And something-else.h for other things and so forth. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 8/8] armv8: ls1046ardb: Add LS1046ARDB board support
Hi Prabhakar, > -Original Message- > From: Prabhakar Kushwaha > Sent: Saturday, August 27, 2016 10:21 AM > To: Qianyu Gong; u-boot@lists.denx.de; york sun > > Cc: Mingkai Hu ; Shaohui Xie ; > Zhiqiang Hou ; Wenbin Song ; > Mingkai Hu ; Qianyu Gong > Subject: RE: [PATCH 8/8] armv8: ls1046ardb: Add LS1046ARDB board support > > > -Original Message- > > From: Gong Qianyu [mailto:qianyu.g...@nxp.com] > > Sent: Friday, August 26, 2016 6:29 AM > > To: u-boot@lists.denx.de; york sun > > Cc: Prabhakar Kushwaha ; Mingkai Hu > > ; Shaohui Xie ; Zhiqiang Hou > > ; Wenbin Song ; Mingkai Hu > > ; Qianyu Gong > > Subject: [PATCH 8/8] armv8: ls1046ardb: Add LS1046ARDB board support > > > > From: Mingkai Hu > > > > LS1046ARDB Specification: > > - > > Memory subsystem: > > * 8GByte DDR4 SDRAM (64bit bus) > > * 512 Mbyte NAND flash > > * Two 64 Mbyte high-speed SPI flash > > * SD connector to interface with the SD memory card > > * On-board 4G eMMC > > > > Ethernet: > > * Two XFI 10G ports > > * Two SGMII ports > > * Two RGMII ports > > > > PCIe: > > * PCIe1 (SerDes2 Lane0) to miniPCIe slot > > * PCIe2 (SerDes2 Lane1) to x2 PCIe slot > > * PCIe3 (SerDes2 Lane2) to x4 PCIe slot > > > > SATA: > > * SerDes2 Lane3 to SATA port > > > > USB 3.0: one super speed USB 3.0 type A port > > one Micro-AB port > > > > UART: supports two UARTs up to 115200 bps for console > > > > Signed-off-by: Gong Qianyu > > Signed-off-by: Mingkai Hu > > --- > > arch/arm/Kconfig | 9 + > > arch/arm/dts/Makefile | 1 + > > arch/arm/dts/fsl-ls1046a-rdb.dts | 44 > > arch/arm/dts/fsl-ls1046a.dtsi | 220 > > +++ > > board/freescale/ls1046ardb/Kconfig | 16 ++ > > board/freescale/ls1046ardb/MAINTAINERS | 8 + > > board/freescale/ls1046ardb/Makefile| 10 + > > board/freescale/ls1046ardb/README | 67 ++ > > board/freescale/ls1046ardb/cpld.c | 158 ++ > > board/freescale/ls1046ardb/cpld.h | 49 + > > board/freescale/ls1046ardb/ddr.c | 140 > > board/freescale/ls1046ardb/ddr.h | 44 > > board/freescale/ls1046ardb/eth.c | 77 +++ > > board/freescale/ls1046ardb/ls1046ardb.c| 173 +++ > > board/freescale/ls1046ardb/ls1046ardb_pbi.cfg | 22 ++ > > board/freescale/ls1046ardb/ls1046ardb_rcw_emmc.cfg | 7 + > > board/freescale/ls1046ardb/ls1046ardb_rcw_sd.cfg | 7 + > > .../ls1046ardb/ls1046ardb_rcw_sd_1200.cfg | 7 + > > .../ls1046ardb/ls1046ardb_rcw_sd_1400.cfg | 7 + > > .../ls1046ardb/ls1046ardb_rcw_sd_5506.cfg | 7 + > > configs/ls1046ardb_qspi_defconfig | 25 +++ > > configs/ls1046ardb_sdcard_defconfig| 26 +++ > > include/configs/ls1046a_common.h | 181 > > include/configs/ls1046ardb.h | 237 > > + > > 24 files changed, 1542 insertions(+) > > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > > index aef901c..d343995 100644 > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -811,6 +811,14 @@ config TARGET_LS1043ARDB > > help > > Support for Freescale LS1043ARDB platform. > > > > +config TARGET_LS1046ARDB > > + bool "Support ls1046ardb" > > + select ARM64 > > + select ARMV8_MULTIENTRY > > + select SUPPORT_SPL > > + help > > + Support for Freescale LS1046ARDB platform. > > + > > Have you run checkpatch. > I guess we get warning if help is < 60 characters. > Will fix in v2. > > config TARGET_H2200 > > bool "Support h2200" > > select CPU_PXA > > @@ -954,6 +962,7 @@ source "board/freescale/ls1021aqds/Kconfig" > > source "board/freescale/ls1043aqds/Kconfig" > > source "board/freescale/ls1021atwr/Kconfig" > > source "board/freescale/ls1043ardb/Kconfig" > > +source "board/freescale/ls1046ardb/Kconfig" > > source "board/freescale/ls1012aqds/Kconfig" > > source "board/freescale/ls1012ardb/Kconfig" > > source "board/freescale/ls1012afrdm/Kconfig" > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > > index 223124e..95b40f6 100644 > > --- a/arch/arm/dts/Makefile > > +++ b/arch/arm/dts/Makefile > > @@ -142,6 +142,7 @@ dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \ > > dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \ > >
[U-Boot] [PATCH 0/4] ARM: move ARMV7_PSCI and ARMV7_PSCI_NR_CPUS to Kconfig
Masahiro Yamada (4): ARM: tegra: remove wrong dependency on SPL_BUILD ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI ARM: armv7: move CONFIG_ARMV7_PSCI to Kconfig ARM: armv7: move ARMV7_PSCI_NR_CPUS to Kconfig arch/arm/Kconfig | 3 +++ arch/arm/cpu/armv7/Kconfig | 15 +++ arch/arm/cpu/armv7/mx7/Kconfig | 1 + arch/arm/cpu/u-boot.lds | 4 ++-- arch/arm/mach-tegra/tegra124/Kconfig | 5 +++-- arch/arm/mach-uniphier/Kconfig | 1 + board/sunxi/Kconfig | 5 + include/configs/arndale.h| 1 - include/configs/bcm_ep_board.h | 1 - include/configs/jetson-tk1.h | 2 -- include/configs/ls1021aqds.h | 2 -- include/configs/ls1021atwr.h | 2 -- include/configs/mx7_common.h | 2 -- include/configs/sun6i.h | 2 -- include/configs/sun7i.h | 2 -- include/configs/sun8i.h | 13 - include/configs/uniphier.h | 2 -- include/configs/vexpress_ca15_tc2.h | 1 - 18 files changed, 30 insertions(+), 34 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] pxe: Fix pxe boot with FIT image
Hi, Tom Yes, I have tested all kinds of cases. Best Regards Wenbin Song > -Original Message- > From: Tom Rini [mailto:tr...@konsulko.com] > Sent: Tuesday, August 30, 2016 8:22 AM > To: Wenbin Song> Cc: s...@chromium.org; bmeng...@gmail.com; h...@denx.de; > p.marc...@samsung.com; s...@denx.de; york sun ; u- > b...@lists.denx.de; Mingkai Hu ; Qianyu Gong > ; Shaohui Xie ; > zhiqian@nxp.com > Subject: Re: [U-Boot] [PATCH] pxe: Fix pxe boot with FIT image > > On Thu, Aug 04, 2016 at 03:44:50PM +0800, Wenbin song wrote: > > > From: York Sun > > > > When FIT image is used, a single image provides kernel, device tree > > and optionally ramdisk. Argc and argv need to be adjusted to support > > this. > > > > Signed-off-by: York Sun > > --- > > cmd/pxe.c | 9 + > > 1 file changed, 5 insertions(+), 4 deletions(-) > > Can you please confirm you tested the other common cases of PXE booting still > work with this change? Thanks! > > -- > Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Q on expected u-boot behavior on ping response
Dear u-boot network experts, I'm now working on NXP MX6Q Sabreauto board with AR8031 network card. I'm using rel_imx_4.1.15_1.2.0_ga. Basically, the network works fine. u-boot can send ping to other device, do the tftp boot as well. But, I just realized that u-boot never respond on ping command from external device. Only the exception is that while u-boot is trying to communicate to other device via network (sending a ping command to others, or doing tftp boot, etc) I'm not dug into detail yet. But before doing so, I would like to confirm if this is a intentional behavior or not. I have only tried the MX6Q Sabre auto device, since this is the only device I have now. Thanks for the feedback. John ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/4] ARM: move ARMV7_PSCI and ARMV7_PSCI_NR_CPUS to Kconfig
Masahiro Yamada (4): ARM: tegra: remove wrong dependency on SPL_BUILD ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI ARM: armv7: move CONFIG_ARMV7_PSCI to Kconfig ARM: armv7: move ARMV7_PSCI_NR_CPUS to Kconfig arch/arm/Kconfig | 3 +++ arch/arm/cpu/armv7/Kconfig | 19 +++ arch/arm/cpu/armv7/mx7/Kconfig | 1 + arch/arm/cpu/u-boot.lds | 4 ++-- arch/arm/mach-tegra/tegra124/Kconfig | 5 +++-- arch/arm/mach-uniphier/Kconfig | 1 + board/sunxi/Kconfig | 5 + include/configs/arndale.h| 1 - include/configs/bcm_ep_board.h | 1 - include/configs/jetson-tk1.h | 2 -- include/configs/ls1021aqds.h | 2 -- include/configs/ls1021atwr.h | 2 -- include/configs/mx7_common.h | 2 -- include/configs/sun6i.h | 2 -- include/configs/sun7i.h | 2 -- include/configs/sun8i.h | 13 - include/configs/uniphier.h | 2 -- include/configs/vexpress_ca15_tc2.h | 1 - 18 files changed, 34 insertions(+), 34 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/8] drivers/ddr/fsl: add DEBUG_38
> -Original Message- > From: york sun > Sent: Friday, August 26, 2016 11:00 PM > To: Qianyu Gong; u-boot@lists.denx.de > Cc: Prabhakar Kushwaha ; Mingkai Hu > ; Shaohui Xie ; Zhiqiang Hou > ; Wenbin Song > Subject: Re: [PATCH 1/8] drivers/ddr/fsl: add DEBUG_38 > > On 08/26/2016 04:40 AM, Gong Qianyu wrote: > > From: Mingkai Hu > > > > DEBUG_38 is needed for rev2 DDR controller. > > > > Signed-off-by: Mingkai Hu > > Signed-off-by: Gong Qianyu > > --- > > drivers/ddr/fsl/ctrl_regs.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c > > index 24fd366..4ae8b80 100644 > > --- a/drivers/ddr/fsl/ctrl_regs.c > > +++ b/drivers/ddr/fsl/ctrl_regs.c > > @@ -2526,5 +2526,7 @@ compute_fsl_memctl_config_regs(const > unsigned int ctrl_num, > > ddr->debug[2] |= 0x0200;/* set bit 22 */ > > #endif > > > > + ddr->debug[37] = 0x8000; > > + > > NAK. You can't simply add a new register without checking if it exists on > older > controllers. > > York Thanks, York. This is not needed and will remove it in next version. Thanks, Mingkai ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1] mmc: mmc-uclass: Add mmc_init() in mmc preinit phrase
Hi Wenyou, On 08/30/2016 05:14 PM, Wenyou Yang wrote: > Add mmc_init() in the mmc preinit phrase to get the device's > information. Otherwise, if the environment variables are from > the mmc device, it will fail with "** Bad device size - mmc 1 **". > > Signed-off-by: Wenyou Yang> --- > > drivers/mmc/mmc-uclass.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c > index 425abb1..4136fee 100644 > --- a/drivers/mmc/mmc-uclass.c > +++ b/drivers/mmc/mmc-uclass.c > @@ -152,11 +152,15 @@ void mmc_do_preinit(void) > > if (!m) > continue; > -#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT > +#if defined CONFIG_FSL_ESDHC_ADAPTER_IDENT || defined CONFIG_ATMEL_SDHCI Could you use the bracket? if defined(...) || defined(...) Best Regards, Jaehoon CHung > mmc_set_preinit(m, 1); > #endif > - if (m->preinit) > + if (m->preinit) { > mmc_start_init(m); > + > + mmc_init(m); > + } > + > } > } > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL
On 30.08.2016 11:50, Masahiro Yamada wrote: If both SPL_DM and SPL_OF_CONTROL are enabled, SPL needs to bind several devices, but CONFIG_SYS_MALLOC_F_LEN=0x400 is apparently not enough. Increase the default to 0x2000 for the case. This will be helpful for shorter defconfigs. Signed-off-by: Masahiro YamadaReviewed-by: Stefan Roese Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] ARM: TI: Enable DISPLAY_BOARDINFO on all boards
On 30.08.2016 07:31, Lokesh Vutla wrote: Delete board specific Kconfig entries for DISPLAY_BOARDINFO and create a common entry. Select it for all TI SoCs and the boards that already has Kconfig entry. Signed-off-by: Lokesh Vutla--- arch/arm/cpu/armv7/am33xx/Kconfig | 11 +++ arch/arm/cpu/armv7/omap3/Kconfig | 8 arch/arm/cpu/armv7/omap5/Kconfig | 4 arch/arm/mach-keystone/Kconfig| 4 arch/powerpc/cpu/ppc4xx/Kconfig | 14 ++ board/amcc/acadia/Kconfig | 4 board/amcc/bamboo/Kconfig | 4 board/amcc/bubinga/Kconfig| 4 board/amcc/canyonlands/Kconfig| 4 board/amcc/katmai/Kconfig | 4 board/amcc/kilauea/Kconfig| 4 board/amcc/luan/Kconfig | 4 board/amcc/makalu/Kconfig | 4 board/amcc/redwood/Kconfig| 4 board/amcc/sequoia/Kconfig| 4 board/amcc/walnut/Kconfig | 4 board/amcc/yosemite/Kconfig | 4 board/amcc/yucca/Kconfig | 4 board/liebherr/lwmon5/Kconfig | 4 common/Kconfig| 8 include/configs/ti_omap4_common.h | 1 - include/configs/ti_omap5_common.h | 2 -- 22 files changed, 49 insertions(+), 59 deletions(-) Reviewed-by: Stefan Roese Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: am335x: select DM_GPIO
2016-08-30 11:51 GMT+02:00 Masahiro Yamada: > We are supposed to not add config entries with only "default y" > in board/SoC Kconfig files. > > Signed-off-by: Masahiro Yamada > --- > > arch/arm/Kconfig | 1 + > board/tcl/sl50/Kconfig | 6 -- > 2 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index c871eaf..03eaeda 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -459,6 +459,7 @@ config TARGET_AM335X_SL50 > select CPU_V7 > select SUPPORT_SPL > select DM > + select DM_GPIO > select DM_SERIAL > > config TARGET_BAV335X > diff --git a/board/tcl/sl50/Kconfig b/board/tcl/sl50/Kconfig > index 390a476..d0068d9 100644 > --- a/board/tcl/sl50/Kconfig > +++ b/board/tcl/sl50/Kconfig > @@ -22,10 +22,4 @@ config CONS_INDEX > board you may want something other than UART0 as for example the IDK > uses UART3 so enter 4 here. > > -config DM_GPIO > - default y > - > -config DM_SERIAL > - default y > - > endif > -- > 1.9.1 > Thanks, Acked-by: Enric Balletbo i Serra > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode
Hi Jacob, On 08/30/2016 02:26 AM, Jacob Chen wrote: > From: "jacob2.chen"> > The former implement have a bug. > It will cause wrong data reading sometimes. Could you explain what bug is there? > > > Signed-off-by: jacob2.chen Could you change from jacob2.chen to your name? > --- > > drivers/mmc/dw_mmc.c | 32 +--- > 1 file changed, 17 insertions(+), 15 deletions(-) > > diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c > index afc674d..f072739 100644 > --- a/drivers/mmc/dw_mmc.c > +++ b/drivers/mmc/dw_mmc.c > @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > > if (host->fifo_mode && size) { > len = 0; > - if (data->flags == MMC_DATA_READ) { > - if ((dwmci_readl(host, DWMCI_RINTSTS) & > - DWMCI_INTMSK_RXDR)) { > + if (data->flags == MMC_DATA_READ && > + (mask & DWMCI_INTMSK_RXDR)) { > + while (size) { > len = dwmci_readl(host, DWMCI_STATUS); > len = (len >> DWMCI_FIFO_SHIFT) & > - DWMCI_FIFO_MASK; > + DWMCI_FIFO_MASK; this changing is related with bug? > len = min(size, len); > for (i = 0; i < len; i++) > *buf++ = > - dwmci_readl(host, DWMCI_DATA); > - dwmci_writel(host, DWMCI_RINTSTS, > - DWMCI_INTMSK_RXDR); > + dwmci_readl(host, > + DWMCI_DATA); > + size = size > len ? (size - len) : 0; > } > - } else { > - if ((dwmci_readl(host, DWMCI_RINTSTS) & > - DWMCI_INTMSK_TXDR)) { > + dwmci_writel(host, DWMCI_RINTSTS, > + DWMCI_INTMSK_RXDR); > + } else if (data->flags == MMC_DATA_WRITE && > +(mask & DWMCI_INTMSK_TXDR)) { data->flags == MMC_DATA_WRITE doesn't need..flags are only two.. one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE. > + while (size) { > len = dwmci_readl(host, DWMCI_STATUS); > len = fifo_depth - ((len >> > -DWMCI_FIFO_SHIFT) & > -DWMCI_FIFO_MASK); > + DWMCI_FIFO_SHIFT) & > + DWMCI_FIFO_MASK); ditto. Best Regards, Jaehoon Chung > len = min(size, len); > for (i = 0; i < len; i++) > dwmci_writel(host, DWMCI_DATA, >*buf++); > - dwmci_writel(host, DWMCI_RINTSTS, > - DWMCI_INTMSK_TXDR); > + size = size > len ? (size - len) : 0; > } > + dwmci_writel(host, DWMCI_RINTSTS, > + DWMCI_INTMSK_TXDR); > } > - size = size > len ? (size - len) : 0; > } > > /* Data arrived correctly. */ > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL
If both SPL_DM and SPL_OF_CONTROL are enabled, SPL needs to bind several devices, but CONFIG_SYS_MALLOC_F_LEN=0x400 is apparently not enough. Increase the default to 0x2000 for the case. This will be helpful for shorter defconfigs. Signed-off-by: Masahiro Yamada--- Kconfig| 1 + configs/clearfog_defconfig | 1 - configs/db-88f6720_defconfig | 1 - configs/db-88f6820-gp_defconfig| 1 - configs/db-mv784mp-gp_defconfig| 1 - configs/ds414_defconfig| 1 - configs/maxbcm_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - configs/socfpga_arria5_defconfig | 1 - configs/socfpga_cyclone5_defconfig | 1 - configs/socfpga_de0_nano_soc_defconfig | 1 - configs/socfpga_is1_defconfig | 1 - configs/socfpga_mcvevk_defconfig | 1 - configs/socfpga_sockit_defconfig | 1 - configs/socfpga_socrates_defconfig | 1 - configs/socfpga_sr1500_defconfig | 1 - configs/socfpga_vining_fpga_defconfig | 1 - configs/theadorable_debug_defconfig| 1 - configs/theadorable_defconfig | 1 - configs/uniphier_ld11_defconfig| 1 - configs/uniphier_ld20_defconfig| 1 - configs/uniphier_ld4_sld8_defconfig| 1 - configs/uniphier_pro4_defconfig| 1 - configs/uniphier_pxs2_ld6b_defconfig | 1 - configs/uniphier_sld3_defconfig| 1 - 25 files changed, 1 insertion(+), 24 deletions(-) diff --git a/Kconfig b/Kconfig index 45a0669..fdea71e 100644 --- a/Kconfig +++ b/Kconfig @@ -83,6 +83,7 @@ config SYS_MALLOC_F config SYS_MALLOC_F_LEN hex "Size of malloc() pool before relocation" depends on SYS_MALLOC_F + default 0x2000 if SPL_DM && SPL_OF_CONTROL default 0x400 help Before relocation, memory is very limited on many platforms. Still, diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 3bf5388..778cf06 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_CLEARFOG=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" CONFIG_SPL=y diff --git a/configs/db-88f6720_defconfig b/configs/db-88f6720_defconfig index f06f27f..b6df961 100644 --- a/configs/db-88f6720_defconfig +++ b/configs/db-88f6720_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_DB_88F6720=y CONFIG_DEFAULT_DEVICE_TREE="armada-375-db" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig index 123e7fc..7ac7457 100644 --- a/configs/db-88f6820-gp_defconfig +++ b/configs/db-88f6820-gp_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_DB_88F6820_GP=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-gp" CONFIG_SPL=y diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig index f2c4a9e..510554e 100644 --- a/configs/db-mv784mp-gp_defconfig +++ b/configs/db-mv784mp-gp_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_DB_MV784MP_GP=y CONFIG_DEFAULT_DEVICE_TREE="armada-xp-gp" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig index a214732..ec23c77 100644 --- a/configs/ds414_defconfig +++ b/configs/ds414_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_DS414=y CONFIG_DEFAULT_DEVICE_TREE="armada-xp-synology-ds414" CONFIG_SPL=y diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig index b67bc51..22186c3 100644 --- a/configs/maxbcm_defconfig +++ b/configs/maxbcm_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_MVEBU=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_MAXBCM=y CONFIG_DEFAULT_DEVICE_TREE="armada-xp-maxbcm" CONFIG_SPL=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index 0f6dda8..ccb31e3 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -1,4 +1,3 @@ -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_MMC=y CONFIG_SANDBOX_SPL=y CONFIG_PCI=y diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index 1bec969..a3797af 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_DM=y CONFIG_DM_GPIO=y diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 0437cbe..5798662 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_SOCFPGA=y -CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_DM=y CONFIG_DM_GPIO=y diff --git
[U-Boot] [PATCH] ARM: am335x: select DM_GPIO
We are supposed to not add config entries with only "default y" in board/SoC Kconfig files. Signed-off-by: Masahiro Yamada--- arch/arm/Kconfig | 1 + board/tcl/sl50/Kconfig | 6 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c871eaf..03eaeda 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -459,6 +459,7 @@ config TARGET_AM335X_SL50 select CPU_V7 select SUPPORT_SPL select DM + select DM_GPIO select DM_SERIAL config TARGET_BAV335X diff --git a/board/tcl/sl50/Kconfig b/board/tcl/sl50/Kconfig index 390a476..d0068d9 100644 --- a/board/tcl/sl50/Kconfig +++ b/board/tcl/sl50/Kconfig @@ -22,10 +22,4 @@ config CONS_INDEX board you may want something other than UART0 as for example the IDK uses UART3 so enter 4 here. -config DM_GPIO - default y - -config DM_SERIAL - default y - endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/8] armv8: fsl-layerscape: Increase L2 Data RAM latency and L2 Tag RAM latency
> -Original Message- > From: york sun > Sent: Friday, August 26, 2016 11:01 PM > To: Qianyu Gong; u-boot@lists.denx.de > Cc: Prabhakar Kushwaha ; Mingkai Hu > ; Shaohui Xie ; Zhiqiang Hou > ; Wenbin Song > Subject: Re: [PATCH 3/8] armv8: fsl-layerscape: Increase L2 Data RAM latency > and L2 Tag RAM latency > > On 08/26/2016 04:40 AM, Gong Qianyu wrote: > > From: Mingkai Hu > > > > Use 3 cycles. > > Care to explain more here? > Hi York, According to design, the L2 cache operates at the same frequency as the A72 CPUs in the cluster with a 3-cycle latency, So increase the L2 Data RAM and Tag RAM latency to 3 cycles, or else, will run into different call trace issues. Thanks, Mingkai ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/6] mmc: sdhci: some fixes for CONFIG_BLK migration and macro renaming
Hi Masahiro, On 08/25/2016 04:07 PM, Masahiro Yamada wrote: > Changes in v2: > - Adjust comment block > > Masahiro Yamada (6): > mmc: sdhci: move sdhci_reset() call to sdhci_init() > mmc: sdhci: move error message to more relevant place > mmc: sdhci: move broken voltage quirk handling to sdhci_setup_cfg() > mmc: sdhci: move SDMA capability check to sdhci_setup_cfg() > mmc: sdhci: drop CONFIG_ from CONFIG_SDHCI_CMD_DEFAULT_TIME > mmc: sdhci: drop CONFIG_ from CONFIG_SDHCI_CMD_MAX_TIMEOUT Applied on u-boot-mmc. Thanks! Best Regards, Jaehoon Chung > > drivers/mmc/sdhci.c | 55 > + > 1 file changed, 26 insertions(+), 29 deletions(-) > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 2/2] mmc: sd: optimize erase
Hi Peng, On 08/23/2016 05:12 PM, Peng Fan wrote: > To SD, there is no erase group, then the value erase_grp_size > will be default 1. When erasing SD blocks, the blocks will be > erased one by one, which is time consuming. > > We use AU_SIZE as a group to speed up the erasing. > > Erasing 4MB with a SD2.0 Card with AU_SIZE 4MB. > `time mmc erase 0x10 0x2000` > time: 44.856 seconds (before optimization) > time: 0.335 seconds (after optimization) > > Signed-off-by: Peng Fan> Cc: Jaehoon Chung > Cc: Simon Glass > Cc: Bin Meng > Cc: Stefan Wahren > Cc: Clemens Gruber > Cc: Kever Yang > Cc: Eric Nelson > Cc: Stephen Warren Applied on u-boot-mmc. Thanks! Best Regards, Jaehoon Chung > --- > > V3: > No change. > > V2: > Add test results. > > drivers/mmc/mmc_write.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c > index 0f8b5c7..2289640 100644 > --- a/drivers/mmc/mmc_write.c > +++ b/drivers/mmc/mmc_write.c > @@ -100,8 +100,13 @@ unsigned long mmc_berase(struct blk_desc *block_dev, > lbaint_t start, > & ~(mmc->erase_grp_size - 1)) - 1); > > while (blk < blkcnt) { > - blk_r = ((blkcnt - blk) > mmc->erase_grp_size) ? > - mmc->erase_grp_size : (blkcnt - blk); > + if (IS_SD(mmc) && mmc->ssr.au) { > + blk_r = ((blkcnt - blk) > mmc->ssr.au) ? > + mmc->ssr.au : (blkcnt - blk); > + } else { > + blk_r = ((blkcnt - blk) > mmc->erase_grp_size) ? > + mmc->erase_grp_size : (blkcnt - blk); > + } > err = mmc_erase_t(mmc, start + blk, blk_r); > if (err) > break; > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 1/2] mmc: sd: extracting erase timeout information from sd status
Hi Peng, On 08/23/2016 05:12 PM, Peng Fan wrote: > Add function to read SD_STATUS information. > According to the information, get erase_timeout/erase_size/erase_offset. > Add a structure sd_ssr to include the erase related information. > > Signed-off-by: Peng Fan> Cc: Jaehoon Chung > Cc: Simon Glass > Cc: Bin Meng > Cc: Stefan Wahren > Cc: Clemens Gruber > Cc: Kever Yang > Cc: Eric Nelson > Cc: Stephen Warren Applied on u-boot-mmc. Thanks! Best Regards, Jaehoon Chung > --- > > I dropped patch [2,3,4]/5 in V2, which is not a must in this optimization > case. > > V3: > No change. > > V2: > Address Jaehoon's comments for V1 > > drivers/mmc/mmc.c | 68 > +++ > include/mmc.h | 8 +++ > 2 files changed, 76 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 43ea0bb..0312da9 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -21,6 +21,14 @@ > #include > #include "mmc_private.h" > > +static const unsigned int sd_au_size[] = { > + 0, SZ_16K / 512, SZ_32K / 512, > + SZ_64K / 512, SZ_128K / 512, SZ_256K / 512, > + SZ_512K / 512, SZ_1M / 512,SZ_2M / 512, > + SZ_4M / 512,SZ_8M / 512,(SZ_8M + SZ_4M) / 512, > + SZ_16M / 512, (SZ_16M + SZ_8M) / 512, SZ_32M / 512, SZ_64M / 512, > +}; > + > #ifndef CONFIG_DM_MMC_OPS > __weak int board_mmc_getwp(struct mmc *mmc) > { > @@ -945,6 +953,62 @@ retry_scr: > return 0; > } > > +static int sd_read_ssr(struct mmc *mmc) > +{ > + int err, i; > + struct mmc_cmd cmd; > + ALLOC_CACHE_ALIGN_BUFFER(uint, ssr, 16); > + struct mmc_data data; > + int timeout = 3; > + unsigned int au, eo, et, es; > + > + cmd.cmdidx = MMC_CMD_APP_CMD; > + cmd.resp_type = MMC_RSP_R1; > + cmd.cmdarg = mmc->rca << 16; > + > + err = mmc_send_cmd(mmc, , NULL); > + if (err) > + return err; > + > + cmd.cmdidx = SD_CMD_APP_SD_STATUS; > + cmd.resp_type = MMC_RSP_R1; > + cmd.cmdarg = 0; > + > +retry_ssr: > + data.dest = (char *)ssr; > + data.blocksize = 64; > + data.blocks = 1; > + data.flags = MMC_DATA_READ; > + > + err = mmc_send_cmd(mmc, , ); > + if (err) { > + if (timeout--) > + goto retry_ssr; > + > + return err; > + } > + > + for (i = 0; i < 16; i++) > + ssr[i] = be32_to_cpu(ssr[i]); > + > + au = (ssr[2] >> 12) & 0xF; > + if ((au <= 9) || (mmc->version == SD_VERSION_3)) { > + mmc->ssr.au = sd_au_size[au]; > + es = (ssr[3] >> 24) & 0xFF; > + es |= (ssr[2] & 0xFF) << 8; > + et = (ssr[3] >> 18) & 0x3F; > + if (es && et) { > + eo = (ssr[3] >> 16) & 0x3; > + mmc->ssr.erase_timeout = (et * 1000) / es; > + mmc->ssr.erase_offset = eo * 1000; > + } > + } else { > + debug("Invalid Allocation Unit Size.\n"); > + } > + > + return 0; > +} > + > /* frequency bases */ > /* divided by 10 to be nice to platforms without floating point */ > static const int fbase[] = { > @@ -1350,6 +1414,10 @@ static int mmc_startup(struct mmc *mmc) > mmc_set_bus_width(mmc, 4); > } > > + err = sd_read_ssr(mmc); > + if (err) > + return err; > + > if (mmc->card_caps & MMC_MODE_HS) > mmc->tran_speed = 5000; > else > diff --git a/include/mmc.h b/include/mmc.h > index aa6d5d1..af2595c 100644 > --- a/include/mmc.h > +++ b/include/mmc.h > @@ -102,6 +102,7 @@ > #define SD_CMD_SWITCH_UHS18V 11 > > #define SD_CMD_APP_SET_BUS_WIDTH 6 > +#define SD_CMD_APP_SD_STATUS 13 > #define SD_CMD_ERASE_WR_BLK_START32 > #define SD_CMD_ERASE_WR_BLK_END 33 > #define SD_CMD_APP_SEND_OP_COND 41 > @@ -392,6 +393,12 @@ struct mmc_config { > unsigned char part_type; > }; > > +struct sd_ssr { > + unsigned int au;/* In sectors */ > + unsigned int erase_timeout; /* In milliseconds */ > + unsigned int erase_offset; /* In milliseconds */ > +}; > + > /* > * With CONFIG_DM_MMC enabled, struct mmc can be accessed from the MMC device > * with mmc_get_mmc_dev(). > @@ -426,6 +433,7 @@ struct mmc { > uint write_bl_len; > uint erase_grp_size;/* in 512-byte sectors */ > uint hc_wp_grp_size;/* in 512-byte sectors */ > + struct sd_ssr ssr;/* SD status register */ > u64 capacity; > u64 capacity_user; > u64 capacity_boot; >
Re: [U-Boot] [PATCH 8/8] armv8: ls1046ardb: Add LS1046ARDB board support
> -Original Message- > From: Gong Qianyu [mailto:qianyu.g...@nxp.com] > Sent: Friday, August 26, 2016 7:29 PM > To: u-boot@lists.denx.de; york sun> Cc: Prabhakar Kushwaha ; Mingkai Hu > ; Shaohui Xie ; Zhiqiang Hou > ; Wenbin Song ; Mingkai > Hu ; Qianyu Gong > Subject: [PATCH 8/8] armv8: ls1046ardb: Add LS1046ARDB board support > > From: Mingkai Hu > > LS1046ARDB Specification: > - > Memory subsystem: > * 8GByte DDR4 SDRAM (64bit bus) > * 512 Mbyte NAND flash > * Two 64 Mbyte high-speed SPI flash > * SD connector to interface with the SD memory card > * On-board 4G eMMC > > Ethernet: > * Two XFI 10G ports > * Two SGMII ports > * Two RGMII ports > > PCIe: > * PCIe1 (SerDes2 Lane0) to miniPCIe slot > * PCIe2 (SerDes2 Lane1) to x2 PCIe slot > * PCIe3 (SerDes2 Lane2) to x4 PCIe slot > > SATA: > * SerDes2 Lane3 to SATA port > > USB 3.0: one super speed USB 3.0 type A port >one Micro-AB port > > UART: supports two UARTs up to 115200 bps for console > > Signed-off-by: Gong Qianyu > Signed-off-by: Mingkai Hu > --- > arch/arm/Kconfig | 9 + > arch/arm/dts/Makefile | 1 + > arch/arm/dts/fsl-ls1046a-rdb.dts | 44 > arch/arm/dts/fsl-ls1046a.dtsi | 220 +++ > board/freescale/ls1046ardb/Kconfig | 16 ++ > board/freescale/ls1046ardb/MAINTAINERS | 8 + > board/freescale/ls1046ardb/Makefile| 10 + > board/freescale/ls1046ardb/README | 67 ++ > board/freescale/ls1046ardb/cpld.c | 158 ++ > board/freescale/ls1046ardb/cpld.h | 49 + > board/freescale/ls1046ardb/ddr.c | 140 > board/freescale/ls1046ardb/ddr.h | 44 > board/freescale/ls1046ardb/eth.c | 77 +++ > board/freescale/ls1046ardb/ls1046ardb.c| 173 +++ > board/freescale/ls1046ardb/ls1046ardb_pbi.cfg | 22 ++ > board/freescale/ls1046ardb/ls1046ardb_rcw_emmc.cfg | 7 + > board/freescale/ls1046ardb/ls1046ardb_rcw_sd.cfg | 7 + > .../ls1046ardb/ls1046ardb_rcw_sd_1200.cfg | 7 + > .../ls1046ardb/ls1046ardb_rcw_sd_1400.cfg | 7 + > .../ls1046ardb/ls1046ardb_rcw_sd_5506.cfg | 7 + > configs/ls1046ardb_qspi_defconfig | 25 +++ > configs/ls1046ardb_sdcard_defconfig| 26 +++ > include/configs/ls1046a_common.h | 181 > include/configs/ls1046ardb.h | 237 > + > 24 files changed, 1542 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index aef901c..d343995 > 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -811,6 +811,14 @@ config TARGET_LS1043ARDB > help > Support for Freescale LS1043ARDB platform. > > + > +Memory map from core's view > + > +Start AddressEnd Address Description Size > +0x00__ 0x00_000F_ Secure Boot ROM > 1MB > +0x00_0100_ 0x00_0FFF_ CCSRBAR > 240MB > +0x00_1000_ 0x00_1000_ OCRAM0 > 64KB > +0x00_1001_ 0x00_1001_ OCRAM1 > 64KB > +0x00_2000_ 0x00_20FF_ DCSR16MB > +0x00_7E80_ 0x00_7E80_ IFC - NAND Flash64KB > +0x00_7FB0_ 0x00_7FB0_0FFF IFC - FPGA 4KB > +0x00_8000_ 0x00__ DRAM1 2GB > + It's better to add DRAM2 memory map. 0x08 _8000_ 0x09__ DRAM2 6GB > +QSPI flash map: > +Start AddressEnd Address Description Size > +0x0_4000_ - 0x0_400F_RCW + PBI 1MB > +0x0_4010_ - 0x0_401F_U-Boot 1MB > +0x0_4020_ - 0x0_402F_U-Boot Env 1MB > +0x0_4030_ - 0x0_403F_FMan ucode 1MB > +0x0_4040_ - 0x0_404F_UEFI1MB > +0x0_4050_ - 0x0_405F_PPA 1MB > +0x0_4060_ - 0x0_40FF_Reserved10MB > +0x0_4100_ - 0x0_43FF_FIT Image 48MB > + Increase the PPA size to 2M and add memory space for secure boot header as follows: 0x4050 0x406F Primary Protected Application (PPA) 2 M 0x4070 0x408F Secure boot header + bootscript 2 M 0x4090 0x40FF Reserved 7 M Regards, Mingkai
[U-Boot] [PATCH v1 3/4] board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC
If 'ethaddr' is not set, we will get the ethernet address from AT24MAC, and set it to 'ethaddr' variable. Signed-off-by: Wenyou YangSigned-off-by: Songjun Wu --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 51 + include/configs/sama5d2_xplained.h | 6 +++ 2 files changed, 57 insertions(+) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 7ccadf2..c94574b 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -7,6 +7,8 @@ #include #include +#include +#include #include #include #include @@ -192,6 +194,55 @@ int board_eth_init(bd_t *bis) return rc; } +#ifdef CONFIG_CMD_I2C +static int set_ethaddr_from_eeprom(void) +{ + const int ETH_ADDR_LEN = 6; + unsigned char ethaddr[ETH_ADDR_LEN]; + const char *ETHADDR_NAME = "ethaddr"; + struct udevice *bus, *dev; + + if (getenv(ETHADDR_NAME)) + return 0; + + if (uclass_get_device_by_seq(UCLASS_I2C, 1, )) { + printf("Cannot find I2C bus 1\n"); + return -1; + } + + if (dm_i2c_probe(bus, CONFIG_AT24MAC_ADDR, 0, )) { + printf("Failed to probe I2C chip\n"); + return -1; + } + + if (dm_i2c_read(dev, CONFIG_AT24MAC_REG, ethaddr, ETH_ADDR_LEN)) { + printf("Failed to read ethernet address from EEPROM\n"); + return -1; + } + + if (!is_valid_ethaddr(ethaddr)) { + printf("The ethernet address read from EEPROM is not valid!\n"); + return -1; + } + + return eth_setenv_enetaddr(ETHADDR_NAME, ethaddr); +} +#else +static int set_ethaddr_from_eeprom(void) +{ + return 0; +} +#endif + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + set_ethaddr_from_eeprom(); + + return 0; +} +#endif + /* SPL */ #ifdef CONFIG_SPL_BUILD void spl_board_init(void) diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index 77757a3..cada04f 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -15,6 +15,8 @@ #include "at91-sama5_common.h" +#define CONFIG_MISC_INIT_R + /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS @@ -54,6 +56,10 @@ #define CONFIG_DOS_PARTITION #endif +/* I2C */ +#define CONFIG_AT24MAC_ADDR0x5c +#define CONFIG_AT24MAC_REG 0x9a + /* Ethernet Hardware */ #define CONFIG_MACB #define CONFIG_RMII -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 4/4] board: sama5d2_xplained: Enable an early debug UART
Enable an early debug UART to debug problems when an ICE or other debug mechanism is not available. Signed-off-by: Wenyou Yang--- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 14 ++ configs/sama5d2_xplained_mmc_defconfig | 6 ++ configs/sama5d2_xplained_spiflash_defconfig | 6 ++ include/configs/sama5d2_xplained.h | 2 ++ 4 files changed, 28 insertions(+) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c94574b..0ae6a7d 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -141,12 +142,25 @@ static void board_uart1_hw_init(void) at91_periph_clk_enable(ATMEL_ID_UART1); } +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + board_uart1_hw_init(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#else board_uart1_hw_init(); +#endif return 0; } +#endif int board_init(void) { diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index ab1b58b..ba36c8f 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -44,6 +44,12 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91PIO4=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xf802 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_DM_SPI=y CONFIG_ATMEL_SPI=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index ecba5ef..85f3f9c 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -44,6 +44,12 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y CONFIG_PINCTRL=y CONFIG_PINCTRL_AT91PIO4=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_ATMEL=y +CONFIG_DEBUG_UART_BASE=0xf802 +CONFIG_DEBUG_UART_CLOCK=0 +CONFIG_DEBUG_UART_BOARD_INIT=y +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_DM_SPI=y CONFIG_ATMEL_SPI=y diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index cada04f..51fabbe 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -15,6 +15,8 @@ #include "at91-sama5_common.h" +#define CONFIG_BOARD_EARLY_INIT_F + #define CONFIG_MISC_INIT_R /* SDRAM */ -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 2/4] board: sama5d2_xplained: Clean up code
Since the introduction of pinctrl and clk driver, and the dts file, remove unneeded the pin configurations and the clock enabling code. Signed-off-by: Wenyou Yang--- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 104 1 file changed, 104 deletions(-) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 413a000..7ccadf2 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -25,34 +25,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifndef CONFIG_DM_SPI -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs == 0; -} -#endif - -void spi_cs_activate(struct spi_slave *slave) -{ - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 0); -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 1); -} - -static void board_spi0_hw_init(void) -{ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 14, 0); - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 15, 0); - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 16, 0); - - atmel_pio4_set_pio_output(AT91_PIO_PORTA, 17, 1); - - at91_periph_clk_enable(ATMEL_ID_SPI0); -} - static void board_usb_hw_init(void) { atmel_pio4_set_pio_output(AT91_PIO_PORTB, 10, 1); @@ -159,55 +131,6 @@ static void board_gmac_hw_init(void) at91_periph_clk_enable(ATMEL_ID_GMAC); } -static void board_sdhci0_hw_init(void) -{ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 0, 0); /* SDMMC0_CK */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 1, 0); /* SDMMC0_CMD */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 2, 0); /* SDMMC0_DAT0 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 3, 0); /* SDMMC0_DAT1 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 4, 0); /* SDMMC0_DAT2 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 5, 0); /* SDMMC0_DAT3 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 6, 0); /* SDMMC0_DAT4 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 7, 0); /* SDMMC0_DAT5 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 8, 0); /* SDMMC0_DAT6 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 9, 0); /* SDMMC0_DAT7 */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 10, 0); /* SDMMC0_RSTN */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 11, 0); /* SDMMC0_VDDSEL */ - atmel_pio4_set_a_periph(AT91_PIO_PORTA, 13, 0); /* SDMMC0_CD */ - - at91_periph_clk_enable(ATMEL_ID_SDMMC0); - at91_enable_periph_generated_clk(ATMEL_ID_SDMMC0, -GCK_CSS_UPLL_CLK, 1); -} - -static void board_sdhci1_hw_init(void) -{ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 18, 0); /* SDMMC1_DAT0 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 19, 0); /* SDMMC1_DAT1 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 20, 0); /* SDMMC1_DAT2 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 21, 0); /* SDMMC1_DAT3 */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 22, 0); /* SDMMC1_CK */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 27, 0); /* SDMMC1_RSTN */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 28, 0); /* SDMMC1_CMD */ - atmel_pio4_set_e_periph(AT91_PIO_PORTA, 30, 0); /* SDMMC1_CD */ - - at91_periph_clk_enable(ATMEL_ID_SDMMC1); - at91_enable_periph_generated_clk(ATMEL_ID_SDMMC1, -GCK_CSS_UPLL_CLK, 1); -} - -int board_mmc_init(bd_t *bis) -{ -#ifdef CONFIG_ATMEL_SDHCI0 - atmel_sdhci_init((void *)ATMEL_BASE_SDMMC0, ATMEL_ID_SDMMC0); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - atmel_sdhci_init((void *)ATMEL_BASE_SDMMC1, ATMEL_ID_SDMMC1); -#endif - - return 0; -} - static void board_uart1_hw_init(void) { atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */ @@ -218,11 +141,6 @@ static void board_uart1_hw_init(void) int board_early_init_f(void) { - at91_periph_clk_enable(ATMEL_ID_PIOA); - at91_periph_clk_enable(ATMEL_ID_PIOB); - at91_periph_clk_enable(ATMEL_ID_PIOC); - at91_periph_clk_enable(ATMEL_ID_PIOD); - board_uart1_hw_init(); return 0; @@ -233,17 +151,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; -#ifdef CONFIG_ATMEL_SPI - board_spi0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI -#ifdef CONFIG_ATMEL_SDHCI0 - board_sdhci0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - board_sdhci1_hw_init(); -#endif -#endif #ifdef CONFIG_MACB board_gmac_hw_init(); #endif @@ -289,17 +196,6 @@ int board_eth_init(bd_t *bis) #ifdef CONFIG_SPL_BUILD void spl_board_init(void) { -#ifdef CONFIG_SYS_USE_SERIALFLASH - board_spi0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI -#ifdef CONFIG_ATMEL_SDHCI0 - board_sdhci0_hw_init(); -#endif -#ifdef CONFIG_ATMEL_SDHCI1 - board_sdhci1_hw_init(); -#endif -#endif }
[U-Boot] [PATCH v1 1/4] board: sama5d2_xplained: Move config options to defconfigs
Move the config options from the include/configs/sama5d2_xplained.h to configs/sama5d2_xplained_*_defconfig. Signed-off-by: Wenyou Yang--- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 2 ++ configs/sama5d2_xplained_mmc_defconfig | 31 +++- configs/sama5d2_xplained_spiflash_defconfig | 32 - include/configs/sama5d2_xplained.h | 26 4 files changed, 63 insertions(+), 28 deletions(-) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 93df7ba..413a000 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -25,10 +25,12 @@ DECLARE_GLOBAL_DATA_PTR; +#ifndef CONFIG_DM_SPI int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus == 0 && cs == 0; } +#endif void spi_cs_activate(struct spi_slave *slave) { diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 9ca2a9c..ab1b58b 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -1,6 +1,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_SAMA5D2_XPLAINED=y +CONFIG_DM_GPIO=y +CONFIG_DM_SERIAL=y +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained" CONFIG_SPL=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC" @@ -13,13 +16,39 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_BLK=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_AT91_GENERIC_CLK=y +CONFIG_ATMEL_PIO4=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_AT91=y +CONFIG_DM_MMC=y +CONFIG_DM_MMC_OPS=y +CONFIG_ATMEL_SDHCI=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91PIO4=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y -CONFIG_OF_LIBFDT=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index 617d73a..ecba5ef 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -1,6 +1,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_TARGET_SAMA5D2_XPLAINED=y +CONFIG_DM_GPIO=y +CONFIG_DM_SERIAL=y +CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained" CONFIG_SPL=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH" @@ -13,13 +16,40 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_MMC=y CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DM=y +CONFIG_SPL_DM=y +CONFIG_BLK=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_AT91=y +CONFIG_AT91_UTMI=y +CONFIG_AT91_H32MX=y +CONFIG_AT91_GENERIC_CLK=y +CONFIG_ATMEL_PIO4=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_AT91=y +CONFIG_DM_MMC=y +CONFIG_DM_MMC_OPS=y +CONFIG_ATMEL_SDHCI=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_AT91PIO4=y +CONFIG_ATMEL_USART=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_SPI=y CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y -CONFIG_OF_LIBFDT=y diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index f9a8f6f..77757a3 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -15,11 +15,6 @@ #include "at91-sama5_common.h" -/* serial console */ -#define CONFIG_ATMEL_USART -#define CONFIG_USART_BASE ATMEL_BASE_UART1 -#define CONFIG_USART_IDATMEL_ID_UART1 - /* SDRAM */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS @@ -34,14 +29,8 @@ #define CONFIG_SYS_LOAD_ADDR 0x2200 /* load address */ -#undef CONFIG_AT91_GPIO -#define CONFIG_ATMEL_PIO4 - /* SerialFlash */ #ifdef CONFIG_CMD_SF -#define CONFIG_ATMEL_SPI -#define CONFIG_ATMEL_SPI0 -#define CONFIG_SPI_FLASH_ATMEL #define CONFIG_SF_DEFAULT_BUS 0 #define CONFIG_SF_DEFAULT_CS 0 #define CONFIG_SF_DEFAULT_SPEED3000 @@ -51,24 +40,9 @@ #undef CONFIG_CMD_NAND /* MMC */ - #ifdef CONFIG_CMD_MMC -#define CONFIG_MMC #define CONFIG_GENERIC_MMC #define CONFIG_SDHCI -#define CONFIG_ATMEL_SDHCI -#define CONFIG_ATMEL_SDHCI0 -#define CONFIG_ATMEL_SDHCI1 -#define CONFIG_SUPPORT_EMMC_BOOT -#endif - -/* USB */ - -#ifdef CONFIG_CMD_USB -#define CONFIG_USB_EHCI -#define
[U-Boot] [PATCH v1 0/4] board: sama5d2_xplained: Convert to use device tree and drivers with DM
Convert to use the drivers which support the driver model and use the device tree. And add the support to enable an early debug UART for debugging. It is based on the following patches: - [PATCH v1] i2c: at91_i2c: Fix the wrong include file http://lists.denx.de/pipermail/u-boot/2016-August/265265.html - [PATCH v1 0/2] clk: at91: Fix the wrong used class ID http://lists.denx.de/pipermail/u-boot/2016-August/265266.html - [PATCH v1] mmc: mmc-uclass: Add mmc_init() in mmc preinit phrase http://lists.denx.de/pipermail/u-boot/2016-August/265269.html - [PATCH v1 0/2] serial: atmel_usart: Support to enable an early debug UART http://lists.denx.de/pipermail/u-boot/2016-August/265270.html - [PATCH v8] dm: at91: Add driver model support for the spi driver http://lists.denx.de/pipermail/u-boot/2016-August/264484.html - [PATCH] sf: fix sf probe http://lists.denx.de/pipermail/u-boot/2016-August/264104.html Wenyou Yang (4): board: sama5d2_xplained: Move config options to defconfigs board: sama5d2_xplained: Clean up code board: sama5d2_xplained: Set 'ethaddr' got from AT24MAC board: sama5d2_xplained: Enable an early debug UART board/atmel/sama5d2_xplained/sama5d2_xplained.c | 167 +--- configs/sama5d2_xplained_mmc_defconfig | 37 +- configs/sama5d2_xplained_spiflash_defconfig | 38 +- include/configs/sama5d2_xplained.h | 32 + 4 files changed, 145 insertions(+), 129 deletions(-) -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] arm: mach-keystone: Implements FIT post-processing call for keystone SoCs
On Friday 26 August 2016 12:00 PM, Madan Srinivas wrote: > From: Vitaly Andrianov> > This commit implements the board_fit_image_post_process() function for > the keystone architecture. Unlike OMAP class devices, security > functions in keystone are not handled in the ROM. > The interface to the secure functions is TI proprietary and depending > on the keystone platform, the security functions like encryption, > decryption and authentication might even be offloaded to other secure > processing elements in the SoC. > The boot monitor acts as the gateway to these secure functions and the > boot monitor for secure devices is available as part of the SECDEV > package for KS2. For more details refer doc/README.ti-secure > > Signed-off-by: Vitaly Andrianov > Signed-off-by: Madan Srinivas > --- > > arch/arm/mach-keystone/mon.c | 53 > > 1 file changed, 53 insertions(+) > > diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c > index 256f630..b4a6f1c 100644 > --- a/arch/arm/mach-keystone/mon.c > +++ b/arch/arm/mach-keystone/mon.c > @@ -12,10 +12,31 @@ > #include > asm(".arch_extension sec\n\t"); > > +#ifdef CONFIG_TI_SECURE_DEVICE > +#define KS2_HS_AUTH_FN_OFFSET8 > +#define KS2_HS_SEC_HEADER_LEN0x60 > +#define KS2_AUTH_CMD "2" > +/** > + * (*fn_auth)() - Invokes security functions using a > + * proprietary TI interface. This binary and source for > + * this is available in the secure development package or > + * SECDEV. For details on how to access this please refer > + * doc/README.ti-secure > + * > + * @first param: no. of parameters > + * @second param:parameter list > + * @return non-zero value on success, zero on error > + */ > +static unsigned int (*fn_auth)(int, char * const []); > +#endif > + > int mon_install(u32 addr, u32 dpsc, u32 freq) > { > int result; > > +#ifdef CONFIG_TI_SECURE_DEVICE > + fn_auth = (void *)(addr + KS2_HS_AUTH_FN_OFFSET); > +#endif > __asm__ __volatile__ ( > "stmfd r13!, {lr}\n" > "mov r0, %1\n" > @@ -61,3 +82,35 @@ int mon_power_off(int core_id) > : "cc", "r0", "r1", "memory"); > return result; > } > + > +#ifdef CONFIG_TI_SECURE_DEVICE > +static void k2_hs_auth(void *addr) > +{ > + char *argv1 = KS2_AUTH_CMD; > + char argv2[32]; > + char *argv[3] = {NULL, argv1, argv2}; > + int ret; > + > + sprintf(argv2, "0x%08x", (u32)addr); > + ret = fn_auth(3, argv); Can fn_auth be checked before calling it? Just to make sure monitor is installed before processing any image. > + > + if (ret == 0) { > + printf("FAIL!!!\n"); /* remove form production code */ > + hang(); > + } > +} > + > +void board_fit_image_post_process(void **p_image, size_t *p_size) > +{ > + void *dst = *p_image; > + void *src = dst + KS2_HS_SEC_HEADER_LEN; > + > + k2_hs_auth(*p_image); > + > + /* > + * Overwrite the image headers after authentication > + * and decryption. Move the image to its run address > + */ > + memcpy(dst, src, *p_size - KS2_HS_SEC_HEADER_LEN); Technically image is not being moved to its run address. This is just updating FIT image after post processing. Also, *p_size should be updated to remove header size. Thanks and regards, Lokesh > +} > +#endif > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 2/2] serial: atmel_usart: Support enable an early debug UART
Add support to enable an early debug UART for debugging. Signed-off-by: Wenyou Yang--- drivers/serial/Kconfig | 7 +++ drivers/serial/atmel_usart.c | 22 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index a6035dc..b8ecd80 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -98,6 +98,13 @@ config DEBUG_UART_AR933X driver will be available until the real driver model serial is running. +config DEBUG_UART_ATMEL + bool "Atmel USART" + help + Select this to enable a debug UART using the atmel usart driver. You + will need to provide parameters to make this work. The driver will + be available until the real driver-model serial is running. + config DEBUG_UART_NS16550 bool "ns16550" help diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index e450135..7674f97 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -226,3 +227,24 @@ U_BOOT_DRIVER(serial_atmel) = { .priv_auto_alloc_size = sizeof(struct atmel_serial_priv), }; #endif + +#ifdef CONFIG_DEBUG_UART_ATMEL +static inline void _debug_uart_init(void) +{ + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE; + + atmel_serial_setbrg_internal(usart, 0, CONFIG_BAUDRATE); +} + +static inline void _debug_uart_putc(int ch) +{ + atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE; + + while (!(readl(>csr) & USART3_BIT(TXRDY))) + ; + + writel(ch, >thr); +} + +DEBUG_UART_FUNCS +#endif -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 1/2] serial: Kconfig: Add ATMEL_USART option
Add ATMEL_USART option to support to enable the Atmel usart driver from Kconfig. Signed-off-by: Wenyou Yang--- drivers/serial/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ab5df70..a6035dc 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -289,6 +289,13 @@ config AR933X_UART tree binding to operate, please refer to the document at doc/device-tree-bindings/serial/qca,ar9330-uart.txt. +config ATMEL_USART + bool "Atmel USART support" + help + Select this to enable USART support for Atmel SoCs. It can be + configured in the device tree, and input clock frequency can + be got from the clk node. + config FSL_LPUART bool "Freescale LPUART support" help -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 0/2] serial: atmel_usart: Support to enable an early debug UART
The patch set is to add support to enable an early debug UART for debugging. And add ATMEL_USART option to enable the Atmel usartdriver from Kconfig. Wenyou Yang (2): serial: Kconfig: Add ATMEL_USART option serial: atmel_usart: Support enable an early debug UART drivers/serial/Kconfig | 14 ++ drivers/serial/atmel_usart.c | 22 ++ 2 files changed, 36 insertions(+) -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1] mmc: mmc-uclass: Add mmc_init() in mmc preinit phrase
Add mmc_init() in the mmc preinit phrase to get the device's information. Otherwise, if the environment variables are from the mmc device, it will fail with "** Bad device size - mmc 1 **". Signed-off-by: Wenyou Yang--- drivers/mmc/mmc-uclass.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 425abb1..4136fee 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -152,11 +152,15 @@ void mmc_do_preinit(void) if (!m) continue; -#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT +#if defined CONFIG_FSL_ESDHC_ADAPTER_IDENT || defined CONFIG_ATMEL_SDHCI mmc_set_preinit(m, 1); #endif - if (m->preinit) + if (m->preinit) { mmc_start_init(m); + + mmc_init(m); + } + } } -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 2/2] clk: at91: Add .ops callback for clk_generic
To avoid the wild pointer as NULL->of_xlate, add an empty .ops callback for the clk_generic driver. Signed-off-by: Wenyou Yang--- drivers/clk/at91/pmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index 76ff387..1043148 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c @@ -59,7 +59,10 @@ int at91_pmc_clk_node_bind(struct udevice *dev) return 0; } +static struct clk_ops generic_clk_ops; + U_BOOT_DRIVER(clk_generic) = { .id = UCLASS_CLK, .name = "clk", + .ops = _clk_ops, }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 1/2] clk: at91: Fix at91-pmc and at91-sckc's class ID
The at91-pmc and at91-sckc aren't the clock providers, change their class ID from UCLASS_CLK to UCLASS_SIMPLE_BUS, they also don't need to bind the child nodes explicitly, the .post_bind callback of simple_bus uclass will do it for them. Signed-off-by: Wenyou Yang--- drivers/clk/at91/pmc.c | 10 ++ drivers/clk/at91/sckc.c | 17 + 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c index a08d7e8..76ff387 100644 --- a/drivers/clk/at91/pmc.c +++ b/drivers/clk/at91/pmc.c @@ -14,21 +14,15 @@ DECLARE_GLOBAL_DATA_PTR; -static int at91_pmc_bind(struct udevice *dev) -{ - return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false); -} - static const struct udevice_id at91_pmc_match[] = { { .compatible = "atmel,sama5d2-pmc" }, {} }; U_BOOT_DRIVER(at91_pmc) = { - .name = "at91-pmc-core", - .id = UCLASS_CLK, + .name = "at91-pmc", + .id = UCLASS_SIMPLE_BUS, .of_match = at91_pmc_match, - .bind = at91_pmc_bind, }; int at91_pmc_core_probe(struct udevice *dev) diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c index b207611..6035e20 100644 --- a/drivers/clk/at91/sckc.c +++ b/drivers/clk/at91/sckc.c @@ -6,25 +6,18 @@ */ #include -#include #include #include DECLARE_GLOBAL_DATA_PTR; -static int at91_sckc_clk_bind(struct udevice *dev) -{ - return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false); -} - -static const struct udevice_id at91_sckc_clk_match[] = { +static const struct udevice_id at91_sckc_match[] = { { .compatible = "atmel,at91sam9x5-sckc" }, {} }; -U_BOOT_DRIVER(at91_sckc_clk) = { - .name = "at91_sckc_clk", - .id = UCLASS_CLK, - .of_match = at91_sckc_clk_match, - .bind = at91_sckc_clk_bind, +U_BOOT_DRIVER(at91_sckc) = { + .name = "at91-sckc", + .id = UCLASS_SIMPLE_BUS, + .of_match = at91_sckc_match, }; -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1 0/2] clk: at91: Fix the wrong used class ID
This patch set is to fix the wrong used class ID. The class ID of the at91-pmc and at91-sckc driver should be UCLASS_SIMPLE_BUS, instead of UCLASS_CLK. And add an empty .ops callback for the clk_generic driver to avoid a wild pointer. Wenyou Yang (2): clk: at91: Fix at91-pmc and at91-sckc's class ID clk: at91: Add .ops callback for clk_generic drivers/clk/at91/pmc.c | 13 + drivers/clk/at91/sckc.c | 17 + 2 files changed, 10 insertions(+), 20 deletions(-) -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1] i2c: at91_i2c: Fix the wrong include file
Since the 'clk_client.h' doesn't exist, it should be 'clk.h'. Signed-off-by: Wenyou Yang--- drivers/i2c/at91_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c index 8e9c3ad..d71f75c 100644 --- a/drivers/i2c/at91_i2c.c +++ b/drivers/i2c/at91_i2c.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/8] armv8: ls1046a: Enable DDR erratum for ls1046a
> -Original Message- > From: Shengzhou Liu > Sent: Monday, August 29, 2016 6:53 PM > To: Qianyu Gong; u-boot@lists.denx.de; york sun > > Cc: Prabhakar Kushwaha ; Mingkai Hu > ; Shaohui Xie ; Zhiqiang Hou > ; Wenbin Song ; Qianyu > Gong > Subject: RE: [PATCH 6/8] armv8: ls1046a: Enable DDR erratum for ls1046a > > > > -Original Message- > > From: Gong Qianyu [mailto:qianyu.g...@nxp.com] > > Sent: Friday, August 26, 2016 7:29 PM > > To: u-boot@lists.denx.de; york sun > > Cc: Prabhakar Kushwaha ; Mingkai Hu > > ; Shaohui Xie ; Zhiqiang > Hou > > ; Wenbin Song ; > Shengzhou > > Liu ; Qianyu Gong > > Subject: [PATCH 6/8] armv8: ls1046a: Enable DDR erratum for ls1046a > > > > From: Shengzhou Liu > > > > Enable ERRATUM_A009801, ERRATUM_A009803, ERRATUM_A009942, > > ERRATUM_A010165 > > > > Signed-off-by: Shengzhou Liu > > Signed-off-by: Gong Qianyu > > --- > > arch/arm/include/asm/arch-fsl-layerscape/config.h | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h > > b/arch/arm/include/asm/arch-fsl-layerscape/config.h > > index c7e374c..3250290 100644 > > --- a/arch/arm/include/asm/arch-fsl-layerscape/config.h > > +++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h > > @@ -238,6 +238,11 @@ > > #define GICC_BASE 0x0142 > > > > #define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1 > > + > > +#define CONFIG_SYS_FSL_ERRATUM_A009801 #define > > +CONFIG_SYS_FSL_ERRATUM_A009803 #define > CONFIG_SYS_FSL_ERRATUM_A009942 > > +#define CONFIG_SYS_FSL_ERRATUM_A010165 > > LS1046 also need to enable ERRATUM_A008511 in this patch. Sure, will add the A008511 as what we have worked out. Thanks, Mingkai ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/4] ARM: armv7: move CONFIG_ARMV7_PSCI to Kconfig
Add ARCH_SUPPORT_PSCI as a non-configurable option that platforms can select. Then, move CONFIG_ARMV7_PSCI, which is automatically enabled if both ARMV7_NONSEC and ARCH_SUPPORT_PSCI are enabled. Signed-off-by: Masahiro Yamada--- Changes in v2: None arch/arm/Kconfig | 3 +++ arch/arm/cpu/armv7/Kconfig | 10 ++ arch/arm/cpu/armv7/mx7/Kconfig | 1 + arch/arm/mach-tegra/tegra124/Kconfig | 1 + arch/arm/mach-uniphier/Kconfig | 1 + board/sunxi/Kconfig | 5 + include/configs/jetson-tk1.h | 1 - include/configs/ls1021aqds.h | 1 - include/configs/ls1021atwr.h | 1 - include/configs/mx7_common.h | 1 - include/configs/sun6i.h | 1 - include/configs/sun7i.h | 1 - include/configs/sun8i.h | 1 - include/configs/uniphier.h | 1 - 14 files changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c871eaf..37fee43 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -816,10 +816,13 @@ config TARGET_LS1021AQDS bool "Support ls1021aqds" select CPU_V7 select SUPPORT_SPL + select ARCH_SUPPORT_PSCI + config TARGET_LS1021ATWR bool "Support ls1021atwr" select CPU_V7 select SUPPORT_SPL + select ARCH_SUPPORT_PSCI config TARGET_LS1043AQDS bool "Support ls1043aqds" diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig index 41c6639..4390f59 100644 --- a/arch/arm/cpu/armv7/Kconfig +++ b/arch/arm/cpu/armv7/Kconfig @@ -6,6 +6,9 @@ config CPU_V7_HAS_NONSEC config CPU_V7_HAS_VIRT bool +config ARCH_SUPPORT_PSCI +bool + config ARMV7_NONSEC bool "Enable support for booting in non-secure mode" if EXPERT depends on CPU_V7_HAS_NONSEC @@ -31,6 +34,13 @@ config ARMV7_VIRT ---help--- Say Y here to boot in hypervisor (HYP) mode when booting non-secure. +config ARMV7_PSCI + bool "Enable PSCI support" if EXPERT + depends on ARMV7_NONSEC && ARCH_SUPPORT_PSCI + default y + help + Say Y here to enable PSCI support. + config ARMV7_LPAE bool "Use LPAE page table format" if EXPERT depends on CPU_V7 diff --git a/arch/arm/cpu/armv7/mx7/Kconfig b/arch/arm/cpu/armv7/mx7/Kconfig index 5fdc8dd..fb00b8c 100644 --- a/arch/arm/cpu/armv7/mx7/Kconfig +++ b/arch/arm/cpu/armv7/mx7/Kconfig @@ -5,6 +5,7 @@ config MX7 select ROM_UNIFIED_SECTIONS select CPU_V7_HAS_VIRT select CPU_V7_HAS_NONSEC + select ARCH_SUPPORT_PSCI default y config MX7D diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig index 44f63f7..f97eb85 100644 --- a/arch/arm/mach-tegra/tegra124/Kconfig +++ b/arch/arm/mach-tegra/tegra124/Kconfig @@ -8,6 +8,7 @@ config TARGET_JETSON_TK1 bool "NVIDIA Tegra124 Jetson TK1 board" select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI config TARGET_NYAN_BIG bool "Google/NVIDIA Nyan-big Chromebook" diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig index 8961458..7bee6c7 100644 --- a/arch/arm/mach-uniphier/Kconfig +++ b/arch/arm/mach-uniphier/Kconfig @@ -8,6 +8,7 @@ config ARCH_UNIPHIER_32BIT select CPU_V7 select CPU_V7_HAS_NONSEC select ARMV7_NONSEC + select ARCH_SUPPORT_PSCI config ARCH_UNIPHIER_64BIT bool diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 1b30669..4e91f49 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -37,6 +37,7 @@ config MACH_SUN6I select CPU_V7 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT @@ -46,6 +47,7 @@ config MACH_SUN7I select CPU_V7 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI select SUNXI_GEN_SUN4I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT @@ -55,6 +57,7 @@ config MACH_SUN8I_A23 select CPU_V7 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT @@ -64,6 +67,7 @@ config MACH_SUN8I_A33 select CPU_V7 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT @@ -79,6 +83,7 @@ config MACH_SUN8I_H3 select CPU_V7 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT + select ARCH_SUPPORT_PSCI select SUNXI_GEN_SUN6I
[U-Boot] [PATCH v2 4/4] ARM: armv7: move ARMV7_PSCI_NR_CPUS to Kconfig
Move this option to Kconfig and set its default value to 4; this increases the number of supported CPUs for some boards. It consumes 1KB memory per CPU for PSCI stack, but it should not be a big deal, given the amount of memory used for the modern OSes. Signed-off-by: Masahiro Yamada--- Changes in v2: - Add help to the Kconfig entry arch/arm/cpu/armv7/Kconfig | 9 + include/configs/arndale.h | 1 - include/configs/bcm_ep_board.h | 1 - include/configs/jetson-tk1.h| 1 - include/configs/ls1021aqds.h| 1 - include/configs/ls1021atwr.h| 1 - include/configs/mx7_common.h| 1 - include/configs/sun6i.h | 1 - include/configs/sun7i.h | 1 - include/configs/sun8i.h | 12 include/configs/uniphier.h | 1 - include/configs/vexpress_ca15_tc2.h | 1 - 12 files changed, 9 insertions(+), 22 deletions(-) diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig index 4390f59..b9c4f4e 100644 --- a/arch/arm/cpu/armv7/Kconfig +++ b/arch/arm/cpu/armv7/Kconfig @@ -41,6 +41,15 @@ config ARMV7_PSCI help Say Y here to enable PSCI support. +config ARMV7_PSCI_NR_CPUS + int "Maximum supported CPUs for PSCI" + depends on ARMV7_NONSEC + default 4 + help + The maximum number of CPUs supported in the PSCI firmware. + It is no problem to set a larger value than the number of + CPUs in the actual hardware implementation. + config ARMV7_LPAE bool "Use LPAE page table format" if EXPERT depends on CPU_V7 diff --git a/include/configs/arndale.h b/include/configs/arndale.h index 18e59fc..b08f341 100644 --- a/include/configs/arndale.h +++ b/include/configs/arndale.h @@ -45,7 +45,6 @@ #define CONFIG_S5P_PA_SYSRAM 0x0202 #define CONFIG_SMP_PEN_ADDRCONFIG_S5P_PA_SYSRAM -#define CONFIG_ARMV7_PSCI_NR_CPUS 4 /* The PERIPHBASE in the CBAR register is wrong on the Arndale, so override it */ #define CONFIG_ARM_GIC_BASE_ADDRESS0x1048 diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h index b5e5029..4b255d8 100644 --- a/include/configs/bcm_ep_board.h +++ b/include/configs/bcm_ep_board.h @@ -91,6 +91,5 @@ /* Misc utility code */ #define CONFIG_BOUNCE_BUFFER #define CONFIG_CRC32_VERIFY -#define CONFIG_ARMV7_PSCI_NR_CPUS 4 #endif /* __BCM_EP_BOARD_H */ diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h index 1eba74a..7c59790 100644 --- a/include/configs/jetson-tk1.h +++ b/include/configs/jetson-tk1.h @@ -60,7 +60,6 @@ #include "tegra-common-usb-gadget.h" #include "tegra-common-post.h" -#define CONFIG_ARMV7_PSCI_NR_CPUS 4 /* Reserve top 1M for secure RAM */ #define CONFIG_ARMV7_SECURE_BASE 0xfff0 #define CONFIG_ARMV7_SECURE_RESERVE_SIZE 0x0010 diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 86969a1..abbd1c4 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -10,7 +10,6 @@ #define CONFIG_LS102XA #define CONFIG_ARMV7_PSCI_1_0 -#define CONFIG_ARMV7_PSCI_NR_CPUS CONFIG_MAX_CPUS #define CONFIG_ARMV7_SECURE_BASE OCRAM_BASE_S_ADDR diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index d0fc7ff..511b0b3 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -10,7 +10,6 @@ #define CONFIG_LS102XA #define CONFIG_ARMV7_PSCI_1_0 -#define CONFIG_ARMV7_PSCI_NR_CPUS CONFIG_MAX_CPUS #define CONFIG_ARMV7_SECURE_BASE OCRAM_BASE_S_ADDR diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index 52c0d0f..4b1077c 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -72,7 +72,6 @@ #define CONFIG_CMD_FUSE #define CONFIG_MXC_OCOTP -#define CONFIG_ARMV7_PSCI_NR_CPUS 2 #define CONFIG_ARMV7_SECURE_BASE 0x0090 #endif diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h index 41552c4..67a26c2 100644 --- a/include/configs/sun6i.h +++ b/include/configs/sun6i.h @@ -22,7 +22,6 @@ #define CONFIG_SUNXI_USB_PHYS 3 -#define CONFIG_ARMV7_PSCI_NR_CPUS 4 #define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE #define CONFIG_ARMV7_SECURE_MAX_SIZE(64 * 1024) /* 64 KB */ diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h index 63760c5..d8e6e20 100644 --- a/include/configs/sun7i.h +++ b/include/configs/sun7i.h @@ -20,7 +20,6 @@ #define CONFIG_SUNXI_USB_PHYS 3 -#define CONFIG_ARMV7_PSCI_NR_CPUS 2 #define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE #define CONFIG_ARMV7_SECURE_MAX_SIZE (64 * 1024) /* 64 KB */ diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h index 151ffdc..011d70f 100644 --- a/include/configs/sun8i.h +++ b/include/configs/sun8i.h @@ -26,18 +26,6 @@ #define CONFIG_SUNXI_USB_PHYS 2 #endif