[U-Boot] [PATCH v2 1/3] common: Display =4GiB memory bank size
bd-bi_dram[] has both start address and size defined as 32-bit, which is not the case on some platforms where =4GiB memory bank is used. Change them to support such memory banks. Signed-off-by: Bin Meng bmeng...@gmail.com --- Changes in v2: - Drop patches which are already applied - Change start to phys_addr_t - Change debug output to either %016llx or %08lx common/board_f.c | 9 - include/asm-generic/u-boot.h | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 6d922b8..eb24f6c 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -206,7 +206,14 @@ static int show_dram_config(void) debug(\nRAM Configuration:\n); for (i = size = 0; i CONFIG_NR_DRAM_BANKS; i++) { size += gd-bd-bi_dram[i].size; - debug(Bank #%d: %08lx , i, gd-bd-bi_dram[i].start); + + if (gd-bd-bi_dram[i].start = 0x1ULL) { + debug(Bank #%d: %016llx , i, + (unsigned long long)(gd-bd-bi_dram[i].start)); + } else { + debug(Bank #%d: %08lx , i, + (unsigned long)(gd-bd-bi_dram[i].start)); + } #ifdef DEBUG print_size(gd-bd-bi_dram[i].size, \n); #endif diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index c918049..9f3351d 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -130,8 +130,8 @@ typedef struct bd_info { ulong bi_boot_params; /* where this board expects params */ #ifdef CONFIG_NR_DRAM_BANKS struct {/* RAM configuration */ - ulong start; - ulong size; + phys_addr_t start; + phys_size_t size; } bi_dram[CONFIG_NR_DRAM_BANKS]; #endif /* CONFIG_NR_DRAM_BANKS */ } bd_t; -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/5] x86: Move x86 to use board_init_f_mem() instead of assembler
Much of the early-init assembler on x86 can be removed if we use the new board_init_f_mem() function. At present only PowerPC uses it, but we should try to move more archs over. This has been contemplated for a while but it is time to take the plunge. Simon Glass (5): x86: Remove init_gd() function Align global_data to a 16-byte boundary Allow arch-specific setting of global_data in board_init_f_mem() x86: Move the GDT into global_data x86: Switch to using generic global_data setup arch/x86/cpu/cpu.c | 11 +++-- arch/x86/cpu/start.S | 86 +- arch/x86/include/asm/global_data.h | 4 +- arch/x86/include/asm/u-boot-x86.h | 1 - common/board_f.c | 19 ++--- include/asm-generic/global_data.h | 2 +- include/common.h | 40 ++ 7 files changed, 75 insertions(+), 88 deletions(-) -- 2.5.0.rc2.392.g76e840b ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] Allow arch-specific setting of global_data in board_init_f_mem()
At present we have a simple assignment to gd. With some archs this is implemented as a register or through some other means; a simple assignment does not suit in all cases. Change this to a function and add documentation to describe how this all works. Signed-off-by: Simon Glass s...@chromium.org --- common/board_f.c | 14 +++--- include/common.h | 40 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index a947770..3d1f305 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1024,15 +1024,23 @@ void board_init_f_r(void) #endif /* CONFIG_X86 */ #ifndef CONFIG_X86 -ulong board_init_f_mem(ulong top) +__weak void arch_setup_gdt(struct global_data *gd_ptr) { + gd = gd_ptr; +} + +ulong board_init_f_mem(ulong top, ulong reserve_size) +{ + struct global_data *gd_ptr; + /* Leave space for the stack we are running with now */ top -= 0x40; top -= sizeof(struct global_data); top = ALIGN(top, 16); - gd = (struct global_data *)top; - memset((void *)gd, '\0', sizeof(*gd)); + gd_ptr = (struct global_data *)top; + memset(gd_ptr, '\0', sizeof(*gd)); + arch_setup_gdt(gd_ptr); #ifdef CONFIG_SYS_MALLOC_F_LEN top -= CONFIG_SYS_MALLOC_F_LEN; diff --git a/include/common.h b/include/common.h index fcc9ae7..029eb1f 100644 --- a/include/common.h +++ b/include/common.h @@ -217,6 +217,46 @@ extern char console_buffer[]; /* arch/$(ARCH)/lib/board.c */ void board_init_f(ulong); void board_init_r(gd_t *, ulong) __attribute__ ((noreturn)); + +/** + * board_init_f_mem() - Allocate global data and set stack position + * + * This function is called by each architecture very early in the start-up + * code to set up the environment for board_init_f(). It allocates space for + * global_data (see include/asm-generic/global_data.h) and places the stack + * below this. + * + * This function requires a stack[1] Normally this is at @top. The function + * starts allocating space from 64 bytes below @top. First it creates space + * for global_data. then it calls arch_setup_gd() which sets gd to point to + * the global_data space and can reserve additional bytes of space if + * required). Finally it allocates early malloc() memory + * (CONFIG_SYS_MALLOC_F_LEN). The new top of the stack is just below this, + * and it returned by this function. + * + * [1] Strictly speaking it would be possible to implement this function + * in C on many archs such that it does not require a stack. However this + * does not seem hugely important as only 64 byte are wasted. + * + * @top: Top of available memory, also normally the top of the stack + * @return:New stack location + */ +ulong board_init_f_mem(ulong top, ulong reserve_size); + +/** + * arch_setup_gdt() - Set up the global_data pointer + * + * This pointer is special in some architectures and cannot easily be assigned + * to. For example on x86 it is implemented by adding a specific record to its + * Global Descriptor Table! So we we provide a function to carry out this task. + * For most architectures this can simply be: + * + *gd = gd_ptr; + * + * @gd_ptr:Pointer to global data + */ +void arch_setup_gdt(gd_t *gd_ptr); + int checkboard(void); int show_board_info(void); int checkflash(void); -- 2.5.0.rc2.392.g76e840b ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] pci: Remove DEBUG from pci_compat.c
Remove DEBUG in drivers/pci/pci_compat.c. Signed-off-by: Bin Meng bmeng...@gmail.com --- Changes in v2: - New patch to remove DEBUG from pci_compat.c drivers/pci/pci_compat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/pci_compat.c b/drivers/pci/pci_compat.c index 05c3510..712c48f 100644 --- a/drivers/pci/pci_compat.c +++ b/drivers/pci/pci_compat.c @@ -5,7 +5,6 @@ * * SPDX-License-Identifier:GPL-2.0+ */ -#define DEBUG #include common.h #include dm.h #include errno.h -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/3] x86: Document how to write PIRQ information in the device tree
Document the development flow on figuring out PIRQ information during the U-Boot porting. Signed-off-by: Bin Meng bmeng...@gmail.com --- Changes in v2: - New patch to document how to write PIRQ information in the device tree doc/README.x86 | 41 + 1 file changed, 41 insertions(+) diff --git a/doc/README.x86 b/doc/README.x86 index 00b3ed0..af2459c 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -668,6 +668,46 @@ boot progress. This can be good for debugging. If not, you can try to get serial working as early as possible. The early debug serial port may be useful here. See setup_early_uart() for an example. +During the U-Boot porting, one of the important steps is to write correct PIRQ +routing information in the board device tree. Without it, device drivers in the +Linux kernel won't function correctly due to interrupt is not working. Please +refer to U-Boot doc [14] for the device tree bindings of Intel interrupt router. +Here we have more details on the intel,pirq-routing property below. + + intel,pirq-routing = + PCI_BDF(0, 2, 0) INTA PIRQA + ... + ; + +As you see each entry has 3 cells. For the first one, we need describe all pci +devices mounted on the board. For SoC devices, normally there is a chapter on +the chipset datasheet which lists all the available PCI devices. For example on +Bay Trail, this is chapter 4.3 (PCI configuration space). For the second one, we +can get the interrupt pin either from datasheet or hardware via U-Boot shell. +The reliable source is the hardware as sometimes chipset datasheet is not 100% +up-to-date. Type 'pci header' plus the device's pci bus/device/function number +from U-Boot shell below. + + = pci header 0.1e.1 +vendor ID =0x8086 +device ID =0x0f08 +... +interrupt line = 0x09 +interrupt pin =0x04 +... + +It shows this PCI device is using INTD pin as it reports 4 in the interrupt pin +register. Repeat this until you get interrupt pins for all the devices. The last +cell is the PIRQ line which a particular interrupt pin is mapped to. On Intel +chipset, the power-up default mapping is INTA/B/C/D maps to PIRQA/B/C/D. This +can be changed by registers in LPC bridge. So far Intel FSP does not touch those +registers so we can write down the PIRQ according to the default mapping rule. + +Once we get the PIRQ routing information in the device tree, the interrupt +allocation and assignment will be done by U-Boot automatically. Now you can +enable CONFIG_GENERATE_PIRQ_TABLE for testing Linux kernel using i8259 PIC and +CONFIG_GENERATE_MP_TABLE for testing Linux kernel using local APIC and I/O APIC. + TODO List - - Audio @@ -689,3 +729,4 @@ References [11] https://en.wikipedia.org/wiki/GUID_Partition_Table [12] http://events.linuxfoundation.org/sites/events/files/slides/chromeos_and_diy_vboot_0.pdf [13] http://events.linuxfoundation.org/sites/events/files/slides/elce-2014.pdf +[14] doc/device-tree-bindings/misc/intel,irq-router.txt -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 03/15] imx: mx6ul: Update imx registers head file
On 20/07/2015 20:39, Marek Vasut wrote: On Monday, July 20, 2015 at 01:28:23 PM, Peng Fan wrote: 1. Update imx register base address for i.MX6UL. 2. Remove duplicated MXS_APBH/GPMI/BCH_BASE. 3. Remove #ifdef for register addresses that equal to AIPS2_OFF_BASE_ADDR + 0x34000 for different chips. 4. According fuse map, complete fuse_bank4_regs. 5. Move AIPS3_ARB_BASE_ADDR and AIPS3_ARB_END_ADDR out of #ifdef CONFIG_MX6SX, because we can use runtime check Signed-off-by: Peng Fan peng@freescale.com [...] @@ -296,7 +300,6 @@ #define AIPS3_CONFIG_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x7C000) #define ADC1_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x8) #define ADC2_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x84000) -#define WDOG3_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x88000) #define ECSPI5_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x8C000) #define HS_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x9) #define MU_MCU_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x94000) @@ -308,12 +311,17 @@ #define PWM7_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0xAC000) #define PWM8_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0xB) #endif +#define MX6SX_WDOG3_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x88000) + +/* only for i.MX6SX/UL */ +#define WDOG3_BASE_ADDR (is_cpu_type(MXC_CPU_MX6UL) ? \ + MX6UL_WDOG3_BASE_ADDR : MX6SX_WDOG3_BASE_ADDR) Nitpick -- this should probably be protected by #ifndef __ASSELMBLY__ . Anyway, I decided to apply it - it could be easy fixed with a follow up patch if this case arises. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 01/15] imx: mx6ul: Add i.MX6UL CPU type
On 20/07/2015 13:28, Peng Fan wrote: Add MXC_CPU_MX6UL for i.MX6UL CPU type which is got at runtime from DIGPROG register. But the value has been occupied by MXC_CPU_MX6D which is not real id from DIGPROG register, so change i.MX6D to value 0x67 which was not occupied. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Ye.Li b37...@freescale.com --- Changes v3: None Changes v2: Refine commit msg. arch/arm/imx-common/cpu.c | 2 ++ arch/arm/include/asm/arch-imx/cpu.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 096d22e..e27546c 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -138,6 +138,8 @@ const char *get_imx_type(u32 imxtype) return 6SL; /* Solo-Lite version of the mx6 */ case MXC_CPU_MX6SX: return 6SX; /* SoloX version of the mx6 */ + case MXC_CPU_MX6UL: + return 6UL; /* Ultra-Lite version of the mx6 */ case MXC_CPU_MX51: return 51; case MXC_CPU_MX53: diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index 99e0e32..c7f9fff 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -10,8 +10,9 @@ #define MXC_CPU_MX6DL0x61 #define MXC_CPU_MX6SX0x62 #define MXC_CPU_MX6Q 0x63 -#define MXC_CPU_MX6D 0x64 +#define MXC_CPU_MX6UL0x64 #define MXC_CPU_MX6SOLO 0x65 /* dummy ID */ +#define MXC_CPU_MX6D 0x67 #define MXC_CPU_MX6DP0x68 #define MXC_CPU_MX6QP0x69 Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 02/15] imx: mx6ul: Add pins IOMUX head file
On 20/07/2015 13:28, Peng Fan wrote: Add i.MX6UL pins IOMUX file which defines the IOMUX settings for choose. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 15/15] imx: mx6ul_14x14_evk add basic board support
On 20/07/2015 13:28, Peng Fan wrote: 1. Add USDHC, I2C, UART, 74LV, USB, QSPI support. 2. Support SPL 3. CONFIG_MX6UL_14X14_EVK_EMMC_REWORK is introduced, this board default supports sd for usdhc2, but can do hardware rework to make usdhc2 support emmc. Boot Log: U-Boot SPL 2015.07-rc3-00124-g35d727b (Jul 20 2015 - 18:40:59) reading u-boot.img reading u-boot.img U-Boot 2015.07-rc3-00124-g35d727b (Jul 20 2015 - 18:40:59 +0800) CPU: Freescale i.MX6UL rev1.0 792 MHz (running at 396 MHz) CPU: Commercial temperature grade (0C to 95C)CPU: Thermal invalid data, fuse: 0x0 - invalid sensor device Reset cause: POR Board: MX6UL 14x14 EVK I2C: ready DRAM: 512 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 *** Warning - bad CRC, using default environment In:serial Out: serial Err: serial Net: CPU Net Initialization Failed No ethernet found. Hit any key to stop autoboot: 0 Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: Add SPL support More commit msg for CONFIG_MX6UL_14X14_EVK_EMMC_REWORK. arch/arm/Kconfig | 8 + board/freescale/mx6ul_14x14_evk/Kconfig | 15 + board/freescale/mx6ul_14x14_evk/MAINTAINERS | 6 + board/freescale/mx6ul_14x14_evk/Makefile | 6 + board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 636 ++ configs/mx6ul_14x14_evk_defconfig | 4 + include/configs/mx6ul_14x14_evk.h | 227 7 files changed, 902 insertions(+) create mode 100644 board/freescale/mx6ul_14x14_evk/Kconfig create mode 100644 board/freescale/mx6ul_14x14_evk/MAINTAINERS create mode 100644 board/freescale/mx6ul_14x14_evk/Makefile create mode 100644 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c create mode 100644 configs/mx6ul_14x14_evk_defconfig create mode 100644 include/configs/mx6ul_14x14_evk.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9908b43..14a622e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -575,6 +575,13 @@ config TARGET_MX6SXSABRESD select DM select DM_THERMAL +config TARGET_MX6UL_14X14_EVK + bool Support mx6ul_14x14_evk + select CPU_V7 + select DM + select DM_THERMAL + select SUPPORT_SPL + config TARGET_GW_VENTANA bool Support gw_ventana select CPU_V7 @@ -920,6 +927,7 @@ source board/freescale/mx6qsabreauto/Kconfig source board/freescale/mx6sabresd/Kconfig source board/freescale/mx6slevk/Kconfig source board/freescale/mx6sxsabresd/Kconfig +source board/freescale/mx6ul_14x14_evk/Kconfig source board/freescale/vf610twr/Kconfig source board/gateworks/gw_ventana/Kconfig source board/genesi/mx51_efikamx/Kconfig diff --git a/board/freescale/mx6ul_14x14_evk/Kconfig b/board/freescale/mx6ul_14x14_evk/Kconfig new file mode 100644 index 000..393aca6 --- /dev/null +++ b/board/freescale/mx6ul_14x14_evk/Kconfig @@ -0,0 +1,15 @@ +if TARGET_MX6UL_14X14_EVK + +config SYS_BOARD + default mx6ul_14x14_evk + +config SYS_VENDOR + default freescale + +config SYS_SOC + default mx6 + +config SYS_CONFIG_NAME + default mx6ul_14x14_evk + +endif diff --git a/board/freescale/mx6ul_14x14_evk/MAINTAINERS b/board/freescale/mx6ul_14x14_evk/MAINTAINERS new file mode 100644 index 000..611feca --- /dev/null +++ b/board/freescale/mx6ul_14x14_evk/MAINTAINERS @@ -0,0 +1,6 @@ +MX6ULEVK BOARD +M: Peng Fan peng@freescale.com +S: Maintained +F: board/freescale/mx6ul_14x14_evk/ +F: include/configs/mx6ul_14x14_evk.h +F: configs/mx6ul_14x14_evk_defconfig diff --git a/board/freescale/mx6ul_14x14_evk/Makefile b/board/freescale/mx6ul_14x14_evk/Makefile new file mode 100644 index 000..61f6778 --- /dev/null +++ b/board/freescale/mx6ul_14x14_evk/Makefile @@ -0,0 +1,6 @@ +# (C) Copyright 2015 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := mx6ul_14x14_evk.o diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c new file mode 100644 index 000..8f712cb --- /dev/null +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -0,0 +1,636 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/iomux.h +#include asm/arch/imx-regs.h +#include asm/arch/crm_regs.h +#include asm/arch/mx6ul_pins.h +#include asm/arch/mx6-pins.h +#include asm/arch/sys_proto.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include asm/imx-common/mxc_i2c.h +#include asm/io.h +#include common.h +#include fsl_esdhc.h +#include i2c.h +#include linux/sizes.h +#include mmc.h +#include usb.h +#include usb/ehci-fsl.h + +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL
Re: [U-Boot] [PATCH v3 14/15] imx: imx6_spl add mx6ul support
On 20/07/2015 13:28, Peng Fan wrote: i.MX6UL's DRAM space starts from 0x8000, same to i.MX6SX, so use same address with i.MX6SX. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: None Changes v2: new patch include/configs/imx6_spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index 21c5dce..0a585b7 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -61,7 +61,7 @@ #define CONFIG_SPL_LIBDISK_SUPPORT #endif -#if defined(CONFIG_MX6SX) +#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) #define CONFIG_SPL_BSS_START_ADDR 0x8820 #define CONFIG_SPL_BSS_MAX_SIZE0x10/* 1 MB */ #define CONFIG_SYS_SPL_MALLOC_START0x8830 Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 13/15] imx:mx6ul add dram spl configuration and header file
On 20/07/2015 13:28, Peng Fan wrote: 1. Define two structures mx6ul_iomux_ddr_regs and mx6ul_iomux_grp_regs. 2. Add a new function mx6ul_dram_iocfg to configure dram io. 3. Refactor MMDC1 macro, discard #ifdef CONFIG_MX6SX. Since only mmdc0 channel exists on i.MX6SX/UL, redefine MMDC1 macro support runtime check, but not hardcoding #ifdef macros. 4. Introduce mx6ul-ddr.h, which includes the register address for DRAM IO configuration. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: new patch arch/arm/cpu/armv7/mx6/ddr.c | 61 ++- arch/arm/include/asm/arch-mx6/mx6-ddr.h | 45 +++ arch/arm/include/asm/arch-mx6/mx6ul-ddr.h | 45 +++ 3 files changed, 141 insertions(+), 10 deletions(-) create mode 100644 arch/arm/include/asm/arch-mx6/mx6ul-ddr.h diff --git a/arch/arm/cpu/armv7/mx6/ddr.c b/arch/arm/cpu/armv7/mx6/ddr.c index 86c8354..b808627 100644 --- a/arch/arm/cpu/armv7/mx6/ddr.c +++ b/arch/arm/cpu/armv7/mx6/ddr.c @@ -71,6 +71,50 @@ void mx6sx_dram_iocfg(unsigned width, } #endif +#ifdef CONFIG_MX6UL +void mx6ul_dram_iocfg(unsigned width, + const struct mx6ul_iomux_ddr_regs *ddr, + const struct mx6ul_iomux_grp_regs *grp) +{ + struct mx6ul_iomux_ddr_regs *mx6_ddr_iomux; + struct mx6ul_iomux_grp_regs *mx6_grp_iomux; + + mx6_ddr_iomux = (struct mx6ul_iomux_ddr_regs *)MX6UL_IOM_DDR_BASE; + mx6_grp_iomux = (struct mx6ul_iomux_grp_regs *)MX6UL_IOM_GRP_BASE; + + /* DDR IO TYPE */ + writel(grp-grp_ddr_type, mx6_grp_iomux-grp_ddr_type); + writel(grp-grp_ddrpke, mx6_grp_iomux-grp_ddrpke); + + /* CLOCK */ + writel(ddr-dram_sdclk_0, mx6_ddr_iomux-dram_sdclk_0); + + /* ADDRESS */ + writel(ddr-dram_cas, mx6_ddr_iomux-dram_cas); + writel(ddr-dram_ras, mx6_ddr_iomux-dram_ras); + writel(grp-grp_addds, mx6_grp_iomux-grp_addds); + + /* Control */ + writel(ddr-dram_reset, mx6_ddr_iomux-dram_reset); + writel(ddr-dram_sdba2, mx6_ddr_iomux-dram_sdba2); + writel(ddr-dram_odt0, mx6_ddr_iomux-dram_odt0); + writel(ddr-dram_odt1, mx6_ddr_iomux-dram_odt1); + writel(grp-grp_ctlds, mx6_grp_iomux-grp_ctlds); + + /* Data Strobes */ + writel(grp-grp_ddrmode_ctl, mx6_grp_iomux-grp_ddrmode_ctl); + writel(ddr-dram_sdqs0, mx6_ddr_iomux-dram_sdqs0); + writel(ddr-dram_sdqs1, mx6_ddr_iomux-dram_sdqs1); + + /* Data */ + writel(grp-grp_ddrmode, mx6_grp_iomux-grp_ddrmode); + writel(grp-grp_b0ds, mx6_grp_iomux-grp_b0ds); + writel(grp-grp_b1ds, mx6_grp_iomux-grp_b1ds); + writel(ddr-dram_dqm0, mx6_ddr_iomux-dram_dqm0); + writel(ddr-dram_dqm1, mx6_ddr_iomux-dram_dqm1); +} +#endif + #if defined(CONFIG_MX6QDL) || defined(CONFIG_MX6Q) || defined(CONFIG_MX6D) /* Configure MX6DQ mmdc iomux */ void mx6dq_dram_iocfg(unsigned width, @@ -243,19 +287,17 @@ void mx6sdl_dram_iocfg(unsigned width, */ #define MR(val, ba, cmd, cs1) \ ((val 16) | (1 15) | (cmd 4) | (cs1 3) | ba) -#ifdef CONFIG_MX6SX -#define MMDC1(entry, value) do {} while (0) -#else -#define MMDC1(entry, value) do { mmdc1-entry = value; } while (0) -#endif +#define MMDC1(entry, value) do { \ + if (!is_cpu_type(MXC_CPU_MX6SX) !is_cpu_type(MXC_CPU_MX6UL)) \ + mmdc1-entry = value; \ + } while (0) + void mx6_dram_cfg(const struct mx6_ddr_sysinfo *sysinfo, const struct mx6_mmdc_calibration *calib, const struct mx6_ddr3_cfg *ddr3_cfg) { volatile struct mmdc_p_regs *mmdc0; -#ifndef CONFIG_MX6SX volatile struct mmdc_p_regs *mmdc1; -#endif u32 val; u8 tcke, tcksrx, tcksre, txpdll, taofpd, taonpd, trrd; u8 todtlon, taxpd, tanpd, tcwl, txp, tfaw, tcl; @@ -270,9 +312,8 @@ void mx6_dram_cfg(const struct mx6_ddr_sysinfo *sysinfo, u16 mem_speed = ddr3_cfg-mem_speed; mmdc0 = (struct mmdc_p_regs *)MMDC_P0_BASE_ADDR; -#ifndef CONFIG_MX6SX - mmdc1 = (struct mmdc_p_regs *)MMDC_P1_BASE_ADDR; -#endif + if (!is_cpu_type(MXC_CPU_MX6SX) !is_cpu_type(MXC_CPU_MX6UL)) + mmdc1 = (struct mmdc_p_regs *)MMDC_P1_BASE_ADDR; /* Limit mem_speed for MX6D/MX6Q */ if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) { diff --git a/arch/arm/include/asm/arch-mx6/mx6-ddr.h b/arch/arm/include/asm/arch-mx6/mx6-ddr.h index c49aa62..7bfbdc3 100644 --- a/arch/arm/include/asm/arch-mx6/mx6-ddr.h +++ b/arch/arm/include/asm/arch-mx6/mx6-ddr.h @@ -16,7 +16,11 @@ #ifdef CONFIG_MX6SX #include mx6sx-ddr.h #else +#ifdef CONFIG_MX6UL +#include mx6ul-ddr.h +#else #error Please select cpu +#endif /* CONFIG_MX6UL */ #endif /* CONFIG_MX6SX */ #endif /* CONFIG_MX6DL or CONFIG_MX6S */ #endif
Re: [U-Boot] [PATCH v3 12/15] mx6_common: Fix LOADADDR and SYS_TEXT_BASE for i.MX6UL
On 20/07/2015 13:28, Peng Fan wrote: DRAM space starts from 0x8000 for i.MX6UL, so need to fix LOADADDR, SYS_TEXT_BASE. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: refine commit msg. include/configs/mx6_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index ce43bd7..ef4cb68 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -54,7 +54,7 @@ #define CONFIG_REVISION_TAG /* Boot options */ -#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL)) +#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6SL) || defined(CONFIG_MX6UL)) #define CONFIG_LOADADDR 0x8200 #ifndef CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_TEXT_BASE 0x8780 Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 12/12] kconfig: add config option for shell prompt
On Wed, Jul 29, 2015 at 12:59:00AM +0900, Masahiro Yamada wrote: 2015-07-28 16:08 GMT+09:00 Nikita Kiryanov nik...@compulab.co.il: Add option to set shell prompt string from menuconfig and migrate boards globally. The migration is done as follows: - Boards that explicitly and unconditionally set CONFIG_SYS_PROMPT had the entry moved to their defconfig files. - Boards that defined some kind of #ifdef logic which selects the CONFIG_SYS_PROMPT (for example qemu-mips) got an #undef CONFIG_SYS_PROMPT right before the #ifdef logic and were left alone. - This change forces CONFIG_SYS_PROMPT to be a per board decision, and thus CONFIG_SYS_PROMPT was removed from all soc_common.h and arch_common.h files. This results in a streamlined default value across platforms, and includes the following files: spear-common, sunxi-common, mv-common, ti_armv7_common, tegra-common, at91-sama5_common, and zynq-common. - Boards that relied on arch/soc_common.h values of CONFIG_SYS_PROMPT were not updated in their respective defconfig files under the assumption that since they did not explicitly define a value, they're fine with whatever the default is. - On the other hand, boards that relied on a value defined in some boards_common.h file such as woodburn_common, rpi-common, bur_am335x_common, ls2085a_common, siemens_am33x_common, and omap3_evm_common, had their values moved to the respective defconfig files. - The define V_PROMPT was removed, since it is not used anywhere except for assigning a value for CONFIG_SYS_PROMPT. Cc: Tom Rini tr...@konsulko.com Cc: Masahiro Yamada yamad...@jp.panasonic.com Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- Changes in V2: - Migrate boards globally (compile tested with buildman on arm and powerpc) - Change default value to = - V_PROMPT define removed as part of the migration diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig index 3ee42d6..af44f87 100644 --- a/configs/T1023RDB_NAND_defconfig +++ b/configs/T1023RDB_NAND_defconfig @@ -6,3 +6,4 @@ CONFIG_SYS_EXTRA_OPTIONS=PPC_T1023,T1023RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND # CONFIG_CMD_IMLS is not set # CONFIG_CMD_FLASH is not set CONFIG_SPI_FLASH=y +CONFIG_SYS_PROMPT== This is the same as the default. It should not appear in a defconfig. I'll take care of it in a V3... It is not sorted by savedefconfig, either. tools/moveconfig.py exists to do such things automatically. OK I'll use it next time. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 2/6] imx: mx6: ccm: Change the clock settings for i.MX6QP
On 11/07/2015 05:38, Peng Fan wrote: Since i.MX6QP changes some CCM registers, so modify the clocks settings to follow the hardware changes. In c files, use runtime check and discard #ifdef. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Ye.Li b37...@freescale.com Reviewed-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Stefano Babic sba...@denx.de --- Changes v5: Add Stefano's Acked-by Changes v4: Add Fabio's Reviewed-by Changes v3: Move bit definition to crm_regs.h. Changes v2: 1. Remove #ifdef, but use runtime check 2. A few bit definitions are introduced in c files, because to other platforms the macro will make compilation fail, also there are no other places refer the bit macro definitions. arch/arm/cpu/armv7/mx6/clock.c | 30 +--- arch/arm/cpu/armv7/mx6/soc.c | 5 +++- arch/arm/include/asm/arch-mx6/crm_regs.h | 48 +--- 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index b461898..cd4bfdd 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -310,10 +310,12 @@ static u32 get_ipg_per_clk(void) u32 reg, perclk_podf; reg = __raw_readl(imx_ccm-cscmr1); -#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX)) - if (reg MXC_CCM_CSCMR1_PER_CLK_SEL_MASK) - return MXC_HCLK; /* OSC 24Mhz */ -#endif + if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) || + is_mx6dqp()) { + if (reg MXC_CCM_CSCMR1_PER_CLK_SEL_MASK) + return MXC_HCLK; /* OSC 24Mhz */ + } + perclk_podf = reg MXC_CCM_CSCMR1_PERCLK_PODF_MASK; return get_ipg_clk() / (perclk_podf + 1); @@ -324,10 +326,13 @@ static u32 get_uart_clk(void) u32 reg, uart_podf; u32 freq = decode_pll(PLL_USBOTG, MXC_HCLK) / 6; /* static divider */ reg = __raw_readl(imx_ccm-cscdr1); -#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX)) - if (reg MXC_CCM_CSCDR1_UART_CLK_SEL) - freq = MXC_HCLK; -#endif + + if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) || + is_mx6dqp()) { + if (reg MXC_CCM_CSCDR1_UART_CLK_SEL) + freq = MXC_HCLK; + } + reg = MXC_CCM_CSCDR1_UART_CLK_PODF_MASK; uart_podf = reg MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET; @@ -339,8 +344,13 @@ static u32 get_cspi_clk(void) u32 reg, cspi_podf; reg = __raw_readl(imx_ccm-cscdr2); - reg = MXC_CCM_CSCDR2_ECSPI_CLK_PODF_MASK; - cspi_podf = reg MXC_CCM_CSCDR2_ECSPI_CLK_PODF_OFFSET; + cspi_podf = (reg MXC_CCM_CSCDR2_ECSPI_CLK_PODF_MASK) + MXC_CCM_CSCDR2_ECSPI_CLK_PODF_OFFSET; + + if (is_mx6dqp()) { + if (reg MXC_CCM_CSCDR2_ECSPI_CLK_SEL_MASK) + return MXC_HCLK / (cspi_podf + 1); + } return decode_pll(PLL_USBOTG, MXC_HCLK) / (8 * (cspi_podf + 1)); } diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index d3a3b2e..e80c09c 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -342,9 +342,12 @@ static void set_ahb_rate(u32 val) static void clear_mmdc_ch_mask(void) { struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + u32 reg; + reg = readl(mxc_ccm-ccdr); /* Clear MMDC channel mask */ - writel(0, mxc_ccm-ccdr); + reg = ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK | MXC_CCM_CCDR_MMDC_CH0_HS_MASK); + writel(reg, mxc_ccm-ccdr); } static void init_bandgap(void) diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h index 98415ac..7d9fe73 100644 --- a/arch/arm/include/asm/arch-mx6/crm_regs.h +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h @@ -123,6 +123,8 @@ struct mxc_ccm_reg { /* Define the bits in register CCDR */ #define MXC_CCM_CCDR_MMDC_CH1_HS_MASK(1 16) #define MXC_CCM_CCDR_MMDC_CH0_HS_MASK(1 17) +/* Exists on i.MX6QP */ +#define MXC_CCM_CCDR_MMDC_CH1_AXI_ROOT_CG(1 18) /* Define the bits in register CSR */ #define MXC_CCM_CSR_COSC_READY (1 5) @@ -195,10 +197,8 @@ struct mxc_ccm_reg { #define MXC_CCM_CBCMR_GPU3D_SHADER_CLK_SEL_OFFSET8 #define MXC_CCM_CBCMR_GPU3D_CORE_CLK_SEL_MASK(0x3 4) #define MXC_CCM_CBCMR_GPU3D_CORE_CLK_SEL_OFFSET 4 -#ifndef CONFIG_MX6SX -#define MXC_CCM_CBCMR_GPU3D_AXI_CLK_SEL (1 1) -#define MXC_CCM_CBCMR_GPU2D_AXI_CLK_SEL (1 0) -#endif +/* Exists on i.MX6QP */ +#define MXC_CCM_CBCMR_PRE_CLK_SEL(1 1) /* Define the bits in register CSCMR1 */ #define MXC_CCM_CSCMR1_ACLK_EMI_SLOW_MASK(0x3 29) @@ -229,10
Re: [U-Boot] [PATCH V5 1/6] imx: add cpu type for i.MX6QP/DP
On 11/07/2015 05:38, Peng Fan wrote: Add cpu type for i.MX6QP/DP. This patch also fix is_mx6dqp(), since get_cpu_rev can return MXC_CPU_MX6QP and MXC_CPU_MX6DP, we should use: (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP)). Signed-off-by: Peng Fan peng@freescale.com Acked-by: Stefano Babic sba...@denx.de --- Changes v5: Refine commit msg Add Stefano's Acked-by Changes v4: Address Fabio's comments, Change Quad-Plus to Dual-Plus for i.MX6DP. Changes v3: New patch This patch is to make print_cpuinfo display correct cpu info,and fix is_mx6dqp Changes v2: none arch/arm/cpu/armv7/mx6/soc.c | 11 +-- arch/arm/imx-common/cpu.c | 4 arch/arm/include/asm/arch-imx/cpu.h | 2 ++ arch/arm/include/asm/arch-mx6/sys_proto.h | 4 +--- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index 29de624..d3a3b2e 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -62,12 +62,12 @@ u32 get_cpu_rev(void) struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; u32 reg = readl(anatop-digprog_sololite); u32 type = ((reg 16) 0xff); - u32 major; + u32 major, cfg = 0; if (type != MXC_CPU_MX6SL) { reg = readl(anatop-digprog); struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR; - u32 cfg = readl(scu-config) 3; + cfg = readl(scu-config) 3; type = ((reg 16) 0xff); if (type == MXC_CPU_MX6DL) { if (!cfg) @@ -81,6 +81,13 @@ u32 get_cpu_rev(void) } major = ((reg 8) 0xff); + if ((major = 1) + ((type == MXC_CPU_MX6Q) || (type == MXC_CPU_MX6D))) { + major--; + type = MXC_CPU_MX6QP; + if (cfg == 1) + type = MXC_CPU_MX6DP; + } reg = 0xff;/* mx6 silicon revision */ return (type 12) | (reg + (0x10 * (major + 1))); } diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 5e56cfe..096d22e 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -122,6 +122,10 @@ unsigned imx_ddr_size(void) const char *get_imx_type(u32 imxtype) { switch (imxtype) { + case MXC_CPU_MX6QP: + return 6QP; /* Quad-Plus version of the mx6 */ + case MXC_CPU_MX6DP: + return 6DP; /* Dual-Plus version of the mx6 */ case MXC_CPU_MX6Q: return 6Q;/* Quad-core version of the mx6 */ case MXC_CPU_MX6D: diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index 4715f4e..99e0e32 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -12,6 +12,8 @@ #define MXC_CPU_MX6Q 0x63 #define MXC_CPU_MX6D 0x64 #define MXC_CPU_MX6SOLO 0x65 /* dummy ID */ +#define MXC_CPU_MX6DP0x68 +#define MXC_CPU_MX6QP0x69 #define CS0_128 0 #define CS0_64M_CS1_64M 1 diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index 28c77a4..eee8ca8 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -30,9 +30,7 @@ const char *get_imx_type(u32 imxtype); unsigned imx_ddr_size(void); void set_chipselect_size(int const); -#define is_mx6dqp() ((is_cpu_type(MXC_CPU_MX6Q) || \ - is_cpu_type(MXC_CPU_MX6D)) \ - (soc_rev() = CHIP_REV_2_0)) +#define is_mx6dqp() (is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP)) /* * Initializes on-chip ethernet controllers. Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 08/15] imx: mx6ul select SYS_L2CACHE_OFF
On 20/07/2015 13:28, Peng Fan wrote: i.MX6UL features an Cortex-A7 core, it does not have PL310 as other i.MX6 chips. To Cortex-A7 core, If D-Cache is enabled, L2 Cache is enabled. There is on specific switch for on/off L2 Cache, so default select SYS_L2CACHE_OFF. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: refine commit msg. arch/arm/cpu/armv7/mx6/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 10908c4..fceba27 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -25,6 +25,10 @@ config MX6SL config MX6SX bool +config MX6UL + select SYS_L2CACHE_OFF + bool + choice prompt MX6 board select optional Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 10/15] imx: mx6 add PAD_CTL_SPEED_LOW for i.MX6SX/UL
On 20/07/2015 13:28, Peng Fan wrote: PAD_CTL_SPEED_LOW for i.MX6SX/UL is (0 6) Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: none arch/arm/include/asm/imx-common/iomux-v3.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h b/arch/arm/include/asm/imx-common/iomux-v3.h index 5cde90f..42098a3 100644 --- a/arch/arm/include/asm/imx-common/iomux-v3.h +++ b/arch/arm/include/asm/imx-common/iomux-v3.h @@ -98,7 +98,11 @@ typedef u64 iomux_v3_cfg_t; #define PAD_CTL_ODE (1 11) +#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) +#define PAD_CTL_SPEED_LOW(0 6) +#else #define PAD_CTL_SPEED_LOW(1 6) +#endif #define PAD_CTL_SPEED_MED(2 6) #define PAD_CTL_SPEED_HIGH (3 6) Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 11/15] mxc: gpio add i.MX6UL support
On 20/07/2015 13:28, Peng Fan wrote: i.MX6UL does not have GPIO6/7, so do not include them for i.MX6UL. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: none drivers/gpio/mxc_gpio.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 2012f99..57a650f 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -45,11 +45,15 @@ static unsigned long gpio_ports[] = { #endif #if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) [4] = GPIO5_BASE_ADDR, +#ifndef CONFIG_MX6UL [5] = GPIO6_BASE_ADDR, #endif +#endif #if defined(CONFIG_MX53) || defined(CONFIG_MX6) +#ifndef CONFIG_MX6UL [6] = GPIO7_BASE_ADDR, #endif +#endif }; static int mxc_gpio_direction(unsigned int gpio, Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 07/15] imx:mx6ul add clock support
On 20/07/2015 13:28, Peng Fan wrote: 1. Add enet, uart, i2c, ipg clock support for i.MX6UL. 2. Correct get_periph_clk, it should account for MXC_CCM_CBCDR_PERIPH_CLK2_PODF_MASK. 3. Refactor get_mmdc_ch0_clk to make all i.MX6 share one function, but not use 'ifdef'. 4. Use CONFIG_FSL_QSPI for enable_qspi_clk, but not #ifdef CONFIG_MX6SX. 5. Use CONFIG_PCIE_IMX for pcie clock settings, use CONFIG_CMD_SATA for sata clock settings. In this way, we not need #if defined(CONFIG_MX6Q) || defined, only need one CONFIG_PCIE_IMX in header file. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: fix possible assembler usage for MXC_CCM_CS2CDR_ENFC_CLKxx Changes v2: none arch/arm/cpu/armv7/mx6/clock.c | 151 +++ arch/arm/include/asm/arch-mx6/crm_regs.h | 98 +--- 2 files changed, 159 insertions(+), 90 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 3e94472..9cf4eec 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -81,19 +81,32 @@ void enable_usboh3_clk(unsigned char enable) #if defined(CONFIG_FEC_MXC) !defined(CONFIG_MX6SX) void enable_enet_clk(unsigned char enable) { - u32 mask = MXC_CCM_CCGR1_ENET_CLK_ENABLE_MASK; + u32 mask, *addr; + + if (is_cpu_type(MXC_CPU_MX6UL)) { + mask = MXC_CCM_CCGR3_ENET_MASK; + addr = imx_ccm-CCGR3; + } else { + mask = MXC_CCM_CCGR1_ENET_MASK; + addr = imx_ccm-CCGR1; + } if (enable) - setbits_le32(imx_ccm-CCGR1, mask); + setbits_le32(addr, mask); else - clrbits_le32(imx_ccm-CCGR1, mask); + clrbits_le32(addr, mask); } #endif #ifdef CONFIG_MXC_UART void enable_uart_clk(unsigned char enable) { - u32 mask = MXC_CCM_CCGR5_UART_MASK | MXC_CCM_CCGR5_UART_SERIAL_MASK; + u32 mask; + + if (is_cpu_type(MXC_CPU_MX6UL)) + mask = MXC_CCM_CCGR5_UART_MASK; + else + mask = MXC_CCM_CCGR5_UART_MASK | MXC_CCM_CCGR5_UART_SERIAL_MASK; if (enable) setbits_le32(imx_ccm-CCGR5, mask); @@ -141,7 +154,7 @@ int enable_i2c_clk(unsigned char enable, unsigned i2c_num) reg = ~mask; __raw_writel(reg, imx_ccm-CCGR2); } else { - if (is_cpu_type(MXC_CPU_MX6SX)) { + if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) { mask = MXC_CCM_CCGR6_I2C4_MASK; addr = imx_ccm-CCGR6; } else { @@ -214,9 +227,11 @@ static u32 mxc_get_pll_pfd(enum pll_clocks pll, int pfd_num) switch (pll) { case PLL_BUS: - if (pfd_num == 3) { - /* No PFD3 on PPL2 */ - return 0; + if (!is_cpu_type(MXC_CPU_MX6UL)) { + if (pfd_num == 3) { + /* No PFD3 on PPL2 */ + return 0; + } } div = __raw_readl(imx_ccm-analog_pfd_528); freq = (u64)decode_pll(PLL_BUS, MXC_HCLK); @@ -248,10 +263,12 @@ static u32 get_mcu_main_clk(void) u32 get_periph_clk(void) { - u32 reg, freq = 0; + u32 reg, div = 0, freq = 0; reg = __raw_readl(imx_ccm-cbcdr); if (reg MXC_CCM_CBCDR_PERIPH_CLK_SEL) { + div = (reg MXC_CCM_CBCDR_PERIPH_CLK2_PODF_MASK) +MXC_CCM_CBCDR_PERIPH_CLK2_PODF_OFFSET; reg = __raw_readl(imx_ccm-cbcmr); reg = MXC_CCM_CBCMR_PERIPH_CLK2_SEL_MASK; reg = MXC_CCM_CBCMR_PERIPH_CLK2_SEL_OFFSET; @@ -291,7 +308,7 @@ u32 get_periph_clk(void) } } - return freq; + return freq / (div + 1); } static u32 get_ipg_clk(void) @@ -311,7 +328,7 @@ static u32 get_ipg_per_clk(void) reg = __raw_readl(imx_ccm-cscmr1); if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) || - is_mx6dqp()) { + is_mx6dqp() || is_cpu_type(MXC_CPU_MX6UL)) { if (reg MXC_CCM_CSCMR1_PER_CLK_SEL_MASK) return MXC_HCLK; /* OSC 24Mhz */ } @@ -328,7 +345,7 @@ static u32 get_uart_clk(void) reg = __raw_readl(imx_ccm-cscdr1); if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) || - is_mx6dqp()) { + is_mx6dqp() || is_cpu_type(MXC_CPU_MX6UL)) { if (reg MXC_CCM_CSCDR1_UART_CLK_SEL) freq = MXC_HCLK; } @@ -347,7 +364,8 @@ static u32 get_cspi_clk(void) cspi_podf = (reg MXC_CCM_CSCDR2_ECSPI_CLK_PODF_MASK) MXC_CCM_CSCDR2_ECSPI_CLK_PODF_OFFSET; - if (is_mx6dqp()) { + if (is_mx6dqp() || is_cpu_type(MXC_CPU_MX6SL) ||
Re: [U-Boot] [PATCH v3 05/15] imx-common: timer: add i.MX6UL support
On 20/07/2015 13:28, Peng Fan wrote: Add i.MX6UL GPT timer support. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: system counter patch is removed. Now, defaut use gpt. arch/arm/imx-common/timer.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/imx-common/timer.c b/arch/arm/imx-common/timer.c index c12556a..1a88ce6 100644 --- a/arch/arm/imx-common/timer.c +++ b/arch/arm/imx-common/timer.c @@ -45,7 +45,8 @@ static inline int gpt_has_clk_source_osc(void) #if defined(CONFIG_MX6) if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) (soc_rev() CHIP_REV_1_0)) || is_cpu_type(MXC_CPU_MX6DL) || - is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX)) + is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX) || + is_cpu_type(MXC_CPU_MX6UL)) return 1; return 0; @@ -103,10 +104,11 @@ int timer_init(void) if (gpt_has_clk_source_osc()) { i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN; - /* For DL/S, SX, set 24Mhz OSC Enable bit and prescaler */ + /* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */ if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO) || - is_cpu_type(MXC_CPU_MX6SX)) { + is_cpu_type(MXC_CPU_MX6SX) || + is_cpu_type(MXC_CPU_MX6UL)) { i |= GPTCR_24MEN; /* Produce 3Mhz clock */ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 06/15] imx: mx6ul remove errata for i.MX6UL
On 20/07/2015 13:28, Peng Fan wrote: Since i.MX6UL use A7 core, but not A9 core, we do not need the erratas for i.MX6UL. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: remove the system counter define, since default use GPT now. include/configs/mx6_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 54ab890..ce43bd7 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -17,11 +17,11 @@ #ifndef __MX6_COMMON_H #define __MX6_COMMON_H +#ifndef CONFIG_MX6UL #define CONFIG_ARM_ERRATA_743622 #define CONFIG_ARM_ERRATA_751472 #define CONFIG_ARM_ERRATA_794072 #define CONFIG_ARM_ERRATA_761320 -#define CONFIG_BOARD_POSTCLK_INIT #ifndef CONFIG_SYS_L2CACHE_OFF #define CONFIG_SYS_L2_PL310 @@ -29,6 +29,8 @@ #endif #define CONFIG_MP +#endif +#define CONFIG_BOARD_POSTCLK_INIT #define CONFIG_MXC_GPT_HCLK #define CONFIG_SYS_NO_FLASH Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 09/15] imx: mx6ul update soc related settings
On 20/07/2015 13:28, Peng Fan wrote: 1.Update WDOG settings. 2.No need to gate/ungate all PFDs for i.MX6UL. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Ye.Li b37...@freescale.com --- Changes v3: none Changes v2: runtime check for wdog part. arch/arm/cpu/armv7/mx6/soc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index e80c09c..033f9de 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -316,11 +316,10 @@ static void imx_set_wdog_powerdown(bool enable) { struct wdog_regs *wdog1 = (struct wdog_regs *)WDOG1_BASE_ADDR; struct wdog_regs *wdog2 = (struct wdog_regs *)WDOG2_BASE_ADDR; - -#ifdef CONFIG_MX6SX struct wdog_regs *wdog3 = (struct wdog_regs *)WDOG3_BASE_ADDR; - writew(enable, wdog3-wmcr); -#endif + + if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) + writew(enable, wdog3-wmcr); /* Write to the PDE (Power Down Enable) bit */ writew(enable, wdog1-wmcr); @@ -530,7 +529,7 @@ void s_init(void) u32 mask528; u32 reg, periph1, periph2; - if (is_cpu_type(MXC_CPU_MX6SX)) + if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) return; /* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 03/15] imx: mx6ul: Update imx registers head file
On 20/07/2015 13:28, Peng Fan wrote: 1. Update imx register base address for i.MX6UL. 2. Remove duplicated MXS_APBH/GPMI/BCH_BASE. 3. Remove #ifdef for register addresses that equal to AIPS2_OFF_BASE_ADDR + 0x34000 for different chips. 4. According fuse map, complete fuse_bank4_regs. 5. Move AIPS3_ARB_BASE_ADDR and AIPS3_ARB_END_ADDR out of #ifdef CONFIG_MX6SX, because we can use runtime check Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: Taking Marek's suggestion, fix the WDOG3_BASE_ADDRESS for assembler usage. Changes v2: split CONFIG_SYS_CACHELINE_SIZE part into another patch arch/arm/include/asm/arch-mx6/imx-regs.h | 60 +++- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 35a324c..d8b5d6f 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -19,7 +19,7 @@ #define GPU_2D_ARB_END_ADDR 0x02203FFF #define OPENVG_ARB_BASE_ADDR0x02204000 #define OPENVG_ARB_END_ADDR 0x02207FFF -#elif CONFIG_MX6SX +#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) #define CAAM_ARB_BASE_ADDR 0x0010 #define CAAM_ARB_END_ADDR 0x00107FFF #define GPU_ARB_BASE_ADDR 0x0180 @@ -28,10 +28,6 @@ #define APBH_DMA_ARB_END_ADDR 0x0180BFFF #define M4_BOOTROM_BASE_ADDR 0x007F8000 -#define MXS_APBH_BASEAPBH_DMA_ARB_BASE_ADDR -#define MXS_GPMI_BASE(APBH_DMA_ARB_BASE_ADDR + 0x02000) -#define MXS_BCH_BASE (APBH_DMA_ARB_BASE_ADDR + 0x04000) - #else #define CAAM_ARB_BASE_ADDR 0x0010 #define CAAM_ARB_END_ADDR 0x00103FFF @@ -52,13 +48,13 @@ #define MXS_BCH_BASE (APBH_DMA_ARB_BASE_ADDR + 0x04000) /* GPV - PL301 configuration ports */ -#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX)) +#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) #define GPV2_BASE_ADDR 0x00D0 #else #define GPV2_BASE_ADDR 0x0020 #endif -#ifdef CONFIG_MX6SX +#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) #define GPV3_BASE_ADDR 0x00E0 #define GPV4_BASE_ADDR 0x00F0 #define GPV5_BASE_ADDR 0x0100 @@ -87,15 +83,21 @@ #define AIPS1_ARB_END_ADDR 0x020F #define AIPS2_ARB_BASE_ADDR 0x0210 #define AIPS2_ARB_END_ADDR 0x021F -#ifdef CONFIG_MX6SX +/* AIPS3 only on i.MX6SX */ #define AIPS3_ARB_BASE_ADDR 0x0220 #define AIPS3_ARB_END_ADDR 0x022F +#ifdef CONFIG_MX6SX #define WEIM_ARB_BASE_ADDR 0x5000 #define WEIM_ARB_END_ADDR 0x57FF #define QSPI0_AMBA_BASE0x6000 #define QSPI0_AMBA_END 0x6FFF #define QSPI1_AMBA_BASE0x7000 #define QSPI1_AMBA_END 0x7FFF +#elif defined(CONFIG_MX6UL) +#define WEIM_ARB_BASE_ADDR 0x5000 +#define WEIM_ARB_END_ADDR 0x57FF +#define QSPI0_AMBA_BASE 0x6000 +#define QSPI0_AMBA_END 0x6FFF #else #define SATA_ARB_BASE_ADDR 0x0220 #define SATA_ARB_END_ADDR 0x02203FFF @@ -111,7 +113,7 @@ #define WEIM_ARB_END_ADDR 0x0FFF #endif -#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX)) +#if (defined(CONFIG_MX6SL) || defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL)) #define MMDC0_ARB_BASE_ADDR 0x8000 #define MMDC0_ARB_END_ADDR 0x #define MMDC1_ARB_BASE_ADDR 0xC000 @@ -238,13 +240,16 @@ #define I2C3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x28000) #define ROMCP_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x2C000) #define MMDC_P0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x3) -#ifdef CONFIG_MX6SL +/* i.MX6SL */ #define RNGB_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) -#elif CONFIG_MX6SX -#define ENET2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) +#ifdef CONFIG_MX6UL +#define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000) #else -#define MMDC_P1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) +/* i.MX6SX */ +#define ENET2_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) #endif +/* i.MX6DQ/SDL */ +#define MMDC_P1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x34000) #define WEIM_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x38000) #define OCOTP_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x3C000) @@ -257,22 +262,21 @@ #define IP2APB_PERFMON3_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4C000) #endif #define
Re: [U-Boot] [PATCH v3 04/15] imx: mx6ul Add CONFIG_SYS_CACHELINE_SIZE for i.MX6UL
On 20/07/2015 13:28, Peng Fan wrote: Since i.MX6UL's cache line size is 64bytes, need to define the macro CONFIG_SYS_CACHELINE_SIZE to 64 for i.MX6UL. Signed-off-by: Peng Fan peng@freescale.com --- Changes v3: none Changes v2: new patch, splitted from patch 03/15. arch/arm/include/asm/arch-mx6/imx-regs.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index d8b5d6f..4d84a9b 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -9,7 +9,11 @@ #define ARCH_MXC +#ifdef CONFIG_MX6UL +#define CONFIG_SYS_CACHELINE_SIZE64 +#else #define CONFIG_SYS_CACHELINE_SIZE32 +#endif #define ROMCP_ARB_BASE_ADDR 0x #define ROMCP_ARB_END_ADDR 0x000F Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 5/6] imx: mx6sabresd/sabreauto runtime setting fdt_file
On 11/07/2015 05:38, Peng Fan wrote: Detect the SOC and board variant at runtime and change the dtb name, but not hardcoding the fdt_file env variable. Take the following patch as a reference. Íd58699b157df75f1aa0b363ea9c21add21a0c mx6cuboxi: Load the correct 'fdtfile' variable Signed-off-by: Peng Fan peng@freescale.com Reviewed-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Stefano Babic sba...@denx.de --- Changes v5: Add Stefano's Acked-by Changes v4: Add Fabio's Reviewed-by Changes v3: New patch Changes v2: none board/freescale/mx6qsabreauto/mx6qsabreauto.c | 9 + board/freescale/mx6sabresd/mx6sabresd.c | 10 ++ include/configs/mx6qsabreauto.h | 5 - include/configs/mx6sabre_common.h | 21 +++-- include/configs/mx6sabresd.h | 5 - 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index b76e4eb..943a4bd 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -522,6 +522,15 @@ int board_late_init(void) add_board_boot_modes(board_boot_modes); #endif +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + setenv(board_name, SABREAUTO); + + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + setenv(board_rev, MX6Q); + else if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO)) + setenv(board_rev, MX6DL); +#endif + return 0; } diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 23f8f6b..4f0694a 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -679,6 +679,16 @@ int board_late_init(void) #ifdef CONFIG_CMD_BMODE add_board_boot_modes(board_boot_modes); #endif + +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + setenv(board_name, SABRESD); + + if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) + setenv(board_rev, MX6Q); + else if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO)) + setenv(board_rev, MX6DL); +#endif + return 0; } diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index 2260344..11cf538 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -12,11 +12,6 @@ #define CONFIG_MACH_TYPE 3529 #define CONFIG_MXC_UART_BASE UART4_BASE #define CONFIG_CONSOLE_DEV ttymxc3 -#if defined CONFIG_MX6Q -#define CONFIG_DEFAULT_FDT_FILE imx6q-sabreauto.dtb -#elif defined CONFIG_MX6DL -#define CONFIG_DEFAULT_FDT_FILE imx6dl-sabreauto.dtb -#endif #define CONFIG_MMCROOT /dev/mmcblk0p2 #define PHYS_SDRAM_SIZE (2u * 1024 * 1024 * 1024) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index e42dfc9..903ab18 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -70,10 +70,12 @@ #define EMMC_ENV #endif +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + #define CONFIG_EXTRA_ENV_SETTINGS \ script=boot.scr\0 \ image=zImage\0 \ - fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \ + fdt_file=undefined\0 \ fdt_addr=0x1800\0 \ boot_fdt=try\0 \ ip_dyn=yes\0 \ @@ -143,9 +145,24 @@ fi; \ else \ bootz; \ - fi;\0 + fi;\0 \ + findfdt=\ + if test $fdt_file = undefined; then \ + if test $board_name = SABREAUTO test $board_rev = MX6Q; then \ + setenv fdt_file imx6q-sabreauto.dtb; fi; \ + if test $board_name = SABREAUTO test $board_rev = MX6DL; then \ + setenv fdt_file imx6dl-sabreauto.dtb; fi; \ + if test $board_name = SABRESD test $board_rev = MX6Q; then \ + setenv fdt_file imx6q-sabresd.dtb; fi; \ + if test $board_name = SABRESD test $board_rev = MX6DL; then \ + setenv fdt_file imx6dl-sabresd.dtb; fi; \ + if test $fdt_file = undefined; then \ + echo WARNING: Could not determine dtb to use; fi; \ + fi;\0 \ + #define CONFIG_BOOTCOMMAND \ + run findfdt; \ mmc dev ${mmcdev}; \ if mmc rescan; then \ if run loadbootscript; then \ diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 41162ca..5f635ca 100644 --- a/include/configs/mx6sabresd.h
Re: [U-Boot] [PATCH V5 6/6] imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support
On 11/07/2015 05:38, Peng Fan wrote: 1. Add DDR script for mx6qpsabreauto board. 2. On CPU3 board, enet RGMII tx clock is from internal PLL. Set the GPR5[9] and init the enet pll output to 125Mhz. 3. On CPU3 board, SW1ABC=VDDSOC_IN, SW2=VDDARM_IN. Build target: mx6qpsabreauto_config Boot Log: U-Boot 2015.07-rc2-00071-gfd985ff (Jun 29 2015 - 22:10:55 +0800) CPU: Freescale i.MX6QP rev1.0 996 MHz (running at 792 MHz) CPU: Automotive temperature grade (-40C to 125C) at 34C Reset cause: POR Board: MX6Q-Sabreauto revA I2C: ready DRAM: 2 GiB PMIC: PFUZE100 ID=0x10 Flash: 32 MiB NAND: 0 MiB MMC: FSL_SDHC: 0 *** Warning - bad CRC, using default environment No panel detected: default to HDMI Display: HDMI (1024x768) In:serial Out: serial Err: serial Net: FEC [PRIME] Hit any key to stop autoboot: 0 Note: In this patch, we still add a new config mx6qpsabreauto_config, since SPL is not supported now, and IMX_CONFIG is needed at build time, so add this config. Future, when SPL is converted, this config can be removed. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Robin Gong b38...@freescale.com Signed-off-by: Ye.Li b37...@freescale.com Reviewed-by: Fabio Estevam fabio.este...@freescale.com --- Changes v5: none Changes v4: Add Fabio's Reviewed-by Changes v3: 1. runtime setting DTB 2. In this patch, we still add a new config mx6qpsabreauto_config, since SPL is not supported now, and IMX_CONFIG is needed at build time, so add this config. All the patches in this patch set have been reworked with CONFIG_MX6QP removed to align with runtime check, but this IMX_CONFIG is needed at build time. Future, when SPL is converted, this config can be removed. Changes v2: 1. Remove unused macro in current upstream uboot. 2. setup_fec, remove non 6qp code. Add comments for gpr setting. 3. mx6qp.cfg is still same with v1. The settings is from IC and passed memory ddr stress test. Since we current have no plan to add SPL, so leave settings unchanged. board/freescale/mx6qsabreauto/mx6qp.cfg | 145 ++ board/freescale/mx6qsabreauto/mx6qsabreauto.c | 33 -- configs/mx6qpsabreauto_defconfig | 4 + include/configs/mx6sabre_common.h | 2 + 4 files changed, 177 insertions(+), 7 deletions(-) create mode 100644 board/freescale/mx6qsabreauto/mx6qp.cfg create mode 100644 configs/mx6qpsabreauto_defconfig diff --git a/board/freescale/mx6qsabreauto/mx6qp.cfg b/board/freescale/mx6qsabreauto/mx6qp.cfg new file mode 100644 index 000..2298c77 --- /dev/null +++ b/board/freescale/mx6qsabreauto/mx6qp.cfg @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Refer doc/README.imximage for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ +/* image version */ + +#define __ASSEMBLY__ +#include config.h + +IMAGE_VERSION 2 + +/* + * Boot Device : one of spi, sd, eimnor, nand, sata: + * spinor: flash_offset: 0x0400 + * nand: flash_offset: 0x0400 + * sata: flash_offset: 0x0400 + * sd/mmc: flash_offset: 0x0400 + * eimnor: flash_offset: 0x1000 + */ +BOOT_FROMsd + +/* + * Device Configuration Data (DCD) + * + * Each entry must have the format: + * Addr-type AddressValue + * + * where: + * Addr-type register length (1,2 or 4 bytes) + * Address absolute address of the register + * value value to be stored in the register + */ +DATA 4 0x020e0798 0x000C +DATA 4 0x020e0758 0x +DATA 4 0x020e0588 0x0030 +DATA 4 0x020e0594 0x0030 +DATA 4 0x020e056c 0x0030 +DATA 4 0x020e0578 0x0030 +DATA 4 0x020e074c 0x0030 +DATA 4 0x020e057c 0x0030 +DATA 4 0x020e058c 0x +DATA 4 0x020e059c 0x0030 +DATA 4 0x020e05a0 0x0030 +DATA 4 0x020e078c 0x0030 +DATA 4 0x020e0750 0x0002 +DATA 4 0x020e05a8 0x0030 +DATA 4 0x020e05b0 0x0030 +DATA 4 0x020e0524 0x0030 +DATA 4 0x020e051c 0x0030 +DATA 4 0x020e0518 0x0030 +DATA 4 0x020e050c 0x0030 +DATA 4 0x020e05b8 0x0030 +DATA 4 0x020e05c0 0x0030 +DATA 4 0x020e0774 0x0002 +DATA 4 0x020e0784 0x0030 +DATA 4 0x020e0788 0x0030 +DATA 4 0x020e0794 0x0030 +DATA 4 0x020e079c 0x0030 +DATA 4 0x020e07a0 0x0030 +DATA 4 0x020e07a4 0x0030 +DATA 4 0x020e07a8 0x0030 +DATA 4 0x020e0748 0x0030 +DATA 4 0x020e05ac 0x0030 +DATA 4 0x020e05b4 0x0030 +DATA 4 0x020e0528 0x0030 +DATA 4 0x020e0520 0x0030 +DATA 4 0x020e0514 0x0030 +DATA 4 0x020e0510 0x0030 +DATA 4 0x020e05bc 0x0030 +DATA 4 0x020e05c4 0x0030 +DATA 4 0x021b0800 0xa1390003 +DATA 4 0x021b080c 0x001b001e +DATA 4 0x021b0810 0x002e0029 +DATA 4 0x021b480c
Re: [U-Boot] [PATCH V5 4/6] imx: mx6qp Enable PRG clock for IPU
On 11/07/2015 05:38, Peng Fan wrote: The i.MX6DQP has a PRG module, need to enable its clock for using IPU. Signed-off-by: Peng Fan peng@freescale.com Signed-off-by: Brown Oliver b37...@freescale.com Signed-off-by: Ye.Li b37...@freescale.com Reviewed-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Stefano Babic sba...@denx.de --- Changes v5: Add Stefano's Acked-by Changes v4: Take Fabio's suggestion, use setbits_le32. Add Fabio's Reviewed-by Changes v3: Remove ipu qos settings Changes v2: 1. runtime check 2. introduce ipu qos settings for better performance arch/arm/cpu/armv7/mx6/clock.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index cd4bfdd..3e94472 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -853,6 +853,11 @@ void enable_ipu_clock(void) reg = readl(mxc_ccm-CCGR3); reg |= MXC_CCM_CCGR3_IPU1_IPU_MASK; writel(reg, mxc_ccm-CCGR3); + + if (is_mx6dqp()) { + setbits_le32(mxc_ccm-CCGR6, MXC_CCM_CCGR6_PRG_CLK0_MASK); + setbits_le32(mxc_ccm-CCGR3, MXC_CCM_CCGR3_IPU2_IPU_MASK); + } } #endif /***/ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5 3/6] imx: mx6: hab : Remove the cache issue workaroud in hab for i.MX6QP
On 11/07/2015 05:38, Peng Fan wrote: From: Ye.Li b37...@freescale.com Since the i.MX6QP has fixed the issue in boot ROM, so remove the workaround for i.MX6QP. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Peng Fan peng@freescale.com Acked-by: Stefano Babic sba...@denx.de --- Changes v5: Add Stefano's Acked-by Changes v4: none Changes v3: none Changes v2: none arch/arm/cpu/armv7/mx6/hab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/mx6/hab.c b/arch/arm/cpu/armv7/mx6/hab.c index 87f422d..27cabe4 100644 --- a/arch/arm/cpu/armv7/mx6/hab.c +++ b/arch/arm/cpu/armv7/mx6/hab.c @@ -423,7 +423,8 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size) * do cache flushes. don't think any * exist, so we ignore them. */ - writel(1, MX6DQ_PU_IROM_MMU_EN_VAR); + if (!is_mx6dqp()) + writel(1, MX6DQ_PU_IROM_MMU_EN_VAR); } else if (is_cpu_type(MXC_CPU_MX6DL) || is_cpu_type(MXC_CPU_MX6SOLO)) { writel(1, MX6DLS_PU_IROM_MMU_EN_VAR); Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/12] arm: mx6: cm-fx6: make it possible to not init display
On 23/07/2015 16:19, Nikita Kiryanov wrote: Implement a cm-fx6 specific board_video_skip() to provide the option to not initialize the display. The new function does not init display if the environment variable panel is not defined, or if it is set to an unsupported value. Collateral changes: - Don't use the global displays array (it's CONFIG_IMX_VIDEO_SKIP specific). - Don't use detect_hdmi(), since env controlled init makes it unnecessary. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Signed-off-by: Igor Grinberg grinb...@compulab.co.il --- board/compulab/cm_fx6/cm_fx6.c | 72 -- include/configs/cm_fx6.h | 1 - 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index b500f91..2fb8db5 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -13,6 +13,7 @@ #include fsl_esdhc.h #include miiphy.h #include netdev.h +#include errno.h #include fdt_support.h #include sata.h #include splash.h @@ -54,31 +55,27 @@ static void cm_fx6_enable_hdmi(struct display_info_t const *dev) imx_enable_hdmi_phy(); } -struct display_info_t const displays[] = { - { - .bus= -1, - .addr = 0, - .pixfmt = IPU_PIX_FMT_RGB24, - .detect = detect_hdmi, - .enable = cm_fx6_enable_hdmi, - .mode = { - .name = HDMI, - .refresh= 60, - .xres = 1024, - .yres = 768, - .pixclock = 40385, - .left_margin= 220, - .right_margin = 40, - .upper_margin = 21, - .lower_margin = 7, - .hsync_len = 60, - .vsync_len = 10, - .sync = FB_SYNC_EXT, - .vmode = FB_VMODE_NONINTERLACED, - } - }, +static struct display_info_t preset_hdmi_1024X768 = { + .bus= -1, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .enable = cm_fx6_enable_hdmi, + .mode = { + .name = HDMI, + .refresh= 60, + .xres = 1024, + .yres = 768, + .pixclock = 40385, + .left_margin= 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED, + } }; -size_t display_count = ARRAY_SIZE(displays); static void cm_fx6_setup_display(void) { @@ -93,6 +90,33 @@ static void cm_fx6_setup_display(void) writel(reg, mxc_ccm-CCGR3); clrbits_le32(iomuxc_regs-gpr[3], MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); } + +int board_video_skip(void) +{ + int ret; + struct display_info_t *preset; + char const *panel = getenv(panel); + + if (!panel) + return -ENOENT; + + if (!strcmp(panel, HDMI)) + preset = preset_hdmi_1024X768; + else + return -EINVAL; + + ret = ipuv3_fb_init(preset-mode, 0, preset-pixfmt); + if (ret) { + printf(Can't init display %s: %d\n, preset-mode.name, ret); + return ret; + } + + preset-enable(preset); + printf(Display: %s (%ux%u)\n, preset-mode.name, preset-mode.xres, +preset-mode.yres); + + return 0; +} #else static inline void cm_fx6_setup_display(void) {} #endif /* CONFIG_VIDEO_IPUV3 */ diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 231f4ba..f23ef8b 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -258,7 +258,6 @@ #define CONFIG_VIDEO_IPUV3 #define CONFIG_IPUV3_CLK 26000 #define CONFIG_IMX_HDMI -#define CONFIG_IMX_VIDEO_SKIP #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE #define CONFIG_SYS_CONSOLE_IS_IN_ENV Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/12] arm: mx6: cm-fx6: map HDMI to IPU1 DI0 explicitly
On 23/07/2015 16:19, Nikita Kiryanov wrote: U-Boot does not explicitly assign the display to an IPU interface. Instead, it relies on the power-on default of DI0. Since the kernel reassigns HDMI display to DI1, after a warm reset the HDMI display no longer works in U-Boot. Fix this by explicitly assigning HDMI to IPU1 DI0 in U-Boot. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- board/compulab/cm_fx6/cm_fx6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 7a1bbaf..b500f91 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -83,6 +83,7 @@ size_t display_count = ARRAY_SIZE(displays); static void cm_fx6_setup_display(void) { struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; int reg; enable_ipu_clock(); @@ -90,6 +91,7 @@ static void cm_fx6_setup_display(void) reg = __raw_readl(mxc_ccm-CCGR3); reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK; writel(reg, mxc_ccm-CCGR3); + clrbits_le32(iomuxc_regs-gpr[3], MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); } #else static inline void cm_fx6_setup_display(void) {} Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 03/12] arm: mx6: cm-fx6: add support for displaytype env var
On 23/07/2015 16:19, Nikita Kiryanov wrote: Add support for selecting display preset using the environment variable displaytype. This is a preparation for future merging of compulab omap3_display.c display selection code with the cm-fx6 display selection code. The panel environment variable is retained for backwards compatibility. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- board/compulab/cm_fx6/cm_fx6.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 2fb8db5..3e518c1 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -95,7 +95,10 @@ int board_video_skip(void) { int ret; struct display_info_t *preset; - char const *panel = getenv(panel); + char const *panel = getenv(displaytype); + + if (!panel) /* Also accept panel for backward compatibility */ + panel = getenv(panel); if (!panel) return -ENOENT; Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 04/12] arm: mx6: cm-fx6: setup hdmi only on hdmi enable
On 23/07/2015 16:19, Nikita Kiryanov wrote: Refactor display code to only setup hdmi if do_enable_hdmi() is invoked. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- board/compulab/cm_fx6/cm_fx6.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 3e518c1..e85c8ab 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -52,6 +52,9 @@ int splash_screen_prepare(void) #ifdef CONFIG_IMX_HDMI static void cm_fx6_enable_hdmi(struct display_info_t const *dev) { + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + imx_setup_hdmi(); + setbits_le32(mxc_ccm-CCGR3, MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); imx_enable_hdmi_phy(); } @@ -79,15 +82,9 @@ static struct display_info_t preset_hdmi_1024X768 = { static void cm_fx6_setup_display(void) { - struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; - int reg; enable_ipu_clock(); - imx_setup_hdmi(); - reg = __raw_readl(mxc_ccm-CCGR3); - reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK; - writel(reg, mxc_ccm-CCGR3); clrbits_le32(iomuxc_regs-gpr[3], MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK); } Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/12] arm: mx6: cm-fx6: move cm-fx6 target under ARCH_MX6
On 23/07/2015 16:19, Nikita Kiryanov wrote: cm-fx6 is an MX6 based board, and the menuconfig hierarchy should reflect that. Make TARGET_CM_FX6 dependant on ARCH_MX6. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- arch/arm/Kconfig | 8 arch/arm/cpu/armv7/mx6/Kconfig | 8 configs/cm_fx6_defconfig | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 506463c..fc8c435 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -625,14 +625,6 @@ config RMOBILE bool Renesas ARM SoCs select CPU_V7 -config TARGET_CM_FX6 - bool Support cm_fx6 - select CPU_V7 - select SUPPORT_SPL - select DM - select DM_SERIAL - select DM_GPIO - config ARCH_SOCFPGA bool Altera SOCFPGA family select CPU_V7 diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 10908c4..2c18bcd 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -29,6 +29,14 @@ choice prompt MX6 board select optional +config TARGET_CM_FX6 + bool Support CM-FX6 + select CPU_V7 + select SUPPORT_SPL + select DM + select DM_SERIAL + select DM_GPIO + config TARGET_SECOMX6 bool Support secomx6 boards select CPU_V7 diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 25829db..7ad5c21 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_ARCH_MX6=y CONFIG_TARGET_CM_FX6=y CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/12] arm: mx6: kconfig: don't select CPU_V7 per board
On 23/07/2015 16:19, Nikita Kiryanov wrote: CPU_V7 is already selected by ARCH_MX6, so no point in selecting it again by boards that depend on ARCH_MX6. Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- arch/arm/cpu/armv7/mx6/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index 2c18bcd..68b46c1 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -31,7 +31,6 @@ choice config TARGET_CM_FX6 bool Support CM-FX6 - select CPU_V7 select SUPPORT_SPL select DM select DM_SERIAL @@ -39,11 +38,9 @@ config TARGET_CM_FX6 config TARGET_SECOMX6 bool Support secomx6 boards - select CPU_V7 config TARGET_TQMA6 bool TQ Systems TQMa6 board - select CPU_V7 endchoice Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] Please pull u-boot-imx
Hi Tom, please pull from u-boot-imx, thanks ! The following changes since commit 605e15db2b54302364a2528d3c6604fbc57be846: Merge git://git.denx.de/u-boot-x86 (2015-07-15 10:41:20 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to f85764cc1f6ab01ffc60dd78de9c4de4cff2b5ce: arm: mx6: tqma6: fix build for WRU-IV baseboard (2015-08-02 11:12:41 +0200) Adrian Alonso (1): imx: imximage: add new CHECK/CLR BIT command Albert ARIBAUD \(3ADEV\) (3): net: fec_mxc: remove useless struct nbuf i2c: fix vf610 support tools: mkimage: fix imximage header size Fabio Estevam (5): thermal: Fix comments power: pmic: Add support for MAX77696 PMIC warp: Add MAX77696 support mx6sabresd: Use 'int' for return values mx6sxsabresd: Use 'int' for return values Guillaume GARDET (1): mx53loco: Use generic 'load' command instead of 'fatload' Nikita Kiryanov (11): arm: mx6: cm-fx6: map HDMI to IPU1 DI0 explicitly arm: mx6: cm-fx6: make it possible to not init display arm: mx6: cm-fx6: add support for displaytype env var arm: mx6: cm-fx6: setup hdmi only on hdmi enable arm: mx6: cm-fx6: move CMD configs to defconfig arm: mx6: cm-fx6: move cm-fx6 target under ARCH_MX6 arm: mx6: kconfig: don't select CPU_V7 per board arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig option usb: kconfig: usb keyboard kconfig usb: kconfig: create a menu for usb sf: kconfig: add kconfig options for spi flashes Otavio Salvador (13): cgtqmx6eval: Use default prompt cgtqmx6eval: Use the default CONFIG_SYS_PBSIZE cgtqmx6eval: Staticize when possible cgtqmx6eval: Improve the error handling cgtqmx6eval: Fit into single lines cgtqmx6eval: Add ESDHC3 support cgtqmx6eval: Add thermal support cgtqmx6eval: Add PMIC support cgtqmx6eval: Add USB support cgtqmx6eval: Add splash screen support cgtqmx6eval: Add SATA support cgtqmx6eval: Align DCD settings with Congatec's U-boot cgtqmx6eval: Use standard boot script Peng Fan (23): imx: mx6 remove duplicated enable_cspi_clock imx: mx6 add i2c4 clock support for i.MX6SX mmc:fsl_esdhc invalidate dcache before read imx: add cpu type for i.MX6QP/DP imx: mx6: ccm: Change the clock settings for i.MX6QP imx: mx6qp Enable PRG clock for IPU imx: mx6sabresd/sabreauto runtime setting fdt_file imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support imx: mx6ul: Add i.MX6UL CPU type imx: mx6ul: Add pins IOMUX head file imx: mx6ul: Update imx registers head file imx: mx6ul Add CONFIG_SYS_CACHELINE_SIZE for i.MX6UL imx-common: timer: add i.MX6UL support imx: mx6ul remove errata for i.MX6UL imx:mx6ul add clock support imx: mx6ul select SYS_L2CACHE_OFF imx: mx6ul update soc related settings imx: mx6 add PAD_CTL_SPEED_LOW for i.MX6SX/UL mxc: gpio add i.MX6UL support mx6_common: Fix LOADADDR and SYS_TEXT_BASE for i.MX6UL imx:mx6ul add dram spl configuration and header file imx: imx6_spl add mx6ul support imx: mx6ul_14x14_evk add basic board support Peter Robinson (1): imx6: standardise OCOTP and fuse config to mx6_common Stefan Roese (1): arm: mx6: tqma6: Add WRU-IV baseboard for the TQMa6 SoM Stefano Babic (3): Merge branch 'master' of git://git.denx.de/u-boot Merge branch 'master' of git://git.denx.de/u-boot arm: mx6: tqma6: fix build for WRU-IV baseboard Tim Harvey (2): thermal:imx_thermal: enter busywait cooling loop when over max CPU temp thermal: imx_thermal: fix busywait if IMX6 temp 0C Ulises Cardenas (1): iMX: adding parsing to hab_status command Ye.Li (1): imx: mx6: hab : Remove the cache issue workaroud in hab for i.MX6QP arch/arm/Kconfig | 16 +- arch/arm/cpu/armv7/mx6/Kconfig| 13 +- arch/arm/cpu/armv7/mx6/clock.c| 211 ++--- arch/arm/cpu/armv7/mx6/ddr.c | 61 - arch/arm/cpu/armv7/mx6/hab.c | 176 +- arch/arm/cpu/armv7/mx6/soc.c | 25 +- arch/arm/imx-common/cpu.c |6 + arch/arm/imx-common/timer.c |8 +- arch/arm/include/asm/arch-imx/cpu.h |5 +- arch/arm/include/asm/arch-mx6/clock.h |1 - arch/arm/include/asm/arch-mx6/crm_regs.h | 139 ++- arch/arm/include/asm/arch-mx6/hab.h | 85 ++- arch/arm/include/asm/arch-mx6/imx-regs.h | 64 -- arch/arm/include/asm/arch-mx6/mx6-ddr.h | 45 arch/arm/include/asm/arch-mx6/mx6-pins.h |2 +
Re: [U-Boot] [PATCH 08/12] arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig option
On 23/07/2015 16:19, Nikita Kiryanov wrote: Add USB_EHCI_MX6 option to menuconfig and use it when migrating cm-fx6 usb config to defconfig. Cc: Masahiro Yamada yamada.masah...@socionext.com Cc: Marek Vasut ma...@denx.de Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- configs/cm_fx6_defconfig | 4 drivers/usb/host/Kconfig | 7 +++ include/configs/cm_fx6.h | 3 --- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 7ad5c21..07a84bb 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -15,4 +15,8 @@ CONFIG_CMD_PING=y CONFIG_SPI_FLASH=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y +CONFIG_USB=y CONFIG_CMD_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MX6=y +CONFIG_USB_STORAGE=y diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8705c7c..b30b43d 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -52,6 +52,13 @@ config USB_EHCI if USB_EHCI_HCD +config USB_EHCI_MX6 + bool Support for i.MX6 on-chip EHCI USB controller + depends on ARCH_MX6 + default y + ---help--- + Enables support for the on-chip EHCI controller on i.MX6 SoCs. + config USB_EHCI_UNIPHIER bool Support for UniPhier on-chip EHCI USB controller depends on ARCH_UNIPHIER OF_CONTROL diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 9b00c0d..9f69322 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -198,9 +198,6 @@ #define CONFIG_NET_RETRY_COUNT 5 /* USB */ -#define CONFIG_USB_EHCI -#define CONFIG_USB_EHCI_MX6 -#define CONFIG_USB_STORAGE #define CONFIG_MXC_USB_PORTSC(PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/12] arm: mx6: cm-fx6: move CMD configs to defconfig
On 23/07/2015 16:19, Nikita Kiryanov wrote: Move CONFIG_CMD_* options that can be selected in menuconfig to cm-fx6 defconfig. Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- configs/cm_fx6_defconfig | 5 + include/configs/cm_fx6.h | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 6be5c17..25829db 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -9,4 +9,9 @@ CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_PING=y CONFIG_SPI_FLASH=y +CONFIG_CMD_SF=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index f23ef8b..9b00c0d 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -50,7 +50,6 @@ sizeof(CONFIG_SYS_PROMPT) + 16) /* SPI flash */ -#define CONFIG_CMD_SF #define CONFIG_SF_DEFAULT_BUS0 #define CONFIG_SF_DEFAULT_CS 0 #define CONFIG_SF_DEFAULT_SPEED 2500 @@ -199,7 +198,6 @@ #define CONFIG_NET_RETRY_COUNT 5 /* USB */ -#define CONFIG_CMD_USB #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_MX6 #define CONFIG_USB_STORAGE @@ -212,7 +210,6 @@ #define CONFIG_SYS_STDIO_DEREGISTER /* I2C */ -#define CONFIG_CMD_I2C #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 11/12] sf: kconfig: add kconfig options for spi flashes
On 23/07/2015 16:19, Nikita Kiryanov wrote: Add kconfig options for various SPI flashes and use them in cm-fx6 defconfig. Cc: Jagan Teki jt...@openedev.com Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- configs/cm_fx6_defconfig | 8 drivers/mtd/spi/Kconfig | 44 include/configs/cm_fx6.h | 8 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index f0fd48c..2aba359 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -13,6 +13,14 @@ CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_SPI_FLASH_EON=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y +CONFIG_SPI_FLASH_WINBOND=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y CONFIG_USB=y diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 4f0c040..8b730ff 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -42,6 +42,50 @@ config SPI_FLASH_BAR Bank/Extended address registers are used to access the flash which has size 16MiB in 3-byte addressing. +if SPI_FLASH + +config SPI_FLASH_ATMEL + bool Atmel SPI flash support + help + Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx) + +config SPI_FLASH_EON + bool EON SPI flash support + help + Add support for various EON SPI flash chips (EN25xxx) + +config SPI_FLASH_GIGADEVICE + bool GigaDevice SPI flash support + help + Add support for various GigaDevice SPI flash chips (GD25xxx) + +config SPI_FLASH_MACRONIX + bool Macronix SPI flash support + help + Add support for various Macronix SPI flash chips (MX25Lxxx) + +config SPI_FLASH_SPANSION + bool Spansion SPI flash support + help + Add support for various Spansion SPI flash chips (S25FLxxx) + +config SPI_FLASH_STMICRO + bool STMicro SPI flash support + help + Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx) + +config SPI_FLASH_SST + bool SST SPI flash support + help + Add support for various SST SPI flash chips (SST25xxx) + +config SPI_FLASH_WINBOND + bool Winbond SPI flash support + help + Add support for various Winbond SPI flash chips (W25xxx) + +endif + config SPI_FLASH_DATAFLASH bool AT45xxx DataFlash support depends on SPI_FLASH DM_SPI_FLASH diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 059004c..bbd9f38 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -162,14 +162,6 @@ /* SPI */ #define CONFIG_SPI #define CONFIG_MXC_SPI -#define CONFIG_SPI_FLASH_ATMEL -#define CONFIG_SPI_FLASH_EON -#define CONFIG_SPI_FLASH_GIGADEVICE -#define CONFIG_SPI_FLASH_MACRONIX -#define CONFIG_SPI_FLASH_SPANSION -#define CONFIG_SPI_FLASH_STMICRO -#define CONFIG_SPI_FLASH_SST -#define CONFIG_SPI_FLASH_WINBOND /* NAND */ #ifndef CONFIG_SPL_BUILD Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/12] usb: kconfig: usb keyboard kconfig
On 23/07/2015 16:19, Nikita Kiryanov wrote: Add Kconfig options for USB keyboard and use them for cm-fx6. Cc: Marek Vasut ma...@denx.de Cc: Stefano Babic sba...@denx.de Cc: Igor Grinberg grinb...@compulab.co.il Signed-off-by: Nikita Kiryanov nik...@compulab.co.il --- configs/cm_fx6_defconfig | 2 ++ drivers/usb/Kconfig | 27 +++ include/configs/cm_fx6.h | 2 -- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 07a84bb..f0fd48c 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -20,3 +20,5 @@ CONFIG_CMD_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_MX6=y CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 637ef3d..04289f2 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -59,4 +59,31 @@ config USB_STORAGE Say Y here if you want to connect USB mass storage devices to your board's USB port. +config USB_KEYBOARD + bool USB Keyboard support + ---help--- + Say Y here if you want to use a USB keyboard for U-Boot command line + input. + +if USB_KEYBOARD + +choice + prompt USB keyboard polling + optional + ---help--- + Enable a polling mechanism for USB keyboard. + + config SYS_USB_EVENT_POLL + bool Interrupt polling + + config SYS_USB_EVENT_POLL_VIA_INT_QUEUE + bool Poll via interrupt queue + + config SYS_USB_EVENT_POLL_VIA_CONTROL_EP + bool Poll via control EP + +endchoice + +endif + endif diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 9f69322..059004c 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -202,8 +202,6 @@ #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ -#define CONFIG_USB_KEYBOARD -#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP #define CONFIG_SYS_STDIO_DEREGISTER /* I2C */ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/15] led: unify obj-$(CONFIG_LED) and obj-$(CONFIG_SPL_LED) entries
On 01/08/2015 15:14, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- Reviewed-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/15] spl: move SPL driver entries to driver/Makefile
On 01/08/2015 15:14, Masahiro Yamada wrote: Just preparing for upcoming cleaning. The board-specific linker script board/vpac270/u-boot-spl.lds has been touched to avoid build error. It does not change the size of spl/u-boot-spl.bin for this board, so it should be OK. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- Reviewed-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/15] clk: rename CONFIG_SPL_CLK_SUPPORT to CONFIG_SPL_CLK
On 01/08/2015 15:14, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- Reviewed-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] Makefile: Add SOURCE_DATE_TZ
On 01/08/15 20:47, Paul Kocialkowski wrote: Le samedi 01 août 2015 à 22:32 +1200, Chris Packham a écrit : Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a build with a specific date timestamp. This allows the verification of source supplied with a pre-compiled binary. If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify what will appear in the output of the version command. If SOURCE_DATE_TZ is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not have an affect. Well, I worked with the assumption that SOURCE_DATE_EPOCH would always be provided in UTC, but I see no harm in providing SOURCE_DATE_TZ as well, provided that it falls back to UTC when not set, as is the current behaviour of tour patch. To clarify, SOURCE_DATE_EPOCH is a unix timestamp which is defined as the number of seconds (excluding leap seconds) since Jan 1 1970 UTC. There is no way to specify this in another timezone; there is no ambiguity here. However, I am not sure that us at Reproducible Builds will actually adopt this variable. We haven't talked about it beyond my previous email [1], it was just me quickly skimming off my thoughts and firing off quick ideas. My personal concern about SOURCE_DATE_TZ is that it implies that it could take actual named time zones, like EST or Europe/London; it is **extremely unlikely** that we will do anything like this soon, because this would involve timezone databases and complex things like that. This is why in my previous email I suggested the SOURCE_DATE_TZOFFSET variable. Also, the TZ variable as specified by POSIX specifies the offset in the *opposite* direction to what ISO8601 and RFC2822 displays. The git internal timestamp format only supports timezone offsets in the common direction, opposite to TZ, i.e. positive for east of Greenwich and negative for west. I'd suggest to leave out SOURCE_DATE_TZ for now, until we come up with a more precisely defined *meaning* for this variable. It is meant to be a standard across all tools, so some time to think through the issues is necessary. Otherwise we risk leaving a clusterfuck of a legacy, like the POSIX time functions. X [1] https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20150727/002562.html or http://lists.denx.de/pipermail/u-boot/2015-July/221301.html -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] Makefile: Add SOURCE_DATE_TZ
On 02/08/15 00:02, Ximin Luo wrote: However, I am not sure that us at Reproducible Builds will actually adopt this variable. We haven't talked about it beyond my previous email [1], it was just me quickly skimming off my thoughts and firing off quick ideas. Whoops, I mean the _TZ variable. The _EPOCH variable has been decided and we're trying to get tools to support this. -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 10/47] Reserve the top 16 flag bits for architecture-specific use
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: Add a convention that the generic global_data only occupy the bottom 16 bits of the flags word, so that there is less chance of a conflict. At present the x86 flags conflict. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Add new patch to reserve the top 16 flag bits for architecture-specific use include/asm-generic/global_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index cb2ec08..2155265 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -104,7 +104,7 @@ typedef struct global_data { #endif /* - * Global Data Flags + * Global Data Flags - the top 16 bits are reserved for arch-specific flags */ #define GD_FLG_RELOC 0x1 /* Code was relocated to RAM */ #define GD_FLG_DEVINIT 0x2 /* Devices have been initialized */ -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 02/47] dm: core: Check for empty list in uclass_find_device()
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: This function needs to check the list has entries before traversing it. Fix this bug. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Correct the return code to avoid a test failure drivers/core/uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index aba9880..ffe6995 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -153,6 +153,8 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp) ret = uclass_get(id, uc); if (ret) return ret; + if (list_empty(uc-dev_head)) + return -ENODEV; list_for_each_entry(dev, uc-dev_head, uclass_node) { if (!index--) { -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 05/47] Add a way to skip relocation
Hi Simon, On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: When running U-Boot as an EFI application we cannot relocate since we do not have relocation information. U-Boot has already been relocated to a suitable address. Add a global_data flag to control skipping relocation. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: None common/board_f.c | 7 +++ include/asm-generic/global_data.h | 1 + 2 files changed, 8 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 21be26f..5e09c5f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -664,6 +664,11 @@ static int reloc_fdt(void) static int setup_reloc(void) { + if (gd-flags GD_FLG_SKIP_RELOC) { + debug(Skipping relocation due to flag\n); + return 0; + } + #ifdef CONFIG_SYS_TEXT_BASE gd-reloc_off = gd-relocaddr - CONFIG_SYS_TEXT_BASE; #ifdef CONFIG_M68K @@ -689,6 +694,8 @@ static int setup_reloc(void) static int jump_to_copy(void) { + if (gd-flags GD_FLG_SKIP_RELOC) + return 0; /* * x86 is special, but in a nice way. It uses a trampoline which * enables the dcache if possible. diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 7ef3e25..cb2ec08 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -117,5 +117,6 @@ typedef struct global_data { #define GD_FLG_SERIAL_READY0x00100 /* Pre-reloc serial console ready */ #define GD_FLG_FULL_MALLOC_INIT0x00200 /* Full malloc() is ready */ #define GD_FLG_SPL_INIT0x00400 /* spl_init() has been called */ +#define GD_FLG_SKIP_RELOC 0x00800 /* Don't relocate */ #endif /* __ASM_GENERIC_GBL_DATA_H */ -- Looks like you missed reloc_fdt() [1] in the v2. [1]: http://lists.denx.de/pipermail/u-boot/2015-July/221374.html Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 15/47] x86: Tidy up a few minor issues with interrupts
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: Fix a typo, remove an unused field and make sure to use existing #define constants instead of open-coded values. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: None arch/x86/cpu/interrupts.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 853c82f..3a9c2d4 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -19,6 +19,7 @@ #include asm/processor-flags.h #include linux/compiler.h #include asm/msr.h +#include asm/processor.h #include asm/u-boot-x86.h #include asm/i8259.h @@ -46,7 +47,7 @@ static char *exceptions[] = { Invalid TSS, Segment Not Present, Stack Segment Fault, - Gerneral Protection, + General Protection, Page Fault, Reserved, x87 FPU Floating-Point Error, @@ -165,7 +166,6 @@ struct idt_entry { struct desc_ptr { unsigned short size; unsigned long address; - unsigned short segment; } __packed; struct idt_entry idt[256] __aligned(16); @@ -202,14 +202,13 @@ int cpu_init_interrupts(void) for (i = 0; i 256; i++) { idt[i].access = 0x8e; idt[i].res = 0; - idt[i].selector = 0x10; + idt[i].selector = X86_GDT_ENTRY_32BIT_CS * X86_GDT_ENTRY_SIZE; set_vector(i, irq_entry); irq_entry += irq_entry_size; } - idt_ptr.size = 256 * 8; + idt_ptr.size = 256 * 8 - 1; idt_ptr.address = (unsigned long) idt; - idt_ptr.segment = 0x18; load_idt(idt_ptr); -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 18/47] x86: Allow use of global_data with EFI
Hi Simon, On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: On x86 the global_data pointer is provided through a somewhat-bizarre and x86-specific mechanism: the F segment register is set to a pointer to the start of global_data, so that accesses can use this build-in register. When running as an EFI payload we don't want to mess with the Global Nits: running as an EFI application Descriptor Table (GDT) and there is little advantage (in terms of code size) to doing so. Allow global_data to be a simple variable in this case. Signed-off-by: Simon Glass s...@chromium.org --- Reviewed-by: Bin Meng bmeng...@gmail.com Changes in v2: - Move this patch to before the EFI start-up code patch - Refer to FS as F segment register instead of frame segment register - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP arch/x86/include/asm/global_data.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 3db9a4c..80ebe3e 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -76,6 +76,12 @@ struct arch_global_data { #include asm-generic/global_data.h #ifndef __ASSEMBLY__ +# ifdef CONFIG_EFI_APP + +#define gd global_data_ptr + +#define DECLARE_GLOBAL_DATA_PTR extern struct global_data *global_data_ptr +# else static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void) { gd_t *gd_ptr; @@ -88,6 +94,7 @@ static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void) #define gd get_fs_gd_ptr() #define DECLARE_GLOBAL_DATA_PTR +# endif #endif -- Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/4] sunxi: nand: Basic NAND driver for SPL
Hi, On 01-08-15 21:22, Scott Wood wrote: On Sat, 2015-08-01 at 14:30 +0200, Boris Brezillon wrote: Hi Hans, On Sat, 1 Aug 2015 14:15:53 +0200 Hans de Goede hdego...@redhat.com wrote: Hi, On 23-07-15 14:33, Piotr Zierhoffer wrote: This is a basic driver for the sunxi NAND controller for Allwinner A20. It supports only SPL. The driver uses DMA for data transfers. It does not support writing. Thanks for your work on this. I've merged patches 1 - 3 in my sunxi-wip branch, and I'll include them in the next u-boot-sunxi pull-req. Shouldn't we at least wait for Scoot's approval? Or Scott's. :-) ACK Thanks. though I'd encourage quickly implementing multiple spl payload locations to work around the breakage of the bad block marker mechanism, as was discussed. I agree 100%, I've added note to my sunxi todo list for this. Note I only have this on my todo list as a reminder, since a few other people are actively working on sunxi nand support I hope that someone else will tackle this. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 12/12] kconfig: add config option for shell prompt
On Sun, Aug 02, 2015 at 10:53:04AM +0200, Stefano Babic wrote: Hi Tom, this patch is across architectures - currently it is assigned to me. Do you prefer I apply it as last of the series to u-boot-imx before my PR or you want to apply it directly to mainline ? It looks like we can just do this as a stand-alone a bit later on (since it needs a v3) if you want ot grab 1-11 now. -- 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 07/47] Bring in __aligned_u64 and friends to linux/types.h
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: These will be used for efi.h both for U-Boot running as an EFI application and as a payload. They come from Linux 4.1. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Fix _aligned() typo include/linux/types.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/types.h b/include/linux/types.h index c9a8d9a..6f75be4 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -113,6 +113,11 @@ typedef__s64 int64_t; #endif /* __KERNEL_STRICT_NAMES */ +/* this is a special 64bit data type that is 8-byte aligned */ +#define aligned_u64 __u64 __aligned(8) +#define aligned_be64 __be64 __aligned(8) +#define aligned_le64 __le64 __aligned(8) + #if defined(CONFIG_USE_STDINT) defined(__INT64_TYPE__) typedef__UINT64_TYPE__ uint64_t; typedef__UINT64_TYPE__ u_int64_t; @@ -145,7 +150,6 @@ typedef __u64 __bitwise __be64; typedef __u16 __bitwise __sum16; typedef __u32 __bitwise __wsum; - typedef unsigned __bitwise__ gfp_t; struct ustat { -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 17/47] pci: Fix up code for CONFIG_PCI_ENUM_ONLY
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: This option is not used by any board but appears to still be useful, at least for testing. With recent commits it does not build, so fix it. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: None drivers/pci/pci_auto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 7ff282b..51d2ac0 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -82,9 +82,9 @@ void pciauto_setup_device(struct pci_controller *hose, pci_size_t bar_size; u16 cmdstat = 0; int bar, bar_nr = 0; +#ifndef CONFIG_PCI_ENUM_ONLY u8 header_type; int rom_addr; -#ifndef CONFIG_PCI_ENUM_ONLY pci_addr_t bar_value; struct pci_region *bar_res; int found_mem64 = 0; @@ -181,6 +181,7 @@ void pciauto_setup_device(struct pci_controller *hose, bar_nr++; } +#ifndef CONFIG_PCI_ENUM_ONLY /* Configure the expansion ROM address */ pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE, header_type); if (header_type != PCI_HEADER_TYPE_CARDBUS) { @@ -201,6 +202,7 @@ void pciauto_setup_device(struct pci_controller *hose, debug(\n); } } +#endif pci_hose_write_config_word(hose, dev, PCI_COMMAND, cmdstat); pci_hose_write_config_byte(hose, dev, PCI_CACHE_LINE_SIZE, -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 19/47] efi: Add start-up library code
Hi Simon, On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: When running as an EFI application, U-Boot must request memory from EFI, and provide access to the boot services U-Boot needs. Add library code to perform these tasks. This includes efi_main() which is the entry point from EFI. U-Boot is built as a shared library. Signed-off-by: Simon Glass s...@chromium.org --- Reviewed-by: Bin Meng bmeng...@gmail.com But please see nits below. Changes in v2: - Add a comment as to why we only allocate pages below 4GB - Add a comment as to why we use global_data_ptr - Add comments as to why we need efi_memset(), efi_putc(), efi_puts() - Avoid useless u64 cast on EFI_RUNTIME_SERVICES_SIGNATURE - Drop __packed from struct efi_device_path - Explain in a comment how the debug UART is implemented for the EFI app - Fix 'command problem' typo - it should say 'command prompt' - Fix 'withU-Boot.' typo - Fix a few comment typos - Fix efi_mem_desc_VERSION typo - Fix mention of CHAR16 which should be wchar_t - Fix missing struct comments - Move the 64-bit payload code to a later patch - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP - Reword the efi_putc() unicode comment to make more sense - Use image_base instead of ImageBase - Use one-line comments when appropriate - Use reserved instead of __reserved in struct efi_boot_services arch/x86/include/asm/fsp/fsp_hob.h | 59 +- include/efi.h | 357 + include/efi_api.h | 244 + include/part_efi.h | 9 +- lib/Kconfig| 2 + lib/Makefile | 1 + lib/efi/Kconfig| 33 lib/efi/Makefile | 7 + lib/efi/efi.c | 101 +++ lib/efi/efi_app.c | 139 +++ 10 files changed, 888 insertions(+), 64 deletions(-) create mode 100644 include/efi.h create mode 100644 include/efi_api.h create mode 100644 lib/efi/Kconfig create mode 100644 lib/efi/Makefile create mode 100644 lib/efi/efi.c create mode 100644 lib/efi/efi_app.c [snip] +/** + * struct efi_entry_hdr - Header for a table entry + * + * @type: enum eft_entry_t + * @size size of entry bytes excluding header and padding + * @addr: address of this entry (0 if it follows the header ) + * @link: size of entry including header and padding + * @spare1:Spare space for expansion + * @spare2:Spare space for expansion + * @ Nits: please remove this @ + */ +struct efi_entry_hdr { + u32 type; + u32 size; + u64 addr; + u32 link; + u32 spare1; + u64 spare2; +}; [snip] diff --git a/lib/efi/efi.c b/lib/efi/efi.c new file mode 100644 index 000..c6454ea --- /dev/null +++ b/lib/efi/efi.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2015 Google, Inc + * + * SPDX-License-Identifier:GPL-2.0+ + * + * EFI information obtained here: + * http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES + * + * Common EFI functions + */ + +#include common.h +#include debug_uart.h +#include errno.h +#include linux/err.h +#include linux/types.h +#include efi.h +#include efi_api.h + +DECLARE_GLOBAL_DATA_PTR; + +/* + * Unfortunately we cannot access any code outside what be build especially Nits: what is built? + * for the stub. lib/string.c is already being built for the U-Boot payload + * so it using the wrong compiler flags. Add our own memset() here. Nits: using - uses? + */ +static void efi_memset(void *ptr, int ch, int size) +{ + char *dest = ptr; + + while (size-- 0) + *dest++ = ch; +} [snip] Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/13][v4] imx: iomux-v3: add imx7d support for iomuxc
Hi Adrian, On 31/07/2015 00:35, Adrian Alonso wrote: * Add imx7d support for iomux controller * imx7d has two iomux controllers iomuxc (0x3033000) and iomuxc-lpsr (0x302C) each conroller provides control and mux mode pad registers but shares iomuxc input select register with iomuxc-lpsr IOMUX_CONFIG_LPSR flag is used to properly set daisy chain settings for iomuxc-lpsr pads. * Since mx7d introduces LPSR IOMUX pins, add new base to IOMUX v3 driver for these LPSR pins. I have a main question. For i.MX6, we could factorize (mainly thanks Tim's work) the major SOC variants, getting some important goals, as having a single u-boot image running on different variations of the same board. This was reached deciding at run time which is the pin, its register and the value to be written - instead of fixing at build time. Exceptions are the SOC that cannot be substitute by another one on the same board, because they are not pin compatible: for example, MXSX. Now you are introducing the new architecture for MX7, but it looks like you get rid of these improvements. It can be right or false, then my questions: - has MX7 quite the same variations as MX6 ? I mean a qaud, dual and solo that are pin-to-pin compatible ? - if this is true, why do you not use the same way as for imx6 ? See MX6_PAD_DECL macros. Best regards, Stefano Babic Signed-off-by: Adrian Alonso aalo...@freescale.com Signed-off-by: Fugang Duan b38...@freescale.com Signed-off-by: Ye.Li b37...@freescale.com --- Changes for V2: - Update commit log information Changes for V3: Resend Changes for V4: - Fix Copyright year information arch/arm/imx-common/iomux-v3.c | 18 + arch/arm/include/asm/arch-mx7/mx7-pins.h | 19 + arch/arm/include/asm/arch-mx7/mx7d_pins.h | 1308 arch/arm/include/asm/imx-common/iomux-v3.h | 32 + 4 files changed, 1377 insertions(+) create mode 100644 arch/arm/include/asm/arch-mx7/mx7-pins.h create mode 100644 arch/arm/include/asm/arch-mx7/mx7d_pins.h diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c index 7fb23dd..b4f481f 100644 --- a/arch/arm/imx-common/iomux-v3.c +++ b/arch/arm/imx-common/iomux-v3.c @@ -41,6 +41,18 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad) } #endif +#ifdef CONFIG_IOMUX_LPSR + u32 lpsr = (pad MUX_MODE_LPSR) MUX_MODE_SHIFT; + + if (lpsr == IOMUX_CONFIG_LPSR) { + base = (void *)IOMUXC_LPSR_BASE_ADDR; + mux_mode = ~IOMUX_CONFIG_LPSR; + /* set daisy chain sel_input */ + if (sel_input_ofs) + sel_input_ofs += IOMUX_LPSR_SEL_INPUT_OFS; + } +#endif + if (mux_ctrl_ofs) __raw_writel(mux_mode, base + mux_ctrl_ofs); @@ -55,6 +67,12 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad) if (!(pad_ctrl NO_PAD_CTRL) pad_ctrl_ofs) __raw_writel(pad_ctrl, base + pad_ctrl_ofs); #endif + +#ifdef CONFIG_IOMUX_LPSR + if (lpsr == IOMUX_CONFIG_LPSR) + base = (void *)IOMUXC_BASE_ADDR; +#endif + } /* configures a list of pads within declared with IOMUX_PADS macro */ diff --git a/arch/arm/include/asm/arch-mx7/mx7-pins.h b/arch/arm/include/asm/arch-mx7/mx7-pins.h new file mode 100644 index 000..164c2be --- /dev/null +++ b/arch/arm/include/asm/arch-mx7/mx7-pins.h @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +#ifndef __ASM_ARCH_MX7_PINS_H__ +#define __ASM_ARCH_MX7_PINS_H__ + +#include asm/imx-common/iomux-v3.h + +#if defined(CONFIG_MX7D) +#include mx7d_pins.h +#elif defined(CONFIG_MX7S) +#include mx7s_pins.h +#else +#error Please select cpu +#endif /* CONFIG_MX7D */ + +#endif /*__ASM_ARCH_MX7_PINS_H__ */ diff --git a/arch/arm/include/asm/arch-mx7/mx7d_pins.h b/arch/arm/include/asm/arch-mx7/mx7d_pins.h new file mode 100644 index 000..d8b4097 --- /dev/null +++ b/arch/arm/include/asm/arch-mx7/mx7d_pins.h @@ -0,0 +1,1308 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_ARCH_IMX7D_PINS_H__ +#define __ASM_ARCH_IMX7D_PINS_H__ + +#include asm/imx-common/iomux-v3.h + +enum { + MX7D_PAD_GPIO1_IO00__GPIO1_IO0 = IOMUX_PAD(0x0030, 0x, IOMUX_CONFIG_LPSR | 0, 0x, 0, 0), + MX7D_PAD_GPIO1_IO00__PWM4_OUT= IOMUX_PAD(0x0030, 0x, IOMUX_CONFIG_LPSR | 1, 0x, 0, 0), + MX7D_PAD_GPIO1_IO00__WDOG1_WDOG_B= IOMUX_PAD(0x0030, 0x, IOMUX_CONFIG_LPSR | 3, 0x, 0, 0), + + MX7D_PAD_GPIO1_IO01__GPIO1_IO1 = IOMUX_PAD(0x0034, 0x0004, IOMUX_CONFIG_LPSR | 0, 0x, 0, 0), + MX7D_PAD_GPIO1_IO01__PWM1_OUT= IOMUX_PAD(0x0034, 0x0004, IOMUX_CONFIG_LPSR | 1,
Re: [U-Boot] [PATCH v2 11/47] x86: Tidy up global_data flags
Hi Simon, On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: These flags now overlap some global ones. Adjust the x86-specific flags to avoid this. Since this requires a change to the start.S code, add a way for tools to find the 32-bit cold reset entry point. Previously this was at a fixed offset. Signed-off-by: Simon Glass s...@chromium.org --- Reviewed-by: Bin Meng bmeng...@gmail.com But please see nits below. Changes in v2: - Add a marker for the cold reset entry point - Use the now-defined top 16-bits of the global_data flags arch/x86/cpu/start.S | 8 ++-- arch/x86/include/asm/global_data.h | 8 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 7ef8b88..9b2584d 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -41,14 +41,18 @@ _x86boot_start: wbinvd /* Tell 32-bit code it is being entered from an in-RAM copy */ - movw$GD_FLG_WARM_BOOT, %bx + movl$GD_FLG_WARM_BOOT, %ebx jmp 1f + + /* Add a way for tools to discover the _start entry point */ + .align 4 + .long 0x12345678 _start: /* * This is the 32-bit cold-reset entry point, coming from start16. * Set %bx to 0 to indicate this. Nits: the comment is not correct. (%bx - %ebx, 0 - GD_FLG_COLD_BOOT) */ - movw$GD_FLG_COLD_BOOT, %bx + movl$GD_FLG_COLD_BOOT, %ebx 1: /* Save BIST */ movl%eax, %ebp diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 4d9eac6..3db9a4c 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -87,14 +87,14 @@ static inline __attribute__((no_instrument_function)) gd_t *get_fs_gd_ptr(void) #define gd get_fs_gd_ptr() +#define DECLARE_GLOBAL_DATA_PTR + #endif /* * Our private Global Data Flags */ -#define GD_FLG_COLD_BOOT 0x00100 /* Cold Boot */ -#define GD_FLG_WARM_BOOT 0x00200 /* Warm Boot */ - -#define DECLARE_GLOBAL_DATA_PTR +#define GD_FLG_COLD_BOOT 0x1 /* Cold Boot */ +#define GD_FLG_WARM_BOOT 0x2 /* Warm Boot */ #endif /* __ASM_GBL_DATA_H */ -- Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 18/48] efi: Add start-up library code
Hi Simon, On Fri, Jul 31, 2015 at 11:45 PM, Simon Glass s...@chromium.org wrote: Hi Bin, On 23 July 2015 at 02:09, Bin Meng bmeng...@gmail.com wrote: Hi Simon, On Wed, Jul 22, 2015 at 11:49 PM, Simon Glass s...@chromium.org wrote: When running as an EFI application, U-Boot must request memory from EFI, and provide access to the boot services U-Boot needs. Add library code to perform these tasks. This includes efi_main() which is the entry point from EFI. U-Boot is built as a shared library. Signed-off-by: Simon Glass s...@chromium.org --- [snip] +struct efi_device_path; + +#define EFI_SUCCESS0 +#define EFI_LOAD_ERROR (1 | (1UL (BITS_PER_LONG - 1))) +#define EFI_INVALID_PARAMETER (2 | (1UL (BITS_PER_LONG - 1))) +#define EFI_UNSUPPORTED(3 | (1UL (BITS_PER_LONG - 1))) +#define EFI_BAD_BUFFER_SIZE(4 | (1UL (BITS_PER_LONG - 1))) +#define EFI_BUFFER_TOO_SMALL (5 | (1UL (BITS_PER_LONG - 1))) +#define EFI_NOT_READY (6 | (1UL (BITS_PER_LONG - 1))) +#define EFI_DEVICE_ERROR (7 | (1UL (BITS_PER_LONG - 1))) +#define EFI_WRITE_PROTECTED(8 | (1UL (BITS_PER_LONG - 1))) +#define EFI_OUT_OF_RESOURCES (9 | (1UL (BITS_PER_LONG - 1))) +#define EFI_NOT_FOUND (14 | (1UL (BITS_PER_LONG - 1))) +#define EFI_SECURITY_VIOLATION (26 | (1UL (BITS_PER_LONG - 1))) + Can we also remove those duplicated defines in arch/x86/include/asm/fsp/fsp_types.h so that FSP codes can use the one in efi.h? But these have an FSP prefix, right? If you are sure about this, I'll do it as a separate clean-up patch. According to FSP spec, FSP is using EFI status codes, so they are compatible. We can do it as a separate clean-up patch later. [snip] Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] sunxi: Do not add a stdout-path alias to dts on boards without a serial port
On Sat, 2015-08-01 at 14:50 +0200, Hans de Goede wrote: Do not add a bogus (pointing to a non existing serial port) stdout-path alias to dts on boards without a serial port. Signed-off-by: Hans de Goede hdego...@redhat.com --- include/configs/sunxi-common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi -common.h index 71b2368..a2cbcf5 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -262,6 +262,7 @@ extern int soft_i2c_gpio_scl; #define CONFIG_CONS_INDEX 1 /* UART0 */ #endif Should this defaulting of CONFIG_CONS_INDEX not be gated as well (or even instead)? Perhaps incorporate an ifndef CONFIG_CONS_INDEX into the chain of #elseif below (making the #error only hit for defined-but -unknown values) to achieve what this patch wants to do? +#ifdef CONFIG_REQUIRE_SERIAL_CONSOLE #if CONFIG_CONS_INDEX == 1 #ifdef CONFIG_MACH_SUN9I #define OF_STDOUT_PATH /soc/serial@0700:115200 @@ -277,6 +278,7 @@ extern int soft_i2c_gpio_scl; #else #error Unsupported console port nr. Please fix stdout-path in sunxi -common.h. #endif +#endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */ /* GPIO */ #define CONFIG_SUNXI_GPIO ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/13][v4] imx: iomux-v3: add imx7d support for iomuxc
Hi Stefano, On Sun, Aug 2, 2015 at 6:40 AM, Stefano Babic sba...@denx.de wrote: I have a main question. For i.MX6, we could factorize (mainly thanks Tim's work) the major SOC variants, getting some important goals, as having a single u-boot image running on different variations of the same board. This was reached deciding at run time which is the pin, its register and the value to be written - instead of fixing at build time. Exceptions are the SOC that cannot be substitute by another one on the same board, because they are not pin compatible: for example, MXSX. Now you are introducing the new architecture for MX7, but it looks like you get rid of these improvements. It can be right or false, then my questions: - has MX7 quite the same variations as MX6 ? I mean a qaud, dual and solo that are pin-to-pin compatible ? No, mx7 is not pin compatible with the mx6 family. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] Please pull u-boot-imx
On Sun, Aug 02, 2015 at 11:23:12AM +0200, Stefano Babic wrote: Hi Tom, please pull from u-boot-imx, thanks ! The following changes since commit 605e15db2b54302364a2528d3c6604fbc57be846: Merge git://git.denx.de/u-boot-x86 (2015-07-15 10:41:20 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to f85764cc1f6ab01ffc60dd78de9c4de4cff2b5ce: arm: mx6: tqma6: fix build for WRU-IV baseboard (2015-08-02 11:12:41 +0200) Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fsl_esdhc.c: Always make check_and_invalidate_dcache_range available
This function is called from esdhc_send_cmd so we need it available to everyone. Signed-off-by: Tom Rini tr...@konsulko.com --- drivers/mmc/fsl_esdhc.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 0510bf0..0b37002 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -274,7 +274,6 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) return 0; } -#ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO static void check_and_invalidate_dcache_range (struct mmc_cmd *cmd, struct mmc_data *data) { @@ -297,7 +296,6 @@ static void check_and_invalidate_dcache_range #endif invalidate_dcache_range(start, end); } -#endif /* * Sends a command out on the bus. Takes the mmc pointer, -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fsl_esdhc.c: Always make check_and_invalidate_dcache_range available
On Sun, Aug 02, 2015 at 11:53:24AM -0400, Tom Rini wrote: This function is called from esdhc_send_cmd so we need it available to everyone. Signed-off-by: Tom Rini tr...@konsulko.com Applied to u-boot/master, 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 3/3] sunxi: Do not add a stdout-path alias to dts on boards without a serial port
Hi, On 02-08-15 18:28, Ian Campbell wrote: On Sat, 2015-08-01 at 14:50 +0200, Hans de Goede wrote: Do not add a bogus (pointing to a non existing serial port) stdout-path alias to dts on boards without a serial port. Signed-off-by: Hans de Goede hdego...@redhat.com --- include/configs/sunxi-common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi -common.h index 71b2368..a2cbcf5 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -262,6 +262,7 @@ extern int soft_i2c_gpio_scl; #define CONFIG_CONS_INDEX 1 /* UART0 */ #endif Should this defaulting of CONFIG_CONS_INDEX not be gated as well That is a good question, unfortunately we still need this for the SPL, where we do not use DM_SERIAL and thus CONFIG_REQUIRE_SERIAL_CONSOLE is not used. We are getting away with this because the sun5i die actually has an uart0, which in the A13 package is not routed to the outside, so we are simply sending SPL bootup messages to the tx pin at the edge of the die, and they go no further from there... And sofar we only have one A13 board which does not have a serial port, all others do have a serial port. This kinda makes sense since the A13 is a much lower pincount package compared to all the other sunxi SoCs. Actually before we moved most things including serial over to the device-model, we were (ab)using the present but not wired uart0 for both the SPL, u-boot proper. So for now to keep things working we need CONFIG_CONS_INDEX 1 even on the 1 board we have which does not have a serial port (the uart1 pins which are routed to the outside on the A13 are used as gpio-s by the lcd. Regards, Hans (or even instead)? Perhaps incorporate an ifndef CONFIG_CONS_INDEX into the chain of #elseif below (making the #error only hit for defined-but -unknown values) to achieve what this patch wants to do? +#ifdef CONFIG_REQUIRE_SERIAL_CONSOLE #if CONFIG_CONS_INDEX == 1 #ifdef CONFIG_MACH_SUN9I #define OF_STDOUT_PATH/soc/serial@0700:115200 @@ -277,6 +278,7 @@ extern int soft_i2c_gpio_scl; #else #error Unsupported console port nr. Please fix stdout-path in sunxi -common.h. #endif +#endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */ /* GPIO */ #define CONFIG_SUNXI_GPIO ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND] tools/imximage: set DCD pointer to NULL when its length is 0
Hi Stefano, On Wed, Jul 15, 2015 at 09:13:33AM +0200, Stefano Babic wrote: On 14/07/2015 21:05, Baruch Siach wrote: On Thu, Jul 09, 2015 at 06:04:17PM +0200, Stefano Babic wrote: On 09/07/2015 17:19, Baruch Siach wrote: When dcd_len is 0 the Write Data command that the set_dcd_rst_v2() routine generates is empty. This causes HAB to complain that the command is invalid. - HAB Event 1 - event data: 0xdb 0x00 0x0c 0x41 0x33 0x06 0xc0 0x00 0xcc 0x00 0x04 0x04 To fix this set the DCD pointer in the IVT to NULL in this case. The DCD header itself is still needed for detect_imximage_version() to determine the image version. Signed-off-by: Baruch Siach bar...@tkos.co.il --- Resending with a proper To: header. tools/imximage.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/imximage.c b/tools/imximage.c index 6f469ae6336c..7b91d09699ad 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -250,7 +250,11 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len, hdr_base = entry_point - imximage_init_loadsize + flash_offset; fhdr_v2-self = hdr_base; - fhdr_v2-dcd_ptr = hdr_base + offsetof(imx_header_v2_t, dcd_table); + if (dcd_len 0) + fhdr_v2-dcd_ptr = hdr_base + + offsetof(imx_header_v2_t, dcd_table); + else + fhdr_v2-dcd_ptr = 0; fhdr_v2-boot_data_ptr = hdr_base + offsetof(imx_header_v2_t, boot_data); hdr_v2-boot_data.start = entry_point - imximage_init_loadsize; It looks ok for me. Acked-by: Stefano Babic sba...@denx.de Which tree is this patch going through? This goes first into u-boot-imx, until I'll send a PR to Tom for inclusion in his tree, Thanks again. Is there a reason this patch is not in the u-boot-imx git tree? baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}ooO--U--Ooo{= - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il - ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] sunxi: Do not add a stdout-path alias to dts on boards without a serial port
On Sun, 2015-08-02 at 20:45 +0200, Hans de Goede wrote: [...] So for now to keep things working we need CONFIG_CONS_INDEX 1 even on the 1 board we have which does not have a serial port (the uart1 pins which are routed to the outside on the A13 are used as gpio-s by the lcd. Makes sense, thanks. Acked-by: Ian Campbell i...@hellion.org.uk Is it worth pasting some of your longer description into the commit message? Ian. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/47] Support removing default assembler flags
On Fri, Jul 31, 2015 at 09:31:18AM -0600, Simon Glass wrote: The CFLAGS_REMOVE_file feature allows default C compiler flags to be removed for particular files. Add the same feature for assembler, using AFLAGS_REMOVE_file. Signed-off-by: Simon Glass s...@chromium.org Reviewed-by: Bin Meng bmeng...@gmail.com Reviewed-by: Tom Rini tr...@konsulko.com -- 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/3] sunxi: Add CONFIG_USB0_ID_DET setting to 2 more tablets
On Sat, 2015-08-01 at 14:50 +0200, Hans de Goede wrote: Now that we have code to check the id-pin and detect usb-host adapters plugged into the otg port that way, enable it on the tablets which I own. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Ian Campbell i...@hellion.org.uk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] sunxi: usb-phy: Never power off the usb ports
On Sat, 2015-08-01 at 14:50 +0200, Hans de Goede wrote: USB devices are not really designed to get the power bounced off and on at them. Esp. USB powered harddisks do not like this. Currently we power off the USB ports both on a usb reset and when booting the kernel, causing the usb-power to bounce off and then back on again. This patch removes the powering off calls, fixing the undesirable power bouncing. Note this requires some special handling for the OTG port: 1) We must skip the external vbus check if we've already enabled our own vbus to avoid false positives 2) If on an usb reset we no longer detect that the id-pin is grounded, turn off vbus as that means an external vbus may be present now Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Ian Campbell i...@hellion.org.uk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/13][v4] power: pmic: add pfuze3000 support
On 31/07/2015 00:35, Adrian Alonso wrote: * Add pmic pfuze3000 support, implement power_pfuze3000_init to be used in power_init_board callback function. Signed-off-by: Adrian Alonso aalo...@freescale.com Signed-off-by: Peng Fan peng@freescale.com --- Reviewed-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/15] clk: unify obj-$(CONFIG_CLK) and obj-$(CONFIG_SPL_CLK) entries
On 01/08/2015 15:14, Masahiro Yamada wrote: Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- Reviewed-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/47] elf: Add a few definitions for 64-bit relocation
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: Provide the types necessary to relocate 64-bit images. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Follow existing file conventions for type definitions include/elf.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/elf.h b/include/elf.h index 63d9341..a35e085 100644 --- a/include/elf.h +++ b/include/elf.h @@ -28,6 +28,16 @@ typedef int32_t Elf32_Sword;/* Signed large integer */ typedef uint32_t Elf32_Word; /* Unsigned large integer */ typedef uint16_t Elf32_Half; /* Unsigned medium integer */ +/* 64-bit ELF base types. */ +typedef uint64_t Elf64_Addr; +typedef uint16_t Elf64_Half; +typedef int16_tElf64_SHalf; +typedef uint64_t Elf64_Off; +typedef int32_tElf64_Sword; +typedef uint32_t Elf64_Word; +typedef uint64_t Elf64_Xword; +typedef int64_tElf64_Sxword; + /* e_ident[] identification indexes */ #define EI_MAG00 /* file ID */ #define EI_MAG11 /* file ID */ @@ -379,6 +389,11 @@ typedef struct Elf32_Sword r_addend; } Elf32_Rela; +typedef struct { + Elf64_Addr r_offset;/* Location at which to apply the action */ + Elf64_Xword r_info; /* index and type of relocation */ +} Elf64_Rel; + /* Extract relocation info - r_info */ #define ELF32_R_SYM(i) ((i) 8) #define ELF32_R_TYPE(i)((unsigned char) (i)) @@ -431,6 +446,17 @@ typedef struct extern Elf32_Dyn _DYNAMIC[]; +typedef struct { + Elf64_Sxword d_tag; /* entry tag value */ + union { + Elf64_Xword d_val; + Elf64_Addr d_ptr; + } d_un; +} Elf64_Dyn; + +#define ELF64_R_SYM(i) ((i) 32) +#define ELF64_R_TYPE(i)((i) 0x) + /* Dynamic Array Tags - d_tag */ #define DT_NULL0 /* marks end of _DYNAMIC array */ #define DT_NEEDED 1 /* string table offset of needed lib */ -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 20/47] efi: Avoid using non-existent text base
On Fri, Jul 31, 2015 at 11:31 PM, Simon Glass s...@chromium.org wrote: From: Ben Stoltz sto...@google.com When U-Boot runs as an EFI application is does not have a definition of CONFIG_SYS_TEXT_BASE. U-Boot is a relocatable application and the relocation is done by EFI. U-Boot can be loaded at any address. This is similar to how sandbox works. Adjust the early board init to deal with this. Signed-off-by: Ben Stoltz sto...@google.com Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Rename CONFIG_ARCH_EFI to CONFIG_EFI_APP - Reorder this patch to after CONFIG_EFI_APP is introduced common/board_f.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 5e09c5f..c596083 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -144,7 +144,7 @@ static int init_baud_rate(void) static int display_text_info(void) { -#ifndef CONFIG_SANDBOX +#if !defined(CONFIG_SANDBOX) !defined(CONFIG_EFI_APP) ulong bss_start, bss_end, text_base; bss_start = (ulong)__bss_start; @@ -267,7 +267,7 @@ static int setup_mon_len(void) { #if defined(__ARM__) || defined(__MICROBLAZE__) gd-mon_len = (ulong)__bss_end - (ulong)_start; -#elif defined(CONFIG_SANDBOX) +#elif defined(CONFIG_SANDBOX) || defined(CONFIG_EFI_APP) gd-mon_len = (ulong)_end - (ulong)_init; #elif defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2) gd-mon_len = CONFIG_SYS_MONITOR_LEN; @@ -975,7 +975,8 @@ void board_init_f(ulong boot_flags) if (initcall_run_list(init_sequence_f)) hang(); -#if !defined(CONFIG_ARM) !defined(CONFIG_SANDBOX) +#if !defined(CONFIG_ARM) !defined(CONFIG_SANDBOX) \ + !defined(CONFIG_EFI_APP) /* NOTREACHED - jump_to_copy() does not return */ hang(); #endif -- Reviewed-by: Bin Meng bmeng...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common: command add '\n' for debug msg
On 28 July 2015 at 08:45, Peng Fan peng@freescale.com wrote: Add '\n' for debug msg. Signed-off-by: Peng Fan peng@freescale.com Cc: Tom Rini tr...@konsulko.com Cc: Masahiro Yamada yamad...@jp.panasonic.com Cc: Simon Glass s...@chromium.org --- common/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] patman: Don't run patman when it is imported as a module
Hi Chris, On 1 August 2015 at 03:32, Chris Packham judge.pack...@gmail.com wrote: On Sat, Aug 1, 2015 at 12:06 AM, Simon Glass s...@chromium.org wrote: Hi Chris, On 30 July 2015 at 23:34, Chris Packham judge.pack...@gmail.com wrote: Hi Simon, On Fri, Jul 31, 2015 at 7:47 AM, Simon Glass s...@chromium.org wrote: Commit 488d19c (patman: add distutils based installer) has the side effect of making patman run twice with each invocation. Fix this by checking for 'main program' invocation in patman.py. This is good practice in any case. Signed-off-by: Simon Glass s...@chromium.org --- Reviewed-by: Chris Packham judge.pack...@gmail.com I did (kind of) think about that at the time when I had to handle the in-tree vs out-of-tree usage. One solution would have been to move most of the code to a module (patch-manager say) and have the patman script import that. The same would work for anything else that wanted to bring in bits of patman (buildman perhaps?). Ah OK. We could do this, but what is the benefit? Buildman currently imports the particular modules it needs and doesn't use the top-level tool. That may play into the de-coupling of u-boot and patman. Some of these common bits could be yet another re-usable component that both patman and buildman use. But then you'd have to come up with a name for such a component which we all know is a NP-hard problem :). I haven't really looked at buildman and only have a vague understanding of what it does. Do you think it too would be useful outside of u-boot? Potentially although it would be a bit of work. How many projects build for 1000 boards and want to collate common bisectability errors between them? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] gitignore: Add defconfig and fdtgrep
On 31 July 2015 at 01:24, Bin Meng bmeng...@gmail.com wrote: Ignore defconfig and tools/fdtgrep. Signed-off-by: Bin Meng bmeng...@gmail.com --- .gitignore | 1 + tools/.gitignore | 1 + 2 files changed, 2 insertions(+) Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] common: Print nothing in the __weak checkboard()
On 31 July 2015 at 01:24, Bin Meng bmeng...@gmail.com wrote: Do not print confusing Board: Unknown during boot. Signed-off-by: Bin Meng bmeng...@gmail.com --- common/board_info.c | 1 - 1 file changed, 1 deletion(-) Acked-by: Simon Glass s...@chromium.org diff --git a/common/board_info.c b/common/board_info.c index 4e5a1f7..6afe98e 100644 --- a/common/board_info.c +++ b/common/board_info.c @@ -8,7 +8,6 @@ int __weak checkboard(void) { - printf(Board: Unknown\n); return 0; } -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] power: regulator: add pfuze100 support
Hi Peng, On 28 July 2015 at 08:48, Peng Fan peng@freescale.com wrote: 1. Add new regulator driver pfuze100. * Introduce struct pfuze100_regulator_desc for mataining info for regulator. 2. Add new Kconfig entry DM_REGULATOR_PFUZE100 for pfuze100. 3. This driver intends to support PF100, PF200 and PF3000. 4. Add related macro definition in pfuze header file. Signed-off-by: Peng Fan peng@freescale.com Cc: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org It looks correct but I have code style comments - see below. They all apply globally. --- drivers/power/regulator/Kconfig| 8 + drivers/power/regulator/Makefile | 1 + drivers/power/regulator/pfuze100.c | 596 + include/power/pfuze100_pmic.h | 24 +- 4 files changed, 625 insertions(+), 4 deletions(-) create mode 100644 drivers/power/regulator/pfuze100.c diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig index 6289b83..b854773 100644 --- a/drivers/power/regulator/Kconfig +++ b/drivers/power/regulator/Kconfig @@ -16,6 +16,14 @@ config DM_REGULATOR for this purpose if PMIC I/O driver is implemented or dm_scan_fdt_node() otherwise. Detailed information can be found in the header file. +config DM_REGULATOR_PFUZE100 + bool Enable Driver Model for REGULATOR PFUZE100 + depends on DM_REGULATOR DM_PMIC_PFUZE100 + ---help--- + This config enables implementation of driver-model regulator uclass + features for REGULATOR PFUZE100. The driver implements get/set api for: + value, enable and mode. + config DM_REGULATOR_MAX77686 bool Enable Driver Model for REGULATOR MAX77686 depends on DM_REGULATOR DM_PMIC_MAX77686 diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile index 96aa624..9f8f17b 100644 --- a/drivers/power/regulator/Makefile +++ b/drivers/power/regulator/Makefile @@ -7,5 +7,6 @@ obj-$(CONFIG_DM_REGULATOR) += regulator-uclass.o obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o +obj-$(CONFIG_DM_REGULATOR_PFUZE100) += pfuze100.o obj-$(CONFIG_DM_REGULATOR_FIXED) += fixed.o obj-$(CONFIG_DM_REGULATOR_SANDBOX) += sandbox.o diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c new file mode 100644 index 000..6c513e9 --- /dev/null +++ b/drivers/power/regulator/pfuze100.c @@ -0,0 +1,596 @@ +#include common.h +#include fdtdec.h +#include errno.h +#include dm.h +#include i2c.h +#include power/pmic.h +#include power/regulator.h +#include power/pfuze100_pmic.h + +/** + * struct pfuze100_regulator_desc - regulator descriptor + * + * @name: Identify name for the regulator. + * @type: Indicates the regulator type. + * @uV_step: Voltage increase for each selector. + * @vsel_reg: Register for adjust regulator voltage for normal. + * @vsel_mask: Mask bit for setting regulator voltage for normal. + * @stby_reg: Register for adjust regulator voltage for standby. + * @stby_mask: Mask bit for setting regulator voltage for standby. + * @volt_table: Voltage mapping table (if table based mapping). + * @voltage: Current voltage for REGULATOR_TYPE_FIXED type regulator. + */ +struct pfuze100_regulator_desc { + char *name; + enum regulator_type type; + unsigned int uV_step; + unsigned int vsel_reg; + unsigned int vsel_mask; + unsigned int stby_reg; + unsigned int stby_mask; + unsigned int *volt_table; + unsigned int voltage; +}; + +#define PFUZE100_FIXED_REG(_name, base, vol) \ + { \ + .name = #_name, \ + .type = REGULATOR_TYPE_FIXED, \ + .voltage= (vol), \ + } + +#define PFUZE100_SW_REG(_name, base, step) \ + { \ + .name = #_name, \ + .type = REGULATOR_TYPE_BUCK,\ + .uV_step= (step), \ + .vsel_reg = (base) + PFUZE100_VOL_OFFSET, \ + .vsel_mask = 0x3F, \ + .stby_reg = (base) + PFUZE100_STBY_OFFSET, \ + .stby_mask = 0x3F, \ + } + +#define PFUZE100_SWB_REG(_name, base, mask, step, voltages)\ + { \ + .name = #_name, \ + .type = REGULATOR_TYPE_BUCK,\ +
Re: [U-Boot] board_pci_pre_scan() and board_pci_post_scan()
Hi Bin, On 27 July 2015 at 01:45, Bin Meng bmeng...@gmail.com wrote: Hi Simon, With driver model pci conversion on x86 boards, we now missed the call to board_pci_pre_scan() and board_pci_post_scan() which are called in the non-dm path. For example, board_pci_post_scan() in arch/x86/lib/fsp/fsp_common.c is not called to do any work as requested by FSP after pci enumeration. I am not sure where we could insert these call back in the dm. Do you have any possible solution on this? I know that the post-scan is needed for FSP - and in fact for Minnowmax I added in back in a recent patch[1]. What is the pre-scan used for? Regards, Simon [1] http://patchwork.ozlabs.org/patch/500864/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] power: regulator: max77686 correct variable type
On 28 July 2015 at 08:47, Peng Fan peng@freescale.com wrote: The return type of pmic_read and pmic_write is signed int, so correct variable 'ret' from type unsigned int to int. Signed-off-by: Peng Fan peng@freescale.com Cc: Simon Glass s...@chromium.org Cc: Przemyslaw Marczak p.marc...@samsung.com --- drivers/power/regulator/max77686.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] power: pmic: pfuze100 support driver model
On 28 July 2015 at 08:48, Peng Fan peng@freescale.com wrote: 1. Support driver model for pfuze100. 2. Introduce a new Kconfig entry DM_PMIC_PFUZE100 for pfuze100 3. This driver intends to support PF100, PF200 and PF3000, so add the device id into the udevice_id array. Signed-off-by: Peng Fan peng@freescale.com Cc: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org --- drivers/power/pmic/Kconfig | 7 +++ drivers/power/pmic/pmic_pfuze100.c | 89 ++ include/power/pfuze100_pmic.h | 3 ++ 3 files changed, 99 insertions(+) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] x86: fsp: Reserve different malloc size before relocation
Hi Bin, On 27 July 2015 at 01:33, Bin Meng bmeng...@gmail.com wrote: Currently Intel queensbay fsp initializes a CAR size with only 4KiB, which is not enough when dm pci is enabled before relocation. Change arch/x86/start.s to reserve a small size before fsp_init() is called and some bigger size after fsp_init() which can be configured via the exisiting CONFIG_MALLOC_F_LEN. Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/Kconfig | 5 + arch/x86/cpu/start.S | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e8968a7..afd4a84 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -227,6 +227,11 @@ config FSP_TEMP_RAM_ADDR Stack top address which is used in FspInit after DRAM is ready and CAR is disabled. +config SYS_MALLOC_F_LEN_PRE_FSP + hex + depends on HAVE_FSP + default 0x800 + config SMP bool Enable Symmetric Multiprocessing default n diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 00e585e..cc6fbe9 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -137,7 +137,15 @@ skip_hob: movl%esp, %ecx #if defined(CONFIG_SYS_MALLOC_F_LEN) - subl$CONFIG_SYS_MALLOC_F_LEN, %esp +#ifdef CONFIG_HAVE_FSP + test%esi, %esi + jnz 1f + subl$CONFIG_SYS_MALLOC_F_LEN_PRE_FSP, %esp + jmp 2f +#endif +1: + subl$CONFIG_SYS_MALLOC_F_LEN, %esp +2: movl%eax, %edx addl$GD_MALLOC_BASE, %edx movl%esp, (%edx) -- 1.8.2.1 This is a bit of an unfortunate problem. While CONFIG_SYS_MALLOC_F_LEN is a generic thing (and in fact I'm about to send a series to make x86 use board_init_f_mem() instead of all this code) CONFIG_SYS_MALLOC_F_LEN_PRE_FSP is not. One option (with my new series) is to simply change the stack after board_init_f_mem() returns. Let's see what you think of that series and then we can revisit this. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/5] x86: Explicitly trigger pci bus configuration with driver model
Hi Bin, On 27 July 2015 at 01:33, Bin Meng bmeng...@gmail.com wrote: With driver model, probing pci bus is all done on a lazy basis, as needed. On x86, pci bus is the fundamental device that needs to work before any other peripherals. In order to have a working pci before any other pci devices can be initialized, we need explicitly trigger the pci bus configuration. Signed-off-by: Bin Meng bmeng...@gmail.com --- common/board_r.c | 16 1 file changed, 16 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index bf6c725..4263e47 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -233,6 +233,22 @@ static int initr_pci(void) { #ifndef CONFIG_DM_PCI pci_init(); +#else +#ifdef CONFIG_X86 + /* +* With driver model, probing pci bus is all done on a lazy basis, +* as needed. On x86, pci bus is the fundamental device that needs +* to work before any other peripherals. In order to have a working +* pci before any other pci devices can be initialized, we need +* explicitly trigger the pci bus configuration. +*/ + struct udevice *dev; + int ret; + + ret = uclass_first_device(UCLASS_PCI, dev); + if (ret) + return ret; Won't this happen anyway when you first access a PCI device? +#endif #endif return 0; -- 1.8.2.1 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] power: regulator use node name when no regulator-name
Hi Peng, On 28 July 2015 at 08:48, Peng Fan peng@freescale.com wrote: If there is no property named 'regulator-name' for regulators, choose node name instead, but not directly return failure value. Signed-off-by: Peng Fan peng@freescale.com Cc: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org --- drivers/power/regulator/regulator-uclass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 12e141b..d4f06d5 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -256,7 +256,9 @@ static int regulator_post_bind(struct udevice *dev) if (!uc_pdata-name) { debug(%s: dev: %s has no property 'regulator-name'\n, __func__, dev-name); - return -EINVAL; + uc_pdata-name = fdt_get_name(blob, offset, NULL); + if (!uc_pdata-name) + return -EINVAL; } if (regulator_name_is_unique(dev, uc_pdata-name)) -- 1.8.4 What is this for please? Can you point me to the device tree binding that needs this? I suspect it is fine, but I would like to understand the purpose. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v2] lib/fdtdec: Fix fdt_addr_t and fdt_size_t typedef
Hi York, On 23 July 2015 at 16:12, York Sun york...@freescale.com wrote: fdt_addr_t is a physical address. It can be either 64-bit or 32-bit, depending on the architecture. It should be phys_addr_t instead of u64 or u32. Similarly, fdt_size_t is changed to phys_size_t. Signed-off-by: York Sun york...@freescale.com CC: Simon Glass s...@chromium.org --- Change log v2: Rebase code to latest master, add change to fsl_dspi.c. Can you please put that change into a different patch? For both: Reviewed-by: Simon Glass s...@chromium.org drivers/spi/fsl_dspi.c |4 ++-- include/fdtdec.h |7 +++ lib/fdtdec.c |4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c index 7928531..326f040 100644 --- a/drivers/spi/fsl_dspi.c +++ b/drivers/spi/fsl_dspi.c @@ -664,8 +664,8 @@ static int fsl_dspi_ofdata_to_platdata(struct udevice *bus) plat-speed_hz = fdtdec_get_int(blob, node, spi-max-frequency, FSL_DSPI_DEFAULT_SCK_FREQ); - debug(DSPI: regs=0x%llx, max-frequency=%d, endianess=%s, num-cs=%d\n, - (u64)plat-regs_addr, plat-speed_hz, + debug(DSPI: regs=0x%pa, max-frequency=%d, endianess=%s, num-cs=%d\n, + plat-regs_addr, plat-speed_hz, plat-flags DSPI_FLAG_REGMAP_ENDIAN_BIG ? be : le, plat-num_chipselect); diff --git a/include/fdtdec.h b/include/fdtdec.h index 2323603..c61734c 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -14,6 +14,7 @@ * changes to support FDT are minimized. */ +#include linux/types.h #include libfdt.h #include pci.h @@ -21,15 +22,13 @@ * A typedef for a physical address. Note that fdt data is always big * endian even on a litle endian machine. */ +typedef phys_addr_t fdt_addr_t; +typedef phys_size_t fdt_size_t; #ifdef CONFIG_PHYS_64BIT -typedef u64 fdt_addr_t; -typedef u64 fdt_size_t; #define FDT_ADDR_T_NONE (-1ULL) #define fdt_addr_to_cpu(reg) be64_to_cpu(reg) #define fdt_size_to_cpu(reg) be64_to_cpu(reg) #else -typedef u32 fdt_addr_t; -typedef u32 fdt_size_t; #define FDT_ADDR_T_NONE (-1U) #define fdt_addr_to_cpu(reg) be32_to_cpu(reg) #define fdt_size_to_cpu(reg) be32_to_cpu(reg) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 9c6b361..3ff8b66 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -102,8 +102,8 @@ fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, size = (fdt_size_t *)((char *)cell + sizeof(fdt_addr_t)); *sizep = fdt_size_to_cpu(*size); - debug(addr=%08lx, size=%llx\n, - (ulong)addr, (u64)*sizep); + debug(addr=%pa, size=%llx\n, + addr, (u64)*sizep); } else { debug(%08lx\n, (ulong)addr); } -- 1.7.9.5 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] fsl: common: pfuze: no use original pfuze code if DM_PMIC
On 28 July 2015 at 08:48, Peng Fan peng@freescale.com wrote: If enable DM PMIC and REGULATOR, we should not use original power framework. So need to comment out the pfuze code for original power framework, when CONFIG_DM_PMIC_PFUZE100 defined. Signed-off-by: Peng Fan peng@freescale.com Cc: Przemyslaw Marczak p.marc...@samsung.com Cc: Simon Glass s...@chromium.org Cc: Stefano Babic sba...@denx.de --- board/freescale/common/pfuze.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/5] x86: queensbay: Support pre-relocation dm pci
Hi Bin, On 27 July 2015 at 01:33, Bin Meng bmeng...@gmail.com wrote: Increase CONFIG_MALLOC_F_LEN so that dm pci does not fail with -ENOMEM before relocation. This makes pci uart work again on Intel Crown Bay. Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/cpu/queensbay/Kconfig | 3 +++ arch/x86/cpu/queensbay/tnc.c | 13 + arch/x86/dts/crownbay.dts | 2 -- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/queensbay/Kconfig b/arch/x86/cpu/queensbay/Kconfig index fbf85f2..8eb619c 100644 --- a/arch/x86/cpu/queensbay/Kconfig +++ b/arch/x86/cpu/queensbay/Kconfig @@ -42,4 +42,7 @@ config CPU_ADDR_BITS int default 32 +config SYS_MALLOC_F_LEN + default 0x8000 32KB? Wow that's a huge amount. How much does it actually use? Perhaps we should change PCI so that it respects the u-boot,dm-pre-reloc property? + endif diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c index de50893..322534b 100644 --- a/arch/x86/cpu/queensbay/tnc.c +++ b/arch/x86/cpu/queensbay/tnc.c @@ -13,6 +13,7 @@ #include asm/arch/tnc.h #include asm/fsp/fsp_support.h #include asm/processor.h +#include dm.h static void unprotect_spi_flash(void) { @@ -36,6 +37,18 @@ int arch_cpu_init(void) if (ret) return ret; + return 0; +} + +int arch_cpu_init_dm(void) +{ + struct udevice *dev; + int ret; + + ret = uclass_first_device(UCLASS_PCI, dev); + if (ret) + return ret; + unprotect_spi_flash(); return 0; diff --git a/arch/x86/dts/crownbay.dts b/arch/x86/dts/crownbay.dts index 3af9cc3..2714370 100644 --- a/arch/x86/dts/crownbay.dts +++ b/arch/x86/dts/crownbay.dts @@ -100,13 +100,11 @@ pcie@17,0 { #address-cells = 3; #size-cells = 2; - compatible = intel,pci; device_type = pci; topcliff@0,0 { #address-cells = 3; #size-cells = 2; - compatible = intel,pci; device_type = pci; pciuart0: uart@a,1 { -- 1.8.2.1 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] power: pfuze100 correct SWBST macro definition
On 28 July 2015 at 08:48, Peng Fan peng@freescale.com wrote: According to datasheet, SWBST_MODE starts from bit 2 and it occupies 2 bits. So SWBST_MODE_MASK should be 0xC, and SWBST_MODE_xx should be ([mode] 2). Signed-off-by: Peng Fan peng@freescale.com Cc: Przemyslaw Marczak p.marc...@samsung.com Cc: Stefano Babic sba...@denx.de --- include/power/pfuze100_pmic.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/9] dfu: tftp: update: Add dfu_write_from_mem_addr() function
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: This function allows writing via DFU data stored from fixed buffer address (like e.g. loadaddr env variable). Such predefined buffers are used in the update_tftp() code. In fact this function is a wrapper on the dfu_write() and dfu_flush(). Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Use min() macro instead of comparison - Change definition of left variable to be unsigned long - this allowed safe usage of min() macro --- drivers/dfu/dfu.c | 48 include/dfu.h | 1 + 2 files changed, 49 insertions(+) Reviewed-by: Simon Glass s...@chromium.org But see nits below. diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 2267dbf..c83ee41 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -568,3 +568,51 @@ int dfu_get_alt(char *name) return -ENODEV; } + +/** + * dfu_write_from_mem_addr - this function adds support for writing data + * starting from fixed memory address (like $loadaddr) + * to dfu managed medium (e.g. NAND, MMC) I think it's better to start with a direct one-line description, like: + * dfu_write_from_mem_addr - wite data to dfu-managed medium + * + * More detail goes here ... + * + * @param dfu - dfu entity to which we want to store data + * @param buf - fixed memory addres from where data starts + * @param size - number of bytes to write + * + * @return - 0 on success, other value on failure + */ +int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size) const void *buf? My understanding is that this buffer is not changed. +{ + unsigned long dfu_buf_size, write, left = size; + int i, ret = 0; + void *dp = buf; + + /* +* Here we must call dfu_get_buf(dfu) first to be sure that dfu_buf_size +* has been properly initialized - e.g. if dfu_bufsiz has been taken +* into account. +*/ + dfu_get_buf(dfu); + dfu_buf_size = dfu_get_buf_size(); + debug(%s: dfu buf size: %lu\n, __func__, dfu_buf_size); + + for (i = 0; left 0; i++) { + write = min(dfu_buf_size, left); + + debug(%s: dp: 0x%p left: %lu write: %lu\n, __func__, + dp, left, write); + ret = dfu_write(dfu, dp, write, i); + if (ret) { + error(DFU write failed\n); + return ret; + } + + dp += write; + left -= write; + } + + ret = dfu_flush(dfu, NULL, 0, i); + if (ret) + error(DFU flush failed!); + + return ret; +} diff --git a/include/dfu.h b/include/dfu.h index 7f78cc2..e624c41 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -162,6 +162,7 @@ bool dfu_usb_get_reset(void); int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num); int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num); int dfu_flush(struct dfu_entity *de, void *buf, int size, int blk_seq_num); Please can you put your function comment here in the header? +int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size); /* Device specific */ #ifdef CONFIG_DFU_MMC extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s); -- 2.1.4 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/9] update: tftp: dfu: Extend update_tftp() function to support DFU
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: This code allows using DFU defined mediums for storing data received via TFTP protocol. It reuses and preserves functionality of legacy code at common/update.c. The update_tftp() function now accepts parameters - namely medium device name and its number (e.g. mmc 1). Without this information passed old behavior is preserved. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Remove env variables from update_tftp() function - Add parameters to update_tftp() function - without them old behavior is preserved - Stop compilation when legacy flags (CONFIG_UPDATE_TFTP and CONFIG_SYS_NO_FLASH) are wrongly defined - In the u-boot code legacy calls to update_tftp(0UL) have been changed to update_tftp(0UL, NULL, NULL) --- common/Makefile | 1 + common/cmd_fitupd.c | 2 +- common/main.c | 2 +- common/update.c | 40 ++-- include/net.h | 2 +- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/common/Makefile b/common/Makefile index d6c1d48..76626f1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -208,6 +208,7 @@ obj-$(CONFIG_LYNXKDI) += lynxkdi.o obj-$(CONFIG_MENU) += menu.o obj-$(CONFIG_MODEM_SUPPORT) += modem.o obj-$(CONFIG_UPDATE_TFTP) += update.o +obj-$(CONFIG_DFU_TFTP) += update.o obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o obj-$(CONFIG_CMD_DFU) += cmd_dfu.o obj-$(CONFIG_CMD_GPT) += cmd_gpt.o diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c index b045974..78b8747 100644 --- a/common/cmd_fitupd.c +++ b/common/cmd_fitupd.c @@ -23,7 +23,7 @@ static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc == 2) addr = simple_strtoul(argv[1], NULL, 16); - return update_tftp(addr); + return update_tftp(addr, NULL, NULL); } U_BOOT_CMD(fitupd, 2, 0, do_fitupd, diff --git a/common/main.c b/common/main.c index 2979fbe..ead0cd1 100644 --- a/common/main.c +++ b/common/main.c @@ -75,7 +75,7 @@ void main_loop(void) run_preboot_environment_command(); #if defined(CONFIG_UPDATE_TFTP) - update_tftp(0UL); + update_tftp(0UL, NULL, NULL); #endif /* CONFIG_UPDATE_TFTP */ s = bootdelay_process(); diff --git a/common/update.c b/common/update.c index 542915c..1d082b0 100644 --- a/common/update.c +++ b/common/update.c @@ -13,11 +13,16 @@ #error CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature #endif +#if defined(CONFIG_UPDATE_TFTP) defined(CONFIG_SYS_NO_FLASH) +#error CONFIG_UPDATE_TFTP and CONFIG_SYS_NO_FLASH needed for legacy behaviour +#endif + #include command.h #include flash.h #include net.h #include net/tftp.h #include malloc.h +#include dfu.h /* env variable holding the location of the update file */ #define UPDATE_FILE_ENVupdatefile @@ -222,13 +227,17 @@ static int update_fit_getparams(const void *fit, int noffset, ulong *addr, return 0; } -int update_tftp(ulong addr) +int update_tftp(ulong addr, char *interface, char *devstring) Should these be const char *? { - char *filename, *env_addr; - int images_noffset, ndepth, noffset; + char *filename, *env_addr, *fit_image_name; And these? ulong update_addr, update_fladdr, update_size; - void *fit; + int images_noffset, ndepth, noffset; + bool update_tftp_dfu = false; int ret = 0; + void *fit; + + if (interface devstring) + update_tftp_dfu = true; /* use already present image */ if (addr) @@ -277,8 +286,8 @@ got_update_file: if (ndepth != 1) goto next_node; - printf(Processing update '%s' :, - fit_get_name(fit, noffset, NULL)); + fit_image_name = (char *)fit_get_name(fit, noffset, NULL); Can you drop that cast? + printf(Processing update '%s' :, fit_image_name); if (!fit_image_verify(fit, noffset)) { printf(Error: invalid update hash, aborting\n); @@ -294,10 +303,21 @@ got_update_file: ret = 1; goto next_node; } - if (update_flash(update_addr, update_fladdr, update_size)) { - printf(Error: can't flash update, aborting\n); - ret = 1; - goto next_node; + + if (!update_tftp_dfu) { + if (update_flash(update_addr, update_fladdr, +update_size)) { + printf(Error: can't flash update, aborting\n); + ret = 1; + goto next_node; + } +
Re: [U-Boot] [PATCH v2 7/9] dfu: command: Extend dfu command to handle receiving data via TFTP
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: The dfu command has been extended to support transfers via TFTP protocol. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Remove dfutftp command - Modify dfu command to support optional [tftp] parameter - Only one flag (CONFIG_DFU_TFTP) needs to be enabled --- common/cmd_dfu.c | 25 + 1 file changed, 25 insertions(+) Reviewed-by: Simon Glass s...@chromium.org See below. diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index 857148f..aea466b 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -1,6 +1,9 @@ /* * cmd_dfu.c -- dfu command * + * Copyright (C) 2015 + * Lukasz Majewski l.majew...@majess.pl + * * Copyright (C) 2012 Samsung Electronics * authors: Andrzej Pietrasiewicz andrze...@samsung.com * Lukasz Majewski l.majew...@samsung.com @@ -13,6 +16,9 @@ #include dfu.h #include g_dnl.h #include usb.h +#ifdef CONFIG_DFU_TFTP +#include net.h +#endif static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { @@ -26,7 +32,18 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *devstring = argv[3]; int ret, i = 0; +#ifdef CONFIG_DFU_TFTP + unsigned long addr = 0; + if (!strcmp(usb_controller, tftp)) { + usb_controller = argv[2]; + interface = argv[3]; + devstring = argv[4]; + if (argc == 6) + addr = simple_strtoul(argv[5], NULL, 0); + return update_tftp(addr, interface, devstring); + } +#endif ret = dfu_init_env_entities(interface, devstring); if (ret) goto done; @@ -84,9 +101,17 @@ done: U_BOOT_CMD(dfu, CONFIG_SYS_MAXARGS, 1, do_dfu, Device Firmware Upgrade, +#ifdef CONFIG_DFU_TFTP + [tftp] USB_controller interface dev [list] [addr]\n It's a bit confusing since tftp looks like a parameter but I think you mean we should type it. Maybe it would be better to have: + [tftp] USB_controller interface dev [list] [addr]\n +#else USB_controller interface dev [list]\n +#endif - device firmware upgrade via USB_controller\n on device dev, attached to interface\n interface\n [list] - list available alt settings\n +#ifdef CONFIG_DFU_TFTP + [tftp] - use TFTP protocol to download data\n + [addr] - address where FIT image has been stored\n +#endif ); -- 2.1.4 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 9/9] dfu:tests: Modify dfu_gadget_test.sh to accept USB device major:minor number
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: In the dfu-util it is possible to set major:minor number by unsing -d flag using (-d 0451:d022). Such option is very handy when many DFU devices are connected to a single host PC. This commit allows testing when above situation emerges. Does this test cover the new tftp feature? Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - New patch Reviewed-by: Simon Glass s...@chromium.org --- test/dfu/README | 9 - test/dfu/dfu_gadget_test.sh | 18 +++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/test/dfu/README b/test/dfu/README index 5176aba..8925a91 100644 --- a/test/dfu/README +++ b/test/dfu/README @@ -26,12 +26,19 @@ Example usage: setenv dfu_alt_info dfu_test.bin fat 0 6\;dfudummy.bin fat 0 6 dfu 0 mmc 0 2. On the host: - test/dfu/dfu_gadget_test.sh X Y [test file name] + test/dfu/dfu_gadget_test.sh X Y [test file name] [usb device major:minor] e.g. test/dfu/dfu_gadget_test.sh 0 1 or e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img + or + e.g. test/dfu/dfu_gadget_test.sh 0 1 0451:d022 + or + e.g. test/dfu/dfu_gadget_test.sh 0 1 ./dat_960.img 0451:d022 ... where X and Y are dfu_test.bin's and dfudummy.bin's alt setting numbers. They can be obtained from dfu-util -l or $dfu_alt_info. It is also possible to pass optional [test file name] to force the script to test one particular file. +If many DFU devices are connected, it is necessary to specify USB device major +and minor numbers (0451:d022). One can get them by running lsusb command on +a host PC. diff --git a/test/dfu/dfu_gadget_test.sh b/test/dfu/dfu_gadget_test.sh index 2f5b7db..9c79422 100755 --- a/test/dfu/dfu_gadget_test.sh +++ b/test/dfu/dfu_gadget_test.sh @@ -45,18 +45,18 @@ dfu_test_file () { printf $COLOUR_GREEN = $COLOUR_DEFAULT\n printf File:$COLOUR_GREEN %s $COLOUR_DEFAULT\n $1 -dfu-util -D $1 -a $TARGET_ALT_SETTING $LOG_FILE 21 || die $? +dfu-util $USB_DEV -D $1 -a $TARGET_ALT_SETTING $LOG_FILE 21 || die $? echo -n TX: calculate_md5sum $1 MD5_TX=$MD5SUM -dfu-util -D ${DIR}/dfudummy.bin -a $TARGET_ALT_SETTING_B $LOG_FILE 21 || die $? +dfu-util $USB_DEV -D ${DIR}/dfudummy.bin -a $TARGET_ALT_SETTING_B $LOG_FILE 21 || die $? N_FILE=$DIR$RCV_DIR${1:2}_rcv -dfu-util -U $N_FILE -a $TARGET_ALT_SETTING $LOG_FILE 21 || die $? +dfu-util $USB_DEV -U $N_FILE -a $TARGET_ALT_SETTING $LOG_FILE 21 || die $? echo -n RX: calculate_md5sum $N_FILE @@ -89,13 +89,17 @@ fi TARGET_ALT_SETTING=$1 TARGET_ALT_SETTING_B=$2 -if [ -n $3 ] +file=$3 +[[ $3 == *':'* ]] USB_DEV=-d $3 file= +[ $# -eq 4 ] USB_DEV=-d $4 + +if [ -n $file ] then - dfu_test_file $3 + dfu_test_file $file else - for file in $DIR*.$SUFFIX + for f in $DIR*.$SUFFIX do - dfu_test_file $file + dfu_test_file $f done fi -- 2.1.4 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/9] tftp: update: Allow some parts of the code to be reused when CONFIG_SYS_NO_FLASH is set
On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: Up till now it was impossible to use code from update.c when system was not equipped with raw FLASH memory. Such behavior prevented DFU from reusing this code. Signed-off-by: Lukasz Majewski l.majew...@majess.pl Acked-by: Joe Hershberger joe.hershber...@ni.com --- Changes for v2: - None --- common/update.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) Reviewed-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/9] doc: dfu: tftp: README entry for TFTP extension of DFU
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: Documentation file for DFU extension. With this functionality it is now possible to transfer FIT images with firmware updates via TFTP and use DFU backend for storing them. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Remove section regarding update_tftp() specific environment variables --- doc/README.dfutftp | 113 + 1 file changed, 113 insertions(+) create mode 100644 doc/README.dfutftp Reviewed-by: Simon Glass s...@chromium.org Can you add a link to your new doc in README.update? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 8/9] config: bbb: Configs necessary for running update via TFTP on Beagle Bone Black
HI Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: Commit message? E.g. 'Enable DFU via update on Beaglebone Black' Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Do not enable CONFIG_UPDATE_TFTP since CONFIG_DFU_TFTP enables the common code - Do not enable CONFIG_CMD_DFUTFTP since dfutftp commands has been removed --- include/configs/am335x_evm.h | 8 1 file changed, 8 insertions(+) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 633391b..be000fa 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -46,6 +46,14 @@ #define CONFIG_CMD_GPT #define CONFIG_EFI_PARTITION +/* Commands to enable DFU TFTP support */ +#define CONFIG_DFU_TFTP Can this go in Kconfig and then the board's defconfig? +#define CONFIG_OF_LIBFDT + +/* Enable SHA1 support */ +#define CONFIG_SHA1 +#define CONFIG_CMD_SHA1SUM + #ifdef CONFIG_NAND #define NANDARGS \ mtdids= MTDIDS_DEFAULT \0 \ -- 2.1.4 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/9] dfu: tftp: update: Provide tftp support for the DFU subsystem
Hi Lukasz, On 25 July 2015 at 02:11, Lukasz Majewski l.majew...@majess.pl wrote: This commit adds initial support for using tftp for downloading and upgrading firmware on the device. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Return -ENOSYS instead of plain -1 - Remove interface and devstring env variables reading in the dfu_tftp_write() - Those parameters are now passed to dfu_tftp_write() function as its arguments --- drivers/dfu/Makefile | 1 + drivers/dfu/dfu_tftp.c | 65 ++ include/dfu.h | 13 ++ 3 files changed, 79 insertions(+) create mode 100644 drivers/dfu/dfu_tftp.c Is there a Kconfig option needed here? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] x86: qemu: Add MP initialization
On 27 July 2015 at 05:16, Bin Meng bmeng...@gmail.com wrote: Add a cpu1 node to the device tree and enable the MP initialization on QEMU targets (i440fx and q35). Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/dts/qemu-x86_i440fx.dts | 7 +++ arch/x86/dts/qemu-x86_q35.dts| 7 +++ configs/qemu-x86_defconfig | 2 ++ doc/README.x86 | 5 + 4 files changed, 21 insertions(+) diff --git a/arch/x86/dts/qemu-x86_i440fx.dts b/arch/x86/dts/qemu-x86_i440fx.dts index c26c71b..fc74cd0 100644 --- a/arch/x86/dts/qemu-x86_i440fx.dts +++ b/arch/x86/dts/qemu-x86_i440fx.dts @@ -34,6 +34,13 @@ reg = 0; intel,apic-id = 0; }; + + cpu@1 { + device_type = cpu; + compatible = cpu-x86; + reg = 1; + intel,apic-id = 1; + }; }; pci { diff --git a/arch/x86/dts/qemu-x86_q35.dts b/arch/x86/dts/qemu-x86_q35.dts index 2e785fa..7f16971 100644 --- a/arch/x86/dts/qemu-x86_q35.dts +++ b/arch/x86/dts/qemu-x86_q35.dts @@ -45,6 +45,13 @@ reg = 0; intel,apic-id = 0; }; + + cpu@1 { + device_type = cpu; + compatible = cpu-x86; + reg = 1; + intel,apic-id = 1; + }; }; pci { diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 4b18d51..e579c36 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -1,5 +1,7 @@ CONFIG_X86=y CONFIG_DEFAULT_DEVICE_TREE=qemu-x86_i440fx +CONFIG_SMP=y +CONFIG_MAX_CPUS=2 CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_CMD_CPU=y diff --git a/doc/README.x86 b/doc/README.x86 index 5d71244..1cab42c 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -281,6 +281,11 @@ QEMU emulates a graphic card which U-Boot supports. Removing '-nographic' will show QEMU's VGA console window. Note this will disable QEMU's serial output. If you want to check both consoles, use '-serial stdio'. +Multicore is also supported by QEMU via '-smp n' where n is the number of cores +to instantiate. Currently the default U-Boot built for QEMU supports 2 cores. nit: is built +In order to support more cores, you need add additional cpu nodes in the device +tree and change CONFIG_MAX_CPUS accordingly. + CPU Microcode - Modern CPUs usually require a special bit stream called microcode [8] to be -- 1.8.2.1 Acked-by: Simon Glass s...@chromium.org Tested-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] dm: pci: Allow scan bridge child devices before relocation
On 27 July 2015 at 01:33, Bin Meng bmeng...@gmail.com wrote: On some platforms pci devices behind bridge need to be probed (eg: a pci uart on recent x86 chipset) before relocation. Remove such limitation so that dm pci can be used before relocation. Signed-off-by: Bin Meng bmeng...@gmail.com --- drivers/pci/pci-uclass.c | 4 1 file changed, 4 deletions(-) Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] doc: dm: Update pci-info.txt for pci support
On 27 July 2015 at 01:33, Bin Meng bmeng...@gmail.com wrote: Correct two typos and mention how pci bus will be probed. Signed-off-by: Bin Meng bmeng...@gmail.com --- doc/driver-model/pci-info.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] x86: Add a 'pause' instruction in __udelay() for QEMU target
On 27 July 2015 at 05:16, Bin Meng bmeng...@gmail.com wrote: From: Miao Yan yanmiaob...@gmail.com When running SMP configuration on QEMU (tcg mode, no kvm), there is a busy loop in start_aps(), calling udelay(), that waits for APs to show up online. However, there is a chance that VCPU1 will be timeout waiting, IOW the secondary VCPUs haven't started their execution yet. This patch adds a 'pause' instruction in __udelay() only for QEMU target, to give other VCPUs a chance to run. When QEMU sees the 'pause' instruction, it will yeild the execution to other CPUs. Signed-off-by: Miao Yan yanmiaob...@gmail.com Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/lib/tsc_timer.c | 8 1 file changed, 8 insertions(+) Acked-by: Simon Glass s...@chromium.org Tested-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lib: fdt: fix indent of #ifdef..#endif conditional
On 1 August 2015 at 01:03, Masahiro Yamada yamada.masah...@socionext.com wrote: Match the depth of indentation between #ifdef and #endif for better readability. Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com --- lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index a954051..48667ef 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1167,7 +1167,7 @@ int fdtdec_setup(void) # else /* FDT is at end of image */ gd-fdt_blob = (ulong *)_end; -#endif +# endif # elif defined(CONFIG_OF_HOSTFILE) if (sandbox_read_fdt_from_file()) { puts(Failed to read control FDT\n); -- 1.9.1 Acked-by: Simon Glass s...@chromium.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot