[U-Boot] [PATCH 2/4] x86: Remove cpu_init_r() for x86
Since cpu_init_interrupts() was moved out of cpu_init_r(), it is useless to keep cpu_init_r() for x86, thus remove it. Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/cpu/cpu.c| 6 -- arch/x86/include/asm/u-boot-x86.h | 2 -- common/board_r.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index cf0606e..1a6f679 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -319,12 +319,6 @@ int x86_cpu_init_f(void) return 0; } -int x86_cpu_init_r(void) -{ - return 0; -} -int cpu_init_r(void) __attribute__((weak, alias(x86_cpu_init_r))); - void x86_enable_caches(void) { unsigned long cr0; diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 0399417..f454b83 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -10,8 +10,6 @@ /* cpu/.../cpu.c */ int arch_cpu_init(void); -int x86_cpu_init_r(void); -int cpu_init_r(void); int x86_cpu_init_f(void); int cpu_init_f(void); void init_gd(gd_t *id, u64 *gdt_addr); diff --git a/common/board_r.c b/common/board_r.c index 7c33900..b5ea030 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -774,7 +774,7 @@ init_fnc_t init_sequence_r[] = { initr_flash, #endif INIT_FUNC_WATCHDOG_RESET -#if defined(CONFIG_PPC) || defined(CONFIG_X86) +#if defined(CONFIG_PPC) /* initialize higher level parts of CPU like time base and timers */ cpu_init_r, #endif -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] x86: Refactor interrupt_init()
Rename interrupt_init() in arch/x86/lib/pcat_interrupts.c to i8259_init() and create a new interrupt_init() in arch/x86/cpu/interrupt.c to call i8259_init() followed by a call to cpu_init_interrupts(). Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/cpu/interrupts.c | 26 -- arch/x86/include/asm/i8259.h | 2 ++ arch/x86/lib/pcat_interrupts.c | 9 + 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index 51e2c59..ea03724 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -20,6 +20,7 @@ #include linux/compiler.h #include asm/msr.h #include asm/u-boot-x86.h +#include asm/i8259.h DECLARE_GLOBAL_DATA_PTR; @@ -128,9 +129,6 @@ int cpu_init_interrupts(void) int irq_entry_size = irq_1 - irq_0; void *irq_entry = (void *)irq_0; - /* Just in case... */ - disable_interrupts(); - /* Setup the IDT */ for (i = 0; i 256; i++) { idt[i].access = 0x8e; @@ -146,9 +144,6 @@ int cpu_init_interrupts(void) load_idt(idt_ptr); - /* It is now safe to enable interrupts */ - enable_interrupts(); - return 0; } @@ -172,6 +167,25 @@ int disable_interrupts(void) return flags X86_EFLAGS_IF; } +int interrupt_init(void) +{ + /* Just in case... */ + disable_interrupts(); + +#ifdef CONFIG_SYS_PCAT_INTERRUPTS + /* Initialize the master/slave i8259 pic */ + i8259_init(); +#endif + + /* Initialize core interrupt and exception functionality of CPU */ + cpu_init_interrupts(); + + /* It is now safe to enable interrupts */ + enable_interrupts(); + + return 0; +} + /* IRQ Low-Level Service Routine */ void irq_llsr(struct irq_regs *regs) { diff --git a/arch/x86/include/asm/i8259.h b/arch/x86/include/asm/i8259.h index 73113f9..bc4033b 100644 --- a/arch/x86/include/asm/i8259.h +++ b/arch/x86/include/asm/i8259.h @@ -69,4 +69,6 @@ #defineICW4_AEOI 0x02/* Automatic EOI Mode */ #define ICW4_PM0x01/* Microprocessor Mode */ +int i8259_init(void); + #endif diff --git a/arch/x86/lib/pcat_interrupts.c b/arch/x86/lib/pcat_interrupts.c index 2ce371e..27c7f08 100644 --- a/arch/x86/lib/pcat_interrupts.c +++ b/arch/x86/lib/pcat_interrupts.c @@ -24,12 +24,10 @@ #error CONFIG_SYS_NUM_IRQS must equal 16 if CONFIG_SYS_NUM_IRQS is defined #endif -int interrupt_init(void) +int i8259_init(void) { u8 i; - disable_interrupts(); - /* Mask all interrupts */ outb(0xff, MASTER_PIC + IMR); outb(0xff, SLAVE_PIC + IMR); @@ -62,11 +60,6 @@ int interrupt_init(void) */ unmask_irq(2); - /* Initialize core interrupt and exception functionality of CPU */ - cpu_init_interrupts(); - - enable_interrupts(); - return 0; } -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] x86: Remove unnecessary call to initr_enable_interrupts()
Actually initr_enable_interrupts() was never called in an x86 build due to it was wrapped by CONFIG_x86 (typo of X86). Signed-off-by: Bin Meng bmeng...@gmail.com --- common/board_r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_r.c b/common/board_r.c index b5ea030..128fcce 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -841,7 +841,7 @@ init_fnc_t init_sequence_r[] = { board_early_init_r, #endif interrupt_init, -#if defined(CONFIG_ARM) || defined(CONFIG_x86) +#if defined(CONFIG_ARM) initr_enable_interrupts, #endif #ifdef CONFIG_X86 -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] x86: Call cpu_init_interrupts() from interrupt_init()
Currently cpu_init_interrupts() is called from cpu_init_r() to setup the interrupt and exception of the cpu core, but at that time the i8259 has not been initialized to mask all the irqs and remap the master i8259 interrupt vector base, so the whole system is at risk of being interrupted, and if interrupted, wrong interrupt/exception message is shown. Signed-off-by: Bin Meng bmeng...@gmail.com --- arch/x86/cpu/cpu.c | 2 -- arch/x86/lib/pcat_interrupts.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 97c77ba..cf0606e 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -321,8 +321,6 @@ int x86_cpu_init_f(void) int x86_cpu_init_r(void) { - /* Initialize core interrupt and exception functionality of CPU */ - cpu_init_interrupts(); return 0; } int cpu_init_r(void) __attribute__((weak, alias(x86_cpu_init_r))); diff --git a/arch/x86/lib/pcat_interrupts.c b/arch/x86/lib/pcat_interrupts.c index 4c86f7f..2ce371e 100644 --- a/arch/x86/lib/pcat_interrupts.c +++ b/arch/x86/lib/pcat_interrupts.c @@ -62,6 +62,9 @@ int interrupt_init(void) */ unmask_irq(2); + /* Initialize core interrupt and exception functionality of CPU */ + cpu_init_interrupts(); + enable_interrupts(); return 0; -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: exynos: fix the div value for set_mmc_clk
The most exynos used the Ratio + 1 as div value. And value at register is Ratio. So if want to set exact value, it needs to subtract one. Value at register (Ratio) = div - 1 Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com --- arch/arm/cpu/armv7/exynos/clock.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 4ecce44..6633ffe 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -1654,6 +1654,12 @@ unsigned long get_mmc_clk(int dev_index) void set_mmc_clk(int dev_index, unsigned int div) { + /* +* If want to set correct value, it needs to substract one from div. +*/ + if (div 0) + div -= 1; + if (cpu_is_exynos5()) { if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_set_mmc_clk(dev_index, div); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: mx53loco: Add raw initrd support
-Original Message- From: Guillaume GARDET [mailto:guillaume.gar...@free.fr] Sent: Thursday, November 20, 2014 3:39 PM To: u-boot@lists.denx.de Cc: Guillaume GARDET; Stefano Babic; Liu Hui-R64343 Subject: [U-Boot] [PATCH] imx: mx53loco: Add raw initrd support Signed-off-by: Guillaume GARDET guillaume.gar...@free.fr Cc: Stefano Babic sba...@denx.de Cc: Jason Liu r64...@freescale.com Acked-by: Jason Liu r64...@freescale.com --- include/configs/mx53loco.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 10fb1f4..42bc3c8 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -94,6 +94,7 @@ /* Command definition */ #include config_cmd_default.h #define CONFIG_CMD_BOOTZ +#define CONFIG_SUPPORT_RAW_INITRD #undef CONFIG_CMD_IMLS -- 1.8.4.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] cmd_fuse: return CMD_RET_FAILURE on error
Fuse drivers, like the mxs_ocotp.c, may return negative error codes but the commands are only allowed to return CMD_RET_* enum values to the shell, otherwise the following error appears: exit not allowed from main input shell. Signed-off-by: Hector Palacios hector.palac...@digi.com --- Changes for v2: Reword commit message. common/cmd_fuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cmd_fuse.c b/common/cmd_fuse.c index abab9789b0df..d4bc0f6c94a1 100644 --- a/common/cmd_fuse.c +++ b/common/cmd_fuse.c @@ -128,7 +128,7 @@ static int do_fuse(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) err: puts(ERROR\n); - return ret; + return CMD_RET_FAILURE; } U_BOOT_CMD( ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 0/9] Add full DDR init for Marvell Armada-XP MV78xx0 (AXP)
Hi Prafulla, On 28.10.2014 10:35, Stefan Roese wrote: This patch adds the DDR3 setup and training code taken from the Marvell U-Boot repository. This code used to be included as a binary (bin_hdr) into the AXP boot image. Not linked with the main U-Boot. With this code addition and the also included SERDES / PHY setup code, the Armada-XP support in mainline U-Boot is finally self-contained. So the complete image for booting can be built from mainline U-Boot. Without any additional external inclusion. Hopefully other MVEBU SoC's will follow here. Tested on AXP using a SPD DIMM setup on the Marvell DB-MV784MP-GP board and on a custom fixed DDR configuration board (maxbcm with MV78460). Prafulla, how should we continue with this patch-set? Do you have any comments on it? If you are okay with it, do you plan to pull it via your repository? Or should I pull it via some branch in one of my repositories? Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 2/2] odroid: usbhost - Add missing gpio_request call
Dear Suriyan Ramasami, On 20/11/14 01:21, Suriyan Ramasami wrote: The USB host code was missing gpio_request() calls before using the gpio functions, causing errors to be printed out. Signed-off-by: Suriyan Ramasami suriya...@gmail.com --- Changes in v1: - Added gpio_request() call in board_gpio_init() board/samsung/odroid/odroid.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index f7396ab..a2c008e 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -382,6 +382,17 @@ static void board_gpio_init(void) gpio_set_pull(EXYNOS4X12_GPIO_X31, S5P_GPIO_PULL_UP); gpio_set_drv(EXYNOS4X12_GPIO_X31, S5P_GPIO_DRV_4X); gpio_direction_input(EXYNOS4X12_GPIO_X31); + +#ifdef CONFIG_CMD_USB + /* USB3503A Reference frequency */ + gpio_request(EXYNOS4X12_GPIO_X30, USB3503A RefFreq); + + /* USB3503A Connect */ + gpio_request(EXYNOS4X12_GPIO_X34, USB3503A Connect); + + /* USB3503A Reset */ + gpio_request(EXYNOS4X12_GPIO_X35, USB3503A Reset); +#endif } static int pmic_init_max77686(void) @@ -489,10 +500,8 @@ int board_usb_init(int index, enum usb_init_type init) p_pmic = pmic_get(MAX77686_PMIC); if (p_pmic !pmic_probe(p_pmic)) { - max77686_set_buck_mode(p_pmic, 8, OPMODE_OFF); max77686_set_buck_voltage(p_pmic, 8, 75); max77686_set_buck_voltage(p_pmic, 8, 330); - max77686_set_buck_mode(p_pmic, 8, OPMODE_ON); why you remove those two lines? This patch is for adding gpio_request call, and there's no explain for this change. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: make arch memset/memcpy to work with Thumb2 builds
Hello Stefan, On 19-11-14 15:16, Stefan Agner wrote: Resynchronize memcpy/memset with kernel and build them explicitly in Thumb2 mode (unified syntax). Those assembler files can be built and linked in ARM mode too, however when calling them from Thumb2 built code, the stack got corrupted and the copy did not succeed (the exact details have not been traced back). Hoever, the Linux kernel builds those files in Thumb2 mode. Hence U-Boot should build them in Thumb2 mode too when CONFIG_SYS_THUMB_BUILD is set. Also add implicit-it=always to AFLAGS when building for Thumb2. Furthermore add no-warn-deprecated option to AFLAGS to rid of deprecated unified syntax: arch/arm/lib/memcpy.S: Assembler messages: arch/arm/lib/memcpy.S:153: Warning: conditional infixes are deprecated in unified syntax arch/arm/lib/memcpy.S:154: Warning: conditional infixes are deprecated in unified syntax ... Any particular reason not to fix these warnings instead? It Is just a matter of making the conditionals suffixes. [I guess you can even disassemble to file to get the UAL represenation]. Or are there gas version around which actually choke on that? Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 3/3] sunxi: video: Add simplefb support
On Wed, 2014-11-19 at 14:32 +0100, Hans de Goede wrote: From: Luc Verhaegen l...@skynet.be Add simplefb support, note this depends on the kernel having support for the clocks property which has recently been added to the simplefb devicetree binding. Signed-off-by: Luc Verhaegen l...@skynet.be [hdego...@redhat.com: Use pre-populated simplefb node under /chosen as disussed on the devicetree list] Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Ian Campbell i...@hellion.org.uk. One non-blocking queries: + /* Find a framebuffer node, with pipeline == de_be0-lcd0-hdmi */ + offset = fdt_node_offset_by_compatible(blob, -1, +allwinner,simple-framebuffer); + while (offset = 0) { + ret = fdt_find_string(blob, offset, allwinner,pipeline, + de_be0-lcd0-hdmi); + if (ret == 0) + break; + offset = fdt_node_offset_by_compatible(blob, offset, +allwinner,simple-framebuffer); + } Is this variant non-conformant with coding style?: int offset = -1; while ( (offset = fdt_node_offset_by_compatible(blob, offset, allwinner,simple-framebuffer) ) { LOOP BODY } I expect it is because of the assignment within the while condition, which is a shame, since this is one case where it is IMHO leads to clearer code. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] novena: Move the DCD settings to spl code
On 14/11/2014 21:07, Marek Vasut wrote: On Friday, November 14, 2014 at 12:37:01 PM, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com mx6sabresd_spl.cfg configures CCM registers, GPR registers and CCM_CCOSR. Move the configuration to the spl code. CCM_CCOSR setting is no longer required to get audio functionality in the kernel, so remove such setting. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Board still works. I wonder you can compile it, because crm_regs.h is missing in novena_spl.c. I fix it myself, but I am wondering that it worked on your side. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4] ARM: mxs: tools: Add support for boot progress display flag
Hi Alexey, On 11/10/2014 23:43, Alexey Ignatov wrote: mkimage -T mxs now support new flag in config file: DISPLAYPROGRESS - makes boot process print HTLLC characters for each BootROM instruction. Signed-off-by: Alexey Ignatov lexsz...@gmail.com --- After fixing a couple of checkpatch's warnings: Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] imx:mx6sxsabresd fix pfuz probe failed
On 31/10/2014 04:08, Peng Fan wrote: The PFUZ probe failed with the following msg: wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=0 wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=1 wait_for_sr_state: failed sr=81 cr=a0 state=2020 i2c_init_transfer: failed for chip 0x8 retry=2 i2c_init_transfer: give up i2c_regs=021a Can't find PMIC:PFUZE100 board_early_init_f is too early to call i2c related setting, because init_func_i2c is called after board_early_init_f being invoked. Thus move setup_i2c into board_init. Also PFUZ is connected to I2C bus 0, so change 1 - 0. Using this patch PFUZ can be correctly probed: PMIC: PFUZE100 ID=0x11 Signed-off-by: Peng Fan peng@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] imx: mx6slevk: Change default mmcdev to USDHC2 device
On 04/11/2014 08:26, Ye.Li wrote: Since USDHC1 and USDHC3 added, the dev index for USDHC2 changed to 1. So modify the default mmcdev in environment variables to dev 1. Signed-off-by: Ye.Li b37...@freescale.com --- include/configs/mx6slevk.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 4fcaf51..271548c 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -87,7 +87,7 @@ fdt_addr=0x8800\0 \ boot_fdt=try\0 \ ip_dyn=yes\0 \ - mmcdev=0\0 \ + mmcdev=1\0 \ mmcpart=1\0 \ mmcroot=/dev/mmcblk0p2 rootwait rw\0 \ mmcargs=setenv bootargs console=${console},${baudrate} \ Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/2] imx: fix exception vectors relocation in imx27
Hi Albert, On 13/11/2014 17:59, Albert ARIBAUD wrote: Commit 3ff46cc4 fixed exception vectors setting in the general ARM case, by either copying the exception and indirect vector tables to normal (0x) or high (0x) vectors address, or setting VBAR to U-Boot's base if applicable. i.MX27 SoC is ARM926E-JS, thus has only normal and high options, but does not provide RAM at 0x and has only ROM at 0x; it is therefore not possible to move or change its exception vectors. Besides, i.MX27 ROM code does provide an indirect vectors table but at a non-standard address and with the reset and reserved vectors missing. Turn the current vector relocation code into a weak routine called after relocate_code from crt0, and add strong version for i.MX27. Series-Cc: Heiko Schocher h...@denx.de Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 1/4] mx6sabresd: Move the DCD settings to spl code
On 14/11/2014 12:36, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com mx6sabresd_spl.cfg configures CCM registers, GPR registers and CCM_CCOSR. Move the configuration to the spl code. CCM_CCOSR setting is no longer required to get audio functionality in the kernel, so remove such setting. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/4] gw_ventana: Move the DCD settings to spl code
On 14/11/2014 12:37, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com mx6sabresd_spl.cfg configures CCM registers, GPR registers and CCM_CCOSR. Move the configuration to the spl code. CCM_CCOSR setting is no longer required to get audio functionality in the kernel, so remove such setting. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 4/4] mx6: Use a common SPL configuration file
On 14/11/2014 12:37, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Many boards use a minimal .cfg file in the SPL case. Introduce spl_sd.cfg so that we can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 3/4] novena: Move the DCD settings to spl code
On 14/11/2014 12:37, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com mx6sabresd_spl.cfg configures CCM registers, GPR registers and CCM_CCOSR. Move the configuration to the spl code. CCM_CCOSR setting is no longer required to get audio functionality in the kernel, so remove such setting. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- After a small fix (include crm_regs.h): Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 1/3] imx: consolidate set_chipselect_size function
On 14/11/2014 14:27, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Move MX5 specific set_chipselect_size function into generic i.MX part, such that MX6 based boards are able to use this function as well. While doing this the iomuxc gpr member needed to be consolidated between MX5 and MX6. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/armv7/mx5/soc.c | 31 --- arch/arm/imx-common/cpu.c | 31 +++ arch/arm/include/asm/arch-imx/cpu.h | 5 + arch/arm/include/asm/arch-mx5/imx-regs.h | 12 ++-- arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + 5 files changed, 39 insertions(+), 41 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 2d53669..3753c14 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c @@ -85,37 +85,6 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) } #endif -void set_chipselect_size(int const cs_size) -{ - unsigned int reg; - struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; - reg = readl(iomuxc_regs-gpr1); - - switch (cs_size) { - case CS0_128: - reg = ~0x7;/* CS0=128MB, CS1=0, CS2=0, CS3=0 */ - reg |= 0x5; - break; - case CS0_64M_CS1_64M: - reg = ~0x3F; /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */ - reg |= 0x1B; - break; - case CS0_64M_CS1_32M_CS2_32M: - reg = ~0x1FF; /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */ - reg |= 0x4B; - break; - case CS0_32M_CS1_32M_CS2_32M_CS3_32M: - reg = ~0xFFF; /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */ - reg |= 0x249; - break; - default: - printf(Unknown chip select size: %d\n, cs_size); - break; - } - - writel(reg, iomuxc_regs-gpr1); -} - #ifdef CONFIG_MX53 void boot_mode_apply(unsigned cfg_val) { diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 09fc227..24740b8 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -187,3 +187,34 @@ void arch_preboot_os(void) ipuv3_fb_shutdown(); } #endif + +void set_chipselect_size(int const cs_size) +{ + unsigned int reg; + struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; + reg = readl(iomuxc_regs-gpr[1]); + + switch (cs_size) { + case CS0_128: + reg = ~0x7;/* CS0=128MB, CS1=0, CS2=0, CS3=0 */ + reg |= 0x5; + break; + case CS0_64M_CS1_64M: + reg = ~0x3F; /* CS0=64MB, CS1=64MB, CS2=0, CS3=0 */ + reg |= 0x1B; + break; + case CS0_64M_CS1_32M_CS2_32M: + reg = ~0x1FF; /* CS0=64MB, CS1=32MB, CS2=32MB, CS3=0 */ + reg |= 0x4B; + break; + case CS0_32M_CS1_32M_CS2_32M_CS3_32M: + reg = ~0xFFF; /* CS0=32MB, CS1=32MB, CS2=32MB, CS3=32MB */ + reg |= 0x249; + break; + default: + printf(Unknown chip select size: %d\n, cs_size); + break; + } + + writel(reg, iomuxc_regs-gpr[1]); +} diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h index a3cc96f..254136e 100644 --- a/arch/arm/include/asm/arch-imx/cpu.h +++ b/arch/arm/include/asm/arch-imx/cpu.h @@ -12,3 +12,8 @@ #define MXC_CPU_MX6Q 0x63 #define MXC_CPU_MX6D 0x64 #define MXC_CPU_MX6SOLO 0x65 /* dummy ID */ + +#define CS0_128 0 +#define CS0_64M_CS1_64M 1 +#define CS0_64M_CS1_32M_CS2_32M 2 +#define CS0_32M_CS1_32M_CS2_32M_CS3_32M 3 diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h index 054c680..f059d0f 100644 --- a/arch/arm/include/asm/arch-mx5/imx-regs.h +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h @@ -202,11 +202,6 @@ */ #define WBED 1 -#define CS0_128 0 -#define CS0_64M_CS1_64M 1 -#define CS0_64M_CS1_32M_CS2_32M 2 -#define CS0_32M_CS1_32M_CS2_32M_CS3_32M 3 - /* * CSPI register definitions */ @@ -414,8 +409,7 @@ struct weim { #if defined(CONFIG_MX51) struct iomuxc { - u32 gpr0; - u32 gpr1; + u32 gpr[2]; u32 omux0; u32 omux1; u32 omux2; @@ -424,9 +418,7 @@ struct iomuxc { }; #elif defined(CONFIG_MX53) struct iomuxc { - u32 gpr0; - u32 gpr1; - u32 gpr2; + u32 gpr[3]; u32 omux0; u32 omux1; u32 omux2; diff --git
Re: [U-Boot] [PATCH 2/3] mx6: add weim registers
On 14/11/2014 14:27, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 3/3] mx6qsabreauto: Add parallel NOR flash support
On 14/11/2014 14:27, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com mx6sabreauto boards come with 32 MiB of parallel NOR flash. Add support for it: U-Boot 2015.01-rc1-18107-g1543636-dirty (Nov 14 2014 - 11:11:04) CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: MX6Q-Sabreauto revA I2C: ready DRAM: 2 GiB Flash: 32 MiB NAND: 0 MiB Due to pin conflict with I2C3, only define configure I2C3 IOMUX when flash is not used. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] tools/msximage.c: fix warning about nptr possibly uninitialized
On 14/11/2014 16:16, Albert ARIBAUD wrote: Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 1/2] wandboard: Fix error handling in board_mmc_init()
On 15/11/2014 17:50, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com When an invalid USDHC port is passed we should return -EINVAL instead of 0. Also, return the error immediately on fsl_esdhc_initialize() failure. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/2] mx53loco: Fix error handling in board_mmc_init()
On 15/11/2014 17:50, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com When an invalid USDHC port is passed we should return -EINVAL instead of 0. Also, return the error immediately on fsl_esdhc_initialize() failure. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] mx6sabresd: State that only mx6q is supported in SPL
On 15/11/2014 17:57, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Make clear that current SPL code only supports the mx6q variant. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 1/4] tqma6: (cosmetic) remove CONFIG_FLASH_SECTOR_SIZE
On 18/11/2014 13:22, Markus Niebel wrote: From: Markus Niebel markus.nie...@tq-group.com This is nowhere documented and only used by two other boards. Replace it with TQMA6_SPI_FLASH_SECTOR_SIZE. Signed-off-by: Markus Niebel markus.nie...@tq-group.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/4] tqma6: add missing include
On 18/11/2014 13:22, Markus Niebel wrote: From: Markus Niebel markus.nie...@tq-group.com Add include needed to have prototype for board_spi_cs_gpio Signed-off-by: Markus Niebel markus.nie...@tq-group.com --- board/tqc/tqma6/tqma6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index fd1bd59..5e913d7 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -17,6 +17,7 @@ #include asm/gpio.h #include asm/io.h #include asm/imx-common/mxc_i2c.h +#include asm/imx-common/spi.h #include common.h #include fsl_esdhc.h #include libfdt.h Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 3/4] tqma6: add warning on failed setup_i2c
On 18/11/2014 13:22, Markus Niebel wrote: From: Markus Niebel markus.nie...@tq-group.com setup_i2c has a return value. Use it to give feedback on error. Signed-off-by: Markus Niebel markus.nie...@tq-group.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 4/4] tqma6: use imx_ddr_size
On 18/11/2014 13:22, Markus Niebel wrote: From: Markus Niebel markus.nie...@tq-group.com Signed-off-by: Markus Niebel markus.nie...@tq-group.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] mx6sabresd: Access SRC_SBMR1 register via structure
On 18/11/2014 14:26, Fabio Estevam wrote: In U-boot it is preferred to access the register via structure pointer, so convert it such style. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] [PATCH] scripts/Makefile.lib: Make __dtb_dt_begin align on a 4 byte boundary
With CONFIG_OF_EMBED, __dtb_dt_begin must be aligned on a 4 byte boundary otherwise fdtdec_prepare_fdt() will fail. Signed-off-by: Bin Meng bmeng...@gmail.com --- scripts/Makefile.lib | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 9d1383a..aead250 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -260,6 +260,7 @@ quiet_cmd_dt_S_dtb= DTB $@ cmd_dt_S_dtb= \ ( \ echo '.section .dtb.init.rodata,a'; \ + echo '.p2align 2'; \ echo '.global __dtb_$(*F)_begin'; \ echo '__dtb_$(*F)_begin:'; \ echo '.incbin $ '; \ -- 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 v4 3/3] ARM: atmel: add sama5d4ek board support
Hi Bo, On Mon, 10 Nov 2014 15:24:02 +0800 Bo Shen voice.s...@atmel.com wrote: diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig new file mode 100644 index 000..16a5ed7 --- /dev/null +++ b/configs/sama5d4ek_mmc_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_MMC ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig new file mode 100644 index 000..8b7fbc3 --- /dev/null +++ b/configs/sama5d4ek_nandflash_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_NANDFLASH ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig new file mode 100644 index 000..63e9b6c --- /dev/null +++ b/configs/sama5d4ek_spiflash_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_SERIALFLASH ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y These three defconfigs added +S prefix to CONFIG_ARM and CONFIG_TARGET_SAMA5D4EK but did not define CONFIG_SPL=y My question is do they support SPL, or not? 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 v3 1/2] mmc: fsl_esdhc: Update esdhc driver for iMX6SX
On 04/11/2014 08:35, Ye.Li wrote: The reset value of uSDHCx_INT_STATUS_EN register is changed to 0 on iMX6SX. So the fsl_esdhc driver must update to set the register, otherwise no state can be detected. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/2] imx: mx6sxsabresd: Add board support for USDHC2 and USDHC3
On 04/11/2014 08:36, Ye.Li wrote: Add full support for USDHC2, USDHC3, USDHC4 on mx6sx sabresd board. The default boot socket is USDHC4, so the MMC environment device and mmcdev variable are set to this device. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/3] ARM: atmel: add sama5d4ek board support
Hi Masahiro, On 11/20/2014 05:45 PM, Masahiro Yamada wrote: Hi Bo, On Mon, 10 Nov 2014 15:24:02 +0800 Bo Shen voice.s...@atmel.com wrote: diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig new file mode 100644 index 000..16a5ed7 --- /dev/null +++ b/configs/sama5d4ek_mmc_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_MMC ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig new file mode 100644 index 000..8b7fbc3 --- /dev/null +++ b/configs/sama5d4ek_nandflash_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_NANDFLASH ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig new file mode 100644 index 000..63e9b6c --- /dev/null +++ b/configs/sama5d4ek_spiflash_defconfig @@ -0,0 +1,3 @@ +CONFIG_SYS_EXTRA_OPTIONS=SAMA5D4,SYS_USE_SERIALFLASH ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_SAMA5D4EK=y These three defconfigs added +S prefix to CONFIG_ARM and CONFIG_TARGET_SAMA5D4EK but did not define CONFIG_SPL=y My question is do they support SPL, or not? The code applied now won't support SPL. I am preparing the SPL code, will send it soon. Best Regards Masahiro Yamada Best Regards, Bo Shen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 5/5] imx: imx6q/dlsabreauto: Add PMIC Pfuze100 support
On 06/11/2014 09:29, Ye.Li wrote: Add the pfuze100 initialization in power_init_board for imx6q/dl sabreauto board. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 4/5] imx: mx6sxsabresd: Use the pfuze common init function
On 06/11/2014 09:29, Ye.Li wrote: Modify the pfuze init for mx6sxsabresd to use the shared pfuze_common_init function. And move this initialization to power_init_board. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 3/5] imx: mx6sabresd: Use the pfuze common init function
On 06/11/2014 09:29, Ye.Li wrote: Modify the pfuze init for mx6sabresd to use the shared pfuze_common_init function. And move this initialization to power_init_board. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 2/5] imx: mx6sabre common: Factorize the Pfuze init function
On 06/11/2014 09:28, Ye.Li wrote: Since the Pfuze initializations are similar on various mx6 SABRE boards. Factorize the initialization to a common function in file board/freescale/common/pfuze.c. So that all SABRE boards BSP can share the function. Signed-off-by: Ye.Li b37...@freescale.com --- After rebasing on current u-boot-imx and fixing the following checkpatch errors: ERROR: foo * bar should be foo *bar #182: FILE: board/freescale/common/pfuze.c:11: +struct pmic * pfuze_common_init(unsigned char i2cbus) ERROR: foo * bar should be foo *bar #241: FILE: board/freescale/common/pfuze.h:10: +struct pmic * pfuze_common_init(unsigned char i2cbus); Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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 1/5] power: pfuze100: Update definitions for buck regulators
On 06/11/2014 09:28, Ye.Li wrote: Add definitions for buck regulators (SW1A/B/C) registers and voltage values. Signed-off-by: Ye.Li b37...@freescale.com --- Applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] scripts/Makefile.lib: Make __dtb_dt_begin align on a 4 byte boundary
Hi Bin, I think this issue is covered by Simon's patch: http://patchwork.ozlabs.org/patch/411062/ On Thu, 20 Nov 2014 17:45:06 +0800 Bin Meng bmeng...@gmail.com wrote: With CONFIG_OF_EMBED, __dtb_dt_begin must be aligned on a 4 byte boundary otherwise fdtdec_prepare_fdt() will fail. Signed-off-by: Bin Meng bmeng...@gmail.com --- scripts/Makefile.lib | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 9d1383a..aead250 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -260,6 +260,7 @@ quiet_cmd_dt_S_dtb= DTB $@ cmd_dt_S_dtb=\ (\ echo '.section .dtb.init.rodata,a'; \ + echo '.p2align 2'; \ echo '.global __dtb_$(*F)_begin'; \ echo '__dtb_$(*F)_begin:'; \ echo '.incbin $ '; \ -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] scripts/Makefile.lib: Make __dtb_dt_begin align on a 4 byte boundary
Hi Masahiro, On Thu, Nov 20, 2014 at 6:04 PM, Masahiro Yamada yamad...@jp.panasonic.com wrote: Hi Bin, I think this issue is covered by Simon's patch: http://patchwork.ozlabs.org/patch/411062/ Thanks for the info. I did not notice that patch before. Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] arm: semihosting: staticize internal functions
The semihosting code exposes internal file handle handling functions to read(), open(), close() and get the length of a certain file handle. However the code using it is only interested in either reading and entire named file into memory or getting the file length of a file referred by name. No file handles are used. Thus make the file handle code internal to this file by removing these functions from the semihosting header file and staticize them. This gives us some freedom to rearrange the semihosting code without affecting the external interface. Cc: Darwin Rambo dra...@broadcom.com Cc: AKASHI Takahiro takahiro.aka...@linaro.org Cc: Mark Hambleton mark.hamble...@arm.com Cc: Tom Rini tr...@ti.com Signed-off-by: Linus Walleij linus.wall...@linaro.org --- arch/arm/include/asm/semihosting.h | 4 arch/arm/lib/semihosting.c | 13 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/semihosting.h b/arch/arm/include/asm/semihosting.h index 74111dc359d1..e59b44ed6068 100644 --- a/arch/arm/include/asm/semihosting.h +++ b/arch/arm/include/asm/semihosting.h @@ -12,10 +12,6 @@ * code for more information. */ int smh_load(const char *fname, void *memp, int avail, int verbose); -int smh_read(int fd, void *memp, int len); -int smh_open(const char *fname, char *modestr); -int smh_close(int fd); -int smh_len_fd(int fd); int smh_len(const char *fname); #endif /* __SEMIHOSTING_H__ */ diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index cb5dc26ac3fa..92bbabe158fe 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -23,6 +23,11 @@ #define MODE_READ 0x0 #define MODE_READBIN 0x1 +static int smh_read(int fd, void *memp, int len); +static int smh_open(const char *fname, char *modestr); +static int smh_close(int fd); +static int smh_len_fd(int fd); + /* * Call the handler */ @@ -96,7 +101,7 @@ int smh_load(const char *fname, void *memp, int avail, int verbose) /* * Read 'len' bytes of file into 'memp'. Returns 0 on success, else failure */ -int smh_read(int fd, void *memp, int len) +static int smh_read(int fd, void *memp, int len) { int ret; struct smh_read_s { @@ -131,7 +136,7 @@ int smh_read(int fd, void *memp, int len) * Open a file on the host. Mode is r or rb currently. Returns a file * descriptor or -1 on error. */ -int smh_open(const char *fname, char *modestr) +static int smh_open(const char *fname, char *modestr) { int ret, fd, mode; struct smh_open_s { @@ -171,7 +176,7 @@ int smh_open(const char *fname, char *modestr) /* * Close the file using the file descriptor */ -int smh_close(int fd) +static int smh_close(int fd) { int ret; long fdlong; @@ -189,7 +194,7 @@ int smh_close(int fd) /* * Get the file length from the file descriptor */ -int smh_len_fd(int fd) +static int smh_len_fd(int fd) { int ret; long fdlong; -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] arm: semihosting: fix up compile bugs
There is currently a regression when using newer ARM64 compilers for semihosting: the way long types are inferred from context is no longer the same. The semihosting runtime uses long and size_t, so use this explicitly in the semihosting code and interface, and voila: the code now works again. Tested with aarch64-linux-gnu-gcc: Linaro GCC 4.9-2014.09. Cc: Darwin Rambo dra...@broadcom.com Cc: AKASHI Takahiro takahiro.aka...@linaro.org Cc: Mark Hambleton mark.hamble...@arm.com Cc: Tom Rini tr...@ti.com Suggested-by: Mark Hambleton mark.hamble...@arm.com Signed-off-by: Linus Walleij linus.wall...@linaro.org --- arch/arm/include/asm/semihosting.h | 2 +- arch/arm/lib/semihosting.c | 101 +++-- 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/arch/arm/include/asm/semihosting.h b/arch/arm/include/asm/semihosting.h index e59b44ed6068..835ca7e4b683 100644 --- a/arch/arm/include/asm/semihosting.h +++ b/arch/arm/include/asm/semihosting.h @@ -12,6 +12,6 @@ * code for more information. */ int smh_load(const char *fname, void *memp, int avail, int verbose); -int smh_len(const char *fname); +long smh_len(const char *fname); #endif /* __SEMIHOSTING_H__ */ diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index 92bbabe158fe..6e1b2d182eca 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -23,17 +23,17 @@ #define MODE_READ 0x0 #define MODE_READBIN 0x1 -static int smh_read(int fd, void *memp, int len); -static int smh_open(const char *fname, char *modestr); -static int smh_close(int fd); -static int smh_len_fd(int fd); +static long smh_read(long fd, void *memp, size_t len); +static long smh_open(const char *fname, char *modestr); +static long smh_close(long fd); +static long smh_len_fd(long fd); /* * Call the handler */ -static int smh_trap(unsigned int sysnum, void *addr) +static long smh_trap(unsigned int sysnum, void *addr) { - register int result asm(r0); + register long result asm(r0); #if defined(CONFIG_ARM64) asm volatile (hlt #0xf000 : =r (result) : 0(sysnum), r(addr)); #else @@ -51,7 +51,9 @@ static int smh_trap(unsigned int sysnum, void *addr) */ int smh_load(const char *fname, void *memp, int avail, int verbose) { - int ret, fd, len; + long ret; + long fd; + size_t len; ret = -1; @@ -61,21 +63,21 @@ int smh_load(const char *fname, void *memp, int avail, int verbose) /* Open the file */ fd = smh_open(fname, rb); if (fd == -1) - return ret; + return -1; /* Get the file length */ ret = smh_len_fd(fd); if (ret == -1) { smh_close(fd); - return ret; + return -1; } /* Check that the file will fit in the supplied buffer */ if (ret avail) { - printf(%s: ERROR ret %d, avail %u\n, __func__, ret, + printf(%s: ERROR ret %ld, avail %u\n, __func__, ret, avail); smh_close(fd); - return ret; + return -1; } len = ret; @@ -87,7 +89,7 @@ int smh_load(const char *fname, void *memp, int avail, int verbose) if (verbose) { printf(\n%s\n, fname); printf(0x%8p dest\n, memp); - printf(0x%08x size\n, len); + printf(0x%08lx size\n, len); printf(0x%08x avail\n, avail); } } @@ -101,54 +103,53 @@ int smh_load(const char *fname, void *memp, int avail, int verbose) /* * Read 'len' bytes of file into 'memp'. Returns 0 on success, else failure */ -static int smh_read(int fd, void *memp, int len) +static long smh_read(long fd, void *memp, size_t len) { - int ret; + long ret; struct smh_read_s { - int fd; + long fd; void *memp; - int len; + size_t len; } read; - debug(%s: fd %d, memp %p, len %d\n, __func__, fd, memp, len); + debug(%s: fd %ld, memp %p, len %lu\n, __func__, fd, memp, len); read.fd = fd; read.memp = memp; read.len = len; ret = smh_trap(SYSREAD, read); - if (ret == 0) { - return 0; - } else { + if (ret 0) { /* * The ARM handler allows for returning partial lengths, * but in practice this never happens so rather than create * hard to maintain partial read loops and such, just fail * with an error message. */ - printf(%s: ERROR ret %d, fd %d, len %u memp %p\n, + printf(%s: ERROR ret %ld, fd %ld, len %lu memp %p\n, __func__, ret, fd, len, memp); + return -1; } -
[U-Boot] [PATCH 3/3] arm: semihosting: get rid of forward declarations
By rearranging the functions in the semihosting code we can avoid forward-declaration of the internal static functions. This puts the stuff in a logical order: read/open/close/len and then higher-order functions follow at the end. Cc: Darwin Rambo dra...@broadcom.com Cc: AKASHI Takahiro takahiro.aka...@linaro.org Cc: Mark Hambleton mark.hamble...@arm.com Cc: Tom Rini tr...@ti.com Signed-off-by: Linus Walleij linus.wall...@linaro.org --- arch/arm/lib/semihosting.c | 173 ++--- 1 file changed, 84 insertions(+), 89 deletions(-) diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c index 6e1b2d182eca..2eacbacfde0f 100644 --- a/arch/arm/lib/semihosting.c +++ b/arch/arm/lib/semihosting.c @@ -23,11 +23,6 @@ #define MODE_READ 0x0 #define MODE_READBIN 0x1 -static long smh_read(long fd, void *memp, size_t len); -static long smh_open(const char *fname, char *modestr); -static long smh_close(long fd); -static long smh_len_fd(long fd); - /* * Call the handler */ @@ -44,60 +39,43 @@ static long smh_trap(unsigned int sysnum, void *addr) } /* - * Open, load a file into memory, and close it. Check that the available space - * is sufficient to store the entire file. Return the bytes actually read from - * the file as seen by the read function. The verbose flag enables some extra - * printing of successful read status. + * Open a file on the host. Mode is r or rb currently. Returns a file + * descriptor or -1 on error. */ -int smh_load(const char *fname, void *memp, int avail, int verbose) +static long smh_open(const char *fname, char *modestr) { - long ret; long fd; - size_t len; - - ret = -1; - - debug(%s: fname \'%s\', avail %u, memp %p\n, __func__, fname, - avail, memp); - - /* Open the file */ - fd = smh_open(fname, rb); - if (fd == -1) - return -1; + unsigned long mode; + struct smh_open_s { + const char *fname; + unsigned long mode; + size_t len; + } open; - /* Get the file length */ - ret = smh_len_fd(fd); - if (ret == -1) { - smh_close(fd); - return -1; - } + debug(%s: file \'%s\', mode \'%s\'\n, __func__, fname, modestr); - /* Check that the file will fit in the supplied buffer */ - if (ret avail) { - printf(%s: ERROR ret %ld, avail %u\n, __func__, ret, - avail); - smh_close(fd); + /* Check the file mode */ + if (!(strcmp(modestr, r))) { + mode = MODE_READ; + } else if (!(strcmp(modestr, rb))) { + mode = MODE_READBIN; + } else { + printf(%s: ERROR mode \'%s\' not supported\n, __func__, + modestr); return -1; } - len = ret; - - /* Read the file into the buffer */ - ret = smh_read(fd, memp, len); - if (ret == 0) { - /* Print successful load information if requested */ - if (verbose) { - printf(\n%s\n, fname); - printf(0x%8p dest\n, memp); - printf(0x%08lx size\n, len); - printf(0x%08x avail\n, avail); - } - } + open.fname = fname; + open.len = strlen(fname); + open.mode = mode; - /* Close the file */ - smh_close(fd); + /* Open the file on the host */ + fd = smh_trap(SYSOPEN, open); + if (fd == -1) + printf(%s: ERROR fd %ld for file \'%s\'\n, __func__, fd, + fname); - return ret; + return fd; } /* @@ -135,46 +113,6 @@ static long smh_read(long fd, void *memp, size_t len) } /* - * Open a file on the host. Mode is r or rb currently. Returns a file - * descriptor or -1 on error. - */ -static long smh_open(const char *fname, char *modestr) -{ - long fd; - unsigned long mode; - struct smh_open_s { - const char *fname; - unsigned long mode; - size_t len; - } open; - - debug(%s: file \'%s\', mode \'%s\'\n, __func__, fname, modestr); - - /* Check the file mode */ - if (!(strcmp(modestr, r))) { - mode = MODE_READ; - } else if (!(strcmp(modestr, rb))) { - mode = MODE_READBIN; - } else { - printf(%s: ERROR mode \'%s\' not supported\n, __func__, - modestr); - return -1; - } - - open.fname = fname; - open.len = strlen(fname); - open.mode = mode; - - /* Open the file on the host */ - fd = smh_trap(SYSOPEN, open); - if (fd == -1) - printf(%s: ERROR fd %ld for file \'%s\'\n, __func__, fd, - fname); - - return fd; -} - -/* * Close the file using the file
Re: [U-Boot] [RFC] dm: tegra: boot time regression
On Mon, 2014-11-17 at 06:53 +, Simon Glass wrote: Did this get resolved? No, unfortunately not. Do you have an update please? I just retested this and it is still the case all with latest mainline stuff both on the U-Boot as well as the Linux kernel side. Another issue I noticed is that somehow current U-Boot DM serial stuff seems to double space everything?!? Well, anyway. Here the output of straight mainline: U-Boot SPL 2015.01-rc1-00145-gf196044 (Nov 20 2014 - 09:04:15) U-Boot 2015.01-rc1-00145-gf196044 (Nov 20 2014 - 09:04:15) TEGRA30 Board: Toradex Colibri T30 I2C: ready DRAM: 1 GiB MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1 In:serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 2 1 0 reading tegra30-colibri-eval-v3.dtb 24225 bytes read in 16 ms (1.4 MiB/s) reading uImage 4717016 bytes read in 127 ms (35.4 MiB/s) ## Booting kernel from Legacy Image at 8100 ... Image Name: Linux-3.18.0-rc5 Image Type: ARM Linux Kernel Image (uncompressed) Data Size:4716952 Bytes = 4.5 MiB Load Address: 82008000 Entry Point: 82008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 8200 Booting using the fdt blob at 0x8200 Loading Kernel Image ... OK Using Device Tree in place at 8200, end 82008ea0 Starting kernel ... [0.00] Booting Linux on physical CPU 0x0 [0.00] Initializing cgroup subsys cpu [0.00] Initializing cgroup subsys cpuacct [0.00] Linux version 3.18.0-rc5 (zim@localhost.localdomain) (gcc version 4.7.2 20120910 (prerelease) (crosstool-NG linaro-1.13.1-2012.09-20120921 - Linaro GCC 2012.09) ) #1 SMP PREEMPT Thu Nov 20 09:14:47 CET 2014 [0.00] CPU: ARMv7 Processor [412fc099] revision 9 (ARMv7), cr=10c5387d [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] Machine model: Toradex Colibri T30 on Colibri Evaluation Board [0.00] cma: Reserved 64 MiB at 0xbb40 [0.00] Memory policy: Data cache writealloc [0.00] PERCPU: Embedded 10 pages/cpu @f67d2000 s8896 r8192 d23872 u40960 [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 257312 [0.00] Kernel command line: core_edp_mv=1300 usb_high_speed=1 ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 rootwait asix_mac=00:14:2d:28:39:fe consoleblank=0 no_console_suspend=1 console=tty1 console=ttyS0,115200n8 debug_uartport=lsport,0 vmalloc=128M mem=1012M@2048M fbmem=12M@3060M video=tegrafb0:640x480-16@60 [0.00] PID hash table entries: 4096 (order: 2, 16384 bytes) [0.00] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [0.00] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [0.00] Memory: 951940K/1036288K available (6447K kernel code, 341K rwdata, 2160K rodata, 292K init, 362K bss, 84348K reserved, 69632K highmem) [0.00] Virtual kernel memory layout: [0.00] vector : 0x - 0x1000 ( 4 kB) [0.00] fixmap : 0xffc0 - 0xffe0 (2048 kB) [0.00] vmalloc : 0xf780 - 0xff00 ( 120 MB) [0.00] lowmem : 0xc000 - 0xf700 ( 880 MB) [0.00] pkmap : 0xbfe0 - 0xc000 ( 2 MB) [0.00] modules : 0xbf00 - 0xbfe0 ( 14 MB) [0.00] .text : 0xc0008000 - 0xc0870318 (8609 kB) [0.00] .init : 0xc0871000 - 0xc08ba000 ( 292 kB) [0.00] .data : 0xc08ba000 - 0xc090f7e0 ( 342 kB) [0.00].bss : 0xc090f7e0 - 0xc096a15c ( 363 kB) [0.00] Preemptible hierarchical RCU implementation. [0.00] NR_IRQS:16 nr_irqs:16 16 [0.00] L2C: platform modifies aux control register: 0x0208 - 0x3e480001 [0.00] L2C: DT/platform modifies aux control register: 0x0208 - 0x3e480001 [0.00] L2C-310 erratum 769419 enabled [0.00] L2C-310 enabling early BRESP for Cortex-A9 [0.00] L2C-310: enabling full line of zeros but not enabled in Cortex-A9 [0.00] L2C-310 ID prefetch enabled, offset 1 lines [0.00] L2C-310 dynamic clock gating enabled, standby mode enabled [0.00] L2C-310 cache controller enabled, 8 ways, 1024 kB [0.00] L2C-310: CACHE_ID 0x41c7, AUX_CTRL 0x7e480001 [0.17] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483648000ns [0.54] Switching to timer-based delay loop, resolution 1000ns [0.001149] Console: colour dummy device 80x30 [0.001865] console [tty1] enabled [0.001906] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=1) [0.001949] pid_max: default: 32768 minimum: 301 [0.002649] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [0.002684] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [
[U-Boot] Linker errors with SPL and FAT
Hello, I am trying to build U-Boot SPL (2014.07) for a custom TI AM3354 based board with MMC support. Mostly I have cloned the settings from the am335x_evm.h config file but am getting linker errors with SPL... common/spl/built-in.o: In function `spl_register_fat_device': .../common/spl/spl_fat.c:28: undefined reference to `fat_register_device' common/spl/built-in.o: In function `spl_load_image_fat': .../common/spl/spl_fat.c:55: undefined reference to `file_fat_read' .../common/spl/spl_fat.c:61: undefined reference to `file_fat_read' When I look at spl/fs/built-in.o it is 257 bytes and spl/fs/fat/built-in.o is 8 bytes. I have been staring at this for most of the morning and would appreciate it if someone could tell me what option I am missing. Thanks, Andy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] m68k maintenance
Hi Angelo Dureghello Thanks for your reminder. I'm really not active for the ColdFire platform maintenance recently due to other work assigned. I'll try to find a custodians inside Freescale to take over the work as there are many Freescale boards need to maintain. Thanks. Regards, Jason -- From: Angelo Dureghello [mailto:ang...@sysam.it] Sent: Wednesday, November 19, 2014 7:41 PM To: Jin Zhengxiong-R64188 Cc: u-boot@lists.denx.de Subject: m68k maintenance Dear Jason Jin, this mail to ask if you are still interested in the role of m68k custodian. If not, please let us know, i am proposing myself as custodian since quite active on u-boot m68k development currently. Regards, Angelo Dureghello ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/mpc85xx: use correct dma compatible for several SoCs
Newer qoriq socs have an updated dma ip block with a different compatible. Let's make sure we use the proper string so that the dmas get their liodn. In order to have the means to specify the compatible string, the liodn setting macros were updated to receive a new parameter for it. The following SoCs were changed to use the new compatible: T1023/4, T1040, T2080/1, T4240, B4860. Signed-off-by: Laurentiu Tudor laurentiu.tu...@freescale.com --- depends on https://patchwork.ozlabs.org/patch/403532/ arch/powerpc/cpu/mpc85xx/b4860_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/p2041_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/p3041_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/p4080_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/p5020_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/p5040_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/t1024_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/t1040_ids.c | 4 ++-- arch/powerpc/cpu/mpc85xx/t2080_ids.c | 6 +++--- arch/powerpc/cpu/mpc85xx/t4240_ids.c | 4 ++-- arch/powerpc/include/asm/fsl_liodn.h | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/b4860_ids.c b/arch/powerpc/cpu/mpc85xx/b4860_ids.c index 1a30f1c..598f7bd 100644 --- a/arch/powerpc/cpu/mpc85xx/b4860_ids.c +++ b/arch/powerpc/cpu/mpc85xx/b4860_ids.c @@ -59,8 +59,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148), - SET_DMA_LIODN(1, 147), - SET_DMA_LIODN(2, 227), + SET_DMA_LIODN(1, fsl,elo3-dma, 147), + SET_DMA_LIODN(2, fsl,elo3-dma, 227), #ifndef CONFIG_PPC_B4420 SET_GUTS_LIODN(fsl,rapidio-delta, 199, rio1liodnr, 0), diff --git a/arch/powerpc/cpu/mpc85xx/p2041_ids.c b/arch/powerpc/cpu/mpc85xx/p2041_ids.c index 488e078..6e3cddd 100644 --- a/arch/powerpc/cpu/mpc85xx/p2041_ids.c +++ b/arch/powerpc/cpu/mpc85xx/p2041_ids.c @@ -50,8 +50,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194), SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195), - SET_DMA_LIODN(1, 197), - SET_DMA_LIODN(2, 198), + SET_DMA_LIODN(1, fsl,eloplus-dma, 197), + SET_DMA_LIODN(2, fsl,eloplus-dma, 198), SET_GUTS_LIODN(fsl,rapidio-delta, 199, rio1liodnr, 0), SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), diff --git a/arch/powerpc/cpu/mpc85xx/p3041_ids.c b/arch/powerpc/cpu/mpc85xx/p3041_ids.c index 7d98870..2b57703 100644 --- a/arch/powerpc/cpu/mpc85xx/p3041_ids.c +++ b/arch/powerpc/cpu/mpc85xx/p3041_ids.c @@ -51,8 +51,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195), SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 196), - SET_DMA_LIODN(1, 197), - SET_DMA_LIODN(2, 198), + SET_DMA_LIODN(1, fsl,eloplus-dma, 197), + SET_DMA_LIODN(2, fsl,eloplus-dma, 198), SET_GUTS_LIODN(fsl,rapidio-delta, 199, rio1liodnr, 0), SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), diff --git a/arch/powerpc/cpu/mpc85xx/p4080_ids.c b/arch/powerpc/cpu/mpc85xx/p4080_ids.c index b2a23c0..94a5143 100644 --- a/arch/powerpc/cpu/mpc85xx/p4080_ids.c +++ b/arch/powerpc/cpu/mpc85xx/p4080_ids.c @@ -40,8 +40,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 194), SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195), - SET_DMA_LIODN(1, 196), - SET_DMA_LIODN(2, 197), + SET_DMA_LIODN(1, fsl,eloplus-dma, 196), + SET_DMA_LIODN(2, fsl,eloplus-dma, 197), SET_GUTS_LIODN(fsl,srio-rmu, 200, rmuliodnr, 0xd3000), diff --git a/arch/powerpc/cpu/mpc85xx/p5020_ids.c b/arch/powerpc/cpu/mpc85xx/p5020_ids.c index b5d787c..0f292cf 100644 --- a/arch/powerpc/cpu/mpc85xx/p5020_ids.c +++ b/arch/powerpc/cpu/mpc85xx/p5020_ids.c @@ -51,8 +51,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 195), SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 196), - SET_DMA_LIODN(1, 197), - SET_DMA_LIODN(2, 198), + SET_DMA_LIODN(1, fsl,eloplus-dma, 197), + SET_DMA_LIODN(2, fsl,eloplus-dma, 198), SET_GUTS_LIODN(fsl,rapidio-delta, 199, rio1liodnr, 0), SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), diff --git a/arch/powerpc/cpu/mpc85xx/p5040_ids.c b/arch/powerpc/cpu/mpc85xx/p5040_ids.c index 990f179..d4343ef 100644 --- a/arch/powerpc/cpu/mpc85xx/p5040_ids.c +++ b/arch/powerpc/cpu/mpc85xx/p5040_ids.c @@ -42,8 +42,8 @@ struct liodn_id_table liodn_tbl[] = { SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196), SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197), - SET_DMA_LIODN(1, 193), - SET_DMA_LIODN(2, 194), + SET_DMA_LIODN(1, fsl,eloplus-dma, 193), + SET_DMA_LIODN(2, fsl,eloplus-dma, 194), }; int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); diff --git a/arch/powerpc/cpu/mpc85xx/t1024_ids.c b/arch/powerpc/cpu/mpc85xx/t1024_ids.c index 5f24c15..132689b 100644 --- a/arch/powerpc/cpu/mpc85xx/t1024_ids.c +++
[U-Boot] [PATCH] tbs2910: Fix error handling in board_mmc_init()
When an invalid USDHC port is passed we should return -EINVAL instead of 0. Also, return the error immediately on fsl_esdhc_initialize() failure. Based on similar patches by Fabio Estevam for mx6sabresd, mx53loco, wandboard Signed-off-by: Soeren Moch sm...@web.de -- Cc: Stefano Babic sba...@denx.de Cc: Fabio Estevam feste...@gmail.com --- board/tbs/tbs2910/tbs2910.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c index daf8ff4..dfa430e 100644 --- a/board/tbs/tbs2910/tbs2910.c +++ b/board/tbs/tbs2910/tbs2910.c @@ -219,15 +219,13 @@ int board_mmc_getcd(struct mmc *mmc) int board_mmc_init(bd_t *bis) { - s32 status = 0; - int i; - /* * (U-boot device node)(Physical Port) * mmc0SD2 * mmc1SD3 * mmc2eMMC */ + int i, ret; for (i = 0; i CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { case 0: @@ -251,12 +249,13 @@ int board_mmc_init(bd_t *bis) printf(Warning: you configured more USDHC controllers (%d) then supported by the board (%d)\n, i + 1, CONFIG_SYS_FSL_USDHC_NUM); - return status; + return -EINVAL; } - - status |= fsl_esdhc_initialize(bis, usdhc_cfg[i]); + ret = fsl_esdhc_initialize(bis, usdhc_cfg[i]); + if (ret) + return ret; } - return status; + return 0; } #endif /* CONFIG_FSL_ESDHC */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Query on CONFIG_SYS_THUMB_BUILD
Hello Bill, On Wed, 19 Nov 2014 13:34:34 -0500, Bill Pringlemeir bpringlem...@nbsps.com wrote: In message 20141119074214.3d414ce6@lilith you^H^H^H Stefan wrote: For -mauto-it, it is not documented in the gas documentation online or in my current as' --target-help. I'll dig this deeper today, but barring any scream from me, the change above is fine globally in U-Boot. On 19 Nov 2014, w...@denx.de wrote: Apparently this [1] is where it is coming from; no further documentation there, though. [1] https://sourceware.org/ml/binutils/2009-05/msg00132.html On Wed, 19 Nov 2014 11:31:05 -0500, Bill Pringlemeir I would think that if this worked they would make it automatic and not an option. Probably this is only in certain binutils/as. With 4.6.3 and 4.9.1 I do not have this option, On 19 Nov 2014, albert.u.b...@aribaud.net wrote: Which option do you mean? -mimplicit-it or -mauto-it? '-mauto-it' , which I think if it is working correctly would be rolled into '-mimplicit-it' as it generates better code (for an assembler :). I followed the thread above and the patch originator says he needs to fix section issues and the 'command line options' and he would follow up the proposed patch. I am getting lost, even when reading (quickly, I admit) the patch that adds it; I don't see what -mauto-it does exactly. Can you summarize and clarify the effects of -mimplicit-it (I guess I know this one but it's never a bad thing to get a second opinion), -mauto-it and their interaction? I guess at some version each and every 'instxx' was converted to 'it xx\ninst' where inst is some conditional instruction. For the patch above, '-mauto-it' teaches the assembler to glob them together into 'itet...' type conditions. The Thumb2 supports up to four conditions (and negated condition) instructions. On my version of the tools (I think it is gcc; but maybe binutils), if I use '-mauto-it' it gives an unknown option error. I think that Linux does a probe of this feature and passes it (-mauto-it) if the assembler accepts it. So, if we add to u-boot we should probably take care that the ARM 'as' can take the option. I also see posts on the web of people complaining of this option in other code bases. Are they complaining that the option is passed on to an as which does not know it, or that the option is known but does something wrong? (I'm still having a hard time understanding whether -mauto-it is an accepted new feature that is slow to get integrated or the remnant of an old proposal which did not make it.) Fwiw, Bill. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 3/5] ls102xa: HYP/non-sec: support for ls102xa boards
Hello li.xi...@freescale.com, On Wed, 19 Nov 2014 07:21:26 +, li.xi...@freescale.com li.xi...@freescale.com wrote: Hi Albert, -Original Message- From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net] Sent: Tuesday, November 18, 2014 3:18 PM To: Xiubo Li-B47053 Cc: Sun York-R58495; Jin Zhengxiong-R64188; u-boot@lists.denx.de Subject: Re: [PATCH v3 3/5] ls102xa: HYP/non-sec: support for ls102xa boards Hello li.xi...@freescale.com, On Tue, 18 Nov 2014 02:01:02 +, li.xi...@freescale.com li.xi...@freescale.com wrote: Hi Albert, +#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) +/* Setting the address at which secondary cores start from.*/ +void smp_set_core_boot_addr(unsigned long addr, int corenr) +{ + struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); + + /* + * After setting the secondary cores start address, + * just release them to boot. + */ + out_be32(gur-scratchrw[0], addr); + out_be32(gur-brrl, 0x2); +} This function does not exactly [set] the address at which secondary cores start from; it sets *a* secondary core's boot address, and then it *boots* it. Okay, I will fix it later. Why does this version of smp_set_core_boot_addr() need to boot the core in addition to setting the address, whereas the existing ones in virt_v7, vexpress_common and arndale don't boot the cores? Yes, they don't doing the release operation. For Low Power Management requirement, maybe only one core will be used, and then We also make sure that the secondary core must be in low power and deep sleep mode(using wfi). So I just release it here, to make sure that the wfi instruction will be executed as early as possible. Right after smp_set_core_boot_addr() is called, kick_all_cpus() isgoing to be called. Wouldn't that boot your CPUs just as well? Yes, it will. But before that we must do the holdoff bit set operation as the SoC's requirement. The BRR contains control bits for enabling boot for each core. On exiting HRESET or PORESET, the RCW BOOT_HO field optionally allows for logical core 0 to be released for booting or to remain in boot holdoff. All other cores remain in boot holdoff until their corresponding bit is set. Maybe the comment is not very clear and a bit confusing. Before I'm lost entirely, do you mean that the comment: + /* + * After setting the secondary cores start address, + * just release them to boot. + */ Is actually wrong, and the instructions that follow it do not actually boot the secondary core(s)? The comment should be: /* * After setting the secondary core's start address, * just release it from holdoff. */ From my tests, for most time the release instructions will boot the secondary core(s) without smp_kick_all_cpus(). One time has failed. So I think the release can not make sure that it will boot the secondary core(s). Thanks for clarifying. If a holdoff release is the right way to boot a secondary core for you, then I think the right place to do it is not smp_set_core_boot_addr() but smp_kick_all_cpus(), of which you could make a strong version which would do the holdoff release instead of whatever the weak version does. Yes, I do think a strong version will be okay. In file arch/arm/cpu/armv7/ls102xa/cpu.c, add the strong version: +/* Release the secondary core from holdoff state and boot it */ +void smp_kick_all_cpus(void) +{ + struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); + + out_be32(gur-brrl, 0x2); +} + Is this okay ? Yes, thanks! I have test the holdoff release in two boards(including the old one before I used) for 37 times and all has passed. I have a check the before failed logs, It is another issue led to the failure. And also get confirmation that the Holdoff release will do reset and then boot the secondary core. Good -- this makes smp_kick_all_cpus() the right home for holdoff releast. Thanks, Thank you for your patience. :) BRs Xiubo Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 2/3] Odroid-XU3: Add support for Odroid-XU3
Hi, CPU:Exynos5800@1200MHz Board: Odroid XU3 based on EXYNOS5422 Exynos5800? is it right? On 11/14/2014 03:25 PM, Hyungwon Hwang wrote: This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 144 ++ 10 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -24,6 +24,10 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + select OF_CONTROL + config TARGET_ARNDALE bool Exynos5250 Arndale board select SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-smdk5250.dtb \ exynos5420-smdk5420.dtb \ exynos5420-peach-pit.dtb \ - exynos5800-peach-pi.dtb + exynos5800-peach-pi.dtb \ + exynos5422-odroidxu3.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ tegra20-paz00.dtb \ diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts b/arch/arm/dts/exynos5422-odroidxu3.dts new file mode 100644 index 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * Odroid XU3 device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include exynos54xx.dtsi + +/ { + model = Odroid XU3 based on EXYNOS5422; + compatible = samsung,odroidxu3, samsung,exynos5; + + aliases { + serial0 = /serial@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + +
Re: [U-Boot] [PATCH v3 2/2] imx: fix exception vectors relocation in imx27
Hello Stefano, On Fri, 14 Nov 2014 14:24:52 +0100, Stefano Babic sba...@denx.de wrote: Hi Albert, On 14/11/2014 13:10, Albert ARIBAUD wrote: I'll have a look at the i.MX25, i.MX31 and i.MX35 reference manuals, but at most that will only tell me if they have the same problem as i.MX27 has about ROM/RAM and low/high vectors; it probably won't tell me how their ROM code handles exceptions. According to the i.MX25, i.MX31 and i.MX35 RM, all three SoCs have ROM at address 0x and no RAM at address 0x, so they most certainly have the same kind of issue as i.MX27, but there is no indication that the indirect vectors table is always the same, and it is quite probable that it is located at a different place for each SoC. So in order to solve the issue, we would need a dump (or better yet a disassembly) of ROM addresses 0x to 0x001F for each of the three SoCs. ok - I have a MX35 based board, and I can do some tests, maybe in the week-end. (thanks for applying my patch) Did you do the tests on i.MX35? Should there be a followup patch to fix i.MX35 as i.MX27 i now fixed? Best regards, Stefano Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: make arch memset/memcpy to work with Thumb2 builds
Hi Jeroen, On 2014-11-20 10:21, Jeroen Hofstee wrote: Hello Stefan, On 19-11-14 15:16, Stefan Agner wrote: Resynchronize memcpy/memset with kernel and build them explicitly in Thumb2 mode (unified syntax). Those assembler files can be built and linked in ARM mode too, however when calling them from Thumb2 built code, the stack got corrupted and the copy did not succeed (the exact details have not been traced back). Hoever, the Linux kernel builds those files in Thumb2 mode. Hence U-Boot should build them in Thumb2 mode too when CONFIG_SYS_THUMB_BUILD is set. Also add implicit-it=always to AFLAGS when building for Thumb2. Furthermore add no-warn-deprecated option to AFLAGS to rid of deprecated unified syntax: arch/arm/lib/memcpy.S: Assembler messages: arch/arm/lib/memcpy.S:153: Warning: conditional infixes are deprecated in unified syntax arch/arm/lib/memcpy.S:154: Warning: conditional infixes are deprecated in unified syntax ... Any particular reason not to fix these warnings instead? It Is just a matter of making the conditionals suffixes. [I guess you can even disassemble to file to get the UAL represenation]. Or are there gas version around which actually choke on that? No particular reason, I did not know how to fix this without digging into it. Hence, after I discovered this, I checked why those warnings do not happen for the kernel, then I applied just the AFLAGS the kernel is using. I guess fixing the underlying issue is the better option, and doing this also for the kernel would be the best way... Maybe the kernel community also knows better why they choose to use the AFLAGS instead (and if there are gas version which do have problems with a proper fix)... -- Stefan Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/3] sandbox: enable showdev command
Of course, this command can be used on any boards besides sandbox. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None include/configs/sandbox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index ee4b244..334142b 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -26,6 +26,7 @@ #define CONFIG_DM #define CONFIG_CMD_DEMO #define CONFIG_CMD_DM +#define CONFIG_CMD_SHOWDEV #define CONFIG_DM_DEMO #define CONFIG_DM_DEMO_SIMPLE #define CONFIG_DM_DEMO_SHAPE -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] dm: add a command to list devices in a tree-like format
We are adding more and more drivers to driver model these days. Compared with the ad-hoc driver system, it seems pretty difficult to understand how drivers are working on driver model. For ex. - Which devices have been bound? - Which devices have been probed? - Which is the parent of this device? etc. I hope this tool will help us test/review driver model patches. Just hit showdev on the command line and it will list all the bound devices in a tree-like format with Class and Probed flag. = showdev Class Probed Name root[ + ]root_driver demo[ ]|-- demo_shape_drv demo[ ]|-- demo_simple_drv demo[ ]|-- demo_shape_drv demo[ ]|-- demo_simple_drv demo[ ]|-- demo_shape_drv test[ ]|-- test_drv test[ ]|-- test_drv test[ ]|-- test_drv gpio[ ]|-- gpio_sandbox serial [ ]|-- serial_sandbox serial [ + ]|-- serial demo[ ]|-- triangle demo[ ]|-- square demo[ ]|-- hexagon gpio[ ]|-- gpios i2c [ + ]|-- i2c@0 i2c_eeprom [ + ]| |-- eeprom@2c i2c_emul[ + ]| | \-- emul i2c_generic [ + ]| \-- generic_59 spi [ ]|-- spi@0 spi_emul[ ]| \-- flash@0 cros_ec [ + ]\-- cros-ec@0 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: - Fix the tree format common/Makefile | 1 + common/cmd_showdev.c | 70 2 files changed, 71 insertions(+) create mode 100644 common/cmd_showdev.c diff --git a/common/Makefile b/common/Makefile index 6cc4de8..c26c764 100644 --- a/common/Makefile +++ b/common/Makefile @@ -84,6 +84,7 @@ obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o obj-$(CONFIG_CMD_DATE) += cmd_date.o obj-$(CONFIG_CMD_DEMO) += cmd_demo.o +obj-$(CONFIG_CMD_SHOWDEV) += cmd_showdev.o obj-$(CONFIG_CMD_SOUND) += cmd_sound.o ifdef CONFIG_4xx obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o diff --git a/common/cmd_showdev.c b/common/cmd_showdev.c new file mode 100644 index 000..f73bfba --- /dev/null +++ b/common/cmd_showdev.c @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2014 Panasonic Corporation + * Author: Masahiro Yamada yamad...@jp.panasonic.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include linux/string.h +#include linux/list.h +#include dm/device.h +#include dm/uclass.h + +DECLARE_GLOBAL_DATA_PTR; + +#define INDENT1 +#define INDENT2 | +#define INDENT3 \\-- +#define INDENT4 |-- + +static void show_devices(struct udevice *dev, int depth, int last_flag) +{ + int i, is_last; + struct udevice *child; + char class_name[12]; + + /* print the first 11 characters to not break the tree-format. */ + strlcpy(class_name, dev-uclass-uc_drv-name, sizeof(class_name)); + printf( %-11s , class_name); + + printf([ %c ], dev-flags DM_FLAG_ACTIVATED ? '+' : ' '); + + for (i = depth; i = 0; i--) { + is_last = (last_flag i) 1; + if (i) { + if (is_last) + printf(INDENT1); + else + printf(INDENT2); + } else { + if (is_last) + printf(INDENT3); + else + printf(INDENT4); + } + } + + printf(%s\n, dev-name); + + list_for_each_entry(child, dev-child_head, sibling_node) { + is_last = list_is_last(child-sibling_node, dev-child_head); + show_devices(child, depth + 1, (last_flag 1) | is_last); + } +} + +static int do_showdev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + printf( Class Probed Name\n); + printf(\n); + + show_devices(gd-dm_root, -1, 0); + + return 0; +} + +U_BOOT_CMD( + showdev, 1, 1, do_showdev, + show devices in a tree-like format., + +); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/3] lib: string: move strlcpy() to a common place
Move strlcpy() definition from drivers/usb/gadget/ether.c to lib/string.c because it is a very useful function. Let's add the prototype to include/linux/string.h too. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None drivers/usb/gadget/ether.c | 24 include/linux/string.h | 3 +++ lib/string.c | 25 + 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index d0dd29f..ba442d5 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -852,30 +852,6 @@ DEFINE_CACHE_ALIGN_BUFFER(u8, control_req, USB_BUFSIZ); DEFINE_CACHE_ALIGN_BUFFER(u8, status_req, STATUS_BYTECOUNT); #endif - -/** - * strlcpy - Copy a %NUL terminated string into a sized buffer - * @dest: Where to copy the string to - * @src: Where to copy the string from - * @size: size of destination buffer - * - * Compatible with *BSD: the result is always a valid - * NUL-terminated string that fits in the buffer (unless, - * of course, the buffer size is zero). It does not pad - * out the result like strncpy() does. - */ -size_t strlcpy(char *dest, const char *src, size_t size) -{ - size_t ret = strlen(src); - - if (size) { - size_t len = (ret = size) ? size - 1 : ret; - memcpy(dest, src, len); - dest[len] = '\0'; - } - return ret; -} - /**/ /* diff --git a/include/linux/string.h b/include/linux/string.h index 96348d6..c7047ba 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -30,6 +30,9 @@ extern char * strcpy(char *,const char *); #ifndef __HAVE_ARCH_STRNCPY extern char * strncpy(char *,const char *, __kernel_size_t); #endif +#ifndef __HAVE_ARCH_STRLCPY +size_t strlcpy(char *, const char *, size_t); +#endif #ifndef __HAVE_ARCH_STRCAT extern char * strcat(char *, const char *); #endif diff --git a/lib/string.c b/lib/string.c index 29c2ca7..87c9a40 100644 --- a/lib/string.c +++ b/lib/string.c @@ -102,6 +102,31 @@ char * strncpy(char * dest,const char *src,size_t count) } #endif +#ifndef __HAVE_ARCH_STRLCPY +/** + * strlcpy - Copy a C-string into a sized buffer + * @dest: Where to copy the string to + * @src: Where to copy the string from + * @size: size of destination buffer + * + * Compatible with *BSD: the result is always a valid + * NUL-terminated string that fits in the buffer (unless, + * of course, the buffer size is zero). It does not pad + * out the result like strncpy() does. + */ +size_t strlcpy(char *dest, const char *src, size_t size) +{ + size_t ret = strlen(src); + + if (size) { + size_t len = (ret = size) ? size - 1 : ret; + memcpy(dest, src, len); + dest[len] = '\0'; + } + return ret; +} +#endif + #ifndef __HAVE_ARCH_STRCAT /** * strcat - Append one %NUL-terminated string to another -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/3] dm: display devices in a tree-like format for easy debug
When I was reviewing I2C DM series, I found it difficult to track what is going on. When is this node is bound/probe? etc. I think this tool is helpful to know which device is bound/probe. Devices are listed like tree command does. Changes in v2: - Fix the tree format Masahiro Yamada (3): lib: string: move strlcpy() to a common place dm: add a command to list devices in a tree-like format sandbox: enable showdev command common/Makefile| 1 + common/cmd_showdev.c | 70 ++ drivers/usb/gadget/ether.c | 24 include/configs/sandbox.h | 1 + include/linux/string.h | 3 ++ lib/string.c | 25 + 6 files changed, 100 insertions(+), 24 deletions(-) create mode 100644 common/cmd_showdev.c -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: make arch memset/memcpy to work with Thumb2 builds
Hello Stefan, On 20-11-14 13:15, Stefan Agner wrote: Hi Jeroen, On 2014-11-20 10:21, Jeroen Hofstee wrote: Hello Stefan, On 19-11-14 15:16, Stefan Agner wrote: Resynchronize memcpy/memset with kernel and build them explicitly in Thumb2 mode (unified syntax). Those assembler files can be built and linked in ARM mode too, however when calling them from Thumb2 built code, the stack got corrupted and the copy did not succeed (the exact details have not been traced back). Hoever, the Linux kernel builds those files in Thumb2 mode. Hence U-Boot should build them in Thumb2 mode too when CONFIG_SYS_THUMB_BUILD is set. Also add implicit-it=always to AFLAGS when building for Thumb2. Furthermore add no-warn-deprecated option to AFLAGS to rid of deprecated unified syntax: arch/arm/lib/memcpy.S: Assembler messages: arch/arm/lib/memcpy.S:153: Warning: conditional infixes are deprecated in unified syntax arch/arm/lib/memcpy.S:154: Warning: conditional infixes are deprecated in unified syntax ... Any particular reason not to fix these warnings instead? It Is just a matter of making the conditionals suffixes. [I guess you can even disassemble to file to get the UAL represenation]. Or are there gas version around which actually choke on that? No particular reason, I did not know how to fix this without digging into it. Hence, after I discovered this, I checked why those warnings do not happen for the kernel, then I applied just the AFLAGS the kernel is using. I guess fixing the underlying issue is the better option, and doing this also for the kernel would be the best way... Maybe the kernel community also knows better why they choose to use the AFLAGS instead (and if there are gas version which do have problems with a proper fix)... for what it is worth, I have attached patch hanging around, but I never actually tested it. It is for the current version. Regards, Jeroen From c151254b3de49d8fccb69ab4f9442d884b9ff85c Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee jer...@myspectrum.nl Date: Thu, 20 Nov 2014 14:06:26 +0100 Subject: [PATCH] arm: memset: make it UAL compliant --- arch/arm/lib/memset.S | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 0cdf895..4fe38f6 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -18,8 +18,8 @@ 1: subs r2, r2, #4 @ 1 do we have enough blt 5f @ 1 bytes to align with? cmp r3, #2 @ 1 - strltb r1, [r0], #1 @ 1 - strleb r1, [r0], #1 @ 1 + strblt r1, [r0], #1 @ 1 + strble r1, [r0], #1 @ 1 strb r1, [r0], #1 @ 1 add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) /* @@ -51,20 +51,20 @@ memset: mov lr, r1 2: subs r2, r2, #64 - stmgeia r0!, {r1, r3, ip, lr} @ 64 bytes at a time. - stmgeia r0!, {r1, r3, ip, lr} - stmgeia r0!, {r1, r3, ip, lr} - stmgeia r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} @ 64 bytes at a time. + stmiage r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} bgt 2b ldmeqfd sp!, {pc} @ Now 64 bytes to go. /* * No need to correct the count; we're only testing bits from now on */ tst r2, #32 - stmneia r0!, {r1, r3, ip, lr} - stmneia r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} tst r2, #16 - stmneia r0!, {r1, r3, ip, lr} + stmiage r0!, {r1, r3, ip, lr} ldr lr, [sp], #4 #else @@ -90,28 +90,28 @@ memset: rsb ip, ip, #32 sub r2, r2, ip movs ip, ip, lsl #(32 - 4) - stmcsia r0!, {r4, r5, r6, r7} - stmmiia r0!, {r4, r5} + stmiacs r0!, {r4, r5, r6, r7} + stmiami r0!, {r4, r5} tst ip, #(1 30) mov ip, r1 strne r1, [r0], #4 3: subs r2, r2, #64 - stmgeia r0!, {r1, r3-r7, ip, lr} - stmgeia r0!, {r1, r3-r7, ip, lr} + stmiage r0!, {r1, r3-r7, ip, lr} + stmiage r0!, {r1, r3-r7, ip, lr} bgt 3b - ldmeqfd sp!, {r4-r7, pc} + ldmfdeq sp!, {r4-r7, pc} tst r2, #32 - stmneia r0!, {r1, r3-r7, ip, lr} + stmiage r0!, {r1, r3-r7, ip, lr} tst r2, #16 - stmneia r0!, {r4-r7} + stmiage r0!, {r4-r7} ldmfd sp!, {r4-r7, lr} #endif 4: tst r2, #8 - stmneia r0!, {r1, r3} + stmiage r0!, {r1, r3} tst r2, #4 strne r1, [r0], #4 /* @@ -119,8 +119,8 @@ memset: * may have an unaligned pointer as well. */ 5: tst r2, #2 - strneb r1, [r0], #1 - strneb r1, [r0], #1 + strbne r1, [r0], #1 + strbne r1, [r0], #1 tst r2, #1 - strneb r1, [r0], #1 + strbne r1, [r0], #1 mov pc, lr -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 0/4] add i.MX6 thermal sensor driver
This patch set adds i.MX6 thermal sensor driver and enables it for mx6sabre boards. Also adds various anadig bit definitions as required for upcoming drivers. Changes in v7: -Convert the imx thermal driver to DM. -Enable DM drivers for mx6sabre boards. Changes in v6: -Aligned imx thermal driver macro defines with kernel Changes in v5: -Don't modify the copyright of cpu.c and crm_regs.h file Changes in v4: -Added imx6 thermal sensor as a driver -Renamed the config define to be more meaningful -Move the clock code to clock.c -Reusing ocotp driver for reading fuse -Fix check for calibration fuse not programmed -Aligned the slope computation with kernel -Added Anadig register defines as seperate commit Changes in v3: -adds the mx6 thermal driver support -adds the mx6 thermal support to mx6sabresd board. Changes in v2: -run checkpatch and fix reported issues Nitin Garg (1): mx6: clock: Add thermal clock enable function Ye.Li (3): DM: thermal: Add imx thermal DM driver mx6: thermal: Check cpu temperature via thermal sensor mx6: mx6sabre common: Enable i.MX thermal DM driver arch/arm/cpu/armv7/mx6/clock.c| 30 ++ arch/arm/cpu/armv7/mx6/soc.c | 15 +++ arch/arm/imx-common/cpu.c | 21 arch/arm/include/asm/arch-mx6/clock.h |1 + drivers/Makefile |1 + drivers/thermal/Makefile |9 ++ drivers/thermal/imx_thermal.c | 177 + drivers/thermal/thermal-uclass.c | 30 ++ include/configs/mx6sabre_common.h |7 +- include/dm/uclass-id.h|1 + include/imx_thermal.h | 17 +++ include/thermal.h | 42 12 files changed, 350 insertions(+), 1 deletions(-) create mode 100644 drivers/thermal/Makefile create mode 100644 drivers/thermal/imx_thermal.c create mode 100644 drivers/thermal/thermal-uclass.c create mode 100644 include/imx_thermal.h create mode 100644 include/thermal.h -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 1/4] mx6: clock: Add thermal clock enable function
From: Nitin Garg nitin.g...@freescale.com Add api to check and enable pll3 as required for thermal sensor driver. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Nitin Garg nitin.g...@freescale.com --- arch/arm/cpu/armv7/mx6/clock.c| 30 ++ arch/arm/include/asm/arch-mx6/clock.h |1 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 6c9c78c..144080e 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -673,6 +673,36 @@ void hab_caam_clock_enable(unsigned char enable) } #endif +static void enable_pll3(void) +{ + struct anatop_regs __iomem *anatop = + (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; + + /* make sure pll3 is enabled */ + if ((readl(anatop-usb1_pll_480_ctrl) + BM_ANADIG_USB1_PLL_480_CTRL_LOCK) == 0) { + /* enable pll's power */ + writel(BM_ANADIG_USB1_PLL_480_CTRL_POWER, + anatop-usb1_pll_480_ctrl_set); + writel(0x80, anatop-ana_misc2_clr); + /* wait for pll lock */ + while ((readl(anatop-usb1_pll_480_ctrl) + BM_ANADIG_USB1_PLL_480_CTRL_LOCK) == 0) + ; + /* disable bypass */ + writel(BM_ANADIG_USB1_PLL_480_CTRL_BYPASS, + anatop-usb1_pll_480_ctrl_clr); + /* enable pll output */ + writel(BM_ANADIG_USB1_PLL_480_CTRL_ENABLE, + anatop-usb1_pll_480_ctrl_set); + } +} + +void enable_thermal_clk() +{ + enable_pll3(); +} + unsigned int mxc_get_clock(enum mxc_clock clk) { switch (clk) { diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index 3c58a0a..8e51f9b 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -66,4 +66,5 @@ int enable_spi_clk(unsigned char enable, unsigned spi_num); void enable_ipu_clock(void); int enable_fec_anatop_clock(enum enet_freq freq); void enable_enet_clk(unsigned char enable); +void enable_thermal_clk(void); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 3/4] mx6: thermal: Check cpu temperature via thermal sensor
Add imx6 thermal device to mx6 soc file. Read the cpu temperature using this device to access onchip thermal sensor. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Nitin Garg nitin.g...@freescale.com --- arch/arm/cpu/armv7/mx6/soc.c | 15 +++ arch/arm/imx-common/cpu.c| 21 + 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index 5fd2a63..5f5f497 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -22,6 +22,8 @@ #include asm/arch/mxc_hdmi.h #include asm/arch/crm_regs.h #include asm/bootm.h +#include dm.h +#include imx_thermal.h enum ldo_reg { LDO_ARM, @@ -37,6 +39,19 @@ struct scu_regs { u32 fpga_rev; }; +#if defined(CONFIG_IMX6_THERMAL) +static const struct imx_thermal_plat imx6_thermal_plat = { + .regs = (void *)ANATOP_BASE_ADDR, + .fuse_bank = 1, + .fuse_word = 6, +}; + +U_BOOT_DEVICE(imx6_thermal) = { + .name = imx_thermal, + .platdata = imx6_thermal_plat, +}; +#endif + u32 get_nr_cpus(void) { struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR; diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 09fc227..e43f188 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -17,6 +17,7 @@ #include asm/arch/sys_proto.h #include asm/arch/crm_regs.h #include ipu_pixfmt.h +#include thermal.h #ifdef CONFIG_FSL_ESDHC #include fsl_esdhc.h @@ -134,6 +135,11 @@ int print_cpuinfo(void) { u32 cpurev; +#if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + struct udevice *thermal_dev; + int cpu_tmp, ret; +#endif + cpurev = get_cpu_rev(); printf(CPU: Freescale i.MX%s rev%d.%d at %d MHz\n, @@ -141,6 +147,21 @@ int print_cpuinfo(void) (cpurev 0x000F0) 4, (cpurev 0xF) 0, mxc_get_clock(MXC_ARM_CLK) / 100); + +#if defined(CONFIG_MX6) defined(CONFIG_IMX6_THERMAL) + ret = uclass_get_device(UCLASS_THERMAL, 0, thermal_dev); + if (!ret) { + ret = thermal_get_temp(thermal_dev, cpu_tmp); + + if (!ret) + printf(CPU: Temperature %d C\n, cpu_tmp); + else + printf(CPU: Temperature: invalid sensor data\n); + } else { + printf(CPU: Temperature: Can't find sensor device\n); + } +#endif + printf(Reset cause: %s\n, get_reset_cause()); return 0; } -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 4/4] mx6: mx6sabre common: Enable i.MX thermal DM driver
Enable i.MX thermal DM driver to mx6sabre_common.h file. Since the thermal is used in init_sequence_f, so define the CONFIG_SYS_MALLOC_F_LEN to support DM driver using in pre relocation phase. Additional, thermal driver depends on ocotp, make sure to enable CONFIG_MXC_OCOTP when CONFIG_IMX6_THERMAL is selected. Signed-off-by: Ye.Li b37...@freescale.com Signed-off-by: Nitin Garg nitin.g...@freescale.com --- include/configs/mx6sabre_common.h |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 1e10422..9fdd841 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -25,6 +25,11 @@ #define CONFIG_INITRD_TAG #define CONFIG_REVISION_TAG +#define CONFIG_DM +#define CONFIG_DM_THERMAL +#define CONFIG_SYS_MALLOC_F_LEN(1 10) +#define CONFIG_IMX6_THERMAL + #define CONFIG_SYS_GENERIC_BOARD /* Size of malloc() pool */ @@ -37,7 +42,7 @@ #define CONFIG_MXC_UART #define CONFIG_CMD_FUSE -#ifdef CONFIG_CMD_FUSE +#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL) #define CONFIG_MXC_OCOTP #endif -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v7 2/4] DM: thermal: Add imx thermal DM driver
Add a new thermal uclass for thermal sensor and implement the imx thermal driver basing on this uclass. Signed-off-by: Ye.Li b37...@freescale.com --- drivers/Makefile |1 + drivers/thermal/Makefile |9 ++ drivers/thermal/imx_thermal.c| 177 ++ drivers/thermal/thermal-uclass.c | 30 +++ include/dm/uclass-id.h |1 + include/imx_thermal.h| 17 include/thermal.h| 42 + 7 files changed, 277 insertions(+), 0 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 33227c8..7683c61 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -21,3 +21,4 @@ obj-y += pwm/ obj-y += input/ # SOC specific infrastructure drivers. obj-y += soc/ +obj-y += thermal/ diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile new file mode 100644 index 000..6d4cacd --- /dev/null +++ b/drivers/thermal/Makefile @@ -0,0 +1,9 @@ +# +# (C) Copyright 2014 Freescale Semiconductor, Inc. +# Author: Nitin Garg nitin.g...@freescale.com +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_DM_THERMAL) += thermal-uclass.o +obj-$(CONFIG_IMX6_THERMAL) += imx_thermal.o diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c new file mode 100644 index 000..1161585 --- /dev/null +++ b/drivers/thermal/imx_thermal.c @@ -0,0 +1,177 @@ +/* + * (C) Copyright 2014 Freescale Semiconductor, Inc. + * Author: Nitin Garg nitin.g...@freescale.com + * Ye Li ye...@freescale.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include config.h +#include common.h +#include div64.h +#include fuse.h +#include asm/io.h +#include asm/arch/clock.h +#include dm.h +#include errno.h +#include malloc.h +#include thermal.h +#include imx_thermal.h + +#define TEMPERATURE_MIN-40 +#define TEMPERATURE_HOT80 +#define TEMPERATURE_MAX125 +#define FACTOR01000 +#define FACTOR115976 +#define FACTOR24297157 +#define MEASURE_FREQ 327 + +#define TEMPSENSE0_TEMP_CNT_SHIFT 8 +#define TEMPSENSE0_TEMP_CNT_MASK (0xfff TEMPSENSE0_TEMP_CNT_SHIFT) +#define TEMPSENSE0_FINISHED(1 2) +#define TEMPSENSE0_MEASURE_TEMP(1 1) +#define TEMPSENSE0_POWER_DOWN (1 0) +#define MISC0_REFTOP_SELBIASOFF(1 3) +#define TEMPSENSE1_MEASURE_FREQ0x + +static int read_cpu_temperature(struct udevice *dev) +{ + int temperature; + unsigned int reg, n_meas; + const struct imx_thermal_plat *pdata = dev_get_platdata(dev); + struct anatop_regs *anatop = (struct anatop_regs *)pdata-regs; + unsigned int *priv = dev_get_priv(dev); + u32 fuse = *priv; + int t1, n1; + u32 c1, c2; + u64 temp64; + + /* +* Sensor data layout: +* [31:20] - sensor value @ 25C +* We use universal formula now and only need sensor value @ 25C +* slope = 0.4297157 - (0.0015976 * 25C fuse) +*/ + n1 = fuse 20; + t1 = 25; /* t1 always 25C */ + + /* +* Derived from linear interpolation: +* slope = 0.4297157 - (0.0015976 * 25C fuse) +* slope = (FACTOR2 - FACTOR1 * n1) / FACTOR0 +* (Nmeas - n1) / (Tmeas - t1) = slope +* We want to reduce this down to the minimum computation necessary +* for each temperature read. Also, we want Tmeas in millicelsius +* and we don't want to lose precision from integer division. So... +* Tmeas = (Nmeas - n1) / slope + t1 +* milli_Tmeas = 1000 * (Nmeas - n1) / slope + 1000 * t1 +* milli_Tmeas = -1000 * (n1 - Nmeas) / slope + 1000 * t1 +* Let constant c1 = (-1000 / slope) +* milli_Tmeas = (n1 - Nmeas) * c1 + 1000 * t1 +* Let constant c2 = n1 *c1 + 1000 * t1 +* milli_Tmeas = c2 - Nmeas * c1 +*/ + temp64 = FACTOR0; + temp64 *= 1000; + do_div(temp64, FACTOR1 * n1 - FACTOR2); + c1 = temp64; + c2 = n1 * c1 + 1000 * t1; + + /* +* now we only use single measure, every time we read +* the temperature, we will power on/down anadig thermal +* module +*/ + writel(TEMPSENSE0_POWER_DOWN, anatop-tempsense0_clr); + writel(MISC0_REFTOP_SELBIASOFF, anatop-ana_misc0_set); + + /* setup measure freq */ + reg = readl(anatop-tempsense1); + reg = ~TEMPSENSE1_MEASURE_FREQ; + reg |= MEASURE_FREQ; + writel(reg, anatop-tempsense1); + + /* start the measurement process */ + writel(TEMPSENSE0_MEASURE_TEMP, anatop-tempsense0_clr); + writel(TEMPSENSE0_FINISHED, anatop-tempsense0_clr); + writel(TEMPSENSE0_MEASURE_TEMP, anatop-tempsense0_set); + + /* make sure that the latest temp is valid */ + while ((readl(anatop-tempsense0) +
Re: [U-Boot] [PATCH v2 08/17] dm: i2c: Add a uclass for I2C
+ A few more people to cc Hi Masahiro, On 20 November 2014 06:05, Masahiro Yamada yamad...@jp.panasonic.com wrote: Hi Simon, On Wed, 19 Nov 2014 10:24:47 + Simon Glass s...@chromium.org wrote: BTW, address_offset within the chip and data are treated in the same way in I2C bus. Should we pass them separately to each driver? I mean, can we put the offset address and data in the buffer? I'm not sure what you mean by this sorry. Let's assume we want to write some data to a EEPROM chip connected to i2c bus. We generally send [byte 0] SLAVE_ADDR (7bit) + W flag [byte 1] Offset address in EEPROM where you want to start writing [byte 2] WData0 [byte 3] WData1 ... From the perspective of I2C protocol, [byte 1], [byte 2], [byte 3], ... are all data. I2C itself deos not (should not) know which byte is the offset_address in the chip and which is the *real* data to be written. + return ops-write(bus, chip-chip_addr, addr, chip-addr_len, buffer, + len); In this implementation, the offset_address is treated with addr and the *real* data is handled with buffer. It seems odd from the perspective of I2C protocol, I think. Likewise, when we read data from a EEPROM chip connected to i2c bus, We generally send/receive [byte 0] SLAVE_ADDR (7bit) + W flag [byte 1] Offset address in EEPROM where you want to start reading [byte 2] SLAVE_ADDR (7bit) + R flag [byte 3] RData 0 [byte 4] Rdata 1 [byte 1], [byte 3], [byte 4] are data written/read via I2C bus. In my view, each I2C driver should handle [byte 0] and [byte 1] in its .write operation and [byte 2], [byte3], [byte 4], in its .read operation. We could certainly change this. I'm not sure that I have a strong opinion either way. I haven't to date seen an I2C chip where we don't have an address as the first byte. If we change the API at the driver level, which I think is what we are discussing, then we would need to move to a message array format. The read transaction would become two elements: a write (for the address) then a read (to get the data). If we want to change it, we should do it now. My question is, what is the point? Will we really want 2 elements in the message array, do we want more control over how transactions are done (repeated start, etc.)? I'm not sure. Still it would be a fairly low-impact change I feel. We are changing the drivers anyway, so changing the uclass-to-driver API would be feasible. One advantage perhaps it that it would match Linux more closely. Perhaps Heiko can share an opinion here? + } + debug(not found\n); + return i2c_bind_driver(bus, chip_addr, devp); +} If no chip-device is found at the specified chip_addr, the last line calls i2c_bind_driver(). Why? The i2c_bind_driver() tries to create a generic chip. What is this generic chip? Besides, i2c_bind_driver() tries to probe the created generic chip, but it always fails in i2c_chip_ofdata_to_platdata() because the generic chip does not have reg property I could not understand at all what this code wants to do. This actually creates the device. A generic I2C device is something that has no specific driver, but you can use read()/write() on it. As an example, if we have an EEPROM we might add a special driver for it with functions like 'erase' and 'lock'. In that case we would bind the EEPROM driver to this address on the I2C bus. But for many cases we don't have/need a special driver, and can just fall back to one that supports simple read() and write() only. Sorry, I could not parse you here. I2C is not a hot-plugged bus. I could not understand why such a dummy device is created on run time. Is it related to 'erase' or 'lock' functions? If we cannot write to the chip (i.e. it does not ACK when we send it its address) then we won't be able to talk to it, so there is no point in creating a device. With driver model / device tree we could just blindly add the device and use it, but I chose to duplicate the current behaviour since this is expected. BTW, sandbox_i2c_read() is 400KHz tolerate: /* For testing, don't allow reading above 400KHz */ if (i2c-speed_hz 40 || alen != 1) return -EINVAL; but sandbox_i2c_write() only allows 100KHz: /* For testing, don't allow writing above 100KHz */ if (i2c-speed_hz 10 || alen != 1) return -EINVAL; Because the clock-frequency is set to 40 in the sandbox DTS, writing to I2C fails unless we change the I2C speed. Is this intentional? Personally, I like everything to work on the mail line. This is test code, as it says in the comment. I'm considering splitting sandbox into two boards, one with the test code and one without. But let's see how this develops. Regards, Simon
Re: [U-Boot] [PATCH v5 3/3] sunxi: video: Add simplefb support
Hi, On 11/20/2014 10:22 AM, Ian Campbell wrote: On Wed, 2014-11-19 at 14:32 +0100, Hans de Goede wrote: From: Luc Verhaegen l...@skynet.be Add simplefb support, note this depends on the kernel having support for the clocks property which has recently been added to the simplefb devicetree binding. Signed-off-by: Luc Verhaegen l...@skynet.be [hdego...@redhat.com: Use pre-populated simplefb node under /chosen as disussed on the devicetree list] Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Ian Campbell i...@hellion.org.uk. Thanks, any chance you could also review v2 of the CONFIG_USB_KEYBOARD patch ? One non-blocking queries: +/* Find a framebuffer node, with pipeline == de_be0-lcd0-hdmi */ +offset = fdt_node_offset_by_compatible(blob, -1, + allwinner,simple-framebuffer); +while (offset = 0) { +ret = fdt_find_string(blob, offset, allwinner,pipeline, + de_be0-lcd0-hdmi); +if (ret == 0) +break; +offset = fdt_node_offset_by_compatible(blob, offset, + allwinner,simple-framebuffer); +} Is this variant non-conformant with coding style?: int offset = -1; while ( (offset = fdt_node_offset_by_compatible(blob, offset, allwinner,simple-framebuffer) ) { LOOP BODY } I expect it is because of the assignment within the while condition, which is a shame, since this is one case where it is IMHO leads to clearer code. AFAIK this indeed would go against the coding style, and TBH I'm also not sure if I agree it would be cleaner (mainly because indentation would become (even more) messy due to the 80 columns limit). Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [i2c] Pull request
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/19/2014 01:50 AM, Heiko Schocher wrote: Hello Tom, please pull from u-boot-i2c.git The following changes since commit 2086e388d56cbb0e3737a6276f04f00f74bf6723: Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx (2014-11-14 16:39:32 -0500) are available in the git repository at: git://git.denx.de/u-boot-i2c.git master for you to fetch changes up to c469703ba0e4adcd210e342fa6a19fcd83fe7207: blackfin: convert to use CONFIG_SYS_I2C framework (2014-11-17 08:10:37 +0100) Scott Jiang (3): blackfin: rename bfin-twi_i2c driver to adi_i2c adi_i2c: convert to use general io accessors. blackfin: convert to use CONFIG_SYS_I2C framework drivers/i2c/Makefile| 2 +- drivers/i2c/adi_i2c.c | 305 ++ drivers/i2c/bfin-twi_i2c.c | 379 -- include/configs/bct-brettl2.h | 4 +- include/configs/bf518f-ezbrd.h | 4 +- include/configs/bf526-ezbrd.h | 4 +- include/configs/bf527-ad7160-eval.h | 4 +- include/configs/bf527-ezkit.h | 4 +- include/configs/bf527-sdp.h | 4 +- include/configs/bf537-minotaur.h| 4 +- include/configs/bf537-pnav.h| 4 +- include/configs/bf537-srv1.h| 4 +- include/configs/bf537-stamp.h | 4 +- include/configs/bf538f-ezkit.h | 4 +- include/configs/bf548-ezkit.h | 4 +- include/configs/bf609-ezkit.h | 4 +- include/configs/bfin_adi_common.h | 4 +- include/configs/br4.h | 4 +- include/configs/cm-bf527.h | 4 +- include/configs/cm-bf537e.h | 4 +- include/configs/cm-bf537u.h | 4 +- include/configs/cm-bf548.h | 4 +- include/configs/pr1.h | 4 +- include/configs/tcm-bf518.h | 4 +- include/configs/tcm-bf537.h | 4 +- 25 files changed, 350 insertions(+), 424 deletions(-) create mode 100644 drivers/i2c/adi_i2c.c delete mode 100644 drivers/i2c/bfin-twi_i2c.c Applied to u-boot/master, thanks! - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJUbfewAAoJENk4IS6UOR1WjugP/0/ukSXcnJOWACPvFbTqG1CS COUNeZLZunopcFZkI2nqdgBk8P+1CSekIm90tPSnuIRovaNqJBkqjvR5cRN+FsLN pNRd5xLpXNsCTa7pfghev1TgvtEAfghWbP4qFEWH95Uuo3+I4sD6/5kaGx05gejx aWHe+JkU1ideOHK1R+0kA+A+O82XaK93JZNl6sZVH/3+uDtVkWaqULK2SCqbxdWL iEvximeCHftIzS+W4zdsl56SdIlsvblvAc4bzV5xY/XFWbF677Ow7z4gkoSLiNF8 B9qtcwHVrfMEmjIg0P7a7YrpHE/ZbJFSqJU+lg6GGxklJjo17ubLTavwUSe8/ffM BD7oNgEN6B6ev+l+PtV6ILmL+wJRPejsvshIPkp6y38sgxkL+BWpgKst0J4uenz5 PZDufqDRsMKxBjt5JGbxVVEljkhi80efuTU6ge1ygilNF9jrQ5IlZP+70z8V09G5 bnfKwDzjywHAUbWWsjGvtUwDsVAQ/JmraHMdNOneT1mqJAF7kGQZVXVtfcL93k4Q 82tnGgvkXd6mx2UGn+QwdhkwscWq7hFnMEbnTfQFZ+mwQKNEgQVjENDgl47b9xEZ 3hmmbTad/3J1wlwVDOVeMKR71gVwFkh4CO1OnkwZA1UhcR9h4+QCP5mGevT6R365 pQb3ROBBngE9y6oBJtjg =DAB/ -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ubi] Pull request
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/19/2014 02:00 AM, Heiko Schocher wrote: Hello Tom, please pull from u-boot-ubi.git The following changes since commit f196044dfd64745a163773c6c746f9e149ace127: ARM: atmel: add sama5d4 xplained ultra board support (2014-11-17 08:47:18 -0500) are available in the git repository at: git://git.denx.de/u-boot-ubi.git master for you to fetch changes up to d1cfeee916fe86eddd944f7363f9d2884bdd9814: ubi: enable error reporting in initialization (2014-11-19 07:54:40 +0100) Andrew Ruder (1): ubi: enable error reporting in initialization Heiko Schocher (1): mtd, cfi, ubi: add missing writebufsize initialization drivers/mtd/cfi_mtd.c | 1 + include/ubi_uboot.h | 8 2 files changed, 9 insertions(+) Applied to u-boot/master, thanks! - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJUbfe7AAoJENk4IS6UOR1WAQsQAKlMfVi320XLO2vt4uEATHRs LXAnK0/fvfCPBa8PkVp9+X+P2UXcWTyZOqkcnzrFQ/IlhvCQtaIyv9U/CkbPi697 VrdYZXFlVZ8x5WTnzH6NUA0YqQfL6wOemoU5JSrusjnVMqJzN0uELOQhJrBtN4id 5DwSmr/Dot+EMwBvQ39WjeDnKCqJsfoLkva6kkeCTXwlEvL/KSUabbHD4GXV83mT qgIfrexxFE5wCTnxdnuY7ApTf3zFMtjSM9ERQN6N15cY9Ya+cXtpo6mVTzV/gwMb hTG/JErETLjfnzb9tz2rc0k2W3FaQ/yTl34fYwqdb3EQ63E0LjCkhV/O9muojHuM syfL7S2fNPy3MFibL4mhQDEHrHjQaWfpkxOv6Vn9y9ZhJds2mG2ykPco8kc5M6nG LYtOKqOLYAnILVeehkIXD1tDUXfRoYTmxWs42LN+VjHR3L0w19Db8QnUMoI7CvdX /7Wa/K0pverFInJ4FvFM64dJtV0xCz1KBh6Gi0JSjn8QWPAKZpMTMVjLoDpVWAAZ /bfkgznvkT9rkfZFXGhtZT8qTBEGLKO/0joz8UptKSHOBiU/pRrjKhA3PA5BGRA9 mTE10L6yWXgeUW40uNH3X//WY50PZA7w2237PEb161dtZXT2bp/a5sFYJ0oOeFbw 6SXI7QgWoGbvD418zMF8 =KCPL -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-ppc4xx/master
On Wed, Nov 19, 2014 at 09:03:46AM +0100, Stefan Roese wrote: Hi Tom, please pull the patch series from Dirk. It includes one CFI related patch and one mpc83xx where we have the Ack from Kim. The following changes since commit f196044dfd64745a163773c6c746f9e149ace127: ARM: atmel: add sama5d4 xplained ultra board support (2014-11-17 08:47:18 -0500) are available in the git repository at: git://www.denx.de/git/u-boot-ppc4xx.git for you to fetch changes up to 50dcf89d90b3597d86f5d26f131eabc98bbd5209: mpc83xx: Add gdsys hrcon board (2014-11-19 08:48:42 +0100) 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] powerpc: mpc52xx: PULL REQUEST
On Wed, Nov 19, 2014 at 01:14:35PM +0100, Wolfgang Denk wrote: Dear Tom, The following changes since commit f196044dfd64745a163773c6c746f9e149ace127: ARM: atmel: add sama5d4 xplained ultra board support (2014-11-17 08:47:18 -0500) are available in the git repository at: git://git.denx.de/u-boot-mpc5xxx.git master for you to fetch changes up to 5fc3494fdb00dd7894090ce0c21936815a575558: powerpc: mpc52xx: Clear GD in the main U-Boot stage for SPL usage (2014-11-19 13:08:14 +0100) 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 v2 1/3] lib: string: move strlcpy() to a common place
On 20 November 2014 12:20, Masahiro Yamada yamad...@jp.panasonic.com wrote: Move strlcpy() definition from drivers/usb/gadget/ether.c to lib/string.c because it is a very useful function. Let's add the prototype to include/linux/string.h too. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: None 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 v2 4/4] sunxi: Add usb keyboard Kconfig option
On Sun, 2014-11-16 at 17:06 +0100, Hans de Goede wrote: For use together with the hdmi console. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Ian Campbell ian.campb...@citrix.com --- board/sunxi/Kconfig | 7 +++ configs/A13-OLinuXinoM_defconfig | 1 + configs/A13-OLinuXino_defconfig | 1 + configs/Ippo_q8h_v5_defconfig| 1 + include/configs/sunxi-common.h | 13 + 5 files changed, 23 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 422033a..246cd9a 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -223,4 +223,11 @@ config VIDEO Say Y here to add support for using a cfb console on the HDMI output found on most sunxi devices. +config USB_KEYBOARD + boolean Enable USB keyboard support + default y + ---help--- + Say Y here to add support for using a USB keyboard (typically used + in combination with a graphical console on HDMI). + endif diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig index b1262f7..be8652b 100644 --- a/configs/A13-OLinuXinoM_defconfig +++ b/configs/A13-OLinuXinoM_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,USB_EHCI CONFIG_FDTFILE=sun5i-a13-olinuxino-micro.dtb CONFIG_USB1_VBUS_PIN=PG11 CONFIG_VIDEO=n +CONFIG_USB_KEYBOARD=n +S:CONFIG_ARM=y +S:CONFIG_ARCH_SUNXI=y +S:CONFIG_MACH_SUN5I=y diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig index 652eac1..654e12a 100644 --- a/configs/A13-OLinuXino_defconfig +++ b/configs/A13-OLinuXino_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,AXP209_POWER,USB_EHCI CONFIG_FDTFILE=sun5i-a13-olinuxino.dtb CONFIG_USB1_VBUS_PIN=PG11 CONFIG_VIDEO=n +CONFIG_USB_KEYBOARD=n +S:CONFIG_ARM=y +S:CONFIG_ARCH_SUNXI=y +S:CONFIG_MACH_SUN5I=y diff --git a/configs/Ippo_q8h_v5_defconfig b/configs/Ippo_q8h_v5_defconfig index 53df213..50c2f93 100644 --- a/configs/Ippo_q8h_v5_defconfig +++ b/configs/Ippo_q8h_v5_defconfig @@ -5,3 +5,4 @@ CONFIG_MACH_SUN8I=y CONFIG_TARGET_IPPO_Q8H_V5=y CONFIG_DEFAULT_DEVICE_TREE=sun8i-a23-ippo-q8h-v5.dtb CONFIG_VIDEO=n +CONFIG_USB_KEYBOARD=n diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index d5d907b..fcaa249 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -247,6 +247,13 @@ #define CONFIG_USB_STORAGE #endif +#ifdef CONFIG_USB_KEYBOARD +#define CONFIG_CONSOLE_MUX +#define CONFIG_PREBOOT +#define CONFIG_SYS_STDIO_DEREGISTER +#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE +#endif + #if !defined CONFIG_ENV_IS_IN_MMC \ !defined CONFIG_ENV_IS_IN_NAND \ !defined CONFIG_ENV_IS_IN_FAT \ @@ -297,8 +304,14 @@ #include config_distro_bootcmd.h +#ifdef CONFIG_USB_KEYBOARD +#define CONSOLE_STDIN_SETTINGS \ + preboot=run usb_init\0 \ + stdin=serial,usbkbd\0 +#else #define CONSOLE_STDIN_SETTINGS \ stdin=serial\0 +#endif #ifdef CONFIG_VIDEO #define CONSOLE_STDOUT_SETTINGS \ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 0/3] ARM: Add armv7/Kconfig and allow booting in secure mode on non-secure boot capable systems
Hi Albert, On 11/14/2014 09:34 AM, Hans de Goede wrote: Hi Albert, Here is v5 of my patchset to allow booting in secure mode on non-secure boot capable systems. Changes in v2: -ARM: Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options: -Drop all the FIXME-s, use proper CPU_V7 and CPU_V7_HAS_foo checks instead Changes in v5: -Jump patch-set version to v5 to match the revision level of the patch with the highest revision in the set -Kconfig: Add EXPERT option -Add Masahiro Yamada's Acked-by -ARM: Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options: -Fix the commit message to refer to the right Kconfig option -ARM: bootm: Allow booting in secure mode on hyp capable systems -Fix ARMV7_BOOT_SEC_DEFAULT Kconfig help text mixing up secure and non-secure modes I was wondering what the status of this patch-set is ? Anything I need to do to get this moving upstream ? Thanks Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/11] fdt: Add device tree memory bindings
On Wed, Nov 12, 2014 at 03:14:35PM -0700, Simon Glass wrote: [snip, and sorry for the late reply] What I am talking about here is the memory for U-Boot - i.e. how does U-Boot know how much memory is available. The scheme here is that you can have a board ID which controls this, with the U-Boot device tree allowing the options to be specified (i.e. the mapping from board ID to SDRAM banks) OK. So what I'm getting at is how is this different from other boards where we say Oh, this is $FOO, it has $X LPDRR2 RAM and Oh, this is $BAR, it has $Y DDR3 RAM ? The only thing I'm able to think of is that we cannot call get_ram_size() to see the _size_ of the RAM after doing $whatever to see what board we're on and doing the right configuration for the DDR controller or whatever. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] dm: add a command to list devices in a tree-like format
Hi Masahiro, On 20 November 2014 12:20, Masahiro Yamada yamad...@jp.panasonic.com wrote: We are adding more and more drivers to driver model these days. Compared with the ad-hoc driver system, it seems pretty difficult to understand how drivers are working on driver model. For ex. - Which devices have been bound? - Which devices have been probed? - Which is the parent of this device? etc. I hope this tool will help us test/review driver model patches. Just hit showdev on the command line and it will list all the bound devices in a tree-like format with Class and Probed flag. This looks very similar to the 'dm tree' command. Can we unify these? Perhaps move the commands into common/cmd_dm.c? Then we can use the CONFIG_CMD_DM option instead of a new one. Also I think 'dm xxx' is better than things 'showdev'. The 'dm' prefix can be used for all DM commands. = showdev Class Probed Name root[ + ]root_driver demo[ ]|-- demo_shape_drv demo[ ]|-- demo_simple_drv demo[ ]|-- demo_shape_drv demo[ ]|-- demo_simple_drv demo[ ]|-- demo_shape_drv test[ ]|-- test_drv test[ ]|-- test_drv test[ ]|-- test_drv gpio[ ]|-- gpio_sandbox serial [ ]|-- serial_sandbox serial [ + ]|-- serial demo[ ]|-- triangle demo[ ]|-- square demo[ ]|-- hexagon gpio[ ]|-- gpios i2c [ + ]|-- i2c@0 i2c_eeprom [ + ]| |-- eeprom@2c i2c_emul[ + ]| | \-- emul i2c_generic [ + ]| \-- generic_59 spi [ ]|-- spi@0 spi_emul[ ]| \-- flash@0 cros_ec [ + ]\-- cros-ec@0 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Changes in v2: - Fix the tree format common/Makefile | 1 + common/cmd_showdev.c | 70 2 files changed, 71 insertions(+) create mode 100644 common/cmd_showdev.c diff --git a/common/Makefile b/common/Makefile index 6cc4de8..c26c764 100644 --- a/common/Makefile +++ b/common/Makefile @@ -84,6 +84,7 @@ obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o obj-$(CONFIG_CMD_DATE) += cmd_date.o obj-$(CONFIG_CMD_DEMO) += cmd_demo.o +obj-$(CONFIG_CMD_SHOWDEV) += cmd_showdev.o obj-$(CONFIG_CMD_SOUND) += cmd_sound.o ifdef CONFIG_4xx obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o diff --git a/common/cmd_showdev.c b/common/cmd_showdev.c new file mode 100644 index 000..f73bfba --- /dev/null +++ b/common/cmd_showdev.c @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2014 Panasonic Corporation + * Author: Masahiro Yamada yamad...@jp.panasonic.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include linux/string.h +#include linux/list.h +#include dm/device.h +#include dm/uclass.h + +DECLARE_GLOBAL_DATA_PTR; + +#define INDENT1 +#define INDENT2 | +#define INDENT3 \\-- +#define INDENT4 |-- Is there really any value in these? + +static void show_devices(struct udevice *dev, int depth, int last_flag) +{ + int i, is_last; + struct udevice *child; + char class_name[12]; + + /* print the first 11 characters to not break the tree-format. */ + strlcpy(class_name, dev-uclass-uc_drv-name, sizeof(class_name)); + printf( %-11s , class_name); + + printf([ %c ], dev-flags DM_FLAG_ACTIVATED ? '+' : ' '); This line could be combined with the above. + + for (i = depth; i = 0; i--) { + is_last = (last_flag i) 1; + if (i) { + if (is_last) + printf(INDENT1); + else + printf(INDENT2); + } else { + if (is_last) + printf(INDENT3); + else + printf(INDENT4); + } + } + + printf(%s\n, dev-name); + + list_for_each_entry(child, dev-child_head, sibling_node) { + is_last = list_is_last(child-sibling_node, dev-child_head); + show_devices(child, depth + 1, (last_flag 1) | is_last); + } +} + +static int do_showdev(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + printf( Class Probed Name\n); Remove the first space? + printf(\n); + + show_devices(gd-dm_root, -1, 0); + + return 0; +} + +U_BOOT_CMD( + showdev, 1, 1, do_showdev, + show devices in a tree-like format., + +); -- 1.9.1 Regards, Simon
Re: [U-Boot] [PATCH v1 2/2] odroid: usbhost - Add missing gpio_request call
Hello Minkyu Kang, On Thu, Nov 20, 2014 at 12:41 AM, Minkyu Kang mk7.k...@samsung.com wrote: Dear Suriyan Ramasami, On 20/11/14 01:21, Suriyan Ramasami wrote: The USB host code was missing gpio_request() calls before using the gpio functions, causing errors to be printed out. Signed-off-by: Suriyan Ramasami suriya...@gmail.com --- Changes in v1: - Added gpio_request() call in board_gpio_init() board/samsung/odroid/odroid.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index f7396ab..a2c008e 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -382,6 +382,17 @@ static void board_gpio_init(void) gpio_set_pull(EXYNOS4X12_GPIO_X31, S5P_GPIO_PULL_UP); gpio_set_drv(EXYNOS4X12_GPIO_X31, S5P_GPIO_DRV_4X); gpio_direction_input(EXYNOS4X12_GPIO_X31); + +#ifdef CONFIG_CMD_USB + /* USB3503A Reference frequency */ + gpio_request(EXYNOS4X12_GPIO_X30, USB3503A RefFreq); + + /* USB3503A Connect */ + gpio_request(EXYNOS4X12_GPIO_X34, USB3503A Connect); + + /* USB3503A Reset */ + gpio_request(EXYNOS4X12_GPIO_X35, USB3503A Reset); +#endif } static int pmic_init_max77686(void) @@ -489,10 +500,8 @@ int board_usb_init(int index, enum usb_init_type init) p_pmic = pmic_get(MAX77686_PMIC); if (p_pmic !pmic_probe(p_pmic)) { - max77686_set_buck_mode(p_pmic, 8, OPMODE_OFF); max77686_set_buck_voltage(p_pmic, 8, 75); max77686_set_buck_voltage(p_pmic, 8, 330); - max77686_set_buck_mode(p_pmic, 8, OPMODE_ON); why you remove those two lines? This patch is for adding gpio_request call, and there's no explain for this change. Sorry about the confusion caused. This topic was discussed in another thread, and I shall add the comments (from Przemyslaw) in the next version as to why the BUCK OFF and ON does not work as expected on the Odroid boards. Regards - Suriyan Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] BUG: bootz/bootm command mandates a fdt blob
Hello Simon, This mail is addressed to you as the FDT support was added by you. I am not sure who else to address it to. I find that if CONFIG_OF_LIBFDT is defined then the user is forced to provide a FDT blob. In most of the cases it makes sense. However, this removes the ability to boot older linux (non FDT). For example, I was looking at the Hardkernel Odroid kernels for the U2/U3, and they are 3.8 based. Of course newer kernels 3.17 work. For users to use the same boot loader for 3.8 and for 3.17, they cannot use the mainline uboot. I was wondering if teh third argument to bootz/bootm etc could also take the route of initrd (optional if - is specified) could be implemented. The fix seems to be trivial (or so I think), in file common/image-fdt.c, but wanted to know your comments on this. Also the command help (for bootz etc) states that if the 3rd argument is not passed, then the bd_info struct is passed, and I do not see it being passed in the code anywhere. In the absence of the third parameter, it just gives a No fdt found message. diff --git a/common/image-fdt.c b/common/image-fdt.c index a39ae1b..e685700 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -243,7 +243,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], u if (argc 2) select = argv[2]; - if (select || genimg_has_config(images)) { + if (select strcmp(select, -) == 0) { + debug(## Skipping fdt\n); + return 0; + } else if (select || genimg_has_config(images)) { #if defined(CONFIG_FIT) if (select) { /* Regards - Suriyan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] gw_ventana: Use the generic spl_sd.cfg
From: Fabio Estevam fabio.este...@freescale.com gw_ventana can boot from SPI or NAND and both of these interfaces boot from the same 0x400 offset. This means that we could simplify the code and replace the custom gw_ventana.cfg with the generic spl_sd.cfg, as it provides the same boot offset of 0x400. Cc: Tim Harvey thar...@gateworks.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/gateworks/gw_ventana/gw_ventana.cfg | 23 --- configs/gwventana_defconfig | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 board/gateworks/gw_ventana/gw_ventana.cfg diff --git a/board/gateworks/gw_ventana/gw_ventana.cfg b/board/gateworks/gw_ventana/gw_ventana.cfg deleted file mode 100644 index dd8aa61..000 --- a/board/gateworks/gw_ventana/gw_ventana.cfg +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013 Gateworks Corporation - * - * 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 */ -IMAGE_VERSION 2 - -/* - * Boot Device : one of - * spi, sd, nand, sata - */ -#ifdef CONFIG_SPI_FLASH -BOOT_FROM spi -#else -BOOT_FROM nand -#endif diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig index f185329..4cddbdd 100644 --- a/configs/gwventana_defconfig +++ b/configs/gwventana_defconfig @@ -1,4 +1,4 @@ CONFIG_SPL=y -CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=board/gateworks/gw_ventana/gw_ventana.cfg,MX6QDL +CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL +S:CONFIG_ARM=y +S:CONFIG_TARGET_GW_VENTANA=y -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: make arch memset/memcpy to work with Thumb2 builds
On 20-11-14 13:15, Stefan Agner wrote: No particular reason, I did not know how to fix this without digging into it. Hence, after I discovered this, I checked why those warnings do not happen for the kernel, then I applied just the AFLAGS the kernel is using. I guess fixing the underlying issue is the better option, and doing this also for the kernel would be the best way... Maybe the kernel community also knows better why they choose to use the AFLAGS instead (and if there are gas version which do have problems with a proper fix)... On 20 Nov 2014, jer...@myspectrum.nl wrote: for what it is worth, I have attached patch hanging around, but I never actually tested it. It is for the current version. From c151254b3de49d8fccb69ab4f9442d884b9ff85c Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee jer...@myspectrum.nl Date: Thu, 20 Nov 2014 14:06:26 +0100 Subject: [PATCH] arm: memset: make it UAL compliant --- arch/arm/lib/memset.S | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 0cdf895..4fe38f6 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -18,8 +18,8 @@ 1:subsr2, r2, #4 @ 1 do we have enough blt 5f @ 1 bytes to align with? cmp r3, #2 @ 1 - strltb r1, [r0], #1@ 1 - strleb r1, [r0], #1@ 1 + strblt r1, [r0], #1@ 1 + strble r1, [r0], #1@ 1 To test this, can we just use 'objdump'. The hex codes should be identical; there is only one encoding. It should produce the same binaries. No need to run test-suites, etc. Fwiw, Bill. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v7 2/4] DM: thermal: Add imx thermal DM driver
Hi Ye, On 20/11/2014 14:14, Ye.Li wrote: Add a new thermal uclass for thermal sensor and implement the imx thermal driver basing on this uclass. Thanks for doing this ! Signed-off-by: Ye.Li b37...@freescale.com --- drivers/Makefile |1 + drivers/thermal/Makefile |9 ++ drivers/thermal/imx_thermal.c| 177 ++ drivers/thermal/thermal-uclass.c | 30 +++ include/dm/uclass-id.h |1 + include/imx_thermal.h| 17 include/thermal.h| 42 + 7 files changed, 277 insertions(+), 0 deletions(-) diff --git a/drivers/Makefile b/drivers/Makefile index 33227c8..7683c61 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -21,3 +21,4 @@ obj-y += pwm/ obj-y += input/ # SOC specific infrastructure drivers. obj-y += soc/ +obj-y += thermal/ diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile new file mode 100644 index 000..6d4cacd --- /dev/null +++ b/drivers/thermal/Makefile @@ -0,0 +1,9 @@ +# +# (C) Copyright 2014 Freescale Semiconductor, Inc. +# Author: Nitin Garg nitin.g...@freescale.com +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_DM_THERMAL) += thermal-uclass.o +obj-$(CONFIG_IMX6_THERMAL) += imx_thermal.o diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c new file mode 100644 index 000..1161585 --- /dev/null +++ b/drivers/thermal/imx_thermal.c @@ -0,0 +1,177 @@ +/* + * (C) Copyright 2014 Freescale Semiconductor, Inc. + * Author: Nitin Garg nitin.g...@freescale.com + * Ye Li ye...@freescale.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include config.h +#include common.h +#include div64.h +#include fuse.h +#include asm/io.h +#include asm/arch/clock.h +#include dm.h +#include errno.h +#include malloc.h +#include thermal.h +#include imx_thermal.h + +#define TEMPERATURE_MIN -40 +#define TEMPERATURE_HOT 80 +#define TEMPERATURE_MAX 125 +#define FACTOR0 1000 +#define FACTOR1 15976 +#define FACTOR2 4297157 +#define MEASURE_FREQ 327 + +#define TEMPSENSE0_TEMP_CNT_SHIFT8 +#define TEMPSENSE0_TEMP_CNT_MASK (0xfff TEMPSENSE0_TEMP_CNT_SHIFT) +#define TEMPSENSE0_FINISHED (1 2) +#define TEMPSENSE0_MEASURE_TEMP (1 1) +#define TEMPSENSE0_POWER_DOWN(1 0) +#define MISC0_REFTOP_SELBIASOFF (1 3) +#define TEMPSENSE1_MEASURE_FREQ 0x + +static int read_cpu_temperature(struct udevice *dev) +{ + int temperature; + unsigned int reg, n_meas; + const struct imx_thermal_plat *pdata = dev_get_platdata(dev); + struct anatop_regs *anatop = (struct anatop_regs *)pdata-regs; + unsigned int *priv = dev_get_priv(dev); + u32 fuse = *priv; + int t1, n1; + u32 c1, c2; + u64 temp64; + + /* + * Sensor data layout: + * [31:20] - sensor value @ 25C + * We use universal formula now and only need sensor value @ 25C + * slope = 0.4297157 - (0.0015976 * 25C fuse) + */ + n1 = fuse 20; + t1 = 25; /* t1 always 25C */ + + /* + * Derived from linear interpolation: + * slope = 0.4297157 - (0.0015976 * 25C fuse) + * slope = (FACTOR2 - FACTOR1 * n1) / FACTOR0 + * (Nmeas - n1) / (Tmeas - t1) = slope + * We want to reduce this down to the minimum computation necessary + * for each temperature read. Also, we want Tmeas in millicelsius + * and we don't want to lose precision from integer division. So... + * Tmeas = (Nmeas - n1) / slope + t1 + * milli_Tmeas = 1000 * (Nmeas - n1) / slope + 1000 * t1 + * milli_Tmeas = -1000 * (n1 - Nmeas) / slope + 1000 * t1 + * Let constant c1 = (-1000 / slope) + * milli_Tmeas = (n1 - Nmeas) * c1 + 1000 * t1 + * Let constant c2 = n1 *c1 + 1000 * t1 + * milli_Tmeas = c2 - Nmeas * c1 + */ + temp64 = FACTOR0; + temp64 *= 1000; + do_div(temp64, FACTOR1 * n1 - FACTOR2); + c1 = temp64; + c2 = n1 * c1 + 1000 * t1; + + /* + * now we only use single measure, every time we read + * the temperature, we will power on/down anadig thermal + * module + */ + writel(TEMPSENSE0_POWER_DOWN, anatop-tempsense0_clr); + writel(MISC0_REFTOP_SELBIASOFF, anatop-ana_misc0_set); + + /* setup measure freq */ + reg = readl(anatop-tempsense1); + reg = ~TEMPSENSE1_MEASURE_FREQ; + reg |= MEASURE_FREQ; + writel(reg, anatop-tempsense1); + + /* start the measurement process */ + writel(TEMPSENSE0_MEASURE_TEMP, anatop-tempsense0_clr); + writel(TEMPSENSE0_FINISHED, anatop-tempsense0_clr); + writel(TEMPSENSE0_MEASURE_TEMP, anatop-tempsense0_set); + + /* make sure that the latest temp
Re: [U-Boot] [PATCH] tbs2910: Fix error handling in board_mmc_init()
Hi Soeren, On 20/11/2014 13:03, Soeren Moch wrote: When an invalid USDHC port is passed we should return -EINVAL instead of 0. Also, return the error immediately on fsl_esdhc_initialize() failure. Based on similar patches by Fabio Estevam for mx6sabresd, mx53loco, wandboard Signed-off-by: Soeren Moch sm...@web.de -- Cc: Stefano Babic sba...@denx.de Cc: Fabio Estevam feste...@gmail.com --- board/tbs/tbs2910/tbs2910.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c index daf8ff4..dfa430e 100644 --- a/board/tbs/tbs2910/tbs2910.c +++ b/board/tbs/tbs2910/tbs2910.c @@ -219,15 +219,13 @@ int board_mmc_getcd(struct mmc *mmc) int board_mmc_init(bd_t *bis) { - s32 status = 0; - int i; - /* * (U-boot device node)(Physical Port) * mmc0SD2 * mmc1SD3 * mmc2eMMC */ + int i, ret; for (i = 0; i CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { case 0: @@ -251,12 +249,13 @@ int board_mmc_init(bd_t *bis) printf(Warning: you configured more USDHC controllers (%d) then supported by the board (%d)\n, i + 1, CONFIG_SYS_FSL_USDHC_NUM); - return status; + return -EINVAL; } - - status |= fsl_esdhc_initialize(bis, usdhc_cfg[i]); + ret = fsl_esdhc_initialize(bis, usdhc_cfg[i]); + if (ret) + return ret; } - return status; + return 0; } #endif /* CONFIG_FSL_ESDHC */ ok, I'll merge in the next iteration. Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel 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] m68k maintenance
On Thu, Nov 20, 2014 at 08:19:17AM +, jason@freescale.com wrote: Hi Angelo Dureghello Thanks for your reminder. I'm really not active for the ColdFire platform maintenance recently due to other work assigned. I'll try to find a custodians inside Freescale to take over the work as there are many Freescale boards need to maintain. Thanks. I'd like to take a page from the Linux Kernel here and continue what's working well for the sunxi code. Let's have multiple custodians. I've seen Angelo working in the community and responding and working well, so I'd be happy to see him be a custodian. I've seen Alison Wang (whom you mentioned off list) doing the same and I'd be happy to see her being a custodian as well. Assuming everyone else is agreeable as well :) Thanks! Regards, Jason -- From: Angelo Dureghello [mailto:ang...@sysam.it] Sent: Wednesday, November 19, 2014 7:41 PM To: Jin Zhengxiong-R64188 Cc: u-boot@lists.denx.de Subject: m68k maintenance Dear Jason Jin, this mail to ask if you are still interested in the role of m68k custodian. If not, please let us know, i am proposing myself as custodian since quite active on u-boot m68k development currently. Regards, Angelo Dureghello ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- 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 v5 1/3] Kconfig: Add EXPERT option
On Fri, Nov 14, 2014 at 09:58:52AM +0100, Hans de Goede wrote: Hi, On 11/14/2014 09:55 AM, Albert ARIBAUD wrote: Hello Hans, On Fri, 14 Nov 2014 09:34:29 +0100, Hans de Goede hdego...@redhat.com wrote: From: Tom Rini tr...@ti.com For similar reasons to why the Linux Kernel has an EXPERT option, we too want an option to allow for tweaking of some options that while normally should remain hidden, may need to be changed in some cases. Signed-off-by: Tom Rini tr...@ti.com Acked-by: Masahiro Yamada yamad...@jp.panasonic.com Acked-by: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com --- As you're just resending Tom's patch, should it have your own Signed-off-by? No need to post v6 if you think this should be corrected, I would do it when applying. AFAIK it is normal to add a Signed-off-by when a patch passes through ones hands / tree. But I'm fine with having it removed, either way works for me. I don't have a preference either way. We don't add S-o-B lines as often as the kernel does but I don't want to make people worry about that when switching between kernel and u-boot work either. -- 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] arm: make arch memset/memcpy to work with Thumb2 builds
Hi, On 20-11-14 16:18, Bill Pringlemeir wrote: --- arch/arm/lib/memset.S | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 0cdf895..4fe38f6 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -18,8 +18,8 @@ 1: subsr2, r2, #4 @ 1 do we have enough blt 5f @ 1 bytes to align with? cmp r3, #2 @ 1 - strltb r1, [r0], #1@ 1 - strleb r1, [r0], #1@ 1 + strblt r1, [r0], #1@ 1 + strble r1, [r0], #1@ 1 To test this, can we just use 'objdump'. The hex codes should be identical; there is only one encoding. It should produce the same binaries. No need to run test-suites, etc. yes, I should be trivial to test (and find the trivial problem, with the patch I attached). I am wondering though if all version of gas accept the suffix notation... any idea? Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] BUG: bootz/bootm command mandates a fdt blob
Hi Suriyan, On 11/20/2014 04:16 PM, Suriyan Ramasami wrote: Hello Simon, This mail is addressed to you as the FDT support was added by you. I am not sure who else to address it to. I find that if CONFIG_OF_LIBFDT is defined then the user is forced to provide a FDT blob. In most of the cases it makes sense. However, this removes the ability to boot older linux (non FDT). For example, I was looking at the Hardkernel Odroid kernels for the U2/U3, and they are 3.8 based. Of course newer kernels 3.17 work. For users to use the same boot loader for 3.8 and for 3.17, they cannot use the mainline uboot. I've hit the same problem myself recently, see the thread titled: Booting non devicetree enabled kernels using u-boot build with CONFIG_OF_LIBFDT I was wondering if teh third argument to bootz/bootm etc could also take the route of initrd (optional if - is specified) could be implemented. The fix seems to be trivial (or so I think), in file common/image-fdt.c, but wanted to know your comments on this. Also the command help (for bootz etc) states that if the 3rd argument is not passed, then the bd_info struct is passed, and I do not see it being passed in the code anywhere. In the absence of the third parameter, it just gives a No fdt found message. Thanks for working on a fix, as discussed in the earlier thread, requiring a third argument which is '-' will break old boot.scr files and the likes, so a better fix is to: 1) Always try to find an ftd (to keep things like appended ftd-s working) 2) If not found see if there is a third argument, if there is, treat this as a fatal error, abort the bootm (iow behave as before) 3) If there is not a third argument warn and continue as before. If you could respin your patch to do this, then that would be great. Regards, Hans diff --git a/common/image-fdt.c b/common/image-fdt.c index a39ae1b..e685700 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -243,7 +243,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], u if (argc 2) select = argv[2]; - if (select || genimg_has_config(images)) { + if (select strcmp(select, -) == 0) { + debug(## Skipping fdt\n); + return 0; + } else if (select || genimg_has_config(images)) { #if defined(CONFIG_FIT) if (select) { /* Regards - Suriyan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] lcd: remove LCD_MONOCHROME
No one is using LCD_MONOCHROME; remove related code. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Wolfgang Denk w...@denx.de Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 30 ++ drivers/video/mpc8xx_lcd.c | 17 - drivers/video/pxa_lcd.c| 15 --- include/lcd.h | 10 +- 4 files changed, 3 insertions(+), 69 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index ff53cf1..4c86f6c 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -96,10 +96,7 @@ #define CONSOLE_SIZE (CONSOLE_ROW_SIZE * CONSOLE_ROWS) #define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE) -#if LCD_BPP == LCD_MONOCHROME -# define COLOR_MASK(c) ((c) | (c) 1 | (c) 2 | (c) 3 | \ -(c) 4 | (c) 5 | (c) 6 | (c) 7) -#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \ +#if (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \ (LCD_BPP == LCD_COLOR32) # define COLOR_MASK(c) (c) #else @@ -312,10 +309,6 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) y += BMP_LOGO_HEIGHT; #endif -#if LCD_BPP == LCD_MONOCHROME - ushort off = x * (1 LCD_BPP) % 8; -#endif - dest = (uchar *)(lcd_base + y * lcd_line_length + x * NBITS(LCD_BPP)/8); for (row = 0; row VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) { @@ -329,33 +322,18 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) uchar *d = dest; #endif -#if LCD_BPP == LCD_MONOCHROME - uchar rest = *d -(1 (8 - off)); - uchar sym; -#endif for (i = 0; i count; ++i) { uchar c, bits; c = *s++; bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row]; -#if LCD_BPP == LCD_MONOCHROME - sym = (COLOR_MASK(lcd_color_fg) bits) | - (COLOR_MASK(lcd_color_bg) ~bits); - - *d++ = rest | (sym off); - rest = sym (8-off); -#else /* LCD_BPP == LCD_COLOR8 or LCD_COLOR16 or LCD_COLOR32 */ for (c = 0; c 8; ++c) { *d++ = (bits 0x80) ? lcd_color_fg : lcd_color_bg; bits = 1; } -#endif } -#if LCD_BPP == LCD_MONOCHROME - *d = rest | (*d ((1 (8 - off)) - 1)); -#endif } } @@ -442,11 +420,7 @@ int drv_lcd_init(void) /*--*/ void lcd_clear(void) { -#if LCD_BPP == LCD_MONOCHROME - /* Setting the palette */ - lcd_initcolregs(); - -#elif LCD_BPP == LCD_COLOR8 +#if LCD_BPP == LCD_COLOR8 /* Setting the palette */ lcd_setcolreg(CONSOLE_COLOR_BLACK, 0, 0, 0); lcd_setcolreg(CONSOLE_COLOR_RED, 0xFF, 0, 0); diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c index 3ea240d..3c16bf6 100644 --- a/drivers/video/mpc8xx_lcd.c +++ b/drivers/video/mpc8xx_lcd.c @@ -357,23 +357,6 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue) /*--*/ -#if LCD_BPP == LCD_MONOCHROME -static -void lcd_initcolregs (void) -{ - volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; - volatile cpm8xx_t *cp = (immr-im_cpm); - ushort regno; - - for (regno = 0; regno 16; regno++) { - cp-lcd_cmap[regno * 2] = 0; - cp-lcd_cmap[(regno * 2) + 1] = regno 0x0f; - } -} -#endif - -/*--*/ - void lcd_enable (void) { volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c index e19f6ac..f66f615 100644 --- a/drivers/video/pxa_lcd.c +++ b/drivers/video/pxa_lcd.c @@ -379,21 +379,6 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue) #endif /* LCD_COLOR8 */ /*--*/ -#if LCD_BPP == LCD_MONOCHROME -void lcd_initcolregs (void) -{ - struct pxafb_info *fbi = panel_info.pxa; - cmap = (ushort *)fbi-palette; - ushort regno; - - for (regno = 0; regno 16; regno++) { - cmap[regno * 2] = 0; - cmap[(regno * 2) + 1] = regno 0x0f; - } -} -#endif /* LCD_MONOCHROME */ - -/*--*/ __weak void lcd_enable(void) { } diff --git a/include/lcd.h b/include/lcd.h index 020d880..01609ac 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -359,15 +359,7 @@ void lcd_sync(void); // /* ** CONSOLE CONSTANTS
[U-Boot] [PATCH 1/5] lcd: remove CONFIG_SYS_INVERT_COLORS
No one is using CONFIG_SYS_INVERT_COLORS; remove related code. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Simon Glass s...@chromium.org Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 8 drivers/video/mpc8xx_lcd.c | 4 +--- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 37147af..2f711c6 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -684,11 +684,7 @@ void bitmap_plot(int x, int y) *(cmap + BMP_LOGO_OFFSET) = lut_entry; cmap++; #else /* !CONFIG_ATMEL_LCD */ -#ifdef CONFIG_SYS_INVERT_COLORS - *cmap++ = 0x - colreg; -#else *cmap++ = colreg; -#endif #endif /* CONFIG_ATMEL_LCD */ } @@ -966,11 +962,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) ( ((cte.red)8) 0xf800) | ( ((cte.green) 3) 0x07e0) | ( ((cte.blue) 3) 0x001f) ; -#ifdef CONFIG_SYS_INVERT_COLORS - *cmap = 0x - colreg; -#else *cmap = colreg; -#endif #if defined(CONFIG_MPC823) cmap--; #else diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c index 2bc3ceb..98b9f5e 100644 --- a/drivers/video/mpc8xx_lcd.c +++ b/drivers/video/mpc8xx_lcd.c @@ -373,9 +373,7 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue) colreg = ((red0x0F) 8) | ((green 0x0F) 4) | (blue 0x0F) ; -#ifdef CONFIG_SYS_INVERT_COLORS - colreg ^= 0x0FFF; -#endif + *cmap_ptr = colreg; debug (setcolreg: reg %2d @ %p: R=%02X G=%02X B=%02X = %02X%02X\n, -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] lcd: cleanup lcd_drawchars
Remove code duplication from lcd_drawchars(). Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Anatolij Gustschin ag...@denx.de --- common/lcd.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 2f711c6..ff53cf1 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -345,19 +345,7 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count) *d++ = rest | (sym off); rest = sym (8-off); -#elif LCD_BPP == LCD_COLOR8 - for (c = 0; c 8; ++c) { - *d++ = (bits 0x80) ? - lcd_color_fg : lcd_color_bg; - bits = 1; - } -#elif LCD_BPP == LCD_COLOR16 - for (c = 0; c 8; ++c) { - *d++ = (bits 0x80) ? - lcd_color_fg : lcd_color_bg; - bits = 1; - } -#elif LCD_BPP == LCD_COLOR32 +#else /* LCD_BPP == LCD_COLOR8 or LCD_COLOR16 or LCD_COLOR32 */ for (c = 0; c 8; ++c) { *d++ = (bits 0x80) ? lcd_color_fg : lcd_color_bg; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] lcd: refactor lcd console stuff into its own file
common/lcd.c is a mix of code portions that do different but related things. To improve modularity, the various code portions should be split into their own modules. Separate lcd console code into its own file. In the process of making this move, some minor changes are introduced: CONSOLE_ROWS and CONSOLE_COLS macros are replaced with variables which are assigned using a new function lcd_init_console(). Minor changes were done to facilitate communication between lcd code and lcd_console code, specifically in the introduction of lcd_console functions set_console_col(), set_console_row(), lcd_get_screen_rows(), lcd_get_screen_columns(), and lcd funcitons lcd_getbgcolor(), lcd_getfgcolor(). Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Anatolij Gustschin ag...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org --- common/Makefile | 2 +- common/lcd.c | 268 ++ common/lcd_console.c | 199 + include/lcd.h | 3 + include/lcd_console.h | 14 +++ 5 files changed, 249 insertions(+), 237 deletions(-) create mode 100644 common/lcd_console.c create mode 100644 include/lcd_console.h diff --git a/common/Makefile b/common/Makefile index 6cc4de8..5f2350b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -205,7 +205,7 @@ obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o obj-$(CONFIG_I2C_EDID) += edid.o obj-$(CONFIG_KALLSYMS) += kallsyms.o obj-y += splash.o -obj-$(CONFIG_LCD) += lcd.o +obj-$(CONFIG_LCD) += lcd.o lcd_console.o obj-$(CONFIG_LYNXKDI) += lynxkdi.o obj-$(CONFIG_MENU) += menu.o obj-$(CONFIG_MODEM_SUPPORT) += modem.o diff --git a/common/lcd.c b/common/lcd.c index 4c86f6c..ea41ac2 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -72,42 +72,13 @@ #define CONFIG_LCD_ALIGNMENT PAGE_SIZE #endif -/* By default we scroll by a single line */ -#ifndef CONFIG_CONSOLE_SCROLL_LINES -#define CONFIG_CONSOLE_SCROLL_LINES 1 -#endif - -// -/* ** CONSOLE DEFINITIONS FUNCTIONS */ -// -#if defined(CONFIG_LCD_LOGO) !defined(CONFIG_LCD_INFO_BELOW_LOGO) -# define CONSOLE_ROWS ((panel_info.vl_row-BMP_LOGO_HEIGHT) \ - / VIDEO_FONT_HEIGHT) -#else -# define CONSOLE_ROWS (panel_info.vl_row / VIDEO_FONT_HEIGHT) -#endif - -#define CONSOLE_COLS (panel_info.vl_col / VIDEO_FONT_WIDTH) -#define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length) -#define CONSOLE_ROW_FIRST lcd_console_address -#define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE) -#define CONSOLE_ROW_LAST (lcd_console_address + CONSOLE_SIZE \ - - CONSOLE_ROW_SIZE) -#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * CONSOLE_ROWS) -#define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE) - -#if (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || \ - (LCD_BPP == LCD_COLOR32) -# define COLOR_MASK(c) (c) -#else +#if (LCD_BPP != LCD_COLOR8) (LCD_BPP != LCD_COLOR16) \ + (LCD_BPP != LCD_COLOR32) # error Unsupported LCD BPP. #endif DECLARE_GLOBAL_DATA_PTR; -static void lcd_drawchars(ushort x, ushort y, uchar *str, int count); -static inline void lcd_putc_xy(ushort x, ushort y, uchar c); - static int lcd_init(void *lcdbase); static void *lcd_logo(void); @@ -121,16 +92,12 @@ int lcd_line_length; char lcd_is_enabled = 0; -static short console_col; -static short console_row; - -static void *lcd_console_address; static void *lcd_base; /* Start of framebuffer memory */ static char lcd_flush_dcache; /* 1 to flush dcache after each lcd update */ -// +// /* Flush LCD activity to the caches */ void lcd_sync(void) { @@ -160,186 +127,14 @@ void lcd_set_flush_dcache(int flush) lcd_flush_dcache = (flush != 0); } -/*--*/ - -static void console_scrollup(void) -{ - const int rows = CONFIG_CONSOLE_SCROLL_LINES; - - /* Copy up rows ignoring those that will be overwritten */ - memcpy(CONSOLE_ROW_FIRST, - lcd_console_address + CONSOLE_ROW_SIZE * rows, - CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows); - - /* Clear the last rows */ -#if (LCD_BPP != LCD_COLOR32) - memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows, - COLOR_MASK(lcd_color_bg), - CONSOLE_ROW_SIZE * rows); -#else - u32 *ppix = lcd_console_address + - CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows; - u32 i; - for (i = 0; - i (CONSOLE_ROW_SIZE * rows)
[U-Boot] [PATCH 3/5] mpc8xx_lcd: get rid of CONFIG_EDT32F10
No one is using CONFIG_EDT32F10; remove related code. Signed-off-by: Nikita Kiryanov nik...@compulab.co.il Cc: Wolfgang Denk w...@denx.de Cc: Anatolij Gustschin ag...@denx.de --- drivers/video/mpc8xx_lcd.c | 28 include/configs/R360MPI.h | 1 - 2 files changed, 29 deletions(-) diff --git a/drivers/video/mpc8xx_lcd.c b/drivers/video/mpc8xx_lcd.c index 98b9f5e..3ea240d 100644 --- a/drivers/video/mpc8xx_lcd.c +++ b/drivers/video/mpc8xx_lcd.c @@ -34,11 +34,6 @@ #define CONFIG_LCD_INFO/* Display Logo, (C) and system info */ #endif -#if defined(CONFIG_EDT32F10) -#undef CONFIG_LCD_LOGO -#undef CONFIG_LCD_INFO -#endif - /*--*/ #ifdef CONFIG_KYOCERA_KCS057QV1AJ /* @@ -224,20 +219,6 @@ vidinfo_t panel_info = { }; #endif /* CONFIG_OPTREX_BW */ -/*-*/ -#ifdef CONFIG_EDT32F10 -/* - * Emerging Display Technologies 320x240. Passive, monochrome, single scan. - */ -#define LCD_BPPLCD_MONOCHROME -#define LCD_DF 10 - -vidinfo_t panel_info = { -320, 240, 0, 0, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_HIGH, CONFIG_SYS_LOW, -LCD_BPP, 0, 0, 0, 0, 33, 0, 0, 0 -}; -#endif - // /* - chipset specific functions --- */ // @@ -305,7 +286,6 @@ void lcd_ctrl_init (void *lcdbase) immr-im_clkrst.car_sccr = ~0x1F; immr-im_clkrst.car_sccr |= LCD_DF; /* was 8 */ -#if !defined(CONFIG_EDT32F10) /* Enable LCD on port D. */ immr-im_ioport.iop_pdpar |= 0x1FFF; @@ -315,14 +295,6 @@ void lcd_ctrl_init (void *lcdbase) */ immr-im_cpm.cp_pbpar |= 0x5001; immr-im_cpm.cp_pbdir |= 0x5001; -#else - /* Enable LCD on port D. -*/ - immr-im_ioport.iop_pdpar |= 0x1DFF; - immr-im_ioport.iop_pdpar = ~0x0200; - immr-im_ioport.iop_pddir |= 0x1FFF; - immr-im_ioport.iop_pddat |= 0x0200; -#endif /* Load the physical address of the linear frame buffer * into the LCD controller. diff --git a/include/configs/R360MPI.h b/include/configs/R360MPI.h index 009d1cf..fbaf6a5 100644 --- a/include/configs/R360MPI.h +++ b/include/configs/R360MPI.h @@ -24,7 +24,6 @@ #define CONFIG_LCD #define CONFIG_MPC8XX_LCD -#undef CONFIG_EDT32F10 #define CONFIG_SHARP_LQ057Q3DC02 #defineCONFIG_SPLASH_SCREEN -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/5] cleanup and refactor lcd.c
This series is a first step towards an end goal of merging all CONFIG_LCD related functionality into CONFIG_VIDEO code. My plan is to start by refactoring lcd.c into something cleaner (less ifdefs) and more modular (split code into multiple files), then possibly refactor CONFIG_VIDEO code if needed, and then finally: move CONFIG_LCD related functionality over to CONFIG_VIDEO code, replacing as much CONFIG_LCD related code with CONFIG_VIDEO related code as possible. This specific step eliminates some unused code and refactors lcd console stuff into its own file. These changes were compile tested on arm and powerpc. Cc: Anatolij Gustschin ag...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org Nikita Kiryanov (5): lcd: remove CONFIG_SYS_INVERT_COLORS lcd: cleanup lcd_drawchars mpc8xx_lcd: get rid of CONFIG_EDT32F10 lcd: remove LCD_MONOCHROME lcd: refactor lcd console stuff into its own file common/Makefile| 2 +- common/lcd.c | 314 + common/lcd_console.c | 199 drivers/video/mpc8xx_lcd.c | 49 +-- drivers/video/pxa_lcd.c| 15 --- include/configs/R360MPI.h | 1 - include/lcd.h | 13 +- include/lcd_console.h | 14 ++ 8 files changed, 251 insertions(+), 356 deletions(-) create mode 100644 common/lcd_console.c create mode 100644 include/lcd_console.h -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] CTRL-C hangs after hush: fix segfault on syntax error
Hello, On 11/20/2014 06:21 AM, Stephen Warren wrote: Rabin, With 128059b926b3 hush: fix segfault on syntax error applied, I find that if I press CTRL-C at the U-Boot prompt, U-Boot hangs. If I revert that commit, CTRL-C works fine (prints CTRL-C and returns to the command prompt). I'm testing on real HW (rpi_b board), although I don't expect the exact HW matters. This issue doesn't reproduce with sandbox, since CTRL-C now seems to just execute the binary rather than being handled by U-Boot shell. I can confirm this issue on Trats2. U-Boot hangs in infinite loop, but after revert this commit - it works well. Using CTRL-C in commands works fine, it only hangs in the console. It stays in: ./common/cli.c:206 (cli_loop()) Best regards, -- Przemyslaw Marczak Samsung RD Institute Poland Samsung Electronics p.marc...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Query on CONFIG_SYS_THUMB_BUILD
On Wed, 19 Nov 2014 13:34:34 -0500, Bill Pringlemeir bpringlem...@nbsps.com wrote: In message 20141119074214.3d414ce6@lilith Albert wrote: For -mauto-it, it is not documented in the gas documentation online or in my current as' --target-help. I'll dig this deeper today, but barring any scream from me, the change above is fine globally in U-Boot. On 19 Nov 2014, w...@denx.de wrote: Apparently this [1] is where it is coming from; no further documentation there, though. [1] https://sourceware.org/ml/binutils/2009-05/msg00132.html On Wed, 19 Nov 2014 11:31:05 -0500, Bill Pringlemeir I would think that if this worked they would make it automatic and not an option. Probably this is only in certain binutils/as. With 4.6.3 and 4.9.1 I do not have this option, On 19 Nov 2014, albert.u.b...@aribaud.net wrote: Which option do you mean? -mimplicit-it or -mauto-it? '-mauto-it' , which I think if it is working correctly would be rolled into '-mimplicit-it' as it generates better code (for an assembler :). I followed the thread above and the patch originator says he needs to fix section issues and the 'command line options' and he would follow up the proposed patch. On 20 Nov 2014, albert.u.b...@aribaud.net wrote: I am getting lost, even when reading (quickly, I admit) the patch that adds it; I don't see what -mauto-it does exactly. Can you summarize and clarify the effects of -mimplicit-it (I guess I know this one but it's never a bad thing to get a second opinion), -mauto-it and their interaction? I guess you know how the 'IT' works. The Ubuntu/Debian people give a good explanation in a few paragraphs, https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Conditional_Execution My trying to explain this may have confused thing... Here is Wolfgang's reference, https://sourceware.org/ml/binutils/2009-05/msg00132.html Here is a 2nd reference, https://sourceware.org/ml/binutils/2009-06/msg00162.html Originally Daniel Gutson used '-mauto-it' and then it was converted to '-mimplicit-it'. I am not sure if '-mauto-it' exists in the wild. I have never heard of that option before seeing this email thread. Also my assembler says, Assembler messages: Error: unrecognized option -mauto-it I have built with the most recent binutils, gcc4.9.1 using crosstool-ng. Maybe only some non-mainline tools picked up this '-mauto-it' patch. I don't think it hurts to support '-mauto-it', but an assembler test should be done to see if it accepts the option. hth, Bill Pringlemeir. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] BUG: bootz/bootm command mandates a fdt blob
Hi, On 20 November 2014 16:04, Hans de Goede hdego...@redhat.com wrote: Hi Suriyan, On 11/20/2014 04:16 PM, Suriyan Ramasami wrote: Hello Simon, This mail is addressed to you as the FDT support was added by you. I am not sure who else to address it to. Just to be clear, I didn't add FDT support, this predates my involvement in U-Boot. I added CONFIG_OF_CONTROL etc. though. Han's solution sounds good to me. I find that if CONFIG_OF_LIBFDT is defined then the user is forced to provide a FDT blob. In most of the cases it makes sense. However, this removes the ability to boot older linux (non FDT). For example, I was looking at the Hardkernel Odroid kernels for the U2/U3, and they are 3.8 based. Of course newer kernels 3.17 work. For users to use the same boot loader for 3.8 and for 3.17, they cannot use the mainline uboot. I've hit the same problem myself recently, see the thread titled: Booting non devicetree enabled kernels using u-boot build with CONFIG_OF_LIBFDT I was wondering if teh third argument to bootz/bootm etc could also take the route of initrd (optional if - is specified) could be implemented. The fix seems to be trivial (or so I think), in file common/image-fdt.c, but wanted to know your comments on this. Also the command help (for bootz etc) states that if the 3rd argument is not passed, then the bd_info struct is passed, and I do not see it being passed in the code anywhere. In the absence of the third parameter, it just gives a No fdt found message. Thanks for working on a fix, as discussed in the earlier thread, requiring a third argument which is '-' will break old boot.scr files and the likes, so a better fix is to: 1) Always try to find an ftd (to keep things like appended ftd-s working) 2) If not found see if there is a third argument, if there is, treat this as a fatal error, abort the bootm (iow behave as before) 3) If there is not a third argument warn and continue as before. If you could respin your patch to do this, then that would be great. Regards, Hans diff --git a/common/image-fdt.c b/common/image-fdt.c index a39ae1b..e685700 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -243,7 +243,10 @@ int boot_get_fdt(int flag, int argc, char * const argv[], u if (argc 2) select = argv[2]; - if (select || genimg_has_config(images)) { + if (select strcmp(select, -) == 0) { + debug(## Skipping fdt\n); + return 0; + } else if (select || genimg_has_config(images)) { #if defined(CONFIG_FIT) if (select) { /* Regards - Suriyan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 8/8] dm: core: abolish u-boot, dm-pre-reloc property
Hi Masahiro, On 19 November 2014 09:21, Masahiro Yamada yamad...@jp.panasonic.com wrote: Hi Simon, On Tue, 18 Nov 2014 14:37:33 + Simon Glass s...@chromium.org wrote: Hi Masahiro, On 18 November 2014 12:51, Masahiro Yamada yamad...@jp.panasonic.com wrote: Hi Simon, On Mon, 17 Nov 2014 18:17:43 + Simon Glass s...@chromium.org wrote: Hi Masahiro, On 17 November 2014 08:19, Masahiro Yamada yamad...@jp.panasonic.com wrote: The driver model provides two ways to pass the device information, platform data and device tree. Either way works to bind devices and drivers, but there is inconsistency in terms of how to pass the pre-reloc flag. In the platform data way, the pre-reloc DM scan checks if each driver has DM_FLAG_PRE_RELOC flag (this was changed to use U_BOOT_DRIVER_F just before). That is, each **driver** has the pre-reloc attribute. In the device tree control, the existence of u-boot,dm-pre-reloc is checked for each device node. The driver flag DM_FLAG_PRE_RELOC is never checked. That is, each **device** owns the pre-reloc attribute. Drivers should generally work both with platform data and device tree, but this inconsistency has made our life difficult. I feel we should use device tree where available, and only fall back to platform data when necessary (no device tree available for platform, for example). No, it is true that device tree is a useful tool, but it should be optional. All the infrastructures of drivers must work perfectly without device tree. The device tree is just one choice of how to give device information. Which platform(s) are we talking about here? I am talking about the general design policy of drivers in U-Boot and Linux. Well Linux has moved away from platform data, right? This commit abolishes u-boot,dm-pre-reloc property because: - Having a U-Boot specific property makes it difficult to share the device tree sources between Linux and U-Boot. - The number of devices is generally larger than that of drivers. Each driver often has multiple devices with different base addresses. It seems more reasonable to add the pre-reloc attribute to drivers than devices. The inability for platform data to specify which devices need to be pre-relocation is certainly a limitation. But I'm not sure that the solution is to remove that feature from the device tree. Prior to relocation memory may be severely limited. Things like GPIO and serial can create quite a few devices (e.g. Tegra has 16 for GPIO and 4 for serial), but only a subset may be needed before relocation (on Tegra only 2!). I'm actually pretty comfortable with platform data having a limited subset of functionality, since I believe most platforms will use device tree for one reason or another. Thoughts? No, it is not justified to compel to use device tree unless Linux is the target OS. Even in Linux, limited numbers of architrectures use device trees. Fair enough, but let's look at this when the case comes up. So far the platforms that use I2C and SPI with DM do use device tree in Linux and probably should do in U-Boot. OK, so let's think about it when a problem happens. Let's get back talking about this patch. If 8/8 is not acceptable, I do not have motivation for 6/8 and 7/8, either. I still believe that the top priority of the design policy is to share the same device tree source between U-Boot and Linux. Agreed, and we really need to line up so we are using the same source. I do want to point out that we mostly do, the differences are small. I am really unhappy about having such a u-boot specific property. So, my suggestion is this patch, and one possible alternative is to bind all the devices even before relocation. Only binding won't use much memory because U-Boot does not probe devices until they are actually used. Both u-boot,dm-pre-reloc and DM_FLAG_PRE_RELOC will go away. What do you think? That's a waste of time since we won't use them and the goal is to do as little as possible before relocation. I don't see that the pre-reloc property is a huge problem. In the case of serial I found a way around it (using aliases). I hope that it will be possible more generally and we can review that at some point in the future. There are bigger fish to fry in driver model I think - so many uclasses to write. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] CTRL-C hangs after hush: fix segfault on syntax error
Hi Stephen, On 20 November 2014 05:21, Stephen Warren swar...@wwwdotorg.org wrote: Rabin, With 128059b926b3 hush: fix segfault on syntax error applied, I find that if I press CTRL-C at the U-Boot prompt, U-Boot hangs. If I revert that commit, CTRL-C works fine (prints CTRL-C and returns to the command prompt). I'm testing on real HW (rpi_b board), although I don't expect the exact HW matters. This issue doesn't reproduce with sandbox, since CTRL-C now seems to just execute the binary rather than being handled by U-Boot shell. You can repeat this on sandbox: ./u-boot -t raw Then Ctrl-C will work (i.e. hang). This seems bad - as Przemyslaw mentions it hangs in cli_loop(). parse_stream_outer() should not return. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] USB Host not enumerating properly on AM335x-based board
Hi, I'm currently working on 2014.07, on a custom TI AM335x based board. Everything works great so far, except when we're trying to have USB host working. The board has the MUSB1 controller wired as USB Host only, with the following configuration: #define CONFIG_USB_MUSB_DSPS #define CONFIG_ARCH_MISC_INIT #define CONFIG_MUSB_PIO_ONLY #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_MUSB_HOST #define CONFIG_MUSB_DSPS #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_HOST #ifdef CONFIG_MUSB_HOST #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX #endif Whenever we try to scan the USB controller and that a device is attached, we get the following output: U-Boot# usb start (Re)start USB... USB0: scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found The device itself being a USB key, it's somewhat odd that it enumerates the device, but doesn't find the storage device... The same USB port with the same device works fine under Linux. The VBUS pin is still up after running the command, so it's not really a matter of power being shut down on the bus. I'm kind of running out of idea on what to test next. The differences between u-boot's musb-new and Linux' own musb driver seems thin and to make sense, so I don't think the driver itself is to blame. Anyone experienced such a thing? Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot