Re: [U-Boot] how to clone uboot source code of imx28 cpu?
On 11/04/2011 03:20 AM, lau wrote: Hi All: I find many uboot patches on mx28. Which branch do I clone source code from? I didn't find in master or other branches. Patches were sent to ML for review and they are not yet merged into any branch. Until then, you must apply yourself the patches. 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-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Friday, November 04, 2011 12:33 AM To: Albert ARIBAUD Cc: Prafulla Wadaskar; u-boot@lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik Subject: Re: Pull request for u-boot-marvell.git Dear Albert ARIBAUD, In message 4eb2da35.6090...@aribaud.net you wrote: Note that I get the following errors when fetching u-boot- marvell: remote: error: refs/remotes/origin/mkimage does not point to a valid object! remote: error: refs/tags/2009.01-rc2 does not point to a valid object! The second one means you have a bigus tag, which should disappear with a git push ssh://gu-marv...@git.denx.de/u-boot-marvell.git :2009.01-rc2 The first one seems more complex, as it is a bogus branch name in a *remote* of u-boot-marvell -- I guess this can only be handled directly by Wolfgang. I fixed both these. Hi Wolfgang I hope I don't need to do anything specific now. I hope I can continue with my usual activities (git fetch, git rebase and git push). Please ack. Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] mvgbe: fix network device indices
-Original Message- From: Mike Frysinger [mailto:vap...@gentoo.org] Sent: Friday, November 04, 2011 4:42 AM To: Michael Walle Cc: u-boot@lists.denx.de; Prafulla Wadaskar; Wolfgang Denk Subject: Re: [PATCH 2/2] mvgbe: fix network device indices On Thursday 03 November 2011 19:02:26 Michael Walle wrote: Am Donnerstag 03 November 2011, 19:10:57 schrieb Mike Frysinger: On Thursday 27 October 2011 17:31:36 Michael Walle wrote: --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c + /* Extract the MAC address from the environment */ + while (!eth_getenv_enetaddr_by_index(eth, dev- index, + dev-enetaddr)) { /* Generate Private MAC addr if not set */ dev-enetaddr[0] = 0x02; dev-enetaddr[1] = 0x50; this is wrong. net drivers should not be touching the env at all. please fix your driver to not do that first. i guess this whole mac randomization/generation code belongs to board specific files. correct We can move mac randomization code to the board specific files, but it will be needed for each board and there will be code duplication. How about supporting standalone mac randomization feature? Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx31pdk: Enable D and I caches
On 11/01/2011 07:16 PM, Fabio Estevam wrote: Enable D and I caches on mx31pdk. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Stefano, You explained that enabling cache may cause some drivers like FEC and MMC not to work properly. As mx31pdk does not have FEC or MMC driver I thought this should be OK. Tested by booting Linux kernel via TFTP and mounting a NFS rootfs. board/freescale/mx31pdk/mx31pdk.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index 9f8bc53..1d7b4f6 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -71,11 +71,19 @@ int board_early_init_f(void) return 0; } +void enable_caches(void) +{ + icache_enable(); + dcache_enable(); +} + int board_init(void) { /* adress of boot parameters */ gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; + enable_caches(); + return 0; } 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-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arch/powerpc/lib/board.c: fix build warning
On Nov 3, 2011, at 2:09 PM, Wolfgang Denk wrote: Dear Wolfgang Denk, In message 1319407132-6590-1-git-send-email...@denx.de you wrote: Commit 1272592 powerpc: Use getenv_ulong() in place of getenv(), strtoul instroduced a build warning for some PPC systems: board.c: In function 'board_init_r': board.c:626: warning: unused variable 's' Fix it. Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk I'm still seeing this warning when building MPC8536DS_config - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arch/powerpc/lib/board.c: fix build warning
On Nov 4, 2011, at 1:44 AM, Kumar Gala wrote: On Nov 3, 2011, at 2:09 PM, Wolfgang Denk wrote: Dear Wolfgang Denk, In message 1319407132-6590-1-git-send-email...@denx.de you wrote: Commit 1272592 powerpc: Use getenv_ulong() in place of getenv(), strtoul instroduced a build warning for some PPC systems: board.c: In function 'board_init_r': board.c:626: warning: unused variable 's' Fix it. Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk I'm still seeing this warning when building MPC8536DS_config - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot I think we need to revert this now. I don't see why you'd need it. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Albert, please pull from u-boot-imx. The following changes since commit 92e86c8daed649a9e9ddd6c0b52d61cb25b62c3a: Davinci: ea20: added PREBOOT to configuration (2011-11-03 22:56:26 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master Anatolij Gustschin (1): imx: imx31_phycore.h: fix checkpatch warnings Fabio Estevam (10): mx53evk: Remove unneeded '1' from mx53evk.h mx53loco: Remove unused get_board_rev function mx53evk: Add RTC support mx53evk: Remove unused get_board_rev function mx53ard: Remove unused get_board_rev function mx53smd: Remove unused get_board_rev function vision2: Remove unused get_board_rev function mx53: Turn off child clocks before reconfigure perclk_root README: Fix supported i.MX SoC list for CONFIG_MXC_SPI mx31pdk: Enable D and I caches Wolfgang Denk (1): qong: enable support for compressed images Wolfgang Grandegger (1): ehci-mxc: remove incorrect comment README |2 +- arch/arm/cpu/armv7/mx5/lowlevel_init.S | 15 +++ board/freescale/mx31pdk/mx31pdk.c |8 ++ board/freescale/mx53ard/mx53ard.c |5 - board/freescale/mx53evk/mx53evk.c |5 - board/freescale/mx53loco/mx53loco.c|5 - board/freescale/mx53smd/mx53smd.c |5 - board/ttcontrol/vision2/vision2.c |9 -- drivers/usb/host/ehci-mxc.c|1 - include/configs/imx31_phycore.h| 153 +-- include/configs/mx53ard.h |1 - include/configs/mx53evk.h | 17 ++-- include/configs/mx53loco.h |1 - include/configs/mx53smd.h |1 - include/configs/qong.h |5 +- include/configs/vision2.h |1 - 16 files changed, 121 insertions(+), 113 deletions(-) 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-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] dfu: initial implementation
Dear Wolfgang Denk, Please see my comments inline. On Thursday, November 03, 2011 7:14 PM Wolfgang Denk wrote: http://www.usb.org/developers/devclass_docs/DFU_1.1.pdf ... DFU is part of USB; an extension to be precise, but an extension bound so tightly to the design and philosophy of USB that it is rather inconceivable to separate the two. If I understand correctly, there is no fundamental reason why the DFU protocol would only be possible to implement over a USB link. Or am I missing something here? Eventually it should be possible to run this protocol over Ethernet or even over a serial line? Of course there is no such a reason, provided we lay USB over Ethernet or serial line first ;) Seriously speaking, in view of ties between DFU and USB IMHO it is impossible, or, at least, highly impractical. If my assumption is correct, then what would it take to split off protocol part and make it independent of the actual driver interface? I guess that in the situation given it would be of little use. Regards, Andrzej ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-nds32
Hi Wolfgang 2011/11/4 Wolfgang Denk w...@denx.de: Dear =?UTF-8?B?6aas5YWL5rOh?=, In message CACCg+XPfsaHVvUSoS18ey=2eutsztzur1put+w6qt3ndanz...@mail.gmail.com you wrote: are available in the git repository at: git://git.denx.de/u-boot-nds32.git master Applied, thanks. Can you please deleted tag 'NIOS2-5_0_0' from your tree? Thanks. This tag has been deleted and updated to custodian repo in git://git.denx.de/u-boot-nds32.git However, I've found there is an error when I push to custodian repo. error: refs/tags/2009.01-rc2 does not point to a valid object! Should I delete this tag, too? Thanks. -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] AT91: pio: Add PIO3 features
This patch adds the support for new PIO controller introduced by some AT91 SoCs. New features include * More peripheral multiplexing * Pull-down, Schmitt trigger, Debouncer * More irq trigger mode (may be not interesting in U-Boot) Signed-off-by: Hong Xu hong...@atmel.com --- arch/arm/include/asm/arch-at91/at91_pio.h | 50 ++- drivers/gpio/at91_gpio.c | 130 +++- 2 files changed, 172 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h b/arch/arm/include/asm/arch-at91/at91_pio.h index 416cabf..26e9766 100644 --- a/arch/arm/include/asm/arch-at91/at91_pio.h +++ b/arch/arm/include/asm/arch-at91/at91_pio.h @@ -4,6 +4,7 @@ * Copyright (C) 2005 Ivan Kokshaysky * Copyright (C) SAN People * Copyright (C) 2009 Jens Scharsig (js_at...@scharsoft.de) + * Copyright (C) 2011 Hong Xu (hong...@atmel.com) * * Parallel I/O Controller (PIO) - System peripherals registers. * Based on AT91RM9200 datasheet revision E. @@ -17,7 +18,6 @@ #ifndef AT91_PIO_H #define AT91_PIO_H - #define AT91_ASM_PIO_RANGE 0x200 #define AT91_ASM_PIOC_ASR \ (ATMEL_BASE_PIO + AT91_PIO_PORTC * AT91_ASM_PIO_RANGE + 0x70) @@ -66,14 +66,51 @@ typedef struct at91_port { u32 puer; /* 0x64 Pull-up Enable Register */ u32 pusr; /* 0x68 Pad Pull-up Status Register */ u32 reserved4; +#if defined(ATMEL_CPU_HAS_PIO3) + u32 abcdsr1;/* 0x70 Peripheral ABCD Select Register 1 */ + u32 abcdsr2;/* 0x74 Peripheral ABCD Select Register 2 */ + u32 reserved5[2]; + u32 ifscdr; /* 0x80 Input Filter SCLK Disable Register */ + u32 ifscer; /* 0x84 Input Filter SCLK Enable Register */ + u32 ifscsr; /* 0x88 Input Filter SCLK Status Register */ + u32 scdr; /* 0x8C SCLK Divider Debouncing Register */ +#define PIO_SCDR_DIV_MASK (0x3fff 0) /* Slow Clock Divider Mask */ + u32 ppddr; /* 0x90 Pad Pull-down Disable Register */ + u32 ppder; /* 0x94 Pad Pull-down Enable Register */ + u32 ppdsr; /* 0x98 Pad Pull-down Status Register */ + u32 reserved6; +#else u32 asr;/* 0x70 Select A Register */ u32 bsr;/* 0x74 Select B Register */ u32 absr; /* 0x78 AB Select Status Register */ u32 reserved5[9]; /* */ +#endif u32 ower; /* 0xA0 Output Write Enable Register */ u32 owdr; /* 0xA4 Output Write Disable Register */ - u32 owsr; /* OxA8 utput Write Status Register */ - u32 reserved6[85]; + u32 owsr; /* OxA8 Output Write Status Register */ +#if defined(ATMEL_CPU_HAS_PIO3) + u32 reserved7; /* */ + u32 aimer; /* Additional Interrupt Modes Enable Register*/ + u32 aimdr; /* Additional Interrupt Modes Disable Register*/ + u32 aimmr; /* Additional Intterupt Modes Mask Register */ + u32 reserved8; /* */ + u32 esr;/* 0xC0 Edge Select Register */ + u32 lsr;/* 0xC4 Level Select Register */ + u32 elsr; /* 0xC8 Edge/Level Status Register */ + u32 reserved9; /* 0xCC */ + u32 fellsr; /* 0xD0 Falling Edge/Low Level Select Register*/ + u32 rehlsr; /* 0xD4 Rising Edge/High Level Select Register*/ + u32 frlhsr; /* 0xD8 Fall/Rise - Low/High Status Register */ + u32 reserved10; /* */ + u32 locksr /* 0xE0 Lock Status */ + u32 wpmr/* 0xE4 Write Protect Mode Register */ + u32 wpsr/* 0xE4 Write Protect Status Register */ + u32 reserved11[5]; /* */ + u32 schmitt;/* 0x100 Schmitt Trigger Register */ + u32 reserved12[7]; +#else + u32 reserved6[21]; +#endif } at91_port_t; typedef union at91_pio { @@ -94,6 +131,13 @@ typedef union at91_pio { #ifdef CONFIG_AT91_GPIO int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup); int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup); +#if defined(ATMEL_CPU_HAS_PIO3) +int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup); +int at91_set_d_periph(unsigned port, unsigned pin, int use_pullup); +int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div); +int at91_set_pio_pulldown(unsigned port, unsigned pin, int is_on); +int at91_set_pio_disable_schmitt_trig(unsigned port, unsigned pin); +#endif int at91_set_pio_input(unsigned port, unsigned pin, int use_pullup); int at91_set_pio_multi_drive(unsigned port, unsigned pin, int is_on); int at91_set_pio_output(unsigned port, unsigned pin, int value); diff --git a/drivers/gpio/at91_gpio.c
Re: [U-Boot] nds32: toolchains for building ?
Hi Mike, 2011/11/4 Mike Frysinger vap...@gentoo.org: where can we actually get a toolchain to build nds32 ? support doesn't appear to be in the mainline FSF projects ... -mike Unfortunately both the toolchain and the Linux kernel haven't commit back to mainline yet. You can only found it in autotools which is in FSF projects. :-( The official explanation is that the company has put the code commit activity in schedule. But I and my colledgue are not sure when will it be started. :-( We don't know if the CEO has signed the agreement with FSF already or not. :-( Current toolchain we're using is gcc-4.5, binutils-2.19, the newer version is still under developing. It's pity that only you can found the toolchain with full source from public is very old. I can give you the url as follows. http://osdk.andestech.com/ Currently, only the customers and universities could be able to get the newest toolchain and BSP right now. U-boot is the first project which Andestech to commit the source code into mainline. Hope this could encourage the company to commit the source code into mainline more active. Thanks. -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [X86] Add a target for running as a coreboot payload
Hi Gabe, Can you change the tag to 'x86:' please On 04/11/11 16:29, Gabe Black wrote: Add a target for running u-boot as a coreboot payload in boards.cfg. Signed-off-by: Gabe Black gabebl...@chromium.org --- boards.cfg |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/boards.cfg b/boards.cfg index 604becf..cc7dd2b 100644 --- a/boards.cfg +++ b/boards.cfg @@ -266,6 +266,7 @@ tcm-bf518blackfinblackfin tcm-bf537blackfinblackfin eNET x86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x3804 eNET_SRAMx86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x1900 +coreboot-x86 x86 x86coreboot chromebook-x86 corebootcoreboot:SYS_TEXT_BASE=0xFC Does it need to be chromebook-x86? sandbox sandbox sandbox sandbox sandbox- cobra5272m68kmcf52x2 cobra5272 - idmr m68kmcf52x2 Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ARM: dig297: Define MACH_TYPE_OMAP3_CPS and CONFIG_MACH_TYPE
MACH_TYPE_OMAP3_CPS was dropped in the latest mach-types sync (47af6f61bcd9) because it is not mainlined in Linux. Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Sandeep Paulraj s-paul...@ti.com Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Wolfgang Denk w...@denx.de CC: Tom Rini tom.r...@gmail.com --- Changed in v2: squashed the two previously separated patches as requested by Tom Rini. board/comelit/dig297/dig297.c |2 -- include/configs/dig297.h |8 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/board/comelit/dig297/dig297.c b/board/comelit/dig297/dig297.c index c81ce58..6548281 100644 --- a/board/comelit/dig297/dig297.c +++ b/board/comelit/dig297/dig297.c @@ -91,8 +91,6 @@ static const u32 gpmc_lan_config[] = { int board_init(void) { gpmc_init();/* in SRAM or SDRAM, finish GPMC */ - /* board id for Linux */ - gd-bd-bi_arch_number = MACH_TYPE_OMAP3_CPS; /* boot param addr */ gd-bd-bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); diff --git a/include/configs/dig297.h b/include/configs/dig297.h index 3a05c82..9baf415 100644 --- a/include/configs/dig297.h +++ b/include/configs/dig297.h @@ -32,6 +32,14 @@ #ifndef __CONFIG_H #define __CONFIG_H +#include asm/mach-types.h +#ifdef MACH_TYPE_OMAP3_CPS +#error MACH_TYPE_OMAP3_CPS has been defined properly, please remove this. +#else +#define MACH_TYPE_OMAP3_CPS 2751 +#endif +#define CONFIG_MACH_TYPE MACH_TYPE_OMAP3_CPS + /* * High Level Configuration Options */ -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] About the pull request and patchwork
Hi all, I've noticed that there are many pull request logged inside the patchwork. The most of the pull request has been processed but not been removed in patchwork. This make a lot of useless pull request log in the patchwork and made more difficult to tracking other patches. I think if we (custodians) could assigned the pull request as accept or something after Wolfgang has pull the commits from downstream will be good. What do you guys think about it? -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: FIX for dcache_disable() for ARM926ej-s
the cache also needs to be invalidated, not just flushed, Since re-enabling it, can cause inconsistent data without invalidation. Signed-off-by: Bas van den Berg b.van.den.berg...@gmail.com --- arch/arm/lib/cache.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index b545fb7..10eb8c9 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -37,6 +37,8 @@ void __flush_cache(unsigned long start, unsigned long size) asm(0: mrc p15, 0, r15, c7, c10, 3\n\t bne 0b\n : : : memory); /* disable write buffer as well (page 2-22) */ asm(mcr p15, 0, %0, c7, c10, 4 : : r (0)); +/* Invalidate dcache as well */ +asm(mcr p15, 0, %0, c7, c6, 0 : : r (0)); #endif return; } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/usb: fix usb mode and phy_type
Currently, to make usb work as different modes, we need to set its' dr_mode string in 'hwconfig', and it will be handled by fdt_fixup_usb_mode_phy_type(). This API has a hardcoded compat which is fsl-usb2-dr, so it should not be called when handle the 'hwconfig' for 'usb1', 'usb1' has a compat of fsl-usb2-mph in dts, otherwise, dr_mode of 'usb2' will be set when handling 'usb1', and this will cause error when handling 'usb2'. Also, sometimes phy_type may need to be set for both USB controllers, hardcoded compat is limited to handle this, so add compat fsl-usb2-mph handle in the API. Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc8xxx/fdt.c | 40 +++- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 112c603..a2b56ae 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -88,9 +88,9 @@ void ft_fixup_num_cores(void *blob) { #ifdef CONFIG_HAS_FSL_DR_USB static void fdt_fixup_usb_mode_phy_type(void *blob, const char *mode, - const char *phy_type) + const char *phy_type, int port) { - const char *compat = fsl-usb2-dr; + const char *compat[] = {fsl-usb2-mph, fsl-usb2-dr}; const char *prop_mode = dr_mode; const char *prop_type = phy_type; static int start_offset = -1; @@ -98,27 +98,27 @@ static void fdt_fixup_usb_mode_phy_type(void *blob, const char *mode, int err; node_offset = fdt_node_offset_by_compatible(blob, - start_offset, compat); + start_offset, compat[port]); if (node_offset 0) { printf(WARNING: could not find compatible node %s: %s.\n, - compat, fdt_strerror(node_offset)); + compat[port], fdt_strerror(node_offset)); return; } - if (mode) { + if (strlen(mode)) { err = fdt_setprop(blob, node_offset, prop_mode, mode, strlen(mode) + 1); if (err 0) printf(WARNING: could not set %s for %s: %s.\n, - prop_mode, compat, fdt_strerror(err)); + prop_mode, compat[port], fdt_strerror(err)); } - if (phy_type) { + if (strlen(phy_type)) { err = fdt_setprop(blob, node_offset, prop_type, phy_type, strlen(phy_type) + 1); if (err 0) printf(WARNING: could not set %s for %s: %s.\n, - prop_type, compat, fdt_strerror(err)); + prop_type, compat[port], fdt_strerror(err)); } start_offset = node_offset; @@ -126,8 +126,8 @@ static void fdt_fixup_usb_mode_phy_type(void *blob, const char *mode, void fdt_fixup_dr_usb(void *blob, bd_t *bd) { - const char *modes[] = { host, peripheral, otg }; - const char *phys[] = { ulpi, umti }; + const char *modes[] = { , host, peripheral, otg }; + const char *phys[] = { , ulpi, umti }; const char *mode = NULL; const char *phy_type = NULL; char usb1_defined = 0; @@ -135,7 +135,7 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) int i, j; for (i = 1; i = FSL_MAX_NUM_USB_CTRLS; i++) { - int mode_idx = -1, phy_idx = -1; + int mode_idx = 0, phy_idx = 0; sprintf(str, %s%d, usb, i); if (hwconfig(str)) { for (j = 0; j sizeof(modes); j++) { @@ -152,16 +152,14 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) break; } } - if (mode_idx = 0) - fdt_fixup_usb_mode_phy_type(blob, - modes[mode_idx], NULL); - if (phy_idx = 0) - fdt_fixup_usb_mode_phy_type(blob, - NULL, phys[phy_idx]); - if (!strcmp(str, usb1)) - usb1_defined = 1; - if (mode_idx 0 phy_idx 0) + if (!mode_idx !phy_idx) { printf(WARNING: invalid phy or mode\n); + } else { + fdt_fixup_usb_mode_phy_type(blob, + modes[mode_idx], phys[phy_idx], i - 1); + if (!strcmp(str, usb1)) + usb1_defined = 1; + } } } if (!usb1_defined) { @@ -169,7 +167,7 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) phy_type =
[U-Boot] No power on USB host of IMX25 PDK
Problem: I have got the MX25PDK board to detect the USB hub but its power is cut at usb_hub_power_on(hub) because (I guess) the control register is not set properly. Method: a) Enable USB options in mx25pdk.h b) Enable signal muxing of USBH2_PWR and USBH2_OC. Experiment: When booting Linux it is shown: io mem 0x53ff4400 so my guess was that address should be used for both mxc_set_usbcontrol() and ehci_hcd_init()? And actually, changing the define helped me: wPortStatus: 0x508 wPortChange: 0x0 - With writel(v, IMX_USB_BASE + 0x600); wPortChange: 0x301 wPortChange: 0x1 - With writel(v, IMX_USB_BASE + 0x400); The change did not make very much sense, and actually wPortChange: 0x301 wPortChange: 0x1 is given also when skipping mxc_set_usbcontrol() completely :) 1) So, what is the proper control address for using the MX25PDK's standard USB host port (not OTG)? Indeed, without a proper mxc_set_usbcontrol() the root hub gets local power source is lost (inactive). Actually the USB host port, J18, supplies the required 5V (4.89V to be exact) to my plugged stick until usb_hub_power_on(hub) has run. This line makes the USB host controller set the USBH2_PWR (pin D9) to zero, that makes the regulator stop feeding the port. 2) Do I need to set the mux's SW_PAD_CTL for the D9 pins? 3) Are there any pins I have forgot to mux? If I comment out usb_hub_power_on(hub): | ... | local power source is lost (inactive) | no over-current condition exists | usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4 | req=0 (0x0), type=163 (0xa3), value=0, index=1 | wPortStatus: 400 wPortChange: 0 | Port 1 Status 400 Change 0 | 1 USB Device(s) found | scan end | scanning bus for storage devices... 0 Storage Device(s) found The 5V is kept but I will not get the wPortChange=0x1 so usb_new_device() will be skipped. Off course, the usb_hub_power_on(hub) should be kept. But without the 5V, usb_new_device() will not find any device :) See bellow for details! Hugo Holgersson Debug log: MX25PDK U-Boot usb start (Re)start USB... USB: Register 10011 NbrPorts 1 USB EHCI 1.00 scanning bus for devices... New Device 0 usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40 req=6 (0x6), type=128 (0x80), value=256, index=0 USB_DT_DEVICE request set address 1 usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0 req=5 (0x5), type=0 (0x0), value=1, index=0 USB_REQ_SET_ADDRESS Len is 0 usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12 req=6 (0x6), type=128 (0x80), value=256, index=0 USB_DT_DEVICE request usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9 req=6 (0x6), type=128 (0x80), value=512, index=0 USB_DT_CONFIG config usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19 req=6 (0x6), type=128 (0x80), value=512, index=0 USB_DT_CONFIG config get_conf_no 0 Result 25, wLength 25 if 0, ep 0 ##EP epmaxpacketin[1] = 8 set configuration 1 usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0 req=9 (0x9), type=0 (0x0), value=1, index=0 USB_REQ_SET_CONFIGURATION Len is 0 new device strings: Mfr=1, Product=2, SerialNumber=0 usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF req=6 (0x6), type=128 (0x80), value=768, index=0 USB_DT_STRING config USB device number 1 default language ID 0x1 usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1 length 0xFF req=6 (0x6), type=128 (0x80), value=769, index=1 USB_DT_STRING config usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1 length 0xFF req=6 (0x6), type=128 (0x80), value=770, index=1 USB_DT_STRING config Manufacturer u-boot Product EHCI Host Controller SerialNumber USB hub found usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4 req=6 (0x6), type=160 (0xa0), value=10496, index=0 USB_DT_HUB config usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x8 req=6 (0x6), type=160 (0xa0), value=10496, index=0 USB_DT_HUB config 1 ports detected individual port power switching standalone hub global over-current protection power on to power good time: 510ms hub controller current requirement: 0mA port 1 is removable usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4 req=0 (0x0), type=160 (0xa0), value=0, index=0 get_hub_status returned status 1, change 8101 local power source is lost (inactive) no over-current condition exists enabling power on all ports usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0 req=3 (0x3), type=35 (0x23), value=8, index=1 Len is 0 port 1 returns 0 usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4 req=0 (0x0), type=163 (0xa3), value=0, index=1 Port 1 Status 301 Change 1 port 1 connection change usb_control_msg: request: 0x0,
Re: [U-Boot] No power on USB host of IMX25 PDK
Hi Hugo, 2011/11/4 Hugo Holgersson hu...@student.chalmers.se: 2) Do I need to set the mux's SW_PAD_CTL for the D9 pins? 3) Are there any pins I have forgot to mux? I looked at the IOMUX configuration for USBH2 on the Freescale Linux BSP and the code is below: int gpio_usbh2_active(void) { if (mxc_request_iomux(MX25_PIN_D9, MUX_CONFIG_ALT6) || /* PWR */ mxc_request_iomux(MX25_PIN_D8, MUX_CONFIG_ALT6) || /* OC */ mxc_request_iomux(MX25_PIN_A21, MUX_CONFIG_ALT5)) { /* BT_USB_CS */ return -EINVAL; } /* * This pin controls the mux that switches between * the J18 connector and the on-board bluetooth module. * dir: 0 = out * pin: 0 = J18, 1 = BT */ gpio_request(IOMUX_TO_GPIO(MX25_PIN_A21), a21); gpio_direction_output(IOMUX_TO_GPIO(MX25_PIN_A21), 0); gpio_set_value(IOMUX_TO_GPIO(MX25_PIN_A21), 0); return 0; } ,so please make sure you control MX25_PIN_A21 correctly for USB operation. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] No power on USB host of IMX25 PDK
2011/11/4 Fabio Estevam feste...@gmail.com: Hi Hugo, 2011/11/4 Hugo Holgersson hu...@student.chalmers.se: 2) Do I need to set the mux's SW_PAD_CTL for the D9 pins? 3) Are there any pins I have forgot to mux? I looked at the IOMUX configuration for USBH2 on the Freescale Linux BSP and the code is below: Ops, I see that you have already taken care of this pin. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] No power on USB host of IMX25 PDK
2011/11/4 Hugo Holgersson hu...@student.chalmers.se: int board_init(void) { + struct iomuxc_mux_ctl *muxctl; + struct iomuxc_pad_ctl *padctl; + u32 gpio_mux_mode5 = MX25_PIN_MUX_MODE(5); + u32 gpio_mux_mode6 = MX25_PIN_MUX_MODE(6); + + muxctl = (struct iomuxc_mux_ctl *)IMX_IOPADMUX_BASE; + + /* USBH2_PWR */ + writel(gpio_mux_mode6, muxctl-pad_d9); + //writel(gpio_mux_mode5, muxctl-pad_d9); + //gpio_direction_output(MXC_GPIO_PORT_TO_NUM(4, 11), 1); /* Try keep power on. */ + + /* USBH2_OC */ + writel(gpio_mux_mode6, muxctl-pad_d8); + + /* USB_BT_CS low selects USB Host */ + writel(gpio_mux_mode5, muxctl-pad_a21); /* GPIO2[7] */ + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(2, 7), 0); /* Chip select 0*/ + Can you try to place the USBH2 IOMUX inside board_early_init_f instead? Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] net/ethoc: use flush_dcache_range instead of flush_dcache
flush_dcache is not declared in the common.h API, flush_dcache_range however is Signed-off-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Cc: Ben Warren biggerbadder...@gmail.com Cc: Thomas Chou tho...@wytron.com.tw --- drivers/net/ethoc.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 7ac9025..cb79753 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -272,7 +272,7 @@ static int ethoc_init_ring(struct eth_device *dev) if (i == priv-num_rx - 1) bd.stat |= RX_BD_WRAP; - flush_dcache(bd.addr, PKTSIZE_ALIGN); + flush_dcache_range(bd.addr, bd.addr + PKTSIZE_ALIGN); ethoc_write_bd(dev, priv-num_tx + i, bd); } @@ -377,7 +377,7 @@ static int ethoc_rx(struct eth_device *dev, int limit) } /* clear the buffer descriptor so it can be reused */ - flush_dcache(bd.addr, PKTSIZE_ALIGN); + flush_dcache_range(bd.addr, bd.addr + PKTSIZE_ALIGN); bd.stat = ~RX_BD_STATS; bd.stat |= RX_BD_EMPTY; ethoc_write_bd(dev, entry, bd); @@ -431,7 +431,7 @@ static int ethoc_send(struct eth_device *dev, volatile void *packet, int length) bd.stat = ~TX_BD_PAD; bd.addr = (u32)packet; - flush_dcache(bd.addr, length); + flush_dcache_range(bd.addr, bd.addr + length); bd.stat = ~(TX_BD_STATS | TX_BD_LEN_MASK); bd.stat |= TX_BD_LEN(length); ethoc_write_bd(dev, entry, bd); -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] Fix conflicting definitions of flush_dcache
nios2 and a couple of network drivers have been using a non defined API to flush the data cache (flush_dcache(ulong, ulong)), this is problematic since it conflicts with other architectures definitions of flush_dcache. This series cleans that up by letting the two network drivers use the defined flush_dcache_range(ulong, ulong) API. It also adds this function to the nios2 architecture to avoid breakage. Stefan Kristiansson (3): net/ethoc: use flush_dcache_range instead of flush_dcache net/altera_tse: use flush_dcache_range instead of flush_dcache nios2: add flush_dcache_range function arch/nios2/lib/cache.S | 10 ++ drivers/net/altera_tse.c |9 ++--- drivers/net/ethoc.c |6 +++--- 3 files changed, 19 insertions(+), 6 deletions(-) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] net/altera_tse: use flush_dcache_range instead of flush_dcache
flush_dcache is not declared in the common.h API, flush_dcache_range however is Signed-off-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Cc: Ben Warren biggerbadder...@gmail.com Cc: Thomas Chou tho...@wytron.com.tw --- drivers/net/altera_tse.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 5b00717..0e6aac7 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -268,7 +268,8 @@ static int tse_eth_send(struct eth_device *dev, volatile struct alt_sgdma_descriptor *tx_desc_cur = (volatile struct alt_sgdma_descriptor *)tx_desc[0]; - flush_dcache((unsigned long)packet, length); + flush_dcache_range((unsigned long)packet, + (unsigned long)packet + length); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)tx_desc[0], (volatile struct alt_sgdma_descriptor *)tx_desc[1], @@ -306,7 +307,8 @@ static int tse_eth_rx(struct eth_device *dev) NetReceive(NetRxPackets[0], packet_length); /* start descriptor again */ - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], @@ -834,7 +836,8 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd) 0x0 /* channel */ ); debug(Configuring rx desc\n); - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] nios2: add flush_dcache_range function
exposes functionality to flush dcache according to the common.h API Signed-off-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Cc: Thomas Chou tho...@wytron.com.tw --- arch/nios2/lib/cache.S | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/nios2/lib/cache.S b/arch/nios2/lib/cache.S index ee3b4b7..b952d0c 100644 --- a/arch/nios2/lib/cache.S +++ b/arch/nios2/lib/cache.S @@ -48,6 +48,16 @@ flush_icache: bltur4, r5, 1b ret + .global flush_dcache_range + +flush_dcache_range: + movhi r8, %hi(CONFIG_SYS_DCACHELINE_SIZE) + ori r8, r8, %lo(CONFIG_SYS_DCACHELINE_SIZE) +0: flushd 0(r4) + add r4, r4, r8 + bltur4, r5, 0b + ret + .global flush_cache flush_cache: -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
Apply memoization to cc-option macro by caching the results of the gcc calls. This macro is called very often so using cached results leads to faster compilation times. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- Changes for v2: - move cache file to $(obj)/include/generated - reworked completely - cache also non-working gcc options - remove CACHE_CC_OPTIONS config switch and enable this optimization by default config.mk | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index 918cffe..0da961a 100644 --- a/config.mk +++ b/config.mk @@ -107,8 +107,27 @@ HOSTCFLAGS += -pedantic # Option checker (courtesy linux kernel) to ensure # only supported compiler options are used # -cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ -/dev/null 21; then echo $(1); else echo $(2); fi ;) +CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk + +$(if $(wildcard $(CC_OPTIONS_CACHE_FILE)),,\ + $(shell mkdir -p $(dir $(CC_OPTIONS_CACHE_FILE + +sinclude $(CC_OPTIONS_CACHE_FILE) + +_ccopt_sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ +/dev/null 21; then \ + echo 'CC_OPTIONS += $(strip $1)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(1); else \ + [ x$(strip $2) != x ] \ + echo 'CC_OPTIONS_NOP += $(strip $2)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(2); fi) + +_ccopt_cached = $(if $(filter $1,$(CC_OPTIONS)),$1,) +_ccopt_nop_cached = $(if $(filter $1,$(CC_OPTIONS_NOP)),$1,) + +cc-option = $(if $(call _ccopt_cached,$1),$1,\ + $(if $(call _ccopt_nop_cached,$2),$2,\ + $(call _ccopt_sys,$1,$2))) # # Include the make variables (CC, etc...) -- 1.7.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] No power on USB host of IMX25 PDK
2011/11/4 Hugo Holgersson hu...@student.chalmers.se: diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index a0cfbb7..54b90c8 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -102,7 +102,8 @@ static int mxc_set_usbcontrol(int port, unsigned int flags) } #endif - writel(v, IMX_USB_BASE + USBCTRL_OTGBASE_OFFSET); + writel(v, (IMX_USB_BASE + + (0x200 * CONFIG_MXC_USB_PORT))); return 0; } I am looking at the usb/host/ehci-mxc.c file and I see that the write to the portsc USB register is currently only done for MX31: #ifdef CONFIG_MX31 setbits_le32(ehci-control, USB_EN); __raw_writel(CONFIG_MXC_USB_PORTSC, ehci-portsc); #endif I think you need to allow the portsc register write on MX25 too (and maybe for all i.MX devices). In Linux we have: .portsc = MXC_EHCI_MODE_SERIAL for MX25PDK ,where #define MXC_EHCI_MODE_SERIAL(3 30) Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] MMC: PL180: Fix infinite loop with VExpress extended fifo implementation
The new IO FPGA implementation for Versatile Express contains an MMCI (PL180) cell with the FIFO extended to 128 words. This causes the read_bytes() function to go into an infinite loop; as it will wait for for the half-full signal (SDI_STA_RXFIFOBR) if there are more than 8 words remaining (SDI_FIFO_BURST_SIZE), but it won't receive this signal once there are fewer than 64 words left to transfer. One possible fix is to add some build time configuration to change SDI_FIFO_BURST_SIZE for the new implementation. However, the problematic code only seems to exist as a small performance optimisation, so the solution implemented by this patch is to simply remove it. The error checking following the loop is also removed as this will be handled by code further down the function. Cc: Andy Fleming aflem...@gmail.com Signed-off-by: Jon Medhurst jon.medhu...@linaro.org --- Changes for version 2 - Fix broken whitespace in patch --- drivers/mmc/arm_pl180_mmci.c | 26 -- 1 files changed, 0 insertions(+), 26 deletions(-) diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c index ed296ee..e6467a2 100644 --- a/drivers/mmc/arm_pl180_mmci.c +++ b/drivers/mmc/arm_pl180_mmci.c @@ -111,7 +111,6 @@ static int do_command(struct mmc *dev, struct mmc_cmd *cmd) static int read_bytes(struct mmc *dev, u32 *dest, u32 blkcount, u32 blksize) { u32 *tempbuff = dest; - int i; u64 xfercount = blkcount * blksize; struct mmc_host *host = dev-priv; u32 status, status_err; @@ -121,31 +120,6 @@ static int read_bytes(struct mmc *dev, u32 *dest, u32 blkcount, u32 blksize) status = readl(host-base-status); status_err = status (SDI_STA_DCRCFAIL | SDI_STA_DTIMEOUT | SDI_STA_RXOVERR); - while (!status_err - (xfercount = SDI_FIFO_BURST_SIZE * sizeof(u32))) { - if (status SDI_STA_RXFIFOBR) { - for (i = 0; i SDI_FIFO_BURST_SIZE; i++) - *(tempbuff + i) = readl(host-base-fifo); - tempbuff += SDI_FIFO_BURST_SIZE; - xfercount -= SDI_FIFO_BURST_SIZE * sizeof(u32); - } - status = readl(host-base-status); - status_err = status - (SDI_STA_DCRCFAIL | SDI_STA_DTIMEOUT | SDI_STA_RXOVERR); - } - - if (status SDI_STA_DTIMEOUT) { - printf(Read data timed out, xfercount: %llu, status: 0x%08X\n, - xfercount, status); - return -ETIMEDOUT; - } else if (status SDI_STA_DCRCFAIL) { - printf(Read data blk CRC error: 0x%x\n, status); - return -EILSEQ; - } else if (status SDI_STA_RXOVERR) { - printf(Read data RX overflow error\n); - return -EIO; - } - while ((!status_err) (xfercount = sizeof(u32))) { if (status SDI_STA_RXDAVL) { *(tempbuff) = readl(host-base-fifo); -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/17 RESEND V5] iMX28: Add GPMI NAND driver
Hi Marek, On 10/22/2011 01:44 AM, Marek Vasut wrote: diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c new file mode 100644 index 000..ce2a326 --- /dev/null +++ b/drivers/mtd/nand/mxs_nand.c snip + nand-options |= NAND_NO_SUBPAGE_WRITE; I think we should change this a little bit. Unluckily I don't know what is the best way to fix it. As far as I have understood, the NAND_NO_SUBPAGE_WRITE is a chip option, not for a driver. At nand_base.c is chip-options = ~NAND_CHIPOPTIONS_MSK; chip-options |= type-options NAND_CHIPOPTIONS_MSK; so the bit is masked out anyway and subpages are enabled. After that UBI tries to read VID header at 512 by default. I had to use ubi part root 2048 to override it. Besides of that driver seems to work fine. -- Veli-Pekka Peltola Bluegiga Technologies ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] dfu: initial implementation
Hello, On Thursday, November 03, 2011 3:01 PM Stefan Schmidt wrote: o I will send out my not ready for mainline patch to give you and others an impression how it is tackled in my patch. o I like your split between dfu and flashing and also the addition of the dfu command. Could you split this part from the rest and send it as self conatining patch without other dependencies? o And then one patch with the mmc/fat flashing backend in moved out of the board file (no idea what the best place is, maybe just another file for now) and a last patch with all the board specific changes? I assume splitting into 4 parts: (1) dfu gadget, (2) board specific code, (3) flashing backend generic code, (4) dfu command. As I today discovered, after latest merges in u-boot master the mmc subsystem in Goni does not work properly - the detected capacity is 0, and the number of available partitions is 0. This took me some time to discover. I hope the responsible person will fix this soon. So, as far as the splitting of my dfu implementation into separate patches is concerned, I think I will come up with it early next week. o I will then rebase my code on yours and prepare patches against the dfu implementations as needed and also flashing backend for NAND. o After this we need to review was is missing and bring it over. Not all details covered in the plan but a start. Comments? In the beginning I intend to split the code into respective parts, to give you something to work with. Then I intend to clean the code up, taking into account your and Mike's review. Regards, Andrzej ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/17 RESEND V5] iMX28: Add GPMI NAND driver
Hi Marek, On 10/22/2011 01:44 AM, Marek Vasut wrote: diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c new file mode 100644 index 000..ce2a326 --- /dev/null +++ b/drivers/mtd/nand/mxs_nand.c snip + nand-options |= NAND_NO_SUBPAGE_WRITE; I think we should change this a little bit. Unluckily I don't know what is the best way to fix it. As far as I have understood, the NAND_NO_SUBPAGE_WRITE is a chip option, not for a driver. At nand_base.c is chip-options = ~NAND_CHIPOPTIONS_MSK; chip-options |= type-options NAND_CHIPOPTIONS_MSK; so the bit is masked out anyway and subpages are enabled. After that UBI tries to read VID header at 512 by default. I had to use ubi part root 2048 to override it. Besides of that driver seems to work fine. Can you please supply me with the commands that trigger such bug and the resulting problem you then see? So I can reproduce it and fix it? Thanks! -- Veli-Pekka Peltola Bluegiga Technologies ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 V2] SPL: Allow ARM926EJS to avoid compiling in the CPU support code
This allows the SPL to avoid compiling in the CPU support code. Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Stefano Babic sba...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Detlev Zundel d...@denx.de Cc: Scott Wood scottw...@freescale.com --- arch/arm/cpu/arm926ejs/Makefile |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) V2: Don't frob with cpu.o as it's going to be removed anyway. diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile index 930e0d1..a56ff08 100644 --- a/arch/arm/cpu/arm926ejs/Makefile +++ b/arch/arm/cpu/arm926ejs/Makefile @@ -28,6 +28,12 @@ LIB = $(obj)lib$(CPU).o START = start.o COBJS = cpu.o +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_NO_CPU_SUPPORT_CODE +START := +endif +endif + SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) START := $(addprefix $(obj),$(START)) Hi Albert, can you apply please? Thanks Ping ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/17 RESEND V5] iMX28: Add GPMI NAND driver
On 11/04/2011 03:30 PM, Marek Vasut wrote: Can you please supply me with the commands that trigger such bug and the resulting problem you then see? So I can reproduce it and fix it? Thanks! This procedure should trigger the problem: mtdparts default; nand erase.part filesystem; ubi part filesystem; ubi part filesystem You should see errors with second ubi part filesystem command like UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 0:0, read 64 bytes. You can force UBI not to use subpages (change 2048 to full size of your NAND page): mtdparts default; nand erase.part filesystem; ubi part filesystem 2048; ubi part filesystem 2048 Please let me know if I can help you more somehow. Thanks! -- Veli-Pekka Peltola Bluegiga Technologies ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] SPL support and secondary image size
On Thu, Nov 3, 2011 at 10:11 PM, Aneesh V ane...@ti.com wrote: Hi Jon, For OMAP we find this run-time by loading u-boot.img instead of u-boot.bin. u-boot.img has a 64 byte header with all necessary information such as size, load address, image type etc. The OMAP SPL can in fact load any image that has a standard u-boot header(mkimage header), including a uImage. This scheme was suggested by Wolfgang. Once I get the image file into memory, is there a uboot function I can call to run it? One that copies it to the correct location, does fixups, etc I tried running it from the command line: EA3131-NXP # bootm 0x3100 ## Booting kernel from Legacy Image at 3100 ... Image Name: U-Boot 2011.09-00285-gc0d0576 fo Image Type: ARM U-Boot Firmware (uncompressed) Data Size:240496 Bytes = 234.9 kB Load Address: 3120 Entry Point: Verifying Checksum ... OK Wrong Image Type for bootm command ERROR: can't get kernel image! EA3131-NXP # -- Jon Smirl jonsm...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arch/powerpc/lib/board.c: fix build warning
On Fri, 4 Nov 2011 01:47:04 -0500 Kumar Gala ga...@kernel.crashing.org wrote: On Nov 4, 2011, at 1:44 AM, Kumar Gala wrote: On Nov 3, 2011, at 2:09 PM, Wolfgang Denk wrote: In message 1319407132-6590-1-git-send-email...@denx.de you wrote: Commit 1272592 powerpc: Use getenv_ulong() in place of getenv(), strtoul instroduced a build warning for some PPC systems: board.c: In function 'board_init_r': board.c:626: warning: unused variable 's' Fix it. Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Applied, thanks. I'm still seeing this warning when building MPC8536DS_config me too, on most 83xx boards. I think we need to revert this now. I don't see why you'd need it. yes, all code fragments that utilize a variable 's' declare one local to their code body. Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] No power on USB host of IMX25 PDK
Thanks for the input! Putting the mux code to generic.c, as it was done for the UART's pins, did not change anything... I write MXC_EHCI_MODE_SERIAL to ehci-portsc. Exactly the same behavior. Same log. But the question (1) remains; which is the register (the address) of where mxc_set_usbcontrol() is supposed to write to? I understand Linux use http://lxr.linux.no/#linux+v3.1/arch/arm/mach-imx/ehci-imx25.c uses the IMX_USB_BASE + 0x600 address... But, to me this is outside the usb_ehci-struct, so I cannot figure out what register that is located at that address. Guessing, what about the following possible candidates inside the usb_echi-struct? usb_ehci-usbgenctrl usb_ehci-hwgeneral usb_ehci-control usb_ehci-isiphyctrl I need to find some docs on the controller's registers to understand that. Hugo Changes --- diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index c045a0b..a9752c4 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -26,6 +26,7 @@ #include div64.h #include netdev.h #include asm/io.h +#include asm/gpio.h #include asm/arch/imx-regs.h #include asm/arch/imx25-pinmux.h #ifdef CONFIG_MXC_MMC @@ -195,6 +196,30 @@ int cpu_mmc_init(bd_t *bis) #endif } +#ifdef CONFIG_USB_EHCI +void mx25_usbh2_init_pins() +{ + struct iomuxc_mux_ctl *muxctl; + struct iomuxc_pad_ctl *padctl; + u32 gpio_mux_mode5 = MX25_PIN_MUX_MODE(5); + u32 gpio_mux_mode6 = MX25_PIN_MUX_MODE(6); + + muxctl = (struct iomuxc_mux_ctl *)IMX_IOPADMUX_BASE; + + /* USBH2_PWR */ + writel(gpio_mux_mode6, muxctl-pad_d9); + //writel(gpio_mux_mode5, muxctl-pad_d9); + //gpio_direction_output(MXC_GPIO_PORT_TO_NUM(4, 11), 1); /* Try keep power on. */ + + /* USBH2_OC */ + writel(gpio_mux_mode6, muxctl-pad_d8); + + /* USB_BT_CS low selects USB Host */ + writel(gpio_mux_mode5, muxctl-pad_a21); /* GPIO2[7] */ + gpio_direction_output(MXC_GPIO_PORT_TO_NUM(2, 7), 0); /* Chip select 0*/ +} +#endif /* CONFIG_USB_EHCI */ + #ifdef CONFIG_MXC_UART void mx25_uart1_init_pins(void) { diff --git a/arch/arm/include/asm/arch-mx25/sys_proto.h b/arch/arm/include/asm/arch-mx25/sys_proto.h index 6a01a7b..0cb674a 100644 --- a/arch/arm/include/asm/arch-mx25/sys_proto.h +++ b/arch/arm/include/asm/arch-mx25/sys_proto.h @@ -24,6 +24,7 @@ #ifndef _SYS_PROTO_H_ #define _SYS_PROTO_H_ +void mx25_usbh2_init_pins(void); void mx25_uart1_init_pins(void); #endif diff --git a/board/freescale/mx25pdk/lowlevel_init.S b/board/freescale/mx25pdk/lowlevel_init.S index 6e6810f..1997115 100644 --- a/board/freescale/mx25pdk/lowlevel_init.S +++ b/board/freescale/mx25pdk/lowlevel_init.S @@ -15,7 +15,41 @@ * GNU General Public License for more details. */ +#include asm/macro.h +#include asm/arch/macro.h +#include asm/arch/imx-regs.h +#include generated/asm-offsets.h + +/* + * clocks + */ +.macro init_clocks + + /* disable clock output */ + write32 IMX_CCM_BASE + CCM_MCR, 0x + write32 IMX_CCM_BASE + CCM_CCTL, 0x5003 + + /* first enable CLKO debug output + * 0x4000 enables the debug CLKO signal + * 0x0500 sets CLKO divider to 6 + * 0x0060 makes CLKO parent clk the USB clk + */ + write32 0x53f80064, 0x4560 + write32 0x53f80008, 0x20034000 + + /* +* enable all implemented clocks in all three +* clock control registers +*/ + write32 IMX_CCM_BASE + CCM_CGCR0, 0x1fff + write32 IMX_CCM_BASE + CCM_CGCR1, 0x + write32 IMX_CCM_BASE + CCM_CGCR2, 0xf + + /* Devide NAND clock by 32 */ + write32 IMX_CCM_BASE + CCM_PCDR2, 0x0101011F +.endm + .globl lowlevel_init lowlevel_init: - + init_clocks mov pc, lr diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c index 4a8352f..eba70e2 100644 --- a/board/freescale/mx25pdk/mx25pdk.c +++ b/board/freescale/mx25pdk/mx25pdk.c @@ -19,10 +19,12 @@ #include common.h #include asm/io.h +#include asm/gpio.h #include asm/arch/imx-regs.h #include asm/arch/imx25-pinmux.h #include asm/arch/sys_proto.h + DECLARE_GLOBAL_DATA_PTR; int dram_init(void) @@ -36,7 +38,7 @@ int dram_init(void) int board_early_init_f(void) { mx25_uart1_init_pins(); - + mx25_usbh2_init_pins(); return 0; } diff --git a/config.mk b/config.mk index 3fa9eef..b83179c 100644 --- a/config.mk +++ b/config.mk @@ -163,8 +163,8 @@ else ARFLAGS = crv endif RELFLAGS= $(PLATFORM_RELFLAGS) -DBGFLAGS= -g # -DDEBUG -OPTFLAGS= -Os #-fomit-frame-pointer +DBGFLAGS= -g -DDEBUG +OPTFLAGS= -fno-schedule-insns -fno-schedule-insns2 #-fomit-frame-pointer OBJCFLAGS += --gap-fill=0xff diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index a0cfbb7..85080ea 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -52,6
Re: [U-Boot] No power on USB host of IMX25 PDK
On Fri, Nov 4, 2011 at 2:06 PM, Hugo Holgersson hu...@student.chalmers.se wrote: Thanks for the input! Putting the mux code to generic.c, as it was done for the UART's pins, did not change anything... I write MXC_EHCI_MODE_SERIAL to ehci-portsc. Exactly the same behavior. Same log. But the question (1) remains; which is the register (the address) of where mxc_set_usbcontrol() is supposed to write to? I understand Linux use http://lxr.linux.no/#linux+v3.1/arch/arm/mach-imx/ehci-imx25.c uses the IMX_USB_BASE + 0x600 address... But, to me this is outside the usb_ehci-struct, so I cannot figure out what register that is located at that address. Guessing, what about the following possible candidates inside the usb_echi-struct? usb_ehci-usbgenctrl usb_ehci-hwgeneral usb_ehci-control usb_ehci-isiphyctrl I need to find some docs on the controller's registers to understand that. You need to check MX25RM (Reference Manual) available at http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX257nodeId=018rH3ZrDR6B45fpsp=1tab=Documentation_Tab Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
On Fri, Nov 4, 2011 at 5:53 AM, Daniel Schwierzeck daniel.schwierz...@googlemail.com wrote: Apply memoization to cc-option macro by caching the results of the gcc calls. This macro is called very often so using cached results leads to faster compilation times. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com Tested-by: Simon Glass s...@chromium.org I see a big speed-up with this: full build 7.05s - 4.1s incremental 2.25s - 1.05s --- Changes for v2: - move cache file to $(obj)/include/generated - reworked completely - cache also non-working gcc options - remove CACHE_CC_OPTIONS config switch and enable this optimization by default config.mk | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index 918cffe..0da961a 100644 --- a/config.mk +++ b/config.mk @@ -107,8 +107,27 @@ HOSTCFLAGS += -pedantic # Option checker (courtesy linux kernel) to ensure # only supported compiler options are used # -cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - /dev/null 21; then echo $(1); else echo $(2); fi ;) +CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk + +$(if $(wildcard $(CC_OPTIONS_CACHE_FILE)),,\ + $(shell mkdir -p $(dir $(CC_OPTIONS_CACHE_FILE + +sinclude $(CC_OPTIONS_CACHE_FILE) + +_ccopt_sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + /dev/null 21; then \ + echo 'CC_OPTIONS += $(strip $1)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(1); else \ + [ x$(strip $2) != x ] \ Do shell still need that x bit? + echo 'CC_OPTIONS_NOP += $(strip $2)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(2); fi) + +_ccopt_cached = $(if $(filter $1,$(CC_OPTIONS)),$1,) Do you need the $(if - doesn't filter give you what you want by itself? +_ccopt_nop_cached = $(if $(filter $1,$(CC_OPTIONS_NOP)),$1,) + +cc-option = $(if $(call _ccopt_cached,$1),$1,\ + $(if $(call _ccopt_nop_cached,$2),$2,\ + $(call _ccopt_sys,$1,$2))) # # Include the make variables (CC, etc...) -- 1.7.7.1 Thanks for doing this! Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4 V3] PXA: Adapt Voipac PXA270 to OneNAND SPL
On 11/03/2011 07:55 PM, Marek Vasut wrote: On 11/03/2011 04:52 PM, Marek Vasut wrote: Why do we want to separate them? What is the fundamental difference between OneNAND, and a high-level NAND controller such as fsl_elbc? Honestly, I'm not the author of the subsystem, but please check the documentation. The way we retrieve data from onenand is different to NAND. What documentation? How is it different? There are substantial differences in how we retrieve data between drivers that use the NAND subsystem. Surely you've seen that in the mxs_nand driver. :-) Maybe there would be some differences on init if we can't produce normal ID data, but that doesn't justify duplicating the whole subsystem. Where do you see such duplication? cmd_onenand ? cmd_onenand and env_onenand are the most irritating, since they're at a layer that really shouldn't care about the differences -- we should probably have a plain mtd command instead, for most of the functionality. There's also onenand_bbt.c -- what are the hardware-based differences in how the bad block table is managed? nand_base.c/onenand_base.c are less clear. Obviously much of what is in onenand_base.c would be in the controller driver if it used the NAND subsystem. But it looks like some of it is duplication. Why should the code that just wants to use an API to move data around need to care which it is? Why should there be behavioral differences that aren't rooted in the actual hardware? Another approach might be to use MTD as the common interface, but factor out common code into libraries that drivers can use, and avoid the main nand_base.c code even for things like fsl_elbc. I think you're mistaken here. OneNAND != NAND. Well, last I tried I couldn't find any public documentation, so all I have to go on is the code, some marketing-type info, and asking questions of people that appear to know more about OneNAND than I do. :-) From what I can see, it looks like NAND with an integrated controller that exposes an unusual command set, but still for the most part provides the same operations. Several of our existing NAND-subsystem drivers have to fake the command set for the generic layer as well. Initialization/identification might be a problem area that current drivers don't have to deal with, though. Actually integrating OneNAND with NAND would likely involve an already-needed restructuring of the subsystem. If the answer really is that it makes sense to consider OneNAND to be a totally different thing from NAND, then it's outside my jurisdiction as NAND custodian -- which is fine with me. Frankly, even if it does make sense to merge them, I'd rather not be custodian of the OneNAND stuff unless someone is actually willing to do the merge. I don't have access to hardware or documentation, and it's an entirely separate codebase. People just started sending me the patches a few years back. This is not a new complaint -- I've asked for this before but nobody's put the time into sorting out the mess (and I have neither time nor hardware nor documentation). The SPL load_image function is a simple enough interface to start with, though. :-) Well, it seems what you are proposing is way beyond the scope of this patchset. In fact, it should probably just be spl_load_image() with whatever boot source has been configured into this SPL build. What if you have two boot sources? Traditionally SPL has been small and purpose-built to do exactly one thing -- so we decide at compile-time things that we might otherwise decide at runtime. If there's a requirement for multiple boot sources decided at runtime, then we'll obviously need a runtime mechanism. -- but it seems a bit hackish to why does it matter whether it's two different types of device, or two of the same type of device (possibly with different controller types)? If the answer is that, for example, NAND versus USB versus MMC is a likely use case, but two different NANDs is not likely, is NAND versus OneNAND any more likely? Maybe spl_load_image should be a function pointer that board code sets, with each implementation being distinctly named (in which case nand_spl_load_image would become nand_spl_simple_load_image, unless we move it to nand_spl_load.c and make nand_read_page a function pointer). If needed to save a few bytes, we could use #defines to eliminate the function pointers in a single-target SPL build. For now, until we decide to do something SPL-wide, call it what you want. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] Define uintptr_t as long int to simplify printf() format strings
On Thu, Nov 3, 2011 at 7:01 PM, Mike Frysinger vap...@gentoo.org wrote: On Thursday 03 November 2011 21:08:54 Simon Glass wrote: --- a/include/compiler.h +++ b/include/compiler.h /* Types for `void *' pointers. */ -#if __WORDSIZE == 64 +#if __WORDSIZE == 64 || __WORDSIZE == 32 typedef unsigned long int uintptr_t; -#elif __WORDSIZE == 32 -typedef unsigned int uintptr_t; #else #error __WORDSIZE has unexpected value #endif i'd just delete the #if logic altogether considering we set up the values a few lines above -mike OK will do in v3 - Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/3] Fix warnings in cmd_nvedit.c
This printf() string should be %ld now that uintptr_t is defined as long. Also fix a size_t error. Signed-off-by: Simon Glass s...@chromium.org Acked-by: Mike Frysinger vap...@gentoo.org --- common/cmd_nvedit.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 396a171..8895335 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -405,7 +405,7 @@ int setenv_addr(const char *varname, const void *addr) { char str[17]; - sprintf(str, %x, (uintptr_t)addr); + sprintf(str, %lx, (uintptr_t)addr); return setenv(varname, str); } @@ -862,7 +862,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv - truncated\n, MAX_ENV_SIZE); } ++size; - printf(## Info: input data size = %zd = 0x%zX\n, size, size); + printf(## Info: input data size = %zu = 0x%zX\n, size, size); } if (chk) { -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] Define uintptr_t as long int to simplify printf() format strings
If uintptr_t can be either an unsigned int or an unsigned long int, it is tricky to use it in a printf() format string. This changes it to unsigned long int consistently. This should do the right thing on both 32-bit and 64-bit architectures. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v3: - Remove the #if logic since it doesn't really do anything include/compiler.h | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/compiler.h b/include/compiler.h index 54999a7..0734ed4 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -123,16 +123,10 @@ typedef unsigned int uint; #define __WORDSIZE 32 #endif -/* Types for `void *' pointers. */ -#if __WORDSIZE == 64 -typedef unsigned long int uintptr_t; -#elif __WORDSIZE == 32 -typedef unsigned intuintptr_t; -#else -#error __WORDSIZE has unexpected value -#endif +/* Type for `void *' pointers. */ +typedef unsigned long int uintptr_t; -#endif +#endif /* USE_HOSTCC */ /* compiler options */ #define uninitialized_var(x) x = x -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/3] sandbox: Fix warnings in hashtable.c
This fixes a few printf() strings for size_t which are missing the 'z' modifier. Signed-off-by: Simon Glass s...@chromium.org Acked-by: Mike Frysinger vap...@gentoo.org --- Changes in v2: - Fix another warning in the same file lib/hashtable.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/hashtable.c b/lib/hashtable.c index 6895550..fca9d6e 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -491,8 +491,8 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, return (-1); } - debug(EXPORT table = %p, htab.size = %d, htab.filled = %d, size = %d\n, - htab, htab-size, htab-filled, size); + debug(EXPORT table = %p, htab.size = %d, htab.filled = %d, + size = %zu\n, htab, htab-size, htab-filled, size); /* * Pass 1: * search used entries, @@ -539,7 +539,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, /* Check if the user supplied buffer size is sufficient */ if (size) { if (size totlen + 1) {/* provided buffer too small */ - debug(### buffer too small: %d, but need %d\n, + debug(### buffer too small: %zu, but need %zu\n, size, totlen + 1); __set_errno(ENOMEM); return (-1); @@ -640,7 +640,7 @@ int himport_r(struct hsearch_data *htab, /* we allocate new space to make sure we can write to the array */ if ((data = malloc(size)) == NULL) { - debug(himport_r: can't malloc %d bytes\n, size); + debug(himport_r: can't malloc %zu bytes\n, size); __set_errno(ENOMEM); return 0; } -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] E1000 build warnings
Dear Roy, dear Kyle, you have been modifyong the E1000 driver lately so I hope you are in the best position to help and fix a number of build warnings. For example when building for the MVBC_P board, I get this: e1000.c: In function 'e1000_read_mac_addr': e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e1000.c: In function 'e1000_reset_hw': e1000.c:1373:11: warning: variable 'icr' set but not used [-Wunused-but-set-variable] e1000.c: In function 'e1000_phy_init_script': e1000.c:4395:11: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable] I'm especially concerned about the last warning (the others should be straightforward to fix). The code reads: ... 4402 /* Save off the current value of register 0x2F5B to be 4403 * restored at the end of this routine. */ 4404 ret_val = e1000_read_phy_reg(hw, 0x2F5B, phy_saved_data); ... However, no such restore gets ever done. AFAICT this is your code, Roy. Please check and fix. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de One possible reason that things aren't going according to plan is that there never was a plan in the first place. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] OMAP3: Add SPL support to Beagleboard
On Thu, Oct 27, 2011 at 4:22 PM, Scott Wood scottw...@freescale.com wrote: On 10/27/2011 06:13 PM, Tom Rini wrote: On 10/27/2011 04:10 PM, Igor Grinberg wrote: On 10/27/2011 11:29 PM, Tom Rini wrote: On 10/27/2011 02:18 PM, Igor Grinberg wrote: On 10/26/2011 11:13 PM, Tom Rini wrote: [snip] +/* nand_command: Send a flash command to the flash chip */ +static void nand_command(unsigned char command) +{ + WRITE_NAND_COMMAND(command, NAND_ADDR); + + if (command == NAND_CMD_RESET) { + unsigned char ret_val; + nand_command(NAND_CMD_STATUS); + do { + ret_val = READ_NAND(NAND_ADDR);/* wait till ready */ + } while ((ret_val 0x40) != 0x40); You should be using some kind of timeout, so you will not stuck in here without being noticed. OK. I've been wondering if we shouldn't somehow make a not-tied-to-full-mtd nand_command more available since I suspect a few other boards will be in a similar situation, for probing early on. That would be much better solution. (Background if you've otherwise ignored the thread, on some omap3 boards we need to take a whack at NAND to see what DDR we have) OK, so, Scott, where would you suggest we put a very trivial set of nand infrastructure we need outside of the scope of loading u-boot itself from NAND ? Can the SPL code be used (not an actual SPL build, just the NAND code associated with it)? So, as I start down this path, nand_command needs nand_init() done and that means we need the chip driver so at this point I'm wondering if it's not better to just say that boards that need to poke NAND to determine memory just need CONFIG_SPL_NAND_SIMPLE set and un-static nand_command that we've got already (and make boards call nand_init() before nand_command()), comments? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
Hi SImon, On Fri, Nov 4, 2011 at 5:32 PM, Simon Glass s...@chromium.org wrote: On Fri, Nov 4, 2011 at 5:53 AM, Daniel Schwierzeck daniel.schwierz...@googlemail.com wrote: Apply memoization to cc-option macro by caching the results of the gcc calls. This macro is called very often so using cached results leads to faster compilation times. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com Tested-by: Simon Glass s...@chromium.org I see a big speed-up with this: full build 7.05s - 4.1s incremental 2.25s - 1.05s --- Changes for v2: - move cache file to $(obj)/include/generated - reworked completely - cache also non-working gcc options - remove CACHE_CC_OPTIONS config switch and enable this optimization by default config.mk | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index 918cffe..0da961a 100644 --- a/config.mk +++ b/config.mk @@ -107,8 +107,27 @@ HOSTCFLAGS += -pedantic # Option checker (courtesy linux kernel) to ensure # only supported compiler options are used # -cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - /dev/null 21; then echo $(1); else echo $(2); fi ;) +CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk + +$(if $(wildcard $(CC_OPTIONS_CACHE_FILE)),,\ + $(shell mkdir -p $(dir $(CC_OPTIONS_CACHE_FILE + +sinclude $(CC_OPTIONS_CACHE_FILE) + +_ccopt_sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + /dev/null 21; then \ + echo 'CC_OPTIONS += $(strip $1)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(1); else \ + [ x$(strip $2) != x ] \ Do shell still need that x bit? Probably not but it is safer and does not really harm ;) + echo 'CC_OPTIONS_NOP += $(strip $2)' $(CC_OPTIONS_CACHE_FILE); \ + echo $(2); fi) + +_ccopt_cached = $(if $(filter $1,$(CC_OPTIONS)),$1,) Do you need the $(if - doesn't filter give you what you want by itself? You are right, the if is redundant. I will optimize this. +_ccopt_nop_cached = $(if $(filter $1,$(CC_OPTIONS_NOP)),$1,) + +cc-option = $(if $(call _ccopt_cached,$1),$1,\ + $(if $(call _ccopt_nop_cached,$2),$2,\ + $(call _ccopt_sys,$1,$2))) # # Include the make variables (CC, etc...) -- 1.7.7.1 Thanks for doing this! Regards, Simon Thanks, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Checking validity of rootfs in NAND-Flash
Hello everybody, in my project, u-boot (2009.11) loads a large jffs2-rootfs image (80 MB, with an attached crc32-checksum) from SD-card into a NAND-Flash. To ensure the validity of the rootfs, i let u-boot then clear the RAM-part, read back the rootfs from NAND into RAM, do a crc32 checksum over it and compare this checksum with the crc32- checksum that was attached to the image. This validity check takes about 70 seconds. Do you know a faster/better way of checking the validity? Thanks in advance, Harald Vollmer ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
Hi Albert, Wolfgang, following code from arch/arm/config does not work correctly with my optimization PF_CPPFLAGS_ABI := $(call cc-option,\ -mabi=aapcs-linux -mno-thumb-interwork,\ $(call cc-option,\ -mapcs-32,\ $(call cc-option,\ -mabi=apcs-gnu,\ )\ ) $(call cc-option,-mno-thumb-interwork,)\ ) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) Compiling with seabord_config and latest CodeSourcery toolchain the generated cache file has following content: CC_OPTIONS += -marm CC_OPTIONS += -mabi=apcs-gnu CC_OPTIONS_NOP += -mabi=apcs-gnu CC_OPTIONS += -mno-thumb-interwork CC_OPTIONS += -mabi=aapcs-linux -mno-thumb-interwork CC_OPTIONS += -fno-stack-protector CC_OPTIONS += -Wno-format-nonliteral CC_OPTIONS += -Wno-format-security CC_OPTIONS += -fno-toplevel-reorder If I rewrite that code to PF_CPPFLAGS_ABI := $(call cc-option,-mabi=aapcs-linux,) ifeq ($(PF_CPPFLAGS_ABI),) PF_CPPFLAGS_ABI := $(call cc-option,-mapcs-32,-mabi=apcs-gnu) endif PF_CPPFLAGS_THUMB := $(call cc-option,-mno-thumb-interwork,) PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) $(PF_CPPFLAGS_THUMB) the cache file looks better: CC_OPTIONS += -marm CC_OPTIONS += -mabi=aapcs-linux CC_OPTIONS += -mno-thumb-interwork CC_OPTIONS += -fno-stack-protector CC_OPTIONS += -Wno-format-nonliteral CC_OPTIONS += -Wno-format-security CC_OPTIONS += -fno-toplevel-reorder Should we change it? is the semantic still the same? Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ti/master
The following changes since commit 92e86c8daed649a9e9ddd6c0b52d61cb25b62c3a: Stefano Babic (1): Davinci: ea20: added PREBOOT to configuration are available in the git repository at: git://git.denx.de/u-boot-ti.git master Luca Ceresoli (1): ARM: dig297: Define MACH_TYPE_OMAP3_CPS and CONFIG_MACH_TYPE Sanjeev Premi (3): omap3: mem: Define and use common macros omap3: mem: Clean-up whitespaces omap3: mem: Move comments next to definitions arch/arm/include/asm/arch-omap3/mem.h | 217 - board/comelit/dig297/dig297.c |2 - include/configs/dig297.h |8 ++ 3 files changed, 115 insertions(+), 112 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Checking validity of rootfs in NAND-Flash
Dear harald.voll...@tieto.com, In message fb9ee8d3a2bcc74b808284d2cc56bc8c0a5fe51...@exmb04.eu.tieto.com you wrote: in my project, u-boot (2009.11) loads a large jffs2-rootfs image (80 MB, w ith an attached crc32-checksum) from SD-card into a NAND-Flash. To ensure the validity of the rootfs, i let u-boot then clear the RAM-part, read back the rootfs from NAND into RAM, do a crc32 checksum over it and c ompare this checksum with the crc32- checksum that was attached to the image. This validity check takes about 70 seconds. Do you know a faster/better way of checking the validity? Please make sure your line length does not exceed some 70 characters or so. Thanks. I smell this is on an ARM system? In this case you should update and use a more recent version of U-Boot, where we have support for caches. This usually helps a _lot_. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de It's when they say 2 + 2 = 5 that I begin to argue.- Eric Pepke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Error in using linux\ioport.h
Hi If I include linux\ioport.h I get errors because resource_size_t type has not been defined. I believe it should be defined in linux\types.h? Thanks Hanumant ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ti/master (updated)
The following changes since commit 92e86c8daed649a9e9ddd6c0b52d61cb25b62c3a: Stefano Babic (1): Davinci: ea20: added PREBOOT to configuration are available in the git repository at: git://git.denx.de/u-boot-ti.git master Luca Ceresoli (1): ARM: dig297: Define MACH_TYPE_OMAP3_CPS and CONFIG_MACH_TYPE Michael Jones (1): OMAP3: mvblx: Initial support for mvBlueLYNX-X Sanjeev Premi (3): omap3: mem: Define and use common macros omap3: mem: Clean-up whitespaces omap3: mem: Move comments next to definitions MAINTAINERS|4 + arch/arm/include/asm/arch-omap3/mem.h | 217 +- board/comelit/dig297/dig297.c |2 - board/matrix_vision/mvblx/Makefile | 53 + board/matrix_vision/mvblx/config.mk| 33 +++ board/matrix_vision/mvblx/fpga.c | 219 ++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++ board/matrix_vision/mvblx/mvblx.h | 362 + board/matrix_vision/mvblx/sys_eeprom.c | 395 boards.cfg |1 + doc/README.omap3 |5 + include/configs/dig297.h |8 + include/configs/omap3_mvblx.h | 313 + 14 files changed, 1701 insertions(+), 112 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] config.mk: use memoization in cc-option macro to speed up compilation
Dear Daniel Schwierzeck, In message CACUy__XY1873+dT-s=-gypebq5hnysmywwt-gxexiwy97ec...@mail.gmail.com you wrote: Should we change it? is the semantic still the same? I'm not sure. At first reading it doesn't look really the same to me. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Never ascribe to malice that which can adequately be explained by stupidity. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] [x86] Add a target for running as a coreboot payload
Add a target for running u-boot as a coreboot payload in boards.cfg. --- Changes in v2: Change capitalization of the x86 tag. Signed-off-by: Gabe Black gabebl...@chromium.org boards.cfg |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/boards.cfg b/boards.cfg index 604becf..cc7dd2b 100644 --- a/boards.cfg +++ b/boards.cfg @@ -266,6 +266,7 @@ tcm-bf518blackfinblackfin tcm-bf537blackfinblackfin eNET x86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x3804 eNET_SRAMx86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x1900 +coreboot-x86 x86 x86coreboot chromebook-x86 corebootcoreboot:SYS_TEXT_BASE=0xFC sandbox sandbox sandbox sandbox sandbox- cobra5272m68kmcf52x2 cobra5272 - idmr m68kmcf52x2 -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] E1000 build warnings
On Nov 04, 2011, at 12:47, Wolfgang Denk wrote: you have been modifyong the E1000 driver lately so I hope you are in the best position to help and fix a number of build warnings. For example when building for the MVBC_P board, I get this: e1000.c: In function 'e1000_read_mac_addr': e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Hmm, I would be inclined to just use -fno-strict-aliasing and -Wno-strict-aliasing here. The Linux kernel does the exact same thing because strict-aliasing tends to cause arbitrary breakage with things like memcpy() and network protocol buffers. Here's one relevant email thread: https://lkml.org/lkml/2003/2/25/270 e1000.c: In function 'e1000_reset_hw': e1000.c:1373:11: warning: variable 'icr' set but not used [-Wunused-but-set-variable] In this case the icr variable should just be removed; the register read is just to clear some read-once bits. I'll submit a patch next week to fix this one if nobody else beats me to it. Cheers, Kyle Moffett -- Curious about my work on the Debian powerpcspe port? I'm keeping a blog here: http://pureperl.blogspot.com/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] [x86] Add a target for running as a coreboot payload
On Friday 04 November 2011 15:16:44 Gabe Black wrote: Add a target for running u-boot as a coreboot payload in boards.cfg. --- Changes in v2: Change capitalization of the x86 tag. Signed-off-by: Gabe Black gabebl...@chromium.org your s-o-b tag has to be above the --- -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4 V3] PXA: Adapt Voipac PXA270 to OneNAND SPL
On 11/03/2011 07:55 PM, Marek Vasut wrote: On 11/03/2011 04:52 PM, Marek Vasut wrote: Why do we want to separate them? What is the fundamental difference between OneNAND, and a high-level NAND controller such as fsl_elbc? Honestly, I'm not the author of the subsystem, but please check the documentation. The way we retrieve data from onenand is different to NAND. What documentation? How is it different? There are substantial differences in how we retrieve data between drivers that use the NAND subsystem. Surely you've seen that in the mxs_nand driver. :-) Maybe there would be some differences on init if we can't produce normal ID data, but that doesn't justify duplicating the whole subsystem. Where do you see such duplication? cmd_onenand ? cmd_onenand and env_onenand are the most irritating, since they're at a layer that really shouldn't care about the differences -- we should probably have a plain mtd command instead, for most of the functionality. There's also onenand_bbt.c -- what are the hardware-based differences in how the bad block table is managed? nand_base.c/onenand_base.c are less clear. Obviously much of what is in onenand_base.c would be in the controller driver if it used the NAND subsystem. But it looks like some of it is duplication. Why should the code that just wants to use an API to move data around need to care which it is? Why should there be behavioral differences that aren't rooted in the actual hardware? Another approach might be to use MTD as the common interface, but factor out common code into libraries that drivers can use, and avoid the main nand_base.c code even for things like fsl_elbc. I think you're mistaken here. OneNAND != NAND. Well, last I tried I couldn't find any public documentation, so all I have to go on is the code, some marketing-type info, and asking questions of people that appear to know more about OneNAND than I do. :-) From what I can see, it looks like NAND with an integrated controller that exposes an unusual command set, but still for the most part provides the same operations. Several of our existing NAND-subsystem drivers have to fake the command set for the generic layer as well. Initialization/identification might be a problem area that current drivers don't have to deal with, though. Actually integrating OneNAND with NAND would likely involve an already-needed restructuring of the subsystem. If the answer really is that it makes sense to consider OneNAND to be a totally different thing from NAND, then it's outside my jurisdiction as NAND custodian -- which is fine with me. Frankly, even if it does make sense to merge them, I'd rather not be custodian of the OneNAND stuff unless someone is actually willing to do the merge. I don't have access to hardware or documentation, and it's an entirely separate codebase. People just started sending me the patches a few years back. This is not a new complaint -- I've asked for this before but nobody's put the time into sorting out the mess (and I have neither time nor hardware nor documentation). The SPL load_image function is a simple enough interface to start with, though. :-) Well, it seems what you are proposing is way beyond the scope of this patchset. In fact, it should probably just be spl_load_image() with whatever boot source has been configured into this SPL build. What if you have two boot sources? Traditionally SPL has been small and purpose-built to do exactly one thing -- so we decide at compile-time things that we might otherwise decide at runtime. If there's a requirement for multiple boot sources decided at runtime, then we'll obviously need a runtime mechanism. -- but it seems a bit hackish to why does it matter whether it's two different types of device, or two of the same type of device (possibly with different controller types)? If the answer is that, for example, NAND versus USB versus MMC is a likely use case, but two different NANDs is not likely, is NAND versus OneNAND any more likely? Maybe spl_load_image should be a function pointer that board code sets, with each implementation being distinctly named (in which case nand_spl_load_image would become nand_spl_simple_load_image, unless we move it to nand_spl_load.c and make nand_read_page a function pointer). If needed to save a few bytes, we could use #defines to eliminate the function pointers in a single-target SPL build. For now, until we decide to do something SPL-wide, call it what you want. Well basically from what I see, you'd like me to do the NAND/OneNAND merge. As I already said, that's way out of the scope of this patchset so I'm not doing that. Either way, are you OK with current state of the patch? M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] Define uintptr_t as long int to simplify printf() format strings
Acked-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] E1000 build warnings
On Friday 04 November 2011 16:03:09 Moffett, Kyle D wrote: On Nov 04, 2011, at 12:47, Wolfgang Denk wrote: you have been modifyong the E1000 driver lately so I hope you are in the best position to help and fix a number of build warnings. For example when building for the MVBC_P board, I get this: e1000.c: In function 'e1000_read_mac_addr': e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e1000.c:1149:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Hmm, I would be inclined to just use -fno-strict-aliasing and -Wno-strict-aliasing here. The Linux kernel does the exact same thing because strict-aliasing tends to cause arbitrary breakage with things like memcpy() and network protocol buffers. it's only arbitrary if your code is wrong :) Here's one relevant email thread: https://lkml.org/lkml/2003/2/25/270 i don't think that's relevant as that seems to be exercising a specific bug in the kernel which we don't have -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4 V3] PXA: Adapt Voipac PXA270 to OneNAND SPL
On 11/04/2011 03:07 PM, Marek Vasut wrote: For now, until we decide to do something SPL-wide, call it what you want. Well basically from what I see, you'd like me to do the NAND/OneNAND merge. As I already said, that's way out of the scope of this patchset so I'm not doing that. Oh, I didn't mean to imply that was within the scope of this patch. I was just describing the background behind why I'm frustrated with the OneNAND situation, and this looked like an extension of the onenand is a totally different thing model, in an independent context. Either way, are you OK with current state of the patch? I won't block it. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4 V3] PXA: Adapt Voipac PXA270 to OneNAND SPL
On 11/04/2011 03:07 PM, Marek Vasut wrote: For now, until we decide to do something SPL-wide, call it what you want. Well basically from what I see, you'd like me to do the NAND/OneNAND merge. As I already said, that's way out of the scope of this patchset so I'm not doing that. Oh, I didn't mean to imply that was within the scope of this patch. I was just describing the background behind why I'm frustrated with the OneNAND situation, and this looked like an extension of the onenand is a totally different thing model, in an independent context. Well I suppose this is rooted in Linux. It's different subsys there too. Either way, are you OK with current state of the patch? I won't block it. That's what I meant. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] [x86] Add a target for running as a coreboot payload
From: Gabe Black gabebl...@google.com Add a target for running u-boot as a coreboot payload in boards.cfg. Signed-off-by: Gabe Black gabebl...@chromium.org --- Changes in v2: Change capitalization of the x86 tag. Changes in v3: Move the Signed-off-by line up. boards.cfg |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/boards.cfg b/boards.cfg index 604becf..cc7dd2b 100644 --- a/boards.cfg +++ b/boards.cfg @@ -266,6 +266,7 @@ tcm-bf518blackfinblackfin tcm-bf537blackfinblackfin eNET x86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x3804 eNET_SRAMx86 x86eNET- sc520 eNET:SYS_TEXT_BASE=0x1900 +coreboot-x86 x86 x86coreboot chromebook-x86 corebootcoreboot:SYS_TEXT_BASE=0xFC sandbox sandbox sandbox sandbox sandbox- cobra5272m68kmcf52x2 cobra5272 - idmr m68kmcf52x2 -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-ti/master (updated)
Hi Sandeep, Le 04/11/2011 18:56, s-paul...@ti.com a écrit : The following changes since commit 92e86c8daed649a9e9ddd6c0b52d61cb25b62c3a: Stefano Babic (1): Davinci: ea20: added PREBOOT to configuration are available in the git repository at: git://git.denx.de/u-boot-ti.git master Luca Ceresoli (1): ARM: dig297: Define MACH_TYPE_OMAP3_CPS and CONFIG_MACH_TYPE Michael Jones (1): OMAP3: mvblx: Initial support for mvBlueLYNX-X Sanjeev Premi (3): omap3: mem: Define and use common macros omap3: mem: Clean-up whitespaces omap3: mem: Move comments next to definitions MAINTAINERS|4 + arch/arm/include/asm/arch-omap3/mem.h | 217 +- board/comelit/dig297/dig297.c |2 - board/matrix_vision/mvblx/Makefile | 53 + board/matrix_vision/mvblx/config.mk| 33 +++ board/matrix_vision/mvblx/fpga.c | 219 ++ board/matrix_vision/mvblx/fpga.h | 32 +++ board/matrix_vision/mvblx/mvblx.c | 169 ++ board/matrix_vision/mvblx/mvblx.h | 362 + board/matrix_vision/mvblx/sys_eeprom.c | 395 boards.cfg |1 + doc/README.omap3 |5 + include/configs/dig297.h |8 + include/configs/omap3_mvblx.h | 313 + 14 files changed, 1701 insertions(+), 112 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] [x86] Add a basic implementation for a coreboot board
Signed-off-by: Gabe Black gabebl...@chromium.org --- board/chromebook-x86/coreboot/Makefile | 59 +++ board/chromebook-x86/coreboot/coreboot.c | 88 ++ board/chromebook-x86/coreboot/coreboot_pci.c | 30 board/chromebook-x86/coreboot/coreboot_start.S | 29 +++ board/chromebook-x86/coreboot/coreboot_start16.S | 46 +++ 5 files changed, 252 insertions(+), 0 deletions(-) create mode 100644 board/chromebook-x86/coreboot/Makefile create mode 100644 board/chromebook-x86/coreboot/coreboot.c create mode 100644 board/chromebook-x86/coreboot/coreboot_pci.c create mode 100644 board/chromebook-x86/coreboot/coreboot_start.S create mode 100644 board/chromebook-x86/coreboot/coreboot_start16.S diff --git a/board/chromebook-x86/coreboot/Makefile b/board/chromebook-x86/coreboot/Makefile new file mode 100644 index 000..635f69d --- /dev/null +++ b/board/chromebook-x86/coreboot/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# (C) Copyright 2008 +# Graeme Russ, graeme.r...@gmail.com. +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2002 +# Daniel Engstr�m, Omicron Ceti AB, dan...@omicron.se. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS-y+= coreboot.o +COBJS-$(CONFIG_PCI) += coreboot_pci.o +SOBJS-y+= coreboot_start16.o +SOBJS-y+= coreboot_start.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/chromebook-x86/coreboot/coreboot.c b/board/chromebook-x86/coreboot/coreboot.c new file mode 100644 index 000..251358a --- /dev/null +++ b/board/chromebook-x86/coreboot/coreboot.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * (C) Copyright 2008 + * Graeme Russ, graeme.r...@gmail.com. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include asm/u-boot-x86.h +#include flash.h +#include netdev.h + +#ifdef CONFIG_HW_WATCHDOG +#include watchdog.h +#endif + +DECLARE_GLOBAL_DATA_PTR; + +unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN; + + +/* + * Miscellaneous platform dependent initializations + */ +int board_early_init_f(void) +{ + return 0; +} + +int board_early_init_r(void) +{ + /* CPU Speed to 100MHz */ + gd-cpu_clk = 1; + + /* Crystal is 33.000MHz */ + gd-bus_clk = 3300; + + return 0; +} + +void show_boot_progress(int val) +{ +} + + +int last_stage_init(void) +{ + return 0; +} + +#ifndef CONFIG_SYS_NO_FLASH +ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) +{ + return 0; +} +#endif + +int board_eth_init(bd_t *bis) +{ + return pci_eth_init(bis); +} + +void setup_pcat_compatibility() +{ +} + +#ifdef CONFIG_HW_WATCHDOG +void hw_watchdog_reset(void) +{ +} +#endif
Re: [U-Boot] [PATCH] [x86] Add a basic implementation for a coreboot board
On Friday 04 November 2011 16:52:39 Gabe Black wrote: --- /dev/null +++ b/board/chromebook-x86/coreboot/Makefile +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend dead code - drop --- /dev/null +++ b/board/chromebook-x86/coreboot/coreboot.c +#ifdef CONFIG_HW_WATCHDOG +#include watchdog.h +#endif ... +#ifdef CONFIG_HW_WATCHDOG +void hw_watchdog_reset(void) +{ +} +#endif looks like useless code ... just delete it ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Stefano, Le 04/11/2011 07:47, Stefano Babic a écrit : Hi Albert, please pull from u-boot-imx. The following changes since commit 92e86c8daed649a9e9ddd6c0b52d61cb25b62c3a: Davinci: ea20: added PREBOOT to configuration (2011-11-03 22:56:26 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master Anatolij Gustschin (1): imx: imx31_phycore.h: fix checkpatch warnings Fabio Estevam (10): mx53evk: Remove unneeded '1' from mx53evk.h mx53loco: Remove unused get_board_rev function mx53evk: Add RTC support mx53evk: Remove unused get_board_rev function mx53ard: Remove unused get_board_rev function mx53smd: Remove unused get_board_rev function vision2: Remove unused get_board_rev function mx53: Turn off child clocks before reconfigure perclk_root README: Fix supported i.MX SoC list for CONFIG_MXC_SPI mx31pdk: Enable D and I caches Wolfgang Denk (1): qong: enable support for compressed images Wolfgang Grandegger (1): ehci-mxc: remove incorrect comment README |2 +- arch/arm/cpu/armv7/mx5/lowlevel_init.S | 15 +++ board/freescale/mx31pdk/mx31pdk.c |8 ++ board/freescale/mx53ard/mx53ard.c |5 - board/freescale/mx53evk/mx53evk.c |5 - board/freescale/mx53loco/mx53loco.c|5 - board/freescale/mx53smd/mx53smd.c |5 - board/ttcontrol/vision2/vision2.c |9 -- drivers/usb/host/ehci-mxc.c|1 - include/configs/imx31_phycore.h| 153 +-- include/configs/mx53ard.h |1 - include/configs/mx53evk.h | 17 ++-- include/configs/mx53loco.h |1 - include/configs/mx53smd.h |1 - include/configs/qong.h |5 +- include/configs/vision2.h |1 - 16 files changed, 121 insertions(+), 113 deletions(-) Applied to u-boot-arm/master (once rebased, as I had applied u-boot-ti first), thanks! Best regards, Stefano Babic Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arch/powerpc/lib/board.c: fix build warning
On Friday 04 November 2011 02:47:04 Kumar Gala wrote: On Nov 4, 2011, at 1:44 AM, Kumar Gala wrote: On Nov 3, 2011, at 2:09 PM, Wolfgang Denk wrote: Wolfgang Denk wrote: Commit 1272592 powerpc: Use getenv_ulong() in place of getenv(), strtoul instroduced a build warning for some PPC systems: board.c: In function 'board_init_r': board.c:626: warning: unused variable 's' Fix it. Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk I'm still seeing this warning when building MPC8536DS_config I think we need to revert this now. so post a revert of a9f4fc3fe571cc99260b063ad0ff291d31bafed0 I don't see why you'd need it. Wolfgang's patch was written before Simon's, but they both ended up getting merged when we only needed one of them ... -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-nds32
On Friday 04 November 2011 03:02:21 馬克泡 wrote: However, I've found there is an error when I push to custodian repo. error: refs/tags/2009.01-rc2 does not point to a valid object! Should I delete this tag, too? 2009.01-rc2 is not a tag that came from Wolfgang's tree (the official tag would have been v2009.01-rc2), so that means it's a tag of your own. whether you delete it is up to you. seems the nds32 tree is missing a lot of tags from Wolfgang's tree ... try doing `git push --tags` ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc: Revert arch/powerpc/lib/board.c: fix build warning
This reverts commit a9f4fc3fe571cc99260b063ad0ff291d31bafed0. commit aab773a47a8f7f40b9d7c4877853b00d22fb1347 already fixed the issue. Signed-off-by: Kim Phillips kim.phill...@freescale.com --- arch/powerpc/lib/board.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 3a1b375..508075f 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -625,9 +625,7 @@ void board_init_r (gd_t *id, ulong dest_addr) { bd_t *bd; ulong malloc_start; -#if defined(CONFIG_SYS_FLASH_CHECKSUM) || defined(CONFIG_CMD_NET) - char *s; -#endif + #ifndef CONFIG_SYS_NO_FLASH ulong flash_size; #endif -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] [x86] Add a basic implementation for a coreboot board
From: Gabe Black gabebl...@google.com Signed-off-by: Gabe Black gabebl...@chromium.org --- Changes in v2: Get rid of some dead/unnecessary code in the Makefile and coreboot.c. board/chromebook-x86/coreboot/Makefile | 53 +++ board/chromebook-x86/coreboot/coreboot.c | 77 ++ board/chromebook-x86/coreboot/coreboot_pci.c | 30 + board/chromebook-x86/coreboot/coreboot_start.S | 29 board/chromebook-x86/coreboot/coreboot_start16.S | 46 + 5 files changed, 235 insertions(+), 0 deletions(-) create mode 100644 board/chromebook-x86/coreboot/Makefile create mode 100644 board/chromebook-x86/coreboot/coreboot.c create mode 100644 board/chromebook-x86/coreboot/coreboot_pci.c create mode 100644 board/chromebook-x86/coreboot/coreboot_start.S create mode 100644 board/chromebook-x86/coreboot/coreboot_start16.S diff --git a/board/chromebook-x86/coreboot/Makefile b/board/chromebook-x86/coreboot/Makefile new file mode 100644 index 000..dbeee50 --- /dev/null +++ b/board/chromebook-x86/coreboot/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# (C) Copyright 2008 +# Graeme Russ, graeme.r...@gmail.com. +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2002 +# Daniel Engstr�m, Omicron Ceti AB, dan...@omicron.se. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS-y+= coreboot.o +COBJS-$(CONFIG_PCI) += coreboot_pci.o +SOBJS-y+= coreboot_start16.o +SOBJS-y+= coreboot_start.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/chromebook-x86/coreboot/coreboot.c b/board/chromebook-x86/coreboot/coreboot.c new file mode 100644 index 000..88e4223 --- /dev/null +++ b/board/chromebook-x86/coreboot/coreboot.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * (C) Copyright 2008 + * Graeme Russ, graeme.r...@gmail.com. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include asm/u-boot-x86.h +#include flash.h +#include netdev.h + +DECLARE_GLOBAL_DATA_PTR; + +unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN; + +/* + * Miscellaneous platform dependent initializations + */ +int board_early_init_f(void) +{ + return 0; +} + +int board_early_init_r(void) +{ + /* CPU Speed to 100MHz */ + gd-cpu_clk = 1; + + /* Crystal is 33.000MHz */ + gd-bus_clk = 3300; + + return 0; +} + +void show_boot_progress(int val) +{ +} + + +int last_stage_init(void) +{ + return 0; +} + +#ifndef CONFIG_SYS_NO_FLASH +ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) +{ + return 0; +} +#endif + +int board_eth_init(bd_t *bis) +{ + return pci_eth_init(bis); +} + +void setup_pcat_compatibility() +{ +} diff --git a/board/chromebook-x86/coreboot/coreboot_pci.c b/board/chromebook-x86/coreboot/coreboot_pci.c new file
[U-Boot] [PATCH] matrix vision: fix MVBLM7, MVSMR build error
when a mkimage binary isn't present in the default system PATH, we get this error: $ ./MAKEALL MVBLM7 Configuring for MVBLM7 board... make[1]: mkimage: Command not found make[1]: *** [libmvblm7.o] Error 127 make: *** [board/matrix_vision/mvblm7/libmvblm7.o] Error 2 powerpc-linux-gnu-size: './u-boot': No such file fix by referencing u-boot's built-in mkimage instead. Signed-off-by: Kim Phillips kim.phill...@freescale.com --- board/matrix_vision/mvblm7/Makefile |2 +- board/matrix_vision/mvsmr/Makefile |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/matrix_vision/mvblm7/Makefile b/board/matrix_vision/mvblm7/Makefile index 81761ca..48a602c 100644 --- a/board/matrix_vision/mvblm7/Makefile +++ b/board/matrix_vision/mvblm7/Makefile @@ -32,7 +32,7 @@ SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB):$(obj).depend $(OBJS) $(call cmd_link_o_target, $(OBJS)) - @mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img + @$(OBJTREE)/tools/mkimage -T script -C none -n M7_script -d bootscript $(obj)bootscript.img # diff --git a/board/matrix_vision/mvsmr/Makefile b/board/matrix_vision/mvsmr/Makefile index 37b9bac..bb77eff 100644 --- a/board/matrix_vision/mvsmr/Makefile +++ b/board/matrix_vision/mvsmr/Makefile @@ -36,7 +36,7 @@ SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(obj).depend $(OBJS) $(call cmd_link_o_target, $(OBJS)) - @mkimage -T script -C none -n mvSMR_Script -d bootscript $(obj)bootscript.img + @$(OBJTREE)/tools/mkimage -T script -C none -n mvSMR_Script -d bootscript $(obj)bootscript.img # -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] nds32: toolchains for building ?
On Friday 04 November 2011 04:24:51 馬克泡 wrote: It's pity that only you can found the toolchain with full source from public is very old. I can give you the url as follows. http://osdk.andestech.com/ yes, i d/l-ed that monster of a .rar (which contains .tar.gz which themselves contain .tar.gz .), but the linker in there segfaults for me :( for people who want to try building u-boot but skip d/lin a 100MB+ rar, i've ripped things apart and posted it here as 3MiB: http://dev.gentoo.org/~vapier/u-boot/nds32.tar.xz Configuring for adp-ag101 board... board.c:107: warning: 'pmu_init' defined but not used cmd_bdinfo.c:489: warning: 'print_lnum' defined but not used cmd_mmc.c: In function `do_mmcops': cmd_mmc.c:230: warning: comparison is always false due to limited range of data type cmd_mmc.c:245: warning: comparison is always false due to limited range of data type ns16550.c: In function `NS16550_init': ns16550.c:44: warning: passing arg 2 of `writeb' makes pointer from integer without a cast /bin/sh: line 1: 28408 Segmentation fault (core dumped) nds32le-linux-ld --gc-sections --relax -T u-boot.lds -Bstatic -Ttext 0x0320 $UNDEF_SYM arch/nds32/cpu/n1213/start.o --start-group api/libapi.o arch/nds32/cpu/n1213/ag101/libag101.o arch/nds32/cpu/n1213/libn1213.o arch/nds32/lib/libnds32.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/zlib/libz.o net/libnet.o post/libpost.o board/AndesTech/adp-ag101/libadp- ag101.o --end-group -L /usr/local/src/u-boot/toolchains/nds32le- linux/bin/../lib/gcc/nds32le-linux/3.4.4 -lgcc -Map u-boot.map -o u-boot make: *** [u-boot] Error 139 -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] [x86] Add a basic implementation for a coreboot board
i'm not terribly familiar with what it takes to make an x86 board, but i don't see anything jumping out of this patch. i would note however that you should merge the boards.cfg update into this patch. merging one or the other doesn't make much sense, and there's no reason to keep them split. +void setup_pcat_compatibility() should be (void) -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] [x86] Add a basic implementation for a coreboot board
The early startup code is in arch/x86/cpu/start.S or start16.S depending on the state of the CPU when u-boot is entered, and this code is called back into at various points during startup. You can see that those callbacks stubbed out where there's a label and then a jump back immediately after it, for instance here: +board_init16: + jmp board_init16_ret I have no problem merging the commits, but I'll wait for Graeme to weigh in since it's a little easier to merge them than to unmerge them. Gabe On Fri, Nov 4, 2011 at 3:24 PM, Mike Frysinger vap...@gentoo.org wrote: i'm not terribly familiar with what it takes to make an x86 board, but i don't see anything jumping out of this patch. i would note however that you should merge the boards.cfg update into this patch. merging one or the other doesn't make much sense, and there's no reason to keep them split. +void setup_pcat_compatibility() should be (void) -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] [x86] Add a basic implementation for a coreboot board
On Friday 04 November 2011 18:33:16 Gabe Black wrote: The early startup code is in arch/x86/cpu/start.S or start16.S depending on the state of the CPU when u-boot is entered, and this code is called back into at various points during startup. You can see that those callbacks stubbed out where there's a label and then a jump back immediately after it, for instance here: when i said jumping out, i meant nothing jumps out at me as being wrong ;) -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] mvgbe: fix network device indices
On Friday 04 November 2011 02:29:24 Prafulla Wadaskar wrote: Mike Frysinger: On Thursday 03 November 2011 19:02:26 Michael Walle wrote: Am Donnerstag 03 November 2011, 19:10:57 schrieb Mike Frysinger: On Thursday 27 October 2011 17:31:36 Michael Walle wrote: --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c + /* Extract the MAC address from the environment */ + while (!eth_getenv_enetaddr_by_index(eth, dev-index, + dev-enetaddr)) { /* Generate Private MAC addr if not set */ dev-enetaddr[0] = 0x02; dev-enetaddr[1] = 0x50; this is wrong. net drivers should not be touching the env at all. please fix your driver to not do that first. i guess this whole mac randomization/generation code belongs to board specific files. correct We can move mac randomization code to the board specific files, but it will be needed for each board and there will be code duplication. there's two issues here. (1) no net driver should touch the env. this is why we have the dev-enetaddr field in the first place. (2) drivers should be seeding dev-enetaddr with values from storage directly related to it. so for parts that have dedicated EEPROM interfaces, reading the MAC out of that storage makes sense. if no storage like that exists, then it is up to the board to figure out where to find the address. that means this could should be moved to the boards file. How about supporting standalone mac randomization feature? i think Wolfgang would be opposed to that. mac randomization should not be the first line of defense. your board is supposed to be managing this sanely. from the mvgbe code, it seems that this is not the case and these boards are a bit insane. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] Add limits.h to hold basic limits
On Friday 04 November 2011 01:14:08 Simon Glass wrote: On Thu, Nov 3, 2011 at 7:33 PM, Mike Frysinger wrote: On Monday 10 October 2011 15:22:29 Simon Glass wrote: This brings a basic limits.h implementation into U-Boot. sorry to jump in so late, but i think this was the correct way to go. copying pasting the same defines throughout the tree doesn't make much sense. this would also make it easier to grab changes from Linux since they're the same. Well Albert was pretty keen on leaving this out. Next time we need INT_MAX somewhere, or see someone defining it in a patch, we can think about adding limits.h. his complaint was that there was one consumer. we now have two. and in both cases, it's because we imported code from Linux. i would take the position that even if there is just one consumer (ubifs in this case), we should be importing this. although it might make more sense to have this in linux/limits.h. only downside there is that the upstream Linux code (oddly) places these in linux/kernel.h instead of linux/limits.h. but i think i can live with that idiosyncrasy. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] nds32: toolchains for building ?
On Friday 04 November 2011 18:22:32 Mike Frysinger wrote: On Friday 04 November 2011 04:24:51 馬克泡 wrote: It's pity that only you can found the toolchain with full source from public is very old. I can give you the url as follows. http://osdk.andestech.com/ yes, i d/l-ed that monster of a .rar (which contains .tar.gz which themselves contain .tar.gz .), but the linker in there segfaults for me :( seems to partially be due to the nds32 u-boot.lds not handling .data.rel sections which a few objects have, so the linker just arbitrarily appends them. you should probably tweak the linker script, perhaps like so: --- a/arch/nds32/cpu/n1213/u-boot.lds +++ b/arch/nds32/cpu/n1213/u-boot.lds @@ -41,7 +41,7 @@ SECTIONS .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } . = ALIGN(4); - .data : { *(.data) } + .data : { *(.data*) } . = ALIGN(4); fixing that though just gets me a diff bug: nds32le-linux-ld: BFD 2.16.91 internal error, aborting at ../../bfd/section.c line 1229 in bfd_map_over_sections nds32le-linux-ld: Please report this bug. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] [x86] Add a target for running as a coreboot payload
Dear Gabe Black, In message 1320438740-20752-1-git-send-email-gabebl...@chromium.org you wrote: From: Gabe Black gabebl...@google.com Add a target for running u-boot as a coreboot payload in boards.cfg. Signed-off-by: Gabe Black gabebl...@chromium.org --- Changes in v2: Change capitalization of the x86 tag. Changes in v3: Move the Signed-off-by line up. boards.cfg |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Can you please squash the related patches into useful sets? This patch alone makes no sense. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de I still miss my ex-wife, but my aim is getting better. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [x86] Add a basic implementation for a coreboot board
Dear Gabe Black, In message 1320439959-23095-1-git-send-email-gabebl...@chromium.org you wrote: ... +void show_boot_progress(int val) +{ +} Drop the empty function, and don't enable the feature. + + Don;t waste vertical space. Please fix globally. +int last_stage_init(void) +{ + return 0; +} Can we not avoind all these empty functions? +void setup_pcat_compatibility() +{ +} And again... +#ifdef CONFIG_HW_WATCHDOG +void hw_watchdog_reset(void) +{ +} +#endif And again. NAK. Please clean this up. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The best things in life are for a fee. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [x86] Add a basic implementation for a coreboot board
Dear Gabe Black, In message 1320439959-23095-1-git-send-email-gabebl...@chromium.org you wrote: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Please try to avoid this. Patchwork will drop your patches. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A Puritan is someone who is deathly afraid that someone, somewhere, is having fun. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] [x86] Add a basic implementation for a coreboot board
Dear Gabe Black, In message 1320443602-2677-1-git-send-email-gabebl...@chromium.org you wrote: --===1488196431== Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Gabe Black gabebl...@google.com Signed-off-by: Gabe Black gabebl...@chromium.org --- Changes in v2: Get rid of some dead/unnecessary code in the Makefile and coreboot.c. v2 ? ... +int board_early_init_f(void) +{ + return 0; +} Drop empty functions. + /* CPU Speed to 100MHz */ + gd-cpu_clk = 1; + + /* Crystal is 33.000MHz */ + gd-bus_clk = 3300; You should use #defines for these. +void show_boot_progress(int val) +{ +} + + +int last_stage_init(void) +{ + return 0; +} + +#ifndef CONFIG_SYS_NO_FLASH +ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) +{ + return 0; +} +#endif Drop empty functions. +void setup_pcat_compatibility() +{ +} Drop empty functions. +void pci_init_board(void) +{ +} Drop empty functions. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de They say, well, meybe it _is_ smelly, maybe it _is_ overcrowded, may- be it _is_ a bit like Hell would be if they shut the fires off and stabled a herd of incontinent cows there for a year, but you must admit that it is full of sheer, vibrant, dynamic _life_. - Terry Pratchett, _Moving Pictures_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] matrix vision: fix MVBLM7, MVSMR build error
Dear Kim Phillips, In message 2004164356.5ab650e3a7af28de76f55...@freescale.com you wrote: when a mkimage binary isn't present in the default system PATH, we get this error: Yes - so what? When the cross compiler is not in your path, you will get errors, and so you will when make is missing, or the shell... Sorry, but we really don't need that. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de COBOL is for morons. -- E.W. Dijkstra ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/8] tegra2: Add arch_cpu_init() to fire up Cortex-A9
We want to move away from a special Tegra2 start-up, and just use arch_cpu_init() instead. However, if we run board_init_f() from boot we need to build it for ARMv4T, since the Tegra's AVP start-up CPU does not support ARMv7. The effect of this is to do the AVP init earlier, and in arch_cpu_init(), rather that board_early_init_f(). Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Move Makefile armv4t flags from arch/arm/lib to Tegra's config.mk Changes in v4: - Remove unneed CONFIG_TEGRA2 in Tegra's config.mk arch/arm/cpu/armv7/tegra2/board.c | 15 +++ arch/arm/cpu/armv7/tegra2/config.mk |4 board/nvidia/common/board.c |3 --- board/nvidia/common/board.h |1 - include/configs/tegra2-common.h |1 + 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c index 751102d..4530194 100644 --- a/arch/arm/cpu/armv7/tegra2/board.c +++ b/arch/arm/cpu/armv7/tegra2/board.c @@ -23,6 +23,7 @@ #include common.h #include asm/io.h +#include ap20.h #include asm/arch/sys_proto.h #include asm/arch/tegra2.h #include asm/arch/pmc.h @@ -86,3 +87,17 @@ int checkboard(void) return 0; } #endif /* CONFIG_DISPLAY_BOARDINFO */ + +#ifdef CONFIG_ARCH_CPU_INIT +/* + * Note this function is executed by the ARM7TDMI AVP. It does not return + * in this case. It is also called once the A9 starts up, but does nothing in + * that case. + */ +int arch_cpu_init(void) +{ + /* Fire up the Cortex A9 */ + tegra2_start(); + return 0; +} +#endif diff --git a/arch/arm/cpu/armv7/tegra2/config.mk b/arch/arm/cpu/armv7/tegra2/config.mk index 96c0795..1335804 100644 --- a/arch/arm/cpu/armv7/tegra2/config.mk +++ b/arch/arm/cpu/armv7/tegra2/config.mk @@ -26,3 +26,7 @@ # Use ARMv4 for Tegra2 - initial code runs on the AVP, which is an ARM7TDI. PLATFORM_CPPFLAGS += -march=armv4 + +# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this +# file with compatible flags +CFLAGS_arch/arm/lib/board.o += -march=armv4t diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c index 0f12de2..56850cc 100644 --- a/board/nvidia/common/board.c +++ b/board/nvidia/common/board.c @@ -125,9 +125,6 @@ int board_early_init_f(void) /* Initialize periph GPIOs */ gpio_config_uart(); - - /* Init UART, scratch regs, and start CPU */ - tegra2_start(); return 0; } #endif /* EARLY_INIT */ diff --git a/board/nvidia/common/board.h b/board/nvidia/common/board.h index 35acbca..1f57086 100644 --- a/board/nvidia/common/board.h +++ b/board/nvidia/common/board.h @@ -24,7 +24,6 @@ #ifndef _BOARD_H_ #define _BOARD_H_ -void tegra2_start(void); void gpio_config_uart(void); int tegra2_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio); diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index a9c665c..bdf7eab 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -35,6 +35,7 @@ #define CONFIG_SYS_CACHELINE_SIZE 32 +#define CONFIG_ARCH_CPU_INIT /* Fire up the A9 core */ #define CONFIG_ENABLE_CORTEXA9 /* enable CPU (A9 complex) */ #include asm/arch/tegra2.h /* get chip and board defs */ -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/8] tegra2: Add arch_cpu_init() to fire up Cortex-A9
Hi Mike, On Thu, Nov 3, 2011 at 7:17 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 31 October 2011 18:03:05 Simon Glass wrote: --- a/arch/arm/cpu/armv7/tegra2/config.mk +++ b/arch/arm/cpu/armv7/tegra2/config.mk # Use ARMv4 for Tegra2 - initial code runs on the AVP, which is an ARM7TDI. PLATFORM_CPPFLAGS += -march=armv4 + +# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this +# file with compatible flags +ifdef CONFIG_TEGRA2 +CFLAGS_arch/arm/lib/board.o += -march=armv4t +endif do you need this CONFIG_TEGRA2 check ? this is in tegra2/config.mk already. -mike No not needed - will send a new patch with this removed. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/8] tegra2: Tidy up boot path
Hi Mike, On Thu, Nov 3, 2011 at 7:39 PM, Mike Frysinger vap...@gentoo.org wrote: things generally look fine, but i don't know anything about low level SoC init, so i can't contribute much there -mike Thanks for looking at them. Mostly this series is just trying to simplify things. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] Add limits.h to hold basic limits
Hi Mike, On Fri, Nov 4, 2011 at 4:09 PM, Mike Frysinger vap...@gentoo.org wrote: On Friday 04 November 2011 01:14:08 Simon Glass wrote: On Thu, Nov 3, 2011 at 7:33 PM, Mike Frysinger wrote: On Monday 10 October 2011 15:22:29 Simon Glass wrote: This brings a basic limits.h implementation into U-Boot. sorry to jump in so late, but i think this was the correct way to go. copying pasting the same defines throughout the tree doesn't make much sense. this would also make it easier to grab changes from Linux since they're the same. Well Albert was pretty keen on leaving this out. Next time we need INT_MAX somewhere, or see someone defining it in a patch, we can think about adding limits.h. his complaint was that there was one consumer. we now have two. and in both cases, it's because we imported code from Linux. My snprintf() patch series added the second so Albert was aware of that. Also note it has not been merged yet. i would take the position that even if there is just one consumer (ubifs in this case), we should be importing this. although it might make more sense to have this in linux/limits.h. only downside there is that the upstream Linux code (oddly) places these in linux/kernel.h instead of linux/limits.h. but i think i can live with that idiosyncrasy. -mike Will let you and Albert discuss it over a beer :-) Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v8 4/4] mpc8313erdb: Enable GPIO support on the MPC8313E RDB
Signed-off-by: Joe Hershberger joe.hershber...@ni.com Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Kim Phillips kim.phill...@freescale.com --- Changes for v2: - Moved changes to board/freescale/mpc8313erdb/mpc8313erdb.c from patch 1/2 Changes for v3: - Renamed gpio_init_* to mpc83xx_gpio_init_* - Added board_early_init_r support to MPC8313ERDB targets Changes for v4: - Fixed build warning Changes for v5: Changes for v6: Changes for v7: - checkpatch compliance Changes for v8: board/freescale/mpc8313erdb/mpc8313erdb.c | 15 +++ include/configs/MPC8313ERDB.h |9 +++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 08f873d..730ec4e 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -31,6 +31,9 @@ #include vsc7385.h #include ns16550.h #include nand.h +#if defined(CONFIG_MPC83XX_GPIO) !defined(CONFIG_NAND_SPL) +#include asm/gpio.h +#endif DECLARE_GLOBAL_DATA_PTR; @@ -42,6 +45,18 @@ int board_early_init_f(void) if (im-pmc.pmccr1 PMCCR1_POWER_OFF) gd-flags |= GD_FLG_SILENT; #endif +#if defined(CONFIG_MPC83XX_GPIO) !defined(CONFIG_NAND_SPL) + mpc83xx_gpio_init_f(); +#endif + + return 0; +} + +int board_early_init_r(void) +{ +#if defined(CONFIG_MPC83XX_GPIO) !defined(CONFIG_NAND_SPL) + mpc83xx_gpio_init_r(); +#endif return 0; } diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index 31503af..39bdcf8 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -82,7 +82,8 @@ #define CONFIG_SYS_CLK_FREQCONFIG_83XX_CLKIN -#define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ +#define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f */ +#define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r */ #define CONFIG_SYS_IMMR0xE000 @@ -363,6 +364,9 @@ #define CONFIG_OF_BOARD_SETUP 1 #define CONFIG_OF_STDOUT_VIA_ALIAS 1 +#define CONFIG_MPC83XX_GPIO 1 +#define CONFIG_CMD_GPIO 1 + /* * Serial Port */ @@ -581,7 +585,8 @@ /* System IO Config */ #define CONFIG_SYS_SICRH (SICRH_TSOBI1 | SICRH_TSOBI2) /* RGMII */ -#define CONFIG_SYS_SICRL SICRL_USBDR_10 /* Enable Internal USB Phy */ + /* Enable Internal USB Phy and GPIO on LCD Connector */ +#define CONFIG_SYS_SICRL (SICRL_USBDR_10 | SICRL_LBC) #define CONFIG_SYS_HID0_INIT 0x0 #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \ -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic
ARM boards should use the generic GPIO API Update the existing gpio implementations to conform the the generic API Signed-off-by: Joe Hershberger joe.hershber...@ni.com Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Kim Phillips kim.phill...@freescale.com --- Changes for v4: - Split out of patch 1/2 Changes for v5: - Moved asm/arch/gpio.h include to asm/gpio.h Changes for v6: Changes for v7: Changes for v8: - Include omap-common/gpio.c in retrofit arch/arm/cpu/armv7/omap-common/gpio.c | 23 +++-- arch/arm/include/asm/gpio.h | 38 + drivers/gpio/da8xx_gpio.c | 73 +++ drivers/gpio/tegra2_gpio.c| 160 4 files changed, 128 insertions(+), 166 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/gpio.c b/arch/arm/cpu/armv7/omap-common/gpio.c index 75a02da..fc62acc 100644 --- a/arch/arm/cpu/armv7/omap-common/gpio.c +++ b/arch/arm/cpu/armv7/omap-common/gpio.c @@ -36,7 +36,7 @@ * published by the Free Software Foundation. */ #include common.h -#include asm/arch/gpio.h +#include asm/gpio.h #include asm/io.h #include asm/errno.h @@ -142,20 +142,22 @@ static void _set_gpio_dataout(const struct gpio_bank *bank, int gpio, /** * Set value of the specified gpio */ -void gpio_set_value(int gpio, int value) +int gpio_set_value(unsigned gpio, int value) { const struct gpio_bank *bank; if (check_gpio(gpio) 0) - return; + return -1; bank = get_gpio_bank(gpio); _set_gpio_dataout(bank, get_gpio_index(gpio), value); + + return 0; } /** * Get value of the specified gpio */ -int gpio_get_value(int gpio) +int gpio_get_value(unsigned gpio) { const struct gpio_bank *bank; void *reg; @@ -176,11 +178,11 @@ int gpio_get_value(int gpio) reg += OMAP_GPIO_DATAOUT; break; default: - return -EINVAL; + return -1; } break; default: - return -EINVAL; + return -1; } return (__raw_readl(reg) (1 get_gpio_index(gpio))) != 0; @@ -194,7 +196,7 @@ int gpio_direction_input(unsigned gpio) const struct gpio_bank *bank; if (check_gpio(gpio) 0) - return -EINVAL; + return -1; bank = get_gpio_bank(gpio); _set_gpio_direction(bank, get_gpio_index(gpio), 1); @@ -210,7 +212,7 @@ int gpio_direction_output(unsigned gpio, int value) const struct gpio_bank *bank; if (check_gpio(gpio) 0) - return -EINVAL; + return -1; bank = get_gpio_bank(gpio); _set_gpio_dataout(bank, get_gpio_index(gpio), value); @@ -224,7 +226,7 @@ int gpio_direction_output(unsigned gpio, int value) * * NOTE: Argument 'label' is unused. */ -int gpio_request(int gpio, const char *label) +int gpio_request(unsigned gpio, const char *label) { if (check_gpio(gpio) 0) return -EINVAL; @@ -235,6 +237,7 @@ int gpio_request(int gpio, const char *label) /** * Reset and free the gpio after using it. */ -void gpio_free(unsigned gpio) +int gpio_free(unsigned gpio) { + return 0; } diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index eb071d1..d49ad08 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h @@ -1,38 +1,2 @@ -/* - * Copyright (c) 2011, NVIDIA Corp. All rights reserved. - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#ifndef _GPIO_H_ -#define _GPIO_H_ - #include asm/arch/gpio.h -/* - * Generic GPIO API - */ - -int gpio_request(int gp, const char *label); -void gpio_free(int gp); -void gpio_toggle_value(int gp); -int gpio_direction_input(int gp); -int gpio_direction_output(int gp, int value); -int gpio_get_value(int gp); -void gpio_set_value(int gp, int value); - -#endif /* _GPIO_H_ */ +#include asm-generic/gpio.h diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c index 7a15614..9c2df44 100644 --- a/drivers/gpio/da8xx_gpio.c +++ b/drivers/gpio/da8xx_gpio.c @@ -181,90 +181,85 @@ static
[U-Boot] [PATCH v8 1/4] gpio: Modify common gpio.h to more closely match Linux
Change int gp to unsigned gpio Add request and free entry-points Signed-off-by: Joe Hershberger joe.hershber...@ni.com Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Kim Phillips kim.phill...@freescale.com --- Changes for v6: - Linuxize gpio API Changes for v7: - checkpatch compliance Changes for v8: - Rebase onto 9d2cb8e8e6a3650613eab95c1b30023e81beb15c include/asm-generic/gpio.h | 39 +++ 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index a1ebb28..65d2708 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2011 The Chromium OS Authors. + * Copyright (c) 2011, NVIDIA Corp. All rights reserved. * See file CREDITS for list of people who contributed to this * project. * @@ -19,6 +20,9 @@ * MA 02111-1307 USA */ +#ifndef _ASM_GENERIC_GPIO_H_ +#define _ASM_GENERIC_GPIO_H_ + /* * Generic GPIO API for U-Boot * @@ -38,37 +42,56 @@ */ /** + * Request ownership of a GPIO. + * + * @param gpio GPIO number + * @param labelName given to the GPIO + * @return 0 if ok, -1 on error + */ +int gpio_request(unsigned gpio, const char *label); + +/** + * Stop using the GPIO. + * + * @param gpio GPIO number + * @return 0 if ok, -1 on error + */ +int gpio_free(unsigned gpio); + +/** * Make a GPIO an input. * - * @param gp GPIO number + * @param gpio GPIO number * @return 0 if ok, -1 on error */ -int gpio_direction_input(int gp); +int gpio_direction_input(unsigned gpio); /** * Make a GPIO an output, and set its value. * - * @param gp GPIO number + * @param gpio GPIO number * @param valueGPIO value (0 for low or 1 for high) * @return 0 if ok, -1 on error */ -int gpio_direction_output(int gp, int value); +int gpio_direction_output(unsigned gpio, int value); /** * Get a GPIO's value. This will work whether the GPIO is an input * or an output. * - * @param gp GPIO number + * @param gpio GPIO number * @return 0 if low, 1 if high, -1 on error */ -int gpio_get_value(int gp); +int gpio_get_value(unsigned gpio); /** * Set an output GPIO's value. The GPIO must already be an output of * this function may have no effect. * - * @param gp GPIO number + * @param gpio GPIO number * @param valueGPIO value (0 for low or 1 for high) * @return 0 if ok, -1 on error */ -int gpio_set_value(int gp, int value); +int gpio_set_value(unsigned gpio, int value); + +#endif /* _ASM_GENERIC_GPIO_H_ */ -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v8 3/4] mpc83xx: Add a GPIO driver for the MPC83XX family
Signed-off-by: Joe Hershberger joe.hershber...@ni.com Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Kim Phillips kim.phill...@freescale.com --- Changes for v2: - Improved names of INIT constants (to include CONFIG_) - Moved changes to board/freescale/mpc8313erdb/mpc8313erdb.c to patch 2/2 Changes for v3: - gpio_init_* is now mpc83xx_gpio_init_* Changes for v4: - no volatile - no camelCase - use i/o accessors Changes for v5: Changes for v6: - update to use new GPIO API Changes for v7: - checkpatch compliance Changes for v8: arch/powerpc/include/asm/arch-mpc83xx/gpio.h | 38 + arch/powerpc/include/asm/gpio.h |2 + drivers/gpio/Makefile|1 + drivers/gpio/mpc83xx_gpio.c | 198 ++ 4 files changed, 239 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/include/asm/arch-mpc83xx/gpio.h create mode 100644 arch/powerpc/include/asm/gpio.h create mode 100644 drivers/gpio/mpc83xx_gpio.c diff --git a/arch/powerpc/include/asm/arch-mpc83xx/gpio.h b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h new file mode 100644 index 000..6b2d9ab --- /dev/null +++ b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h @@ -0,0 +1,38 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _MPC83XX_GPIO_H_ +#define _MPC83XX_GPIO_H_ + +/* + * The MCP83xx's 1-2 GPIO controllers each with 32 bits. + */ +#if defined(CONFIG_MPC8313) || defined(CONFIG_MPC8308) || \ + defined(CONFIG_MPC8315) + #define MPC83XX_GPIO_CTRLRS 1 +#elif defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x) + #define MPC83XX_GPIO_CTRLRS 2 +#else + #define MPC83XX_GPIO_CTRLRS 0 +#endif + +#define MAX_NUM_GPIOS (32 * MPC83XX_GPIO_CTRLRS) + +void mpc83xx_gpio_init_f(void); +void mpc83xx_gpio_init_r(void); + +#endif /* MPC83XX_GPIO_H_ */ diff --git a/arch/powerpc/include/asm/gpio.h b/arch/powerpc/include/asm/gpio.h new file mode 100644 index 000..d49ad08 --- /dev/null +++ b/arch/powerpc/include/asm/gpio.h @@ -0,0 +1,2 @@ +#include asm/arch/gpio.h +#include asm-generic/gpio.h diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index f505813..77a1c70 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -35,6 +35,7 @@ COBJS-$(CONFIG_PCA9698) += pca9698.o COBJS-$(CONFIG_S5P)+= s5p_gpio.o COBJS-$(CONFIG_TEGRA2_GPIO)+= tegra2_gpio.o COBJS-$(CONFIG_DA8XX_GPIO) += da8xx_gpio.o +COBJS-$(CONFIG_MPC83XX_GPIO) += mpc83xx_gpio.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/gpio/mpc83xx_gpio.c b/drivers/gpio/mpc83xx_gpio.c new file mode 100644 index 000..5483fd8 --- /dev/null +++ b/drivers/gpio/mpc83xx_gpio.c @@ -0,0 +1,198 @@ +/* + * Freescale MPC83xx GPIO handling. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include mpc83xx.h +#include asm/gpio.h +#include asm/io.h + +#ifndef CONFIG_MPC83XX_GPIO_0_INIT_DIRECTION + #define CONFIG_MPC83XX_GPIO_0_INIT_DIRECTION 0 +#endif +#ifndef CONFIG_MPC83XX_GPIO_1_INIT_DIRECTION + #define CONFIG_MPC83XX_GPIO_1_INIT_DIRECTION 0 +#endif +#ifndef CONFIG_MPC83XX_GPIO_0_INIT_OPEN_DRAIN + #define CONFIG_MPC83XX_GPIO_0_INIT_OPEN_DRAIN 0 +#endif +#ifndef CONFIG_MPC83XX_GPIO_1_INIT_OPEN_DRAIN + #define CONFIG_MPC83XX_GPIO_1_INIT_OPEN_DRAIN 0 +#endif +#ifndef CONFIG_MPC83XX_GPIO_0_INIT_VALUE + #define CONFIG_MPC83XX_GPIO_0_INIT_VALUE 0 +#endif +#ifndef CONFIG_MPC83XX_GPIO_1_INIT_VALUE + #define
Re: [U-Boot] Pull request: u-boot-nds32
Hi Mike, 2011/11/5 Mike Frysinger vap...@gentoo.org: 2009.01-rc2 is not a tag that came from Wolfgang's tree (the official tag would have been v2009.01-rc2), so that means it's a tag of your own. whether you delete it is up to you. seems the nds32 tree is missing a lot of tags from Wolfgang's tree ... try doing `git push --tags` ? -mike I've never set up this tag whether in local or in remote. (Andestech commit the u-boot code back to mainline since 2010.) It comes every time when I clone the code from remote custodian's tree. I'll delete it and add Wolfgang's tag to nds32 tree. Thanks! -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] nds32: toolchains for building ?
Hi Mike, 2011/11/5 Mike Frysinger vap...@gentoo.org: On Friday 04 November 2011 18:22:32 Mike Frysinger wrote: On Friday 04 November 2011 04:24:51 馬克泡 wrote: It's pity that only you can found the toolchain with full source from public is very old. I can give you the url as follows. http://osdk.andestech.com/ yes, i d/l-ed that monster of a .rar (which contains .tar.gz which themselves contain .tar.gz .), but the linker in there segfaults for me :( The old toolchain contains a lot of bugs, even the implementation of rpath has problems. Please do not waste your time! I'll try to get one for you next week. :) -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/56] arch/powerpc/cpu/mpc5xxx/i2c.c: fix GC 4.6 build warnings
Fix: i2c.c: In function 'wait_for_bb': i2c.c:104:16: warning: variable 'temp' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Heiko Schocher h...@denx.de --- arch/powerpc/cpu/mpc5xxx/i2c.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc5xxx/i2c.c b/arch/powerpc/cpu/mpc5xxx/i2c.c index f9d293b..b423d2f 100644 --- a/arch/powerpc/cpu/mpc5xxx/i2c.c +++ b/arch/powerpc/cpu/mpc5xxx/i2c.c @@ -100,14 +100,11 @@ static int wait_for_bb(void) status = mpc_reg_in(regs-msr); while (timeout-- (status I2C_BB)) { -#if 1 - volatile int temp; mpc_reg_out(regs-mcr, I2C_STA, I2C_STA); - temp = mpc_reg_in(regs-mdr); + (void)mpc_reg_in(regs-mdr); mpc_reg_out(regs-mcr, 0, I2C_STA); mpc_reg_out(regs-mcr, 0, 0); mpc_reg_out(regs-mcr, I2C_EN, 0); -#endif udelay(15); status = mpc_reg_in(regs-msr); } -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/56] arch/powerpc/lib/board.c: fix build warning
Fix: board.c: In function 'board_init_r': board.c:633:8: warning: unused variable 's' [-Wunused-variable] Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 35992ae..ff5888e 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -629,9 +629,6 @@ void board_init_r(gd_t *id, ulong dest_addr) bd_t *bd; ulong malloc_start; -#if defined(CONFIG_SYS_FLASH_CHECKSUM) || defined(CONFIG_CMD_NET) - char *s; -#endif #ifndef CONFIG_SYS_NO_FLASH ulong flash_size; #endif -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/56] board/mpl/common/flash.c: fix GCC 4.6 build warning
Fix: ../common/flash.c: In function 'flash_erase': ../common/flash.c:603:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Denis Peter d.pe...@mpl.ch --- board/mpl/common/flash.c | 15 +-- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c index 61f031a..81d7271 100644 --- a/board/mpl/common/flash.c +++ b/board/mpl/common/flash.c @@ -600,7 +600,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) { volatile FLASH_WORD_SIZE *addr = (FLASH_WORD_SIZE *)(info-start[0]); volatile FLASH_WORD_SIZE *addr2; - int flag, prot, sect, l_sect; + int flag, prot, sect; int i, rcode = 0; @@ -632,8 +632,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) printf (\n); } - l_sect = -1; - /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); @@ -672,7 +670,6 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) rcode |= wait_for_DQ7(info, sect); } } - l_sect = sect; /* * Wait for each sector to complete, it's more * reliable. According to AMD Spec, you must @@ -691,16 +688,6 @@ intflash_erase (flash_info_t *info, int s_first, int s_last) /* wait at least 80us - let's wait 1 ms */ udelay (1000); -#if 0 - /* -* We wait for the last triggered sector -*/ - if (l_sect 0) - goto DONE; - wait_for_DQ7(info, l_sect); - -DONE: -#endif /* reset to read mode */ addr = (FLASH_WORD_SIZE *)info-start[0]; addr[0] = (FLASH_WORD_SIZE)0x00F000F0; /* reset bank */ -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/56] board/tqc/tqm5200/cmd_stk52xx.c: fix GC 4.6 build warnings
Fix: cmd_stk52xx.c: In function 'spi_transmit': cmd_stk52xx.c:85:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] cmd_stk52xx.c: In function 'i2s_play_wave': cmd_stk52xx.c:199:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Wolfgang Denk w...@denx.de --- board/tqc/tqm5200/cmd_stk52xx.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/board/tqc/tqm5200/cmd_stk52xx.c b/board/tqc/tqm5200/cmd_stk52xx.c index 0789c58..c40f7f0 100644 --- a/board/tqc/tqm5200/cmd_stk52xx.c +++ b/board/tqc/tqm5200/cmd_stk52xx.c @@ -82,18 +82,17 @@ static void spi_init(void) static int spi_transmit(unsigned char data) { - int dummy; struct mpc5xxx_spi *spi = (struct mpc5xxx_spi*)MPC5XXX_SPI; spi-dr = data; /* wait for SPI transmission completed */ - while(!(spi-sr 0x80)) - { - if (spi-sr 0x40) /* if write collision occured */ - { + while (!(spi-sr 0x80)) { + if (spi-sr 0x40) { /* if write collision occured */ + int dummy; + /* do dummy read to clear status register */ dummy = spi-dr; - printf (SPI write collision\n); + printf(SPI write collision: dr=0x%x\n, dummy); return -1; } } @@ -172,10 +171,8 @@ static void i2s_init(void) psc-ccr = 0x1F03; /* 16 bit data width; 5.617MHz MCLK */ psc-ctur = 0x0F; /* 16 bit frame width */ - for(i=0;i128;i++) - { + for (i = 0; i 128; i++) psc-psc_buffer_32 = 0; /* clear tx fifo */ - } } static int i2s_play_wave(unsigned long addr, unsigned long len) @@ -183,7 +180,6 @@ static int i2s_play_wave(unsigned long addr, unsigned long len) unsigned long i; unsigned char *wave_file = (uchar *)addr + 44; /* quick'n dirty: skip * wav header*/ - unsigned char swapped[4]; struct mpc5xxx_psc *psc = (struct mpc5xxx_psc*)MPC5XXX_PSC2; /* @@ -192,11 +188,16 @@ static int i2s_play_wave(unsigned long addr, unsigned long len) psc-command = (PSC_RX_ENABLE | PSC_TX_ENABLE); for(i = 0;i (len / 4); i++) { + unsigned char swapped[4]; + unsigned long *p = (unsigned long*)swapped; + swapped[3] = *wave_file++; swapped[2] = *wave_file++; swapped[1] = *wave_file++; swapped[0] = *wave_file++; - psc-psc_buffer_32 = *((unsigned long*)swapped); + + psc-psc_buffer_32 = *p; + while (psc-tfnum 400) { if(ctrlc()) return 0; -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/56] drivers/video/videomodes.c: fix GCC 4.6 build warning
Fix: videomodes.c: In function 'video_get_params': videomodes.c:162:13: warning: variable 't' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de --- drivers/video/videomodes.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c index 6fe5811..ef9bc4c 100644 --- a/drivers/video/videomodes.c +++ b/drivers/video/videomodes.c @@ -159,15 +159,18 @@ video_search_param (char *start, char *param) int video_get_params (struct ctfb_res_modes *pPar, char *penv) { char *p, *s, *val_s; - int i = 0, t; + int i = 0; int bpp; int mode; + /* first search for the environment containing the real param string */ s = penv; - if ((p = getenv (s)) != NULL) { + + if ((p = getenv (s)) != NULL) s = p; - } - /* in case of the bootargs line, we have to start + + /* +* in case of the bootargs line, we have to start * after video=ctfb: */ i = video_search_param (s, video=ctfb:); @@ -177,19 +180,22 @@ int video_get_params (struct ctfb_res_modes *pPar, char *penv) } /* search for mode as a default value */ p = s; - t = 0; mode = 0; /* default */ + while ((i = video_get_param_len (p, ',')) != 0) { GET_OPTION (mode:, mode) p += i; if (*p != 0) p++;/* skip ',' */ } + if (mode = RES_MODES_COUNT) mode = 0; + *pPar = res_mode_init[mode];/* copy default values */ bpp = 24 - ((mode % 3) * 8); p = s; /* restart */ + while ((i = video_get_param_len (p, ',')) != 0) { GET_OPTION (x:, pPar-xres) GET_OPTION (y:, pPar-yres) -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 21/56] board/kup/common/pcmcia.c: Fix GCC 4.6 compiler warnings
Fix: ../common/pcmcia.c: In function 'pcmcia_hardware_enable': ../common/pcmcia.c:23:20: warning: variable 'immap' set but not used [-Wunused-but-set-variable] ../common/pcmcia.c: In function 'pcmcia_voltage_set': ../common/pcmcia.c:152:20: warning: variable 'immap' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Klaus Heydeck heyd...@kieback-peter.de --- board/kup/common/pcmcia.c | 42 +++--- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/board/kup/common/pcmcia.c b/board/kup/common/pcmcia.c index ce6b186..61ba586 100644 --- a/board/kup/common/pcmcia.c +++ b/board/kup/common/pcmcia.c @@ -20,7 +20,6 @@ int pcmcia_hardware_enable(int slot) { - volatile immap_t*immap; volatile cpm8xx_t *cp; volatile pcmconf8xx_t *pcmp; volatile sysconf8xx_t *sysp; @@ -30,15 +29,14 @@ int pcmcia_hardware_enable(int slot) udelay(1); - immap = (immap_t *)CONFIG_SYS_IMMR; sysp = (sysconf8xx_t *)immap_t *)CONFIG_SYS_IMMR)-im_siu_conf)); pcmp = (pcmconf8xx_t *)immap_t *)CONFIG_SYS_IMMR)-im_pcmcia)); cp= (cpm8xx_t *)immap_t *)CONFIG_SYS_IMMR)-im_cpm)); /* - * Configure SIUMCR to enable PCMCIA port B - * (VFLS[0:1] are not used for debugging, we connect FRZ# instead) - */ +* Configure SIUMCR to enable PCMCIA port B +* (VFLS[0:1] are not used for debugging, we connect FRZ# instead) +*/ sysp-sc_siumcr = ~SIUMCR_DBGC11; /* set DBGC to 00 */ /* clear interrupt state, and disable interrupts */ @@ -46,9 +44,9 @@ int pcmcia_hardware_enable(int slot) pcmp-pcmc_per = ~PCMCIA_MASK(slot); /* - * Disable interrupts, DMA, and PCMCIA buffers - * (isolate the interface) and assert RESET signal - */ +* Disable interrupts, DMA, and PCMCIA buffers +* (isolate the interface) and assert RESET signal +*/ debug (Disable PCMCIA buffers and assert RESET\n); reg = 0; reg |= __MY_PCMCIA_GCRX_CXRESET;/* active high */ @@ -57,9 +55,9 @@ int pcmcia_hardware_enable(int slot) udelay(2500); /* - * Configure Port B pins for - * 3 Volts enable - */ +* Configure Port B pins for +* 3 Volts enable +*/ if (slot) { /* Slot A is built-in */ cp-cp_pbdir |= KUP4K_PCMCIA_B_3V3; cp-cp_pbpar = ~KUP4K_PCMCIA_B_3V3; @@ -67,8 +65,8 @@ int pcmcia_hardware_enable(int slot) cp-cp_pbdat |= KUP4K_PCMCIA_B_3V3; /* active low */ } /* - * Make sure there is a card in the slot, then configure the interface. - */ +* Make sure there is a card in the slot, then configure the interface. +*/ udelay(1); debug ([%d] %s: PIPR(%p)=0x%x\n, __LINE__,__FUNCTION__, @@ -79,8 +77,8 @@ int pcmcia_hardware_enable(int slot) } /* - * Power On. - */ +* Power On. +*/ printf(%s Slot %c:, slot ? : \n, 'A' + slot); mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot); reg = pcmp-pcmc_pipr; @@ -149,7 +147,6 @@ int pcmcia_hardware_disable(int slot) int pcmcia_voltage_set(int slot, int vcc, int vpp) { - volatile immap_t*immap; volatile cpm8xx_t *cp; volatile pcmconf8xx_t *pcmp; u_long reg; @@ -162,14 +159,13 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) if (!slot) /* Slot A is not configurable */ return 0; - immap = (immap_t *)CONFIG_SYS_IMMR; pcmp = (pcmconf8xx_t *)immap_t *)CONFIG_SYS_IMMR)-im_pcmcia)); cp= (cpm8xx_t *)immap_t *)CONFIG_SYS_IMMR)-im_cpm)); /* - * Disable PCMCIA buffers (isolate the interface) - * and assert RESET signal - */ +* Disable PCMCIA buffers (isolate the interface) +* and assert RESET signal +*/ debug (Disable PCMCIA buffers and assert RESET\n); reg = PCMCIA_PGCRX(slot); reg |= __MY_PCMCIA_GCRX_CXRESET;/* active high */ @@ -179,9 +175,9 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) debug (PCMCIA power OFF\n); /* - * Configure Port B pins for - * 3 Volts enable - */ +* Configure Port B pins for +* 3 Volts enable +*/ cp-cp_pbdir |= KUP4K_PCMCIA_B_3V3; cp-cp_pbpar = ~KUP4K_PCMCIA_B_3V3; /* remove all power */ -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/56] drivers/rtc/ds3231.c: fix GCC 4.6 build warnings
Fix: ds3231.c: In function 'rtc_get': ds3231.c:90:52: warning: variable 'control' set but not used [-Wunused-but-set-variable] Fix is done by switching to standard debug() instead of custom macro. Signed-off-by: Wolfgang Denk w...@denx.de --- drivers/rtc/ds3231.c | 16 +++- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c index 134a0e4..ae59cfb 100644 --- a/drivers/rtc/ds3231.c +++ b/drivers/rtc/ds3231.c @@ -35,16 +35,6 @@ #if defined(CONFIG_CMD_DATE) -/*-*/ -#undef DEBUG_RTC - -#ifdef DEBUG_RTC -#define DEBUGR(fmt,args...) printf(fmt ,##args) -#else -#define DEBUGR(fmt,args...) -#endif -/*-*/ - /* * RTC register addresses */ @@ -99,7 +89,7 @@ int rtc_get (struct rtc_time *tmp) mon_cent = rtc_read (RTC_MON_REG_ADDR); year = rtc_read (RTC_YR_REG_ADDR); - DEBUGR (Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x + debug(Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x hr: %02x min: %02x sec: %02x control: %02x status: %02x\n, year, mon_cent, mday, wday, hour, min, sec, control, status); @@ -121,7 +111,7 @@ int rtc_get (struct rtc_time *tmp) tmp-tm_yday = 0; tmp-tm_isdst= 0; - DEBUGR (Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n, + debug(Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n, tmp-tm_year, tmp-tm_mon, tmp-tm_mday, tmp-tm_wday, tmp-tm_hour, tmp-tm_min, tmp-tm_sec); @@ -136,7 +126,7 @@ int rtc_set (struct rtc_time *tmp) { uchar century; - DEBUGR (Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n, + debug(Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n, tmp-tm_year, tmp-tm_mon, tmp-tm_mday, tmp-tm_wday, tmp-tm_hour, tmp-tm_min, tmp-tm_sec); -- 1.7.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/56] arch/powerpc/lib/board.c: make (mostly) checkpatch-clean
CodingStyle cleanup. Accepted (in this cleanup) checkpatch messages: - externs should be avoided (to be cleaned up later) - no spaces at the start of a line (accepted in multi-line #if's) - Macros with complex values (false reports) - do not use assignment in if condition (accepted in one place, where avoiding it would have required an additional level of nesting, resulting in less readable code) Signed-off-by: Wolfgang Denk w...@denx.de --- arch/powerpc/lib/board.c | 455 -- 1 files changed, 234 insertions(+), 221 deletions(-) diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 3a1b375..35992ae 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2010 + * (C) Copyright 2000-2011 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. * * See file CREDITS for list of people who contributed to this @@ -88,7 +88,7 @@ #endif #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE -extern int update_flash_size (int flash_size); +extern int update_flash_size(int flash_size); #endif #if defined(CONFIG_SC3) @@ -96,7 +96,7 @@ extern void sc3_read_eeprom(void); #endif #if defined(CONFIG_CMD_DOC) -void doc_init (void); +void doc_init(void); #endif #if defined(CONFIG_HARD_I2C) || \ defined(CONFIG_SOFT_I2C) @@ -130,9 +130,8 @@ ulong monitor_flash_len; #include bedbug/type.h #endif -/ - * Utilities * - +/* + * Utilities */ /* @@ -147,16 +146,16 @@ ulong monitor_flash_len; * argument, and returns an integer return code, where 0 means * continue and != 0 means fatal error, hang the system. */ -typedef int (init_fnc_t) (void); +typedef int (init_fnc_t)(void); -/ - * Init Utilities * - +/* + * Init Utilities + * * Some of this code should be moved into the core functions, * but let's get it working (again) first... */ -static int init_baudrate (void) +static int init_baudrate(void) { gd-baudrate = getenv_ulong(baudrate, 10, CONFIG_BAUDRATE); return 0; @@ -168,7 +167,9 @@ void __board_add_ram_info(int use_default) { /* please define platform specific board_add_ram_info() */ } -void board_add_ram_info(int) __attribute__((weak, alias(__board_add_ram_info))); + +void board_add_ram_info(int) + __attribute__ ((weak, alias(__board_add_ram_info))); int __board_flash_wp_on(void) { @@ -179,80 +180,86 @@ int __board_flash_wp_on(void) */ return 0; } -int board_flash_wp_on(void) __attribute__((weak, alias(__board_flash_wp_on))); + +int board_flash_wp_on(void) + __attribute__ ((weak, alias(__board_flash_wp_on))); void __cpu_secondary_init_r(void) { } + void cpu_secondary_init_r(void) -__attribute__((weak, alias(__cpu_secondary_init_r))); + __attribute__ ((weak, alias(__cpu_secondary_init_r))); -static int init_func_ram (void) +static int init_func_ram(void) { #ifdef CONFIG_BOARD_TYPES int board_type = gd-board_type; #else int board_type = 0; /* use dummy arg */ #endif - puts (DRAM: ); + puts(DRAM: ); - if ((gd-ram_size = initdram (board_type)) 0) { - print_size (gd-ram_size, ); + gd-ram_size = initdram(board_type); + + if (gd-ram_size 0) { + print_size(gd-ram_size, ); board_add_ram_info(0); putc('\n'); - return (0); + return 0; } - puts (failed); - return (1); + puts(failed); + return 1; } /***/ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) -static int init_func_i2c (void) +static int init_func_i2c(void) { - puts (I2C: ); - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - puts (ready\n); - return (0); + puts(I2C: ); + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); + puts(ready\n); + return 0; } #endif #if defined(CONFIG_HARD_SPI) -static int init_func_spi (void) +static int init_func_spi(void) { - puts (SPI: ); - spi_init (); - puts (ready\n); - return (0); + puts(SPI: ); + spi_init(); + puts(ready\n); + return 0; } #endif /***/ #if defined(CONFIG_WATCHDOG) -static int init_func_watchdog_init (void) +static int init_func_watchdog_init(void) { - puts ( Watchdog enabled\n); - WATCHDOG_RESET (); - return (0); +