Re: [U-Boot] [PATCH v2 6/7] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Michael, Sorry for the long delay... Michael Jones wrote: This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- Changes for v2: - None. Resubmitting to include custodian in cc: drivers/i2c/omap24xx_i2c.c | 134 ++- 1 files changed, 56 insertions(+), 78 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 966ffc4..4ae03bc 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c [...] @@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) { int i; + u16 status; + int i2c_error = 0; if (alen 1) { - printf (I2C read: addr len %d not supported\n, alen); + printf(I2C write: addr len %d not supported\n, alen); return 1; } if (addr + len 256) { - printf (I2C read: address out of range\n); + printf(I2C write: address 0x%x + 0x%x out of range\n); return 1; } + /* wait until bus not busy */ + wait_for_bb(); + + /* start address phase - will write regoffset + len bytes data */ + /* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ Do we have this usecase? + writew(alen+len, i2c_base-cnt); please change to alen + len + /* set slave address */ + writew(chip, i2c_base-sa); + /* stop bit needed here */ + writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | + I2C_CON_STP, i2c_base-con); + + /* Send address byte */ + status = wait_for_pin(); + + if (status == 0 || status I2C_STAT_NACK) { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); Can you change this printf to output some more info, instead __func__, __LINE__? + goto write_exit; + } + + if (status I2C_STAT_XRDY) { + writeb(addr 0xFF, i2c_base-data); + writew(I2C_STAT_XRDY, i2c_base-stat); + } else { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); here too. + goto write_exit; + } + + /* address phase is over, now write data */ for (i = 0; i len; i++) { - if (i2c_write_byte (chip, addr + i, buffer[i])) { - printf (I2C read: I/O error\n); - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - return 1; + status = wait_for_pin(); + + if (status == 0 || status I2C_STAT_NACK) { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, + __func__, __LINE__, status); also here ... + goto write_exit; + } + + if (status I2C_STAT_XRDY) { + writeb(buffer[i], i2c_base-data); + writew(I2C_STAT_XRDY, i2c_base-stat); + } else { + i2c_error = 1; + printf(%s:%d i=%d error status=0x%x\n, + __func__, __LINE__, i, status); and here. + goto write_exit; } } - return 0; +write_exit: + flush_fifo(); + writew(0x, i2c_base-stat); + return i2c_error; } static void wait_for_bb (void) bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm, davinci: replace CONFIG_PRELOADER with CONFIG_SPL_BUILD
Signed-off-by: Heiko Schocher h...@denx.de --- board/davinci/common/misc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c index 6103339..fed4900 100644 --- a/board/davinci/common/misc.c +++ b/board/davinci/common/misc.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; -#ifndef CONFIG_PRELOADER +#ifndef CONFIG_SPL_BUILD int dram_init(void) { /* dram_init must store complete ramsize in gd-ram_size */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] problem with mpc837x start.S
Hello, boys and girls, my name is shawn Bai. I am new here and hope not disturb you. Although I have not posted before, what you do is very helpful to me to understand what is bsp, how it runs, and so on. I don't know whether the question below is mentioned or not before. If yes, do you mind telling me where I can find the answer. Thanks in advance. The question is about arch\powerpc\cpu\83xx\start.S. the demo board I use is MPC837xERDB, there is 8MBytes Nor flash on it. by default, uboot is booted from lower address, it means BMS field in HRCW is 0, which will affect value of MSR[IP] later. First instruction locates at _start label in uboot. Before first instruction runs, hardware reset configuration word will be loaded to make some basic configuration. Before branching to MONITOR_BASE+in_flash using blr instruction, size of LCS0 is inflated to 4GBytes, and eLBC access window 1 is configured with BAR MONITOR_BASE, and SIZE 8MBytes. After this is done, blr to MONITOR_BASE+in_flash. after branching to MONITOR_BASE+in_flash, LCS0 BAR is modified to MONITOR_BASE, and its size is configured with 8Mbytes again. This is what I know. But the problem which is confused to me is after reset, the default value of LCS0 BAR is 0x_, and its size is 8Mbytes. In order to branch to MONITOR_BASE+in_flash, inlarge Nor flash to 4GB, and configure eLBC access window 1. But the actual size of Nor flash is 8MB , even after inlarging it, where (MONITOR_BASE+in_flash) points to? why? why does branching to in_flash need absolute address? and make absolute address like this? I rack my brains, but there is no result. Do you mind showing me a way? Thanks very much. Shawn Bai -- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ** ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] post, memory test: add memory_post_test() to include file
This include is needed, if this memory test is used outside from post code, for example booting with nand_spl, and using this memory test before copying u-boot code to RAM and jumping to it. Signed-off-by: Heiko Schocher h...@denx.de --- changes for v2: - make MAKEALL clean as Wolfgang Denk suggested - rebased against 7130a579fdba5dd1bf99508fb0b1d13317542109 include/post.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/post.h b/include/post.h index 3f259b7..3d23d22 100644 --- a/include/post.h +++ b/include/post.h @@ -147,6 +147,7 @@ unsigned long post_time_ms (unsigned long base); extern struct post_test post_list[]; extern unsigned int post_list_size; extern int post_hotkeys_pressed(void); +extern int memory_post_test(int flags); /* * If GCC is configured to use a version of GAS that supports -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] panic: remove warning 'noreturn' function does return
since commit commit d2e8b911c0a0661d395ccac72156040702ac842d Author: Mike Frysinger vap...@gentoo.org Date: Wed Jun 29 11:58:04 2011 + panic: add noreturn attribute I see the following warnings: vsprintf.c: In function 'panic': vsprintf.c:730: warning: 'noreturn' function does return for nearly all boards. This patch fixes this warning. Signed-off-by: Heiko Schocher h...@denx.de cc: Mike Frysinger vap...@gentoo.org --- lib/vsprintf.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3b924ec..c029fbb 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -727,4 +727,6 @@ void panic(const char *fmt, ...) udelay (10);/* allow messages to go out */ do_reset (NULL, 0, 0, NULL); #endif + while (1) + ; } -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] compiler warning associated with noreturn
On Tue, Jul 26, 2011 at 20:14, Kumar Gala wrote: With the following commit: commit d2e8b911c0a0661d395ccac72156040702ac842d Author: Mike Frysinger vap...@gentoo.org Date: Wed Jun 29 11:58:04 2011 + panic: add noreturn attribute we now get warnings like the following if we build MPC8540ADS_config: vsprintf.c: In function 'panic': vsprintf.c:730:1: warning: 'noreturn' function does return Seems like do_reset() needs a similar attribute? Or some other change? adding noreturn to do_reset() would be the way to go imo. i'm not sure if the common helpers would prevent this ? i'm traveling atm and wont be able to test for a while ... -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/7] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hi Heiko, Thanks for the review. On 07/27/2011 08:07 AM, Heiko Schocher wrote: Hello Michael, Sorry for the long delay... Michael Jones wrote: This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- Changes for v2: - None. Resubmitting to include custodian in cc: drivers/i2c/omap24xx_i2c.c | 134 ++- 1 files changed, 56 insertions(+), 78 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 966ffc4..4ae03bc 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c [...] @@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) { int i; +u16 status; +int i2c_error = 0; if (alen 1) { -printf (I2C read: addr len %d not supported\n, alen); +printf(I2C write: addr len %d not supported\n, alen); return 1; } if (addr + len 256) { -printf (I2C read: address out of range\n); +printf(I2C write: address 0x%x + 0x%x out of range\n); return 1; } +/* wait until bus not busy */ +wait_for_bb(); + +/* start address phase - will write regoffset + len bytes data */ +/* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ Do we have this usecase? I don't know, I assumed so, as there is the following #ifdef in the part I removed: #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ defined(CONFIG_OMAP44XX) #else /* there is code here that I didn't consider when replacing it. */ #endif +writew(alen+len, i2c_base-cnt); please change to alen + len OK. I thought checkpatch.pl would've found that. +/* set slave address */ +writew(chip, i2c_base-sa); +/* stop bit needed here */ +writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | +I2C_CON_STP, i2c_base-con); + +/* Send address byte */ +status = wait_for_pin(); + +if (status == 0 || status I2C_STAT_NACK) { +i2c_error = 1; +printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); Can you change this printf to output some more info, instead __func__, __LINE__? OK, I will make these more informative. Do you not want __func__ to be in the output? I originally put __LINE__ in as well because the strings were otherwise identical, so I'm fine with getting rid of that once the messages are unique. [snip] bye, Heiko Question about cosmetics: the README says In sources originating from U-Boot a style corresponding to Lindent -pcs (adding spaces before parameters to function calls) is actually used. Currently this is not uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file? -Michael MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] post: fix up I/O helper usage
On Tue, Jul 26, 2011 at 07:43, Wolfgang Denk wrote: Mike Frysinger you wrote: The I/O API from Linux defaults to little endian accesses. In order to do big endian accesses, there are a be variants. The le32 variants are arch-specific and not terribly common, so change it to the normal Linux API funcs. --- a/include/post.h +++ b/include/post.h @@ -78,12 +78,12 @@ static inline ulong post_word_load (void) { - return in_le32((volatile void *)(_POST_WORD_ADDR)); + return inl((volatile void *)(_POST_WORD_ADDR)); } Is this supposed to fix any real problem, or just a change according to your personal preferences? the in_le32 funcs (and all the other related le32 helpers) never made it into the common Linux API and many ports (such as the Blackfin arch) never defined them. so it fixes building for all the ports which lack in_le32. i dont have a source tree by me atm, but i'd imagine that this is most arches. -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-boot 2010v6 ERROR
Dear Mr/Ms I want to run U-boot 2010v6 and i have set version 4.3.1 arm-linux-gcc as my cross compiler. the board which i am working with is sbc2410x. i first make the configuration file of my board and then i entered make all instruction i got the following error. Please help me to solve the problem! arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_udivsi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_udivsi3.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_divsi3.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_umodsi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_umodsi3.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_modsi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_modsi3.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_dvmd_lnx.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_dvmd_lnx.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_lshrdi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_lshrdi3.oS) arm-linux-ld: ERROR: /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_ashldi3.oS) uses hardware FP, whereas u-boot uses software FP arm-linux-ld: failed to merge target specific data of file /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_ashldi3.oS) /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_udivsi3.oS)(.text+0xec):/work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/gcc/config/arm/lib1funcs.asm:615: relocation truncated to fit: R_ARM_PLT32 __div0 /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_divsi3.oS)(.text+0x11c):/work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/gcc/config/arm/lib1funcs.asm:735: relocation truncated to fit: R_ARM_PLT32 __div0 /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_umodsi3.oS)(.text+0xc0):/work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/gcc/config/arm/lib1funcs.asm:656: relocation truncated to fit: R_ARM_PLT32 __div0 /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/libgcc.a(_modsi3.oS)(.text+0xd8):/work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/gcc/config/arm/lib1funcs.asm:795: relocation truncated to fit: R_ARM_PLT32 __div0 make: *** [u-boot] Error 1 regards soltaniyeh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/7] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Hello Michael, Michael Jones wrote: Hi Heiko, Thanks for the review. On 07/27/2011 08:07 AM, Heiko Schocher wrote: Hello Michael, Sorry for the long delay... Michael Jones wrote: This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- Changes for v2: - None. Resubmitting to include custodian in cc: drivers/i2c/omap24xx_i2c.c | 134 ++- 1 files changed, 56 insertions(+), 78 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 966ffc4..4ae03bc 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c [...] @@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) { int i; + u16 status; + int i2c_error = 0; if (alen 1) { - printf (I2C read: addr len %d not supported\n, alen); + printf(I2C write: addr len %d not supported\n, alen); return 1; } if (addr + len 256) { - printf (I2C read: address out of range\n); + printf(I2C write: address 0x%x + 0x%x out of range\n); return 1; } + /* wait until bus not busy */ + wait_for_bb(); + + /* start address phase - will write regoffset + len bytes data */ + /* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ Do we have this usecase? I don't know, I assumed so, as there is the following #ifdef in the part I removed: #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ defined(CONFIG_OMAP44XX) #else /* there is code here that I didn't consider when replacing it. */ #endif Hmm.. I have to look at this deeper, but your patch shouldn;t break any existing board... + writew(alen+len, i2c_base-cnt); please change to alen + len OK. I thought checkpatch.pl would've found that. Yes, I also checked your patch with checkpatch, but it didn;t found this ... + /* set slave address */ + writew(chip, i2c_base-sa); + /* stop bit needed here */ + writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | + I2C_CON_STP, i2c_base-con); + + /* Send address byte */ + status = wait_for_pin(); + + if (status == 0 || status I2C_STAT_NACK) { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); Can you change this printf to output some more info, instead __func__, __LINE__? OK, I will make these more informative. Do you not want __func__ to be in the output? I originally put __LINE__ in as well because the strings were otherwise identical, so I'm fine with getting rid of that once the messages are unique. Thanks! I think, we don;t need __func__ and __LINE__, if you make informative printfs ... [snip] bye, Heiko Question about cosmetics: the README says In sources originating from U-Boot a style corresponding to Lindent -pcs (adding spaces before parameters to function calls) is actually used. Currently this is not uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file? We should get this checkpatch compatible. If you do such a cosmetic change, please split this in a seperate patch, thanks! bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Business Proposal
Business Proposal I contacted you independently of our investigation and no one is informed of this communication. I would like to intimate you with certain facts that I believe would be of interest to you. In 2004, the subject matter; ref: bb/rbs/bank/0012 came to our bank to engage in business discussions with our Private Banking Services Department. Write me back so that i can give you the full details of the transaction which I know will be beneficial to us. I await your swift response. Regards, John. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] savenv failing
Hi, I am saving the environment using saveenv command. After resetting the board the saved environment is not there. It loads the default environment. But if i disable dcache_enable () function call in arch/arm/lib/board.c it retain the saved environment. What can be the possible reason for this? Please suggest.. -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] savenv failing
On 07/27/2011 10:25 AM, Chander Kashyap wrote: Hi, I am saving the environment using saveenv command. After resetting the board the saved environment is not there. It loads the default environment. But if i disable dcache_enable () function call in arch/arm/lib/board.c it retain the saved environment. What can be the possible reason for this? Can you add some information regarding which processor you are using, where you store the environment (NOR, NAND, ...) and to confirm your U-Boot version ? 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][v2] powerpc/85xx: enable USB2 gadget mode for corenet ds board
Hi Kumar, How about this patch? There is no feedback till now. Best Regards, Shaohui Xie -Original Message- From: Xie Shaohui-B21989 Sent: Monday, July 18, 2011 2:11 PM To: u-boot@lists.denx.de Cc: Gala Kumar-B11780; li...@bohmer.net; Xie Shaohui-B21989 Subject: [PATCH][v2] powerpc/85xx: enable USB2 gadget mode for corenet ds board to make USB2 worked in gadget mode, we need to set it's 'dr_mode' to 'peripheral' in hwconfig, but driver starts scan from 'usb1', it'll break if it cannot find 'usb1', so we need to tell driver do not break until it scaned all the 'usbx' that the board may have. Signed-off-by: Shaohui Xie shaohui@freescale.com --- changes for v2: 1. fixed a typo in title. 2. Added some details in commit. arch/powerpc/cpu/mpc8xxx/fdt.c |3 ++- board/freescale/corenet_ds/corenet_ds.c |1 + include/configs/corenet_ds.h|2 ++ 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index d9e3e7e..60cb210 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) if (mode_idx 0 phy_idx 0) printf(WARNING: invalid phy or mode\n); } else { - break; + if (i CONFIG_SYS_USB_DEVICE) + break; } } if (!usb1_defined) { diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index cf9b7b8..b1e7823 100644 --- a/board/freescale/corenet_ds/corenet_ds.c +++ b/board/freescale/corenet_ds/corenet_ds.c @@ -236,6 +236,7 @@ void ft_board_setup(void *blob, bd_t *bd) #endif fdt_fixup_liodn(blob); + fdt_fixup_dr_usb(blob, bd); } int board_eth_init(bd_t *bis) diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index c9cc22a..2c86ba3 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -580,6 +580,8 @@ #define CONFIG_USB_EHCI_FSL #define CONFIG_EHCI_HCD_INIT_AFTER_RESET #define CONFIG_CMD_EXT2 +#define CONFIG_HAS_FSL_DR_USB +#define CONFIG_SYS_USB_DEVICE 2 #define CONFIG_MMC -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL
Dear Scott Wood, On 07/26/2011 08:04 PM, Scott Wood wrote: On Tue, 26 Jul 2011 14:09:16 +0200 Simon Schwarzsimonschwarz...@googlemail.com wrote: diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 8b598f6..cdc9a14 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -26,12 +26,16 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libnand.o ifdef CONFIG_CMD_NAND +ifdef CONFIG_SPL_BUILD +COBJS-y += nand_spl.o +else COBJS-y += nand.o COBJS-y += nand_base.o COBJS-y += nand_bbt.o -COBJS-y += nand_ecc.o COBJS-y += nand_ids.o COBJS-y += nand_util.o +endif +COBJS-y += nand_ecc.o You're assuming all NAND SPLs will want nand_ecc -- this will not fit in most current ones. True. I changed it to: ifdef CONFIG_SPL_BUILD COBJS-y += nand_spl.o ifdef CONFIG_OMAP34XX COBJS-y += nand_ecc.o endif else COBJS-y += nand.o COBJS-y += nand_base.o COBJS-y += nand_bbt.o COBJS-y += nand_ids.o COBJS-y += nand_util.o COBJS-y += nand_ecc.o endif Is there a simple way to write that without duplication of nand_ecc? Where is nand_spl.c, and what is in it that is appropriate for all targets? It is essentially the old nand_boot.c from nand_spl. It is added with this patch to drivers/mtd/nand/nand_spl.c So IMHO all boards which are activating the nand library for SPL need this one. There are some alternative implementations in the nand_spl - when they are added to the new SPL the devs may add switches as needed. -Scott Regards Thanks for your feedback! Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] Removed obsolete Netstal boards
Hi Niklaus, On Friday 22 July 2011 16:10:18 Niklaus Giger wrote: Signed-off-by: Niklaus Giger niklaus.gi...@member.fsf.org Patch is line wrapped. Please fix and resubmit. Thanks. Best regards, Stefan -- 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] [RFC PATCH] POST: add test before execution of post_run to avoid unneeded run
On 07/26/2011 05:44 PM, Wolfgang Denk wrote: Please try if omitting run_flags and testing if (post_list[i].flags flags) instead still has the intended effect. If so, then please resubmit a cleaned up patch. If not, then please explain in detail how your patch is supposed to work. I agree with you and will test this version and if it works resubmit the patch. -- Valentin Longchamp Embedded Software Engineer Hardware and Chip Integration __ KEYMILE AG Schwarzenburgstr. 73 CH-3097 Liebefeld Phone +41 31 377 1318 Fax +41 31 377 1212 valentin.longch...@keymile.com www.keymile.com __ KEYMILE: A Specialist as a Partner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 7/7] OMAP3: mvblx: Initial support for mvBlueLYNX-X
Hi Michael, On 07/18/11 18:00, Michael Jones wrote: Add support for the MATRIX VISION mvBlueLYNX-X, an OMAP3-based intelligent camera. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- Changes for v2: - None. Resubmitting to include custodian in cc: [...] new file mode 100644 index 000..1b8a005 --- /dev/null +++ b/board/matrix_vision/mvblx/mvblx.c [...] + +/* + * Routine: board_init + * Description: Early hardware init. + */ +int board_init(void) +{ + gpmc_init();/* in SRAM or SDRAM, finish GPMC */ + /* board id for Linux */ + gd-bd-bi_arch_number = MACH_TYPE_MVBLX; This should be done in the board config file. Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file). -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation
dear Igor, On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote: CONFIG_MACH_TYPE is used to set the machine type number in the common arm code instead of setting it in the board code. Boards with dynamically discoverable machine types can still set the machine type number in the board code. Signed-off-by: Igor Grinberg grinb...@compulab.co.il --- v2: Document the option as mandatory. Move the bi_arch_number setting to board_init_f() README | 10 ++ arch/arm/lib/board.c | 4 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/README b/README index 446966d..0b6802d 100644 --- a/README +++ b/README @@ -442,6 +442,16 @@ The following options need to be configured: crash. This is needed for buggy hardware (uc101) where no pull down resistor is connected to the signal IDE5V_DD7. + CONFIG_MACH_TYPE [relevant for ARM only][mandatory] + + This setting is mandatory for all boards that have only one + machine type and must be used to specify the machine type + number as it appears in the ARM machine registry + (see http://www.arm.linux.org.uk/developer/machines/). + Only boards that have multiple machine types supported + in a single configuration file and the machine type is + runtime discoverable, do not have to use this setting. + - vxWorks boot parameters: bootvx constructs a valid bootline using the following diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 169dfeb..9901694 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag) gd-mon_len = _bss_end_ofs; +#ifdef CONFIG_MACH_TYPE + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif + bd structure is not initialised by this time. It leads to u-boot hanging for my board. I fixed this problem but modifying it. Below is the patch attached for the same. for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001 From: Chander Kashyap chander.kash...@linaro.org Date: Wed, 27 Jul 2011 15:10:59 +0530 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number bi_arch_number is initialised using @arch/arm/lib/board.c \#ifdef CONFIG_MACH_TYPE gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ \#endif bd structure is not intialized by this time. This leads to u-boot hanging when CONFIG_MACH_TYPE is defined. Signed-off-by: Chander Kashyap chander.kash...@linaro.org --- arch/arm/lib/board.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index bcbf697..98a9bcc 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag) gd-mon_len = _bss_end_ofs; -#ifdef CONFIG_MACH_TYPE - gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ -#endif - for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag) gd-bd = bd; debug (Reserving %zu Bytes for Board Info at: %08lx\n, sizeof (bd_t), addr_sp); +#ifdef CONFIG_MACH_TYPE + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif addr_sp -= sizeof (gd_t); id = (gd_t *) addr_sp; debug (Reserving %zu Bytes for Global Data at: %08lx\n, -- 1.7.4.1 -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] MIPS: make config options more generic
This patch series contains cleanups and enhancements to consolidate the INCA-IP related config options and to make them more generic. Additionally, the cache operation mode is now configurable. All changes are needed to prepare the support of newer MIPS based Lantiq XWAY SoCs. Daniel Schwierzeck (4): MIPS: INCA-IP: rename inca-swap-bytes host tool MIPS: rename INFINEON_EBU_BOOTCFG to CONFIG_SYS_XWAY_EBU_BOOTFG MIPS: make cache operation mode configurable README: update MIPS related informations README | 35 +++- arch/mips/cpu/mips32/start.S | 19 ++--- include/configs/incaip.h |4 ++- tools/Makefile |8 +++--- tools/{inca-swap-bytes.c = xway-swap-bytes.c} |0 5 files changed, 56 insertions(+), 10 deletions(-) rename tools/{inca-swap-bytes.c = xway-swap-bytes.c} (100%) -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] MIPS: INCA-IP: rename inca-swap-bytes host tool
The INCA-IP SoC belongs to the Lantiq XWAY SoC product portfolio. For the upcoming support of other Lantiq SoC devices this tool should not solely depend on the INCA-IP board. Rename the tool to xway-swap-bytes and add an config option to enable compilation optionally. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- include/configs/incaip.h |2 ++ tools/Makefile |8 tools/{inca-swap-bytes.c = xway-swap-bytes.c} |0 3 files changed, 6 insertions(+), 4 deletions(-) rename tools/{inca-swap-bytes.c = xway-swap-bytes.c} (100%) diff --git a/include/configs/incaip.h b/include/configs/incaip.h index f2950e8..57eb2fa 100644 --- a/include/configs/incaip.h +++ b/include/configs/incaip.h @@ -31,6 +31,8 @@ #define CONFIG_MIPS32 1 /* MIPS 4Kc CPU core*/ #define CONFIG_INCA_IP 1 /* on a INCA-IP Board */ +#define CONFIG_XWAY_SWAP_BYTES + /* * Clock for the MIPS core (MHz) * allowed values: 1, 13300, and 15000 (default) diff --git a/tools/Makefile b/tools/Makefile index 97f83f8..7d77b43 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -43,7 +43,7 @@ ifneq ($(HOST_TOOLS_ALL),) CONFIG_LCD_LOGO = y CONFIG_CMD_LOADS = y CONFIG_CMD_NET = y -CONFIG_INCA_IP = y +CONFIG_XWAY_SWAP_BYTES = y CONFIG_NETCONSOLE = y CONFIG_SHA1_CHECK_UB_IMG = y endif @@ -65,7 +65,7 @@ BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) BIN_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX) BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX) BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX) -BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX) +BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) BIN_FILES-y += mkimage$(SFX) BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX) BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) @@ -85,7 +85,7 @@ OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc.o NOPED_OBJ_FILES-y += fit_image.o OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o -OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o +OBJ_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += mkimage.o @@ -175,7 +175,7 @@ $(obj)img2srec$(SFX): $(obj)img2srec.o $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ -$(obj)inca-swap-bytes$(SFX): $(obj)inca-swap-bytes.o +$(obj)xway-swap-bytes$(SFX): $(obj)xway-swap-bytes.o $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTSTRIP) $@ diff --git a/tools/inca-swap-bytes.c b/tools/xway-swap-bytes.c similarity index 100% rename from tools/inca-swap-bytes.c rename to tools/xway-swap-bytes.c -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] MIPS: rename INFINEON_EBU_BOOTCFG to CONFIG_SYS_XWAY_EBU_BOOTFG
This define is a board-specific config option and should be renamed to follow the U-Boot naming convention. Additionally, add an explaining comment for this option. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- arch/mips/cpu/mips32/start.S | 13 ++--- include/configs/incaip.h |2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S index 5d7467d..e829b02 100644 --- a/arch/mips/cpu/mips32/start.S +++ b/arch/mips/cpu/mips32/start.S @@ -64,9 +64,16 @@ _start: RVECENT(reset,0)# U-boot entry point RVECENT(reset,1)# software reboot -#ifdef CONFIG_INCA_IP - .word INFINEON_EBU_BOOTCFG # EBU init code, fetched during - .word 0x# booting phase of the flash +#ifdef CONFIG_SYS_XWAY_EBU_BOOTCFG + /* +* Almost all Lantiq XWAY SoC devices have an external bus unit (EBU) to +* access external NOR flashes. If the board boots from NOR flash the +* internal BootROM does a blind read at address 0xB010 to read the +* initial configuration for that EBU in order to access the flash +* device with correct parameters. This config option is board-specific. +*/ + .word CONFIG_SYS_XWAY_EBU_BOOTCFG + .word 0x #else RVECENT(romReserved,2) #endif diff --git a/include/configs/incaip.h b/include/configs/incaip.h index 57eb2fa..0e5ad2b 100644 --- a/include/configs/incaip.h +++ b/include/configs/incaip.h @@ -41,7 +41,7 @@ #define CONFIG_CPU_CLOCK_RATE 15000 #endif -#define INFINEON_EBU_BOOTCFG 0x40C4 /* CMULT = 8 */ +#define CONFIG_SYS_XWAY_EBU_BOOTCFG0x40C4 /* CMULT = 8 */ #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] MIPS: make cache operation mode configurable
Currently the cache operation mode is hard-coded to CONF_CM_CACHABLE_NONCOHERENT. This is not appropiate for CPUs or SOCs which operate at a different mode. This patch makes the cache operation mode configurable via board config. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- arch/mips/cpu/mips32/start.S |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S index e829b02..9c1b2f7 100644 --- a/arch/mips/cpu/mips32/start.S +++ b/arch/mips/cpu/mips32/start.S @@ -27,6 +27,10 @@ #include asm/regdef.h #include asm/mipsregs.h +#ifndef CONFIG_SYS_MIPS_CACHE_MODE +#define CONFIG_SYS_MIPS_CACHE_MODE CONF_CM_CACHABLE_NONCOHERENT +#endif + /* * For the moment disable interrupts, mark the kernel mode and * set ST0_KX so that the CPU does not spit fire when using @@ -249,7 +253,7 @@ reset: nop /* ... and enable them */ - li t0, CONF_CM_CACHABLE_NONCOHERENT + li t0, CONFIG_SYS_MIPS_CACHE_MODE mtc0t0, CP0_CONFIG #endif -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] README: update MIPS related informations
Amend section 'Directory Hierarchy' for current MIPS directory. Describe config options for MIPS. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- README | 35 ++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/README b/README index cb08816..62d2d44 100644 --- a/README +++ b/README @@ -180,6 +180,7 @@ Directory Hierarchy: /lib Architecture specific library files /mipsFiles generic to MIPS architecture /cpu CPU specific files + /mips32 Files specific to MIPS32 CPUs /lib Architecture specific library files /nios2 Files generic to Altera NIOS2 architecture /cpu CPU specific files @@ -382,6 +383,38 @@ The following options need to be configured: 2. The core frequency as calculated above is multiplied by this value. +- MIPS CPU options: + CONFIG_SYS_INIT_SP_OFFSET + + Offset relative to CONFIG_SYS_SDRAM_BASE for initial stack + pointer. This is needed for the temporary stack before + relocation. + + CONFIG_SYS_MIPS_CACHE_MODE + + Cache operation mode for the MIPS CPU. + See also arch/mips/include/asm/mipsregs.h. + Possible values are: + CONF_CM_CACHABLE_NO_WA + CONF_CM_CACHABLE_WA + CONF_CM_UNCACHED + CONF_CM_CACHABLE_NONCOHERENT + CONF_CM_CACHABLE_CE + CONF_CM_CACHABLE_COW + CONF_CM_CACHABLE_CUW + CONF_CM_CACHABLE_ACCELERATED + + CONFIG_SYS_XWAY_EBU_BOOTCFG + + Special option for Lantiq XWAY SoCs for booting from NOR flash. + See also arch/mips/cpu/mips32/start.S. + + CONFIG_XWAY_SWAP_BYTES + + Enable compilation of tools/xway-swap-bytes needed for Lantiq + XWAY SoCs for booting from NOR flash. The U-Boot image needs to + be swapped if a flash programmer is used. + - Linux Kernel Interface: CONFIG_CLOCKS_IN_MHZ @@ -3070,7 +3103,7 @@ Low Level (hardware related) configuration options: globally (CONFIG_CMD_MEM). - CONFIG_SKIP_LOWLEVEL_INIT - [ARM only] If this variable is defined, then certain + [ARM, MIPS only] If this variable is defined, then certain low level initializations (like setting up the memory controller) are omitted and/or U-Boot does not relocate itself into RAM. -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] __fsl_ddr_set_lawbar: ERROR (ctrl #0, intrlv=0)
On Jul 26, 2011, at 4:23 AM, Wolfgang Denk wrote: Dear Kumar Gala, In message fc7a4dae-b05c-49f3-9201-1b5bb559f...@kernel.crashing.org you wrote: Do you know if this board has any real reset on a FPGA or CPLD or something like that. There is no such faeature on that board, nor on any of a number of other 85xx boards I have access to. The problem on the 8555/8541 is the reset you are trigger is just a core reset and not one of the full SoC. If there is a board level means I would suggest trying to utilize it instead. If not this might be painful problematic as you'll have to slowly make sure we are 'resetting' each SoC block properly. Is this also the cause why the Linux reboot ommand does not work? Probably. If so, I wonder what has changed, because this used to be working in older versions of the kernel? I did not attampt a full git bisect, but from some old images I still found it appears it must have been broken between 2.6.16 (reboot in Linux works fine) and 2.6.27 (reboot does not work any more) - so probably this was part of the arch/ppc = arch/powerpc rework. Possible, its a pretty fragile reset solution so one (or a thousand) of a million things could be the issue. Is there any specific reason we don't use the good old approach of triggering an unhandled machine check exception? Hmm, when did we do that? I've got no issues with it if it causes HRESET_REQ to be signaled on the older devices. On MPC8548 and greater we provided a means for software to causes HRESET_REQ to be asserted. So if an unhandled mcheck will do this sounds good to me. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] panic: add noreturn attribute
Dear Mike Frysinger, In message 20110726145430.3e637138e...@gemini.denx.de I wrote: In message 1309384684-26415-1-git-send-email-vap...@gentoo.org you wrote: Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/common.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Applied, thanks. Arghh... this is causing build warnings for ALL boards: vsprintf.c: In function 'panic': vsprintf.c:730: warning: 'noreturn' function does return Please fix! [Did you not test this??] 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 C++ is the best example of second-system effect since OS/360. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v2] powerpc/85xx: enable USB2 gadget mode for corenet ds board
On Jul 18, 2011, at 1:10 AM, Shaohui Xie wrote: to make USB2 worked in gadget mode, we need to set it's 'dr_mode' to 'peripheral' in hwconfig, but driver starts scan from 'usb1', it'll break if it cannot find 'usb1', so we need to tell driver do not break until it scaned all the 'usbx' that the board may have. Signed-off-by: Shaohui Xie shaohui@freescale.com --- changes for v2: 1. fixed a typo in title. 2. Added some details in commit. arch/powerpc/cpu/mpc8xxx/fdt.c |3 ++- board/freescale/corenet_ds/corenet_ds.c |1 + include/configs/corenet_ds.h|2 ++ 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index d9e3e7e..60cb210 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) if (mode_idx 0 phy_idx 0) printf(WARNING: invalid phy or mode\n); } else { - break; + if (i CONFIG_SYS_USB_DEVICE) + break; } } I still dont understand why this is needed. While we might execute the loop more times than needed, will USB_MAX_DEVICE not cover us? if (!usb1_defined) { - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- Changes for v3: - Rewrote error messages to be more descriptive. Changes for v2: - None. Resubmitting to include custodian in cc: drivers/i2c/omap24xx_i2c.c | 135 ++- 1 files changed, 57 insertions(+), 78 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 966ffc4..19e024d 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -216,77 +216,6 @@ read_exit: return i2c_error; } -static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value) -{ - int i2c_error = 0; - u16 status; - - /* wait until bus not busy */ - wait_for_bb (); - - /* two bytes */ - writew (2, i2c_base-cnt); - /* set slave address */ - writew (devaddr, i2c_base-sa); - /* stop bit needed here */ - writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | - I2C_CON_STP, i2c_base-con); - - while (1) { - status = wait_for_pin(); - if (status == 0 || status I2C_STAT_NACK) { - i2c_error = 1; - goto write_exit; - } - if (status I2C_STAT_XRDY) { -#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ -defined(CONFIG_OMAP44XX) - /* send register offset */ - writeb(regoffset, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); - - while (1) { - status = wait_for_pin(); - if (status == 0 || status I2C_STAT_NACK) { - i2c_error = 1; - goto write_exit; - } - if (status I2C_STAT_XRDY) { - /* send data */ - writeb(value, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); - } - if (status I2C_STAT_ARDY) { - writew(I2C_STAT_ARDY, i2c_base-stat); - break; - } - } - break; -#else - /* send out two bytes */ - writew((value 8) + regoffset, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); -#endif - } - if (status I2C_STAT_ARDY) { - writew(I2C_STAT_ARDY, i2c_base-stat); - break; - } - } - - wait_for_bb(); - - status = readw(i2c_base-stat); - if (status I2C_STAT_NACK) - i2c_error = 1; - -write_exit: - flush_fifo(); - writew (0x, i2c_base-stat); - writew (0, i2c_base-cnt); - return i2c_error; -} - static void flush_fifo(void) { u16 stat; @@ -372,26 +301,76 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) { int i; + u16 status; + int i2c_error = 0; if (alen 1) { - printf (I2C read: addr len %d not supported\n, alen); + printf(I2C write: addr len %d not supported\n, alen); return 1; } if (addr + len 256) { - printf (I2C read: address out of range\n); + printf(I2C write: address 0x%x + 0x%x out of range\n); return 1; } + /* wait until bus not busy */ + wait_for_bb(); + + /* start address phase - will write regoffset + len bytes data */ + /* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ + writew(alen + len, i2c_base-cnt); + /* set slave address */ + writew(chip, i2c_base-sa); + /* stop bit needed here */ + writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | + I2C_CON_STP, i2c_base-con); + + /* Send address byte */ + status = wait_for_pin(); + + if (status == 0 || status I2C_STAT_NACK) { + i2c_error = 1; + printf(error waiting for i2c address ACK (status=0x%x)\n, + status); + goto write_exit; + } + + if (status I2C_STAT_XRDY) { + writeb(addr 0xFF, i2c_base-data); + writew(I2C_STAT_XRDY, i2c_base-stat); + } else { + i2c_error = 1; + printf(i2c bus not ready for transmit (status=0x%x)\n, + status); +
[U-Boot] [PATCH] ARMV7: OMAP: I2C driver: cosmetic: make checkpatch-compatible
Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- drivers/i2c/omap24xx_i2c.c | 105 ++-- 1 files changed, 53 insertions(+), 52 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 19e024d..c812001 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -31,8 +31,8 @@ DECLARE_GLOBAL_DATA_PTR; #define I2C_TIMEOUT1000 -static void wait_for_bb (void); -static u16 wait_for_pin (void); +static void wait_for_bb(void); +static u16 wait_for_pin(void); static void flush_fifo(void); static struct i2c *i2c_base = (struct i2c *)I2C_DEFAULT_BASE; @@ -40,7 +40,7 @@ static struct i2c *i2c_base = (struct i2c *)I2C_DEFAULT_BASE; static unsigned int bus_initialized[I2C_BUS_MAX]; static unsigned int current_bus; -void i2c_init (int speed, int slaveadd) +void i2c_init(int speed, int slaveadd) { int psc, fsscll, fssclh; int hsscll = 0, hssclh = 0; @@ -107,9 +107,9 @@ void i2c_init (int speed, int slaveadd) sclh = (unsigned int)fssclh; } - if (readw (i2c_base-con) I2C_CON_EN) { - writew (0, i2c_base-con); - udelay (5); + if (readw(i2c_base-con) I2C_CON_EN) { + writew(0, i2c_base-con); + udelay(5); } writew(0x2, i2c_base-sysc); /* for ES2 after soft reset */ @@ -130,35 +130,36 @@ void i2c_init (int speed, int slaveadd) writew(sclh, i2c_base-sclh); /* own address */ - writew (slaveadd, i2c_base-oa); - writew (I2C_CON_EN, i2c_base-con); + writew(slaveadd, i2c_base-oa); + writew(I2C_CON_EN, i2c_base-con); /* have to enable intrrupts or OMAP i2c module doesn't work */ - writew (I2C_IE_XRDY_IE | I2C_IE_RRDY_IE | I2C_IE_ARDY_IE | + writew(I2C_IE_XRDY_IE | I2C_IE_RRDY_IE | I2C_IE_ARDY_IE | I2C_IE_NACK_IE | I2C_IE_AL_IE, i2c_base-ie); - udelay (1000); + udelay(1000); flush_fifo(); - writew (0x, i2c_base-stat); - writew (0, i2c_base-cnt); + writew(0x, i2c_base-stat); + writew(0, i2c_base-cnt); if (gd-flags GD_FLG_RELOC) bus_initialized[current_bus] = 1; } -static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) +static int i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value) { int i2c_error = 0; u16 status; /* wait until bus not busy */ - wait_for_bb (); + wait_for_bb(); /* one byte only */ - writew (1, i2c_base-cnt); + writew(1, i2c_base-cnt); /* set slave address */ - writew (devaddr, i2c_base-sa); + writew(devaddr, i2c_base-sa); /* no stop bit needed here */ - writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX, i2c_base-con); + writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | + I2C_CON_TRX, i2c_base-con); /* send register offset */ while (1) { @@ -196,7 +197,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) } if (status I2C_STAT_RRDY) { #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ -defined(CONFIG_OMAP44XX) + defined(CONFIG_OMAP44XX) *value = readb(i2c_base-data); #else *value = readw(i2c_base-data); @@ -211,8 +212,8 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) read_exit: flush_fifo(); - writew (0x, i2c_base-stat); - writew (0, i2c_base-cnt); + writew(0x, i2c_base-stat); + writew(0, i2c_base-cnt); return i2c_error; } @@ -222,38 +223,37 @@ static void flush_fifo(void) /* note: if you try and read data when its not there or ready * you get a bus error */ - while(1){ + while (1) { stat = readw(i2c_base-stat); - if(stat == I2C_STAT_RRDY){ + if (stat == I2C_STAT_RRDY) { #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ -defined(CONFIG_OMAP44XX) + defined(CONFIG_OMAP44XX) readb(i2c_base-data); #else readw(i2c_base-data); #endif - writew(I2C_STAT_RRDY,i2c_base-stat); + writew(I2C_STAT_RRDY, i2c_base-stat); udelay(1000); - }else + } else break; } } -int i2c_probe (uchar chip) +int i2c_probe(uchar chip) { u16 status; int res = 1; /* default = fail */ - if (chip == readw (i2c_base-oa)) { + if (chip == readw(i2c_base-oa)) return res; - } /* wait until bus not busy */ - wait_for_bb (); + wait_for_bb(); /* try to write one byte */ - writew (1, i2c_base-cnt); + writew(1, i2c_base-cnt); /* set
[U-Boot] [PATCH V5 0/5] OMAP3 and devkit8000 SPL support
V1 Initial SPL support for OMAP3 was based on the old SPL V2 Introduced major changes. It is based on the OMAP4-SPL patch by Aneesh V and the new SPL Framework by Daniel Schwierzeck and Aneesh V V3 Some small bug fixes and correct placed SOB. V4 Corrected one bugfix and some style problems V5 Exclude some nand objects from SPL, interface change for nand_spl Simon Schwarz (5): omap3: Configure RAM bank 0 if in SPL omap-common: add nand spl support nand spl: add NAND Library to new SPL omap3: new SPL structure support devkit8000: Add nand-spl support for new SPL arch/arm/cpu/armv7/omap-common/spl.c| 46 ++ arch/arm/cpu/armv7/omap3/board.c| 37 ++- arch/arm/cpu/armv7/omap3/lowlevel_init.S|5 ++ arch/arm/cpu/armv7/omap3/sdrc.c | 30 +++- arch/arm/include/asm/arch-omap3/mem.h | 36 ++ arch/arm/include/asm/arch-omap3/sys_proto.h |1 + arch/arm/include/asm/omap_common.h |1 + board/timll/devkit8000/devkit8000.c |2 +- doc/README.SPL |2 + drivers/mtd/nand/Makefile |9 +++- drivers/mtd/nand/omap_gpmc.c| 68 +++ include/configs/devkit8000.h| 46 ++ include/nand.h |2 + spl/Makefile|2 + 14 files changed, 282 insertions(+), 5 deletions(-) -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V5 1/5] omap3: Configure RAM bank 0 if in SPL
OMAP3 relied on the memory config done by X-loader or Configuration Header. This has to be reworked for the implementation of a SPL. This patch configures RAM bank 0 if CONFIG_SPL_BUILD is set. Settings for Micron-RAM used by devkit8000 are added to mem.h Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- V1 changes: ADD Settings for Micron RAM V2 changes: DEL spl_debug outputs if mem test fails/passes CHG CONFIG_PRELOADER to CONFIG_SPL_BUILD V3 changes: nothing V4 changes: nothing V5 changes: nothing Transition from V1 to V2 also includes that this patch is now based on - the new SPL layout by Aneesh V and Daniel Schwierzeck - the OMAP4 SPL patches by Aneesh V This is the successor of [U-Boot,3/5] devkit8000 nand_spl: Add RAM configuration independent of x-loader or CH (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114) --- arch/arm/cpu/armv7/omap3/sdrc.c | 30 ++- arch/arm/include/asm/arch-omap3/mem.h | 36 + 2 files changed, 65 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c index 2a7970b..dac14d0 100644 --- a/arch/arm/cpu/armv7/omap3/sdrc.c +++ b/arch/arm/cpu/armv7/omap3/sdrc.c @@ -8,6 +8,9 @@ * Copyright (C) 2004-2010 * Texas Instruments Incorporated - http://www.ti.com/ * + * Copyright (C) 2011 + * Corscience GmbH Co. KG - Simon Schwarz schw...@corscience.de + * * Author : * Vaibhav Hiremath hvaib...@ti.com * @@ -133,13 +136,38 @@ void do_sdrc_init(u32 cs, u32 early) sdelay(0x2); } +#ifdef CONFIG_SPL_BUILD + /* If we use a SPL there is no x-loader nor config header so we have +* to do the job ourselfs +*/ + if (cs == CS0) { + sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; + + /* General SDRC config */ + writel(V_MCFG, sdrc_base-cs[cs].mcfg); + writel(V_RFR_CTRL, sdrc_base-cs[cs].rfr_ctrl); + + /* AC timings */ + writel(V_ACTIMA_165, sdrc_actim_base0-ctrla); + writel(V_ACTIMB_165, sdrc_actim_base0-ctrlb); + + /* Initialize */ + writel(CMD_NOP, sdrc_base-cs[cs].manual); + writel(CMD_PRECHARGE, sdrc_base-cs[cs].manual); + writel(CMD_AUTOREFRESH, sdrc_base-cs[cs].manual); + writel(CMD_AUTOREFRESH, sdrc_base-cs[cs].manual); + + writel(V_MR, sdrc_base-cs[cs].mr); + } +#endif /* CONFIG_SPL_BUILD */ + /* * SDRC timings are set up by x-load or config header * We don't need to redo them here. * Older x-loads configure only CS0 * configure CS1 to handle this ommission */ - if (cs) { + if (cs == CS1) { sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE; writel(readl(sdrc_base-cs[CS0].mcfg), diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h index f165949..8e28f77 100644 --- a/arch/arm/include/asm/arch-omap3/mem.h +++ b/arch/arm/include/asm/arch-omap3/mem.h @@ -128,6 +128,33 @@ enum { (MICRON_XSR_165 0) | (MICRON_TXP_165 8) | \ (MICRON_TWTR_165 16)) +#define MICRON_RAMTYPE 0x1 +#define MICRON_DDRTYPE 0x0 +#define MICRON_DEEPPD 0x1 +#define MICRON_B32NOT160x1 +#define MICRON_BANKALLOCATION 0x2 +#define MICRON_RAMSIZE ((PHYS_SDRAM_1_SIZE/(1024*1024))/2) +#define MICRON_ADDRMUXLEGACY 0x1 +#define MICRON_CASWIDTH0x5 +#define MICRON_RASWIDTH0x2 +#define MICRON_LOCKSTATUS 0x0 +#define MICRON_V_MCFG ((MICRON_LOCKSTATUS 30) | (MICRON_RASWIDTH 24) | \ + (MICRON_CASWIDTH 20) | (MICRON_ADDRMUXLEGACY 19) | \ + (MICRON_RAMSIZE 8) | (MICRON_BANKALLOCATION 6) | \ + (MICRON_B32NOT16 4) | (MICRON_DEEPPD 3) | \ + (MICRON_DDRTYPE 2) | (MICRON_RAMTYPE)) + +#define MICRON_ARCV2030 +#define MICRON_ARE 0x1 +#define MICRON_V_RFR_CTRL ((MICRON_ARCV 8) | (MICRON_ARE)) + +#define MICRON_BL 0x2 +#define MICRON_SIL 0x0 +#define MICRON_CASL0x3 +#define MICRON_WBST0x0 +#define MICRON_V_MR ((MICRON_WBST 9) | (MICRON_CASL 4) | \ + (MICRON_SIL 3) | (MICRON_BL)) + /* * NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns * ACTIMA @@ -171,10 +198,15 @@ enum { #define V_ACTIMA_165 INFINEON_V_ACTIMA_165 #define V_ACTIMB_165 INFINEON_V_ACTIMB_165 #endif + #ifdef CONFIG_OMAP3_MICRON_DDR #define V_ACTIMA_165 MICRON_V_ACTIMA_165 #define V_ACTIMB_165 MICRON_V_ACTIMB_165 +#define
[U-Boot] [PATCH V5 2/5] omap-common: add nand spl support
Add NAND support for the new SPL structure. Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- This patch didn't exist before V2! V2 changes: ADD Some define-barriers for OMAP3 to only use NAND ADD nand_load_image() - inits the OMAP gpmc, loads the images - parses the header CHG cosmetic ADD do_reset() implementation for omap-common spl ADD nand_copy_image to nand.h ADD CPP barriers for mmc and nand support. The parts depending on library support are only compiled if the respective library is included. V3 changes: ADD Comment why setup_clocks_for_console() isn't called for OMAP3 CHG cosmetic (deleted empty line) CHG rename of NAND_MODE_HW to NAND_MODE_HW_ECC DEL NAND_MODE_SW. Not used. V4 changes: CHG cosmetic - style problems V5 changes: CHG renamed nand_copy_image to nand_spl_load_image CHG offs paramter of nand_spl_load_image is of type loff_t now Transition from V1 to V2 also includes that this patch is now based on - the new SPL layout by Aneesh V and Daniel Schwierzeck - the OMAP4 SPL patches by Aneesh V --- arch/arm/cpu/armv7/omap-common/spl.c | 46 ++ arch/arm/include/asm/omap_common.h |1 + include/nand.h |2 + 3 files changed, 49 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index d177652..6503c8a 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -26,6 +26,7 @@ #include asm/u-boot.h #include asm/utils.h #include asm/arch/sys_proto.h +#include nand.h #include mmc.h #include fat.h #include timestamp_autogenerated.h @@ -107,6 +108,7 @@ static void parse_image_header(const struct image_header *header) } } +#ifdef CONFIG_SPL_MMC_SUPPORT static void mmc_load_image_raw(struct mmc *mmc) { u32 image_size_sectors, err; @@ -140,7 +142,9 @@ end: hang(); } } +#endif /* CONFIG_SPL_MMC_SUPPORT */ +#ifdef CONFIG_SPL_MMC_SUPPORT static void mmc_load_image_fat(struct mmc *mmc) { s32 err; @@ -173,7 +177,9 @@ end: hang(); } } +#endif /* CONFIG_SPL_MMC_SUPPORT */ +#ifdef CONFIG_SPL_MMC_SUPPORT static void mmc_load_image(void) { struct mmc *mmc; @@ -206,6 +212,27 @@ static void mmc_load_image(void) hang(); } } +#endif /* CONFIG_SPL_MMC_SUPPORT */ + +#ifdef CONFIG_SPL_NAND_SUPPORT +static void nand_load_image(void) +{ + gpmc_init(); + nand_init(); + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, + CONFIG_SYS_NAND_U_BOOT_SIZE, + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST); +#ifdef CONFIG_NAND_ENV_DST + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_NAND_ENV_DST); +#ifdef CONFIG_ENV_OFFSET_REDUND + nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE, + (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE); +#endif +#endif + parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST); +} +#endif /* CONFIG_SPL_NAND_SUPPORT */ void jump_to_image_no_args(void) { @@ -228,10 +255,17 @@ void board_init_r(gd_t *id, ulong dummy) boot_device = omap_boot_device(); debug(boot device - %d\n, boot_device); switch (boot_device) { +#ifdef CONFIG_SPL_MMC_SUPPORT case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: mmc_load_image(); break; +#endif +#ifdef CONFIG_SPL_NAND_SUPPORT + case BOOT_DEVICE_NAND: + nand_load_image(); + break; +#endif default: printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device); hang(); @@ -259,7 +293,11 @@ void preloader_console_init(void) gd-flags |= GD_FLG_RELOC; gd-baudrate = CONFIG_BAUDRATE; +/* Console clock for OMAP3 is already initialized by per_clocks_enable() + * called in board.c by s_init() */ +#ifndef CONFIG_OMAP34XX setup_clocks_for_console(); +#endif serial_init(); /* serial communications setup */ /* Avoid a second U-Boot coming from this string */ @@ -270,3 +308,11 @@ void preloader_console_init(void) omap_rev_string(rev_string_buffer); printf(Texas Instruments %s\n, rev_string_buffer); } + +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + debug(resetting cpu...); + reset_cpu(0); + + return 0; +} diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index d3cb857..13f6884 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -49,6 +49,7 @@ void preloader_console_init(void); #defineMMCSD_MODE_UNDEFINED0 #define MMCSD_MODE_RAW 1 #define MMCSD_MODE_FAT 2 +#define NAND_MODE_HW_ECC 3 u32 omap_boot_device(void); u32 omap_boot_mode(void); diff --git
[U-Boot] [PATCH V5 3/5] nand spl: add NAND Library to new SPL
Insert some NAND driver sources into NAND SPL library. Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- V1 changes: CHG Default to HW ecc in SPL build ADD nand_read_buf16 function, read buffer ADD omap_dev_ready function, indicte if chip is ready V2 changes: DEL GPMC_WAIT0_PIN_ACTIVE define CHG omap_dev_ready() renamed to omap_spl_dev_ready(), does not use the GPMC_WAIT0_PIN_ACTIVE-define anymore CHG ogpmc_read_buf16 renamed omap_spl_read_buf16 ADD omap_spl_read_buf, 8x buf read function ADD CONFIG_SPL_POWER_SUPPORT and CONFIG_SPL_NAND_SUPPORT to SPL CHG cosmetic CHG nand_base and nand_bbt aren't needed for SPL anymore CHG omap_nand_switch_ecc is not compiled for SPL ADD entry for CONFIG_SPL_POWER_SUPPORT and CONFIG_SPL_NAND_SUPPORT to README.SPL V3 changes: DEL cosmetic (empty line) V4 changes: nothing V5 changes: CHG nand_ecc.o is only compiled for SPL if CONFIG_OMAP34XX is set Transition from V1 to V2 also includes that this patch is now based on - the new SPL layout by Aneesh V and Daniel Schwierzeck - the OMAP4 SPL patches by Aneesh V This Patch is related to [U-Boot,4/5] devkit8000 nand_spl: Add SPL NAND support to omap_gpmc driver (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102115) in V1 --- doc/README.SPL |2 + drivers/mtd/nand/Makefile|9 +- drivers/mtd/nand/omap_gpmc.c | 68 ++ spl/Makefile |2 + 4 files changed, 80 insertions(+), 1 deletions(-) diff --git a/doc/README.SPL b/doc/README.SPL index ce8e19f..2987f43 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -60,3 +60,5 @@ CONFIG_SPL_SPI_FLASH_SUPPORT (drivers/mtd/spi/libspi_flash.o) CONFIG_SPL_SPI_SUPPORT (drivers/spi/libspi.o) CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o) CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o) +CONFIG_SPL_POWER_SUPPORT (drivers/power/libpower.o) +CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o) diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 8b598f6..5e706c3 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -26,12 +26,19 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libnand.o ifdef CONFIG_CMD_NAND +ifdef CONFIG_SPL_BUILD +COBJS-y += nand_spl.o +ifdef CONFIG_OMAP34XX +COBJS-y += nand_ecc.o +endif +else COBJS-y += nand.o COBJS-y += nand_base.o COBJS-y += nand_bbt.o -COBJS-y += nand_ecc.o COBJS-y += nand_ids.o COBJS-y += nand_util.o +COBJS-y += nand_ecc.o +endif COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index 99b9cef..61eac35 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -61,6 +61,55 @@ static void omap_nand_hwcontrol(struct mtd_info *mtd, int32_t cmd, writeb(cmd, this-IO_ADDR_W); } +#ifdef CONFIG_SPL_BUILD +/* Check wait pin as dev ready indicator */ +int omap_spl_dev_ready(struct mtd_info *mtd) +{ + return gpmc_cfg-status (1 8); +} + +/* + * omap_spl_read_buf16 - [DEFAULT] read chip data into buffer + * @mtd:MTD device structure + * @buf:buffer to store date + * @len:number of bytes to read + * + * Default read function for 16bit buswith + * + * This function is based on nand_read_buf16 from nand_base.c. This version + * reads 32bit not 16bit although the bus only has 16bit. + */ +static void omap_spl_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) +{ + int i; + struct nand_chip *chip = mtd-priv; + u32 *p = (u32 *) buf; + len = 2; + + for (i = 0; i len; i++) + p[i] = readl(chip-IO_ADDR_R); +} + +/* + * omap_spl_read_buf - [DEFAULT] read chip data into buffer + * @mtd:MTD device structure + * @buf:buffer to store date + * @len:number of bytes to read + * + * Default read function for 8bit buswith + * + * This is the same function as this from nand_base.c nand_read_buf + */ +static void omap_spl_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) +{ + int i; + struct nand_chip *chip = mtd-priv; + + for (i = 0; i len; i++) + buf[i] = readb(chip-IO_ADDR_R); +} +#endif + /* * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in * GPMC controller @@ -224,6 +273,7 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int32_t mode) } } +#ifndef CONFIG_SPL_BUILD /* * omap_nand_switch_ecc - switch the ECC operation b/w h/w ecc and s/w ecc. * The default is to come up on s/w ecc @@ -280,6 +330,7 @@ void omap_nand_switch_ecc(int32_t hardware) nand-options = ~NAND_OWN_BUFFERS; } +#endif /* CONFIG_SPL_BUILD */ /* * Board-specific NAND initialization. The following members of the @@ -338,7 +389,24 @@ int board_nand_init(struct nand_chip *nand) nand-chip_delay = 100; /* Default ECC mode */ +#ifndef CONFIG_SPL_BUILD nand-ecc.mode =
[U-Boot] [PATCH V5 4/5] omap3: new SPL structure support
Support for the new spl structure. Using the interface defined by Aneesh V for OMAP4 Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- V1 changes: ADD support for early console output in SPL V2 changes: ADD include omap_common.h in board.c ADD implement new omap common interface omap_boot_device, omap_boot_mode and omap_rev_string (very basic) CHG cosmetic CHG Don't add ecc switch command in SPL ADD save_boot_params stump with warning to implement it V3 changes: none V4 changes: CHG cosmetic - corrected style problem V5 changes: nothing Transition from V1 to V2 also includes that this patch is now based on - the new SPL layout by Aneesh V and Daniel Schwierzeck - the OMAP4 SPL patches by Aneesh V This is in some parts a anccesstor of [U-Boot,2/5] devkit8000 nand_spl: omap3 support nand_spl boot (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102114) in V1 --- arch/arm/cpu/armv7/omap3/board.c| 37 +- arch/arm/cpu/armv7/omap3/lowlevel_init.S|5 +++ arch/arm/include/asm/arch-omap3/sys_proto.h |1 + 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c index 4aaf97b..ee3285f 100644 --- a/arch/arm/cpu/armv7/omap3/board.c +++ b/arch/arm/cpu/armv7/omap3/board.c @@ -39,6 +39,7 @@ #include asm/cache.h #include asm/armv7.h #include asm/omap_gpio.h +#include asm/omap_common.h /* Declarations */ extern omap3_sysinfo sysinfo; @@ -56,6 +57,28 @@ static const struct gpio_bank gpio_bank_34xx[6] = { const struct gpio_bank *const omap_gpio_bank = gpio_bank_34xx; +#ifdef CONFIG_SPL_BUILD +/* +* We use static variables because global data is not ready yet. +* Initialized data is available in SPL right from the beginning. +* We would not typically need to save these parameters in regular +* U-Boot. This is needed only in SPL at the moment. +*/ +u32 omap3_boot_device = BOOT_DEVICE_NAND; +u32 omap3_boot_mode = NAND_MODE_HW_ECC; + +u32 omap_boot_device(void) +{ + return omap3_boot_device; +} + +u32 omap_boot_mode(void) +{ + return omap3_boot_mode; +} +#endif /* CONFIG_SPL_BUILD */ + + /** * Routine: delay * Description: spinning delay to use before udelay works @@ -197,6 +220,10 @@ void s_init(void) per_clocks_enable(); +#ifdef CONFIG_SPL_BUILD + preloader_console_init(); +#endif + if (!in_sdram) mem_init(); } @@ -245,7 +272,7 @@ void abort(void) { } -#ifdef CONFIG_NAND_OMAP_GPMC +#if defined(CONFIG_NAND_OMAP_GPMC) !defined(CONFIG_SPL_BUILD) /** * OMAP3 specific command to switch between NAND HW and SW ecc */ @@ -273,7 +300,7 @@ U_BOOT_CMD( [hw/sw] - Switch between NAND hardware (hw) or software (sw) ecc algorithm ); -#endif /* CONFIG_NAND_OMAP_GPMC */ +#endif /* CONFIG_NAND_OMAP_GPMC !CONFIG_SPL_BUILD */ #ifdef CONFIG_DISPLAY_BOARDINFO /** @@ -402,3 +429,9 @@ void v7_outer_cache_disable(void) omap3_update_aux_cr(0, 0x2); } #endif + +void omap_rev_string(char *omap_rev_string) +{ + sprintf(omap_rev_string, OMAP3, sorry revision detection \ +unimplemented); +} diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S b/arch/arm/cpu/armv7/omap3/lowlevel_init.S index 67e8ceb..48a7ec6 100644 --- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S +++ b/arch/arm/cpu/armv7/omap3/lowlevel_init.S @@ -35,6 +35,11 @@ _TEXT_BASE: .word CONFIG_SYS_TEXT_BASE/* sdram load addr from config.mk */ +.global save_boot_params +save_boot_params: + #warning Please implement save_boot_params for OMAP3 + bx lr + .global omap3_gp_romcode_call omap3_gp_romcode_call: PUSH {r4-r12, lr} @ Save all registers from ROM code! diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index 995e7cb..7b60051 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -71,4 +71,5 @@ void power_init_r(void); void dieid_num_r(void); void do_omap3_emu_romcode_call(u32 service_id, u32 parameters); void omap3_gp_romcode_call(u32 service_id, u32 parameter); +void omap_rev_string(char *omap_rev_string); #endif -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V5 5/5] devkit8000: Add nand-spl support for new SPL
Add NAND SPL support to the devkit8000 config Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- V1 changes: ADD devkit8000_nand to board.cfg ADD nand_spl Makefile, llinker script, spl-devkit8000.c ADD config ecc, SRAM, SPL to board config ADD CONFIG_SYS_SRAM_START and _SIZE to board config ADD CONFIG_SYS_SPL_TEXT_BASE, _MAX_SIZE and SPL_STACK to board config V2 changes: ADD CONFIG_SPL and LIBCOMMON, LIBDISK, I2C, LIBGENERIC, SERIAL, POWER, NAND and CONFIG_SPL_LDSCRIPT to board config CHG renamed CONFIG_SYS_SPL_* to CONFIG_SPL_* ADD CONFIG_SYS_NAND_U_BOOT_START, _OFFS, _SIZE, _DST to board config: Where to expect u-boot and where to load it. ADD some barrier to not build board_eth_init in SPL DEL no changes to board.cfg DEL everything used the old nand_spl layout (Makefile, linker script, spl-devkit8000.c) CHG cosmetic V3 changes: CHG Deleted wrong comment V4 changes: CHG CONFIG_SYS_SRAM_SIZE NOW has the right value CHG cosmetic - corrected style problems V5 changes: nothing Transition from V1 to V2 also includes that this patch is now based on - the new SPL layout by Aneesh V and Daniel Schwierzeck - the OMAP4 SPL patches by Aneesh V This is the successor of [U-Boot,5/5] devkit8000 nand_spl: add nand_spl support (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/102111) --- board/timll/devkit8000/devkit8000.c |2 +- include/configs/devkit8000.h| 46 +++ 2 files changed, 47 insertions(+), 1 deletions(-) diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index 95afaaa..9b53742 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -119,7 +119,7 @@ void set_muxconf_regs(void) MUX_DEVKIT8000(); } -#ifdef CONFIG_DRIVER_DM9000 +#if defined(CONFIG_DRIVER_DM9000) !defined(CONFIG_SPL_BUILD) /* * Routine: board_eth_init * Description: Setting up the Ethernet hardware. diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 125c690..022069d 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -307,4 +307,50 @@ CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) +/* SRAM config */ +#define CONFIG_SYS_SRAM_START 0x4020 +#define CONFIG_SYS_SRAM_SIZE 0x1 + +/* Defines for SPL */ +#define CONFIG_SPL + +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBDISK_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_POWER_SUPPORT +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_LDSCRIPT$(CPUDIR)/omap-common/u-boot-spl.lds + +#define CONFIG_SPL_TEXT_BASE 0x4020 /*CONFIG_SYS_SRAM_START*/ +#define CONFIG_SPL_MAX_SIZE0xB400 /* 45 K */ +#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK + +#define CONFIG_SPL_BSS_START_ADDR 0x8000 /*CONFIG_SYS_SDRAM_BASE*/ +#define CONFIG_SPL_BSS_MAX_SIZE0x8 + +/* NAND boot config */ +#define CONFIG_SYS_NAND_PAGE_COUNT 64 +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 +#define CONFIG_SYS_NAND_OOBSIZE64 +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ + 10, 11, 12, 13} + +#define CONFIG_SYS_NAND_ECCSIZE512 +#define CONFIG_SYS_NAND_ECCBYTES 3 + +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ + CONFIG_SYS_NAND_ECCSIZE) +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ + CONFIG_SYS_NAND_ECCSTEPS) + +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST + +#define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 +#define CONFIG_SYS_NAND_U_BOOT_SIZE0x20 +#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE + #endif /* __CONFIG_H */ -- 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 4/4] cmd_mac: fix help for 'mac read'
Hi Detlev, On 07/15/2011 05:17 PM, Detlev Zundel wrote: Michael Jones michael.jo...@matrix-vision.de writes: In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de Thanks for the ack. Do you know when I can expect these to get merged in? MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/85xx: Add support for new P102x/P2020 RDB style boards
On Tue, Jul 26, 2011 at 9:52 PM, Kumar Gala ga...@kernel.crashing.org wrote: +/* CCSRBAR PHYSICAL Address */ +/* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k + SPL code*/ +#if defined(CONFIG_NAND_U_BOOT) defined(CONFIG_NAND_SPL) +#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR_DEFAULT +#else +#ifdef CONFIG_PHYS_64BIT +#define CONFIG_SYS_CCSRBAR_PHYS 0xfffe0ull +#else +#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of */ + /* CCSRBAR */ +#endif +#endif +#define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses */ + /* CONFIG_SYS_IMMR */ This conflicts with the CCSR patch I posted a couple days ago. What order are you going to be applying these patches? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/85xx: Add support for new P102x/P2020 RDB style boards
On Jul 27, 2011, at 7:58 AM, Tabi Timur-B04825 wrote: On Tue, Jul 26, 2011 at 9:52 PM, Kumar Gala ga...@kernel.crashing.org wrote: +/* CCSRBAR PHYSICAL Address */ +/* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k + SPL code*/ +#if defined(CONFIG_NAND_U_BOOT) defined(CONFIG_NAND_SPL) +#define CONFIG_SYS_CCSRBAR_PHYSCONFIG_SYS_CCSRBAR_DEFAULT +#else +#ifdef CONFIG_PHYS_64BIT +#define CONFIG_SYS_CCSRBAR_PHYS0xfffe0ull +#else +#define CONFIG_SYS_CCSRBAR_PHYSCONFIG_SYS_CCSRBAR /* physical addr of */ + /* CCSRBAR */ +#endif +#endif +#define CONFIG_SYS_IMMRCONFIG_SYS_CCSRBAR /* PQII uses */ + /* CONFIG_SYS_IMMR */ This conflicts with the CCSR patch I posted a couple days ago. What order are you going to be applying these patches? I'm wanting to apply the CCSR patch first (so we'll need to update the board ports). - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] arm: add CONFIG_MACH_TYPE setting and documentation
On 07/27/11 13:31, Chander Kashyap wrote: dear Igor, On 14 July 2011 21:15, Igor Grinberg grinb...@compulab.co.il wrote: CONFIG_MACH_TYPE is used to set the machine type number in the common arm code instead of setting it in the board code. Boards with dynamically discoverable machine types can still set the machine type number in the board code. Signed-off-by: Igor Grinberg grinb...@compulab.co.il --- v2: Document the option as mandatory. Move the bi_arch_number setting to board_init_f() README | 10 ++ arch/arm/lib/board.c |4 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/README b/README index 446966d..0b6802d 100644 --- a/README +++ b/README @@ -442,6 +442,16 @@ The following options need to be configured: crash. This is needed for buggy hardware (uc101) where no pull down resistor is connected to the signal IDE5V_DD7. + CONFIG_MACH_TYPE[relevant for ARM only][mandatory] + + This setting is mandatory for all boards that have only one + machine type and must be used to specify the machine type + number as it appears in the ARM machine registry + (see http://www.arm.linux.org.uk/developer/machines/). + Only boards that have multiple machine types supported + in a single configuration file and the machine type is + runtime discoverable, do not have to use this setting. + - vxWorks boot parameters: bootvx constructs a valid bootline using the following diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 169dfeb..9901694 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -281,6 +281,10 @@ void board_init_f (ulong bootflag) gd-mon_len = _bss_end_ofs; +#ifdef CONFIG_MACH_TYPE + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif + bd structure is not initialised by this time. It leads to u-boot hanging for my board. I fixed this problem but modifying it. Below is the patch attached for the same. Then how does it work for boards setting the gd-bd-bi_arch_number in board_early_init_f() function? for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot From d8df2f0ca9f08470c0cb88307fea4a66f41147a5 Mon Sep 17 00:00:00 2001 From: Chander Kashyap chander.kash...@linaro.org Date: Wed, 27 Jul 2011 15:10:59 +0530 Subject: [PATCH] ARM: Fix wrong initialisation of bi_arch_number bi_arch_number is initialised using @arch/arm/lib/board.c \#ifdef CONFIG_MACH_TYPE gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ \#endif bd structure is not intialized by this time. This leads to u-boot hanging when CONFIG_MACH_TYPE is defined. Signed-off-by: Chander Kashyap chander.kash...@linaro.org --- arch/arm/lib/board.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index bcbf697..98a9bcc 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -281,10 +281,6 @@ void board_init_f (ulong bootflag) gd-mon_len = _bss_end_ofs; -#ifdef CONFIG_MACH_TYPE - gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ -#endif - for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); @@ -380,6 +376,9 @@ void board_init_f (ulong bootflag) gd-bd = bd; debug (Reserving %zu Bytes for Board Info at: %08lx\n, sizeof (bd_t), addr_sp); +#ifdef CONFIG_MACH_TYPE + gd-bd-bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif This is problematic... There are boards that rely on this setting in early init function calls. For them it should be set before the init_sequence array is run. I will rethink this once again. Thanks for testing... -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] panic: add noreturn attribute
On Jul 27, 2011, at 7:24 AM, Wolfgang Denk wrote: Dear Mike Frysinger, In message 20110726145430.3e637138e...@gemini.denx.de I wrote: In message 1309384684-26415-1-git-send-email-vap...@gentoo.org you wrote: Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/common.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Applied, thanks. Arghh... this is causing build warnings for ALL boards: vsprintf.c: In function 'panic': vsprintf.c:730: warning: 'noreturn' function does return Please fix! http://patchwork.ozlabs.org/patch/106987/ - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] phy.c: make less verbose - turn printf() into debug()
On Jul 25, 2011, at 2:39 AM, Wolfgang Denk wrote: The PHY driver was too verbose and corrupted the boot message display like this: ... Net: TSEC0 connected to Marvell 88ES TSEC1 connected to Marvell 88ES TSEC0, TSEC1 ... Turn printf() into debug() so we het the expected output again: ... Net: TSEC0, TSEC1 ... Signed-off-by: Wolfgang Denk w...@denx.de Cc: Kumar Gala ga...@kernel.crashing.org --- drivers/net/phy/phy.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c7edcc0..ce69c19 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -714,7 +714,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, phydev-dev = dev; - printf(%s connected to %s\n, dev-name, phydev-drv-name); + debug(%s connected to %s\n, dev-name, phydev-drv-name); return phydev; } -- 1.7.6 Andy, Any comments? - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] cmd_mac: fix help for 'mac read'
Hi Michael, Hi Detlev, On 07/15/2011 05:17 PM, Detlev Zundel wrote: Michael Jones michael.jo...@matrix-vision.de writes: In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de Thanks for the ack. Do you know when I can expect these to get merged in? As we currently lack a network maintainer, these patches fall into the and all the rest category picked up sequentially by Wolfgang. I expect that to happen Real Soon (tm) now. On the other hand, please do not forget that we _intentionally_ allow for some time to pass before the patches are merged in order to allow for review on the mailing list and to prevent potentially merge/revert/change/merge cycles. Cheers Detlev -- The management question ... is not _whether_ to build a pilot system and throw it away. You _will_ do that. The only question is whether to plan in advance to build a throwaway, or to promise to deliver the throwaway to customers. - Fred Brooks, The Mythical Man Month -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] cmd_mac: fix help for 'mac read'
Hi Detlev, Thanks for the reply. On 07/27/2011 03:54 PM, Detlev Zundel wrote: Hi Michael, Hi Detlev, On 07/15/2011 05:17 PM, Detlev Zundel wrote: Michael Jones michael.jo...@matrix-vision.de writes: In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de Thanks for the ack. Do you know when I can expect these to get merged in? As we currently lack a network maintainer, these patches fall into the and all the rest category picked up sequentially by Wolfgang. I expect that to happen Real Soon (tm) now. That's exactly what I wanted to know- it seemed there wasn't a custodian whom I needed to cc:, and I didn't know who would end up merging them. On the other hand, please do not forget that we _intentionally_ allow for some time to pass before the patches are merged in order to allow for review on the mailing list and to prevent potentially merge/revert/change/merge cycles. Sure, and that makes sense. I just wanted to get a feel for what kind of time scale that was in general. Obviously these are not important patches. Cheers Detlev thanks, Michael MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] preloader_console_init()
Hi Simon, On Mon, Jul 25, 2011 at 8:36 PM, Simon Schwarz simonschwarz...@googlemail.com wrote: Hi Aneesh, I'am nearly done with OMAP3 - I think I can release the patch today. I have just one problem left: You implemented preloader_console_init() in omap-common to call setup_clocks_for_console(). This is a OMAP4 specific call - OMAP3 only has per_clocks_init() - which inits a bunch of clocks. Sorry. I was on a short travel and didn't have mail access for a couple of days. The idea was to enable the console at the earliest, even before prcm_init(). If OMAP3 doesn't need this I would suggest moving setup_clocks_for_console() call to s_init() in omap4/board.c BTW, how did you fix this in your patches fianlly? br, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL
Hi Simon, Scott, On Wed, Jul 27, 2011 at 2:52 PM, Simon Schwarz simonschwarz...@googlemail.com wrote: Dear Scott Wood, On 07/26/2011 08:04 PM, Scott Wood wrote: On Tue, 26 Jul 2011 14:09:16 +0200 Simon Schwarzsimonschwarz...@googlemail.com wrote: diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 8b598f6..cdc9a14 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -26,12 +26,16 @@ include $(TOPDIR)/config.mk LIB := $(obj)libnand.o ifdef CONFIG_CMD_NAND +ifdef CONFIG_SPL_BUILD +COBJS-y += nand_spl.o +else COBJS-y += nand.o COBJS-y += nand_base.o COBJS-y += nand_bbt.o -COBJS-y += nand_ecc.o COBJS-y += nand_ids.o COBJS-y += nand_util.o +endif +COBJS-y += nand_ecc.o You're assuming all NAND SPLs will want nand_ecc -- this will not fit in most current ones. True. I changed it to: ifdef CONFIG_SPL_BUILD COBJS-y += nand_spl.o ifdef CONFIG_OMAP34XX -ffunction-sections, -fdata-sections and --gc-sections are enabled globally for SPL. Source files are #ifdef'ed out in Makefile's for SPL primarily to reduce build time. I would suggest to enable the super set of all files needed for all SPL's in these Makefile's and not clutter it with any more #ifdef's best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] preloader_console_init()
Hi Aneesh, On 07/27/2011 04:39 PM, V, Aneesh wrote: Hi Simon, On Mon, Jul 25, 2011 at 8:36 PM, Simon Schwarz simonschwarz...@googlemail.com wrote: Hi Aneesh, I'am nearly done with OMAP3 - I think I can release the patch today. I have just one problem left: You implemented preloader_console_init() in omap-common to call setup_clocks_for_console(). This is a OMAP4 specific call - OMAP3 only has per_clocks_init() - which inits a bunch of clocks. Sorry. I was on a short travel and didn't have mail access for a couple of days. No problem, hope it was great! The idea was to enable the console at the earliest, even before prcm_init(). If OMAP3 doesn't need this I would suggest moving setup_clocks_for_console() call to s_init() in omap4/board.c So I think it is best to move it to s_init like you said. For now I don't plan to add this to OMAP3. If we move it to s_init the dev can decide to do early clock init or not. BTW, how did you fix this in your patches fianlly? #ifndef CONFIG_OMAP34XX setup_clocks_for_console(); #endif To be able to post the patch. br, Aneesh Regards Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] WESTERN UNION TRANSFER
-- My associate has helped me to send your first paymentof $7,500 USD to you as instructed by Mr.David Cameronthe United Kingdom prime minister after the last G20meeting that was held in United Kingdom, making you one of the beneficiaries. Here is the information below. MTCN Numbers: 6096147516 Sender First Name Is = Johannes Second Name = Davis I told him to keep sending you £7,500 USD twice a weekuntil the FULL payment of (£82.00 pounds)is completed. A certificate will be made to change the Receiver Name asstated by the British prime minister, send your Full Namesand address via Email to: Mr Garry Moore Email:western.d...@w.cn You cannot pickup the money until the certificate is issued to you. Regards Mr. Garry Moore.Tel: +(44) 703 596 3900. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC.
-Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- drivers/rtc/Makefile |1 + drivers/rtc/mvinteg_rtc.c | 151 Filename mvrtc.c sounds more relevent + drivers/rtc/mvinteg_rtc.h | 89 ++ 3 files changed, 241 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/mvinteg_rtc.c create mode 100644 drivers/rtc/mvinteg_rtc.h diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index e4be4a4..ed63e9c 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -55,6 +55,7 @@ COBJS-$(CONFIG_MCFRTC) += mcfrtc.o COBJS-$(CONFIG_RTC_MK48T59) += mk48t59.o COBJS-$(CONFIG_RTC_MPC5200) += mpc5xxx.o COBJS-$(CONFIG_RTC_MPC8xx) += mpc8xx.o +COBJS-$(CONFIG_RTC_MVINTEG) += mvinteg_rtc.o COBJS-$(CONFIG_RTC_PCF8563) += pcf8563.o COBJS-$(CONFIG_RTC_PL031) += pl031.o COBJS-$(CONFIG_RTC_PT7C4338) += pt7c4338.o diff --git a/drivers/rtc/mvinteg_rtc.c b/drivers/rtc/mvinteg_rtc.c new file mode 100644 index 000..295e4f7 --- /dev/null +++ b/drivers/rtc/mvinteg_rtc.c @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2011 + * Jason Cooper u-b...@lakedaemon.net + * + * 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 + */ + +/* + * Date Time support for Marvell Integrated RTC + */ + +#include common.h +#include command.h +#include rtc.h +#include mvinteg_rtc.h + +/* This RTC does not support century, so we assume 20 */ +#define CENTURY 20 + +int rtc_get(struct rtc_time *t) +{ + u32 time; + u32 date; + u8 tens; + u8 single; + + /* read the time register */ + time = MV_REG_READ(MVINTEG_RTCTIME_REG); + + /* read the date register */ + date = MV_REG_READ(MVINTEG_RTCDATE_REG); + + /* seconds */ + tens = ((time MVINTEG_10SEC_MSK) MVINTEG_10SEC_SFT); + single = ((time MVINTEG_SEC_MSK)MVINTEG_SEC_SFT); + t-tm_sec = 10 * tens + single; + + /* minutes */ + tens = ((time MVINTEG_10MIN_MSK) MVINTEG_10MIN_SFT); + single = ((time MVINTEG_MIN_MSK)MVINTEG_MIN_SFT); + t-tm_min = 10 * tens + single; + + /* hours */ + tens = ((time MVINTEG_10HOUR_MSK) MVINTEG_10HOUR_SFT); + single = ((time MVINTEG_HOUR_MSK)MVINTEG_HOUR_SFT); + t-tm_hour = 10 * tens + single; + + /* day */ + t-tm_wday = ((time MVINTEG_DAY_MSK) MVINTEG_DAY_SFT); + t-tm_wday--; + + /* date */ + tens = ((date MVINTEG_10DATE_MSK) MVINTEG_10DATE_SFT); + single = ((date MVINTEG_DATE_MSK)MVINTEG_DATE_SFT); + t-tm_mday = 10 * tens + single; + + /* month */ + tens = ((date MVINTEG_10MON_MSK) MVINTEG_10MON_SFT); + single = ((date MVINTEG_MON_MSK)MVINTEG_MON_SFT); + t-tm_mon = 10 * tens + single; + + /* year */ + tens = ((date MVINTEG_10YEAR_MSK) MVINTEG_10YEAR_SFT); + single = ((date MVINTEG_YEAR_MSK)MVINTEG_YEAR_SFT); + t-tm_year = (CENTURY * 100) + (10 * tens) + single; + + /* not supported in this RTC */ + t-tm_yday = 0; + t-tm_isdst = 0; + + return 0; +} + +int rtc_set(struct rtc_time *t) +{ + u32 time = 0; + u32 date = 0; + u32 tens; + u32 single; + + /* seconds */ + tens = t-tm_sec / 10; + single = t-tm_sec % 10; + time |= ((tensMVINTEG_10SEC_SFT) MVINTEG_10SEC_MSK) | + ((single MVINTEG_SEC_SFT)MVINTEG_SEC_MSK); + + /* minutes */ + tens = t-tm_min / 10; + single = t-tm_min % 10; + time |= ((tensMVINTEG_10MIN_SFT) MVINTEG_10MIN_MSK) | + ((single MVINTEG_MIN_SFT)MVINTEG_MIN_MSK); + + /* hours (24) */ + tens = t-tm_hour / 10; + single = t-tm_hour % 10; + time |= ((tensMVINTEG_10HOUR_SFT) MVINTEG_10HOUR_MSK) | + ((single
Re: [U-Boot] RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info.
-Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- arch/arm/cpu/arm926ejs/kirkwood/cpu.c| 46 ++ arch/arm/include/asm/arch-kirkwood/cpu.h |1 + 2 files changed, 47 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index b4a4c04..a69f9f2 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -270,11 +270,26 @@ static void kw_sysrst_check(void) } #if defined(CONFIG_DISPLAY_CPUINFO) +#define MSAR_CPUCLCK_EXTRACT(X) (((X 0x2) 1) | ((X 0x40) 21) | \ + ((X 0x18) 1)) +#define MSAR_L2CLCK_EXTRACT(X) (((X 0x600) 9) | ((X 0x8) 17)) +#define MSAR_DDRCLCK_RTIO_MASK (0xf 5) + +#define MSAR_TCLCK_OFFS 21 +#define MSAR_TCLCK_MASK (0x1 MSAR_TCLCK_OFFS) +#define MV_BOARD_TCLK_166MHZ 16667 +#define MV_BOARD_TCLK_200MHZ 2 +#define MSAR_TCLCK_167 (0x1 MSAR_TCLCK_OFFS) +#define MSAR_TCLCK_200 (0x0 MSAR_TCLCK_OFFS) There are one time used macros, can they be optimized? + int print_cpuinfo(void) { char *rev; u16 devid = (readl(KW_REG_PCIE_DEVID) 16) 0x; u8 revid = readl(KW_REG_PCIE_REVID) 0xff; + u32 cpu_clk, t_clk, tmp; + u32 sys_clk, l2_clk; + u32 l2_ratio, ddr_ratio; if ((readl(KW_REG_DEVICE_ID) 0x03) 2) { printf(Error.. %s:Unsupported Kirkwood SoC 88F%04x\n, __FUNCTION__, devid); @@ -297,6 +312,37 @@ int print_cpuinfo(void) } printf(SoC: Kirkwood 88F%04x_%s\n, devid, rev); + + tmp = readl(MPP_SAMPLE_AT_RESET); + cpu_clk = MSAR_CPUCLCK_EXTRACT(tmp); + if (cpu_clk == 0x9) + cpu_clk = 1200; + + l2_ratio = MSAR_L2CLCK_EXTRACT(tmp); + l2_clk = cpu_clk / l2_ratio; + + ddr_ratio = tmp MSAR_DDRCLCK_RTIO_MASK; + ddr_ratio = ddr_ratio 5; + if (ddr_ratio == 4) + sys_clk = 400; + + switch (tmp MSAR_TCLCK_MASK) { + case MSAR_TCLCK_167: + t_clk = MV_BOARD_TCLK_166MHZ; + break; + case MSAR_TCLCK_200: + t_clk = MV_BOARD_TCLK_200MHZ; + break; + default: + t_clk = MV_BOARD_TCLK_200MHZ; + break; + } + + printf(CPU running @ %dMHz L2 running @ %dMHz\n, + cpu_clk, l2_clk); + printf(SysClock = %dMHz, TClock = %dMHz\n, + sys_clk, t_clk / 100); It is good to encapsulate this in #ifdef CONFIG_SYS_XXX + return 0; } #endif /* CONFIG_DISPLAY_CPUINFO */ diff --git a/arch/arm/include/asm/arch-kirkwood/cpu.h b/arch/arm/include/asm/arch-kirkwood/cpu.h index d28c51a..28ddd25 100644 --- a/arch/arm/include/asm/arch-kirkwood/cpu.h +++ b/arch/arm/include/asm/arch-kirkwood/cpu.h @@ -41,6 +41,7 @@ #define KW_REG_SYSRST_CNT(KW_MPP_BASE + 0x50) #define SYSRST_CNT_1SEC_VAL (25*100) #define KW_REG_MPP_OUT_DRV_REG (KW_MPP_BASE + 0xE0) +#define MPP_SAMPLE_AT_RESET (KW_MPP_BASE + 0x30) enum memory_bank { BANK0, -- Regards.. Prafulla . . 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond.
-Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond. This fixes 'EHCI timed out on TD...' on the dreamplug board. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- include/usb.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/usb.h b/include/usb.h index 53603a5..168e2b2 100644 --- a/include/usb.h +++ b/include/usb.h @@ -46,7 +46,7 @@ * This is the timeout to allow for submitting an urb in ms. We allow more * time for a BULK device to react - some are slow. */ -#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100) +#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 500) This looks global change, how will it affect other implementations? Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 4/5 v5] dreamplug: initial board support.
-Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 4/5 v5] dreamplug: initial board support. Copied wholeheartedly from board/Marvell/guruplug and modified to add support for SPI NOR flash. Also, the following features are used: - Use the Marvell Integrated RTC. - display Marvell CPU/L2/etc speeds if requested. Note: this still uses MACH_TYPE_GURUPLUG until MACH_TYPE_DREAMPLUG is accepted into mainline Linux. The source from Globalscale did the same. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- There is no change log for all previous versions. Please put them here. Ref: http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions MAINTAINERS |4 + MAKEALL |1 + board/Marvell/dreamplug/Makefile | 54 +++ board/Marvell/dreamplug/dreamplug.c | 157 board/Marvell/dreamplug/dreamplug.h | 42 + board/Marvell/dreamplug/kwbimage.cfg | 163 ++ boards.cfg |1 + include/configs/dreamplug.h | 138 8 files changed, 560 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/dreamplug/Makefile create mode 100644 board/Marvell/dreamplug/dreamplug.c create mode 100644 board/Marvell/dreamplug/dreamplug.h create mode 100644 board/Marvell/dreamplug/kwbimage.cfg create mode 100644 include/configs/dreamplug.h diff --git a/MAINTAINERS b/MAINTAINERS index 2bba7b4..9affbea 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -70,6 +70,10 @@ Conn Clark cl...@esteem.com ESTEEM192E MPC8xx +Jason Cooper u-b...@lakedaemon.net + + dreamplug ARM926EJS (Kirkwood SoC) + Joe D'Abbraccio ljd...@freescale.com MPC837xERDB MPC837x diff --git a/MAKEALL b/MAKEALL index 51db13e..55a122f 100755 --- a/MAKEALL +++ b/MAKEALL @@ -335,6 +335,7 @@ LIST_ARM9= \ cp966 \ da830evm\ da850evm\ + dreamplug \ edb9301 \ edb9302 \ edb9302a\ diff --git a/board/Marvell/dreamplug/Makefile b/board/Marvell/dreamplug/Makefile new file mode 100644 index 000..9ee5406 --- /dev/null +++ b/board/Marvell/dreamplug/Makefile @@ -0,0 +1,54 @@ +# +# (C) Copyright 2011 +# Jason Cooper u-b...@lakedaemon.net +# +# Based on work by: +# Marvell Semiconductor www.marvell.com +# Written-by: Siddarth Gore go...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= dreamplug.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +### ## + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +### ## diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c new file mode 100644 index 000..cdc094a --- /dev/null +++ b/board/Marvell/dreamplug/dreamplug.c @@ -0,0 +1,157 @@ +/* + * (C) Copyright 2011 + * Jason Cooper u-b...@lakedaemon.net + * + * Based on work by: + * Marvell Semiconductor www.marvell.com + * Written-by: Siddarth Gore go...@marvell.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
Re: [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG
-Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG Sorry about my related comments in patch 4/5, you can merge this patch to 4/5 to avoid confusion. Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] RFC: postload: Loading some U-Boot code later
Hi, I am looking to implement a feature where a cut-down U-Boot is initially loaded, which is enough for a normal boot. But then when an abnormal boot is required (e.g. from a USB stick or network), we can load more code to cope with it. Why? - Improves security by not loading code that we shouldn't execute - Speeds up boot by loading less code (we are targeting very fast boot time and 100ms is worth chasing) My current thinking is a system where the optional code is kept at the end of the image in a post-load area and loaded when needed. Given that, I am thinking: 1. We use the CONFIG items to find object files which can be made optional. For example, CONFIG_CMD_ECHO controls whether cmd_echo.o is linked in. So if we don't need the echo command in the normal case we can move it to the 'post-load' area. 2. More extreme: we could do a build of a cut-down U-Boot for analysis purposes, and compare the functions linked with those in the full U-Boot. When building the full U-Boot, all the functions which are not in the cut-down one can go into post-load. 2a. For simplicity, don't do anything special with data and bss - these stay at full size. 3. Control the build using a new 'build-select' file which specifies which CONFIG items are essential and which are normally not needed. 4. We need to adjust the link script to move the objects around. The generation of (parts of) this link script would need to be under control of the build-select file. 5. Provide a function like postload_load_chunk() which loads a chunk of code when we decide we need it. This can be called within U-Boot when/if needed. It loads the code from flash, relocates it and returns with everything ready. I am interested in any thoughts that people have about this: - has this been done before, or something similar? - any hints, tips, dragon warnings? - does the above approach sound reasonable? Thanks, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC: postload: Loading some U-Boot code later
Dear Simon Glass, In message capnjgz0y7lnu6kiosm8q4qfqnezh0wg3txffitqhzpzuw8w...@mail.gmail.com you wrote: I am looking to implement a feature where a cut-down U-Boot is initially loaded, which is enough for a normal boot. But then when an abnormal boot is required (e.g. from a USB stick or network), we can load more code to cope with it. ... - has this been done before, or something similar? This has been done before, since the very earliest versions of U-Boot (or PPCboot, as it was called at that times). The feature is called standalone applications. There are _many_ systems around where you can load (and run) manufacturing test code, hardware diagnosis code, burn in test stuff, proprietary code to perform top secret actions nobody ever may know, etc. - any hints, tips, dragon warnings? - does the above approach sound reasonable? I understand what you want, and why you want it. But I disagree with the suggested implementation. If you just need a simple environment, you can probably do well with the existing standalone approach. If you are looking for a more powerful solution, that is more tightly integrated with the rest of the U-Boot code (**) then we should make the jump and implement loadable modules. This has been done before, too - see Linux for a big example, or barebox for a smaller, more U-Boot-like one. (**) The separation and restriction of the standalone code is an intentional one, made not for technical but for political reasons - standalone applications are provided as a means to run closed-source, proprietary code. This is something that has to hurt a bit. 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 How many QA engineers does it take to screw in a lightbulb? 3: 1 to screw it in and 2 to say I told you so when it doesn't work. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 6/7] Add pxecfg command
Dear Jason Hobbs, In message 20110726213914.GB22660@jhobbs-laptop you wrote: +static char *from_env(char *envvar) +{ + char *ret; + + ret = getenv(envvar); + + if (!ret) + printf(missing environment variable: %s\n, envvar); + + return ret; +} I don't like this. It just blows up the code and shifts error handling from the place where it happens. In the result, you will have to check return codes on several function call levels. I recommend to drop this function. I added this in response to your suggestion to make the print 'missing environment variable' code common. From the caller's perspective, Arghhh... You got me there. This happens when somebody actually listens to my bavardage and actually puts it into code ;-) from_env as with getenv, so I don't understand your concern about handling return codes in several function call levels. Do you have another suggestion that doesn't involve going back to scattering printf's throughout the code? Not really. Please ignore my remark. I'll change this to allocate in the caller, as you suggest. We didn't continue as if nothing happened, though. format_mac_pxecfg's caller can checks the value of *outbuf for NULL and doesn't use it if it's NULL. Anyhow, that will change as a result of the allocate in caller change. Hm... that was not obvious to me when I read the code. Let;s see how the new version looks. + if (last_slash == NULL) + return NULL; This looks unnecessarily stringent to me. Why can we not accept a plain file name [we can always use ./ if we need a path for the directory] ? Yes, that's he behavior, as you've suggested. I'll add comments to make this clearer. This function generates a prefix if it's required, and NULL if it isn't or if bootfile isn't defined. The NULL prefix results in the plain filename being used. It's awkward to use a NULL, I thought about using a zero length string, but that was awkward too. I'll see if I can improve this when I go after eliminating the dynamic allocation. Why don't you simply use . as directory name, then? This is something that everybody can understand when reading the code the first time. + if (path_len MAX_TFTP_PATH_LEN) { + printf(Base path too long (%s%s)\n, + bootfile_path ? bootfile_path : , + file_path); Indentation is one level only. Please fix globally. Moving these printf args substantially to the right follows kernel CodingStyle guidelines and is more readable than a single level of indentation. Is this a deviation from the kernel CodingStyle that should go into the U-boot coding style wiki? I think you misread the Coding Style here. What you are referring to is probably this: Statements longer than 80 columns will be broken into sensible chunks. Descendants are always substantially shorter than the parent and are placed substantially to the right. The same applies to function headers with a long argument list. So this rule of place substantially to the right is given here for function headers only. I cannot find a place that makes such a comment for calling a function with a long argument list. Personally, I don't think that such excessive indentation makes the code easier to read. + config_file_size = simple_strtoul(getenv(filesize), NULL, 16); + *(char *)(file_addr + config_file_size) = '\0'; What exactly are you doing here? Files retrieved by tftp aren't terminated with a null byte, so I'm grabbing the file size and doing so. I'll add a comment. What do you mean by files are not terminated with a nul byte? Only C strings have such termination, but files are a blob of binary data which do not carry any kind of end of file marker. This is what the file size is good for. And what happens when getenv() should return NULL? It's set by the do_tftpb routine, which succeeded, or we would have It may be set there - or not. Every setenv() can fail, for example, when we are running out of memory. bailed out after get_relfile. I can check it here to be more defensive, but if it's not set, we'll just have an empty file that the parser will skip over. Wrong. You would run simple_strtoul(NULL, ...) which is causes undefined behaviour. +struct pxecfg_label *label_create(void) +{ + struct pxecfg_label *label; + + label = malloc(sizeof *label); You allocate space for a pointer only, but it appears you want a fuill struct here? This is a full struct. 'sizeof label' is the pointer size. Yes, you are right. Anyway, please write malloc(sizeof(struct pxecfg_label)) instead to avoid such confusion. + if (!label) + return NULL; + + label-name = NULL; + label-kernel = NULL; + label-append = NULL; + label-initrd = NULL; +
Re: [U-Boot] [PATCH] 85xx: enable FDT support for STX SSA board
Dear Sergei Shtylyov, In message 4e2ea9dd.8060...@mvista.com you wrote: + ft_cpu_setup (blob, bd); I guess this won't pass checkpatch.pl (spaces before paren). You are right. Bad me. I apologize. Thanks to Kumar for cleaning 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 There's a way out of any cage. -- Captain Christopher Pike, The Menagerie (The Cage), stardate unknown. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] README: udate Coding Style description to current status quo
Signed-off-by: Wolfgang Denk w...@denx.de --- README | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README b/README index cb08816..9618537 100644 --- a/README +++ b/README @@ -4479,9 +4479,7 @@ Coding Standards: All contributions to U-Boot should conform to the Linux kernel coding style; see the file Documentation/CodingStyle and the script -scripts/Lindent in your Linux kernel source directory. In sources -originating from U-Boot a style corresponding to Lindent -pcs (adding -spaces before parameters to function calls) is actually used. +scripts/Lindent in your Linux kernel source directory. Source files originating from a different project (for example the MTD subsystem) are generally exempt from these guidelines and are not @@ -4494,9 +4492,9 @@ in your code. Please also stick to the following formatting rules: - remove any trailing white space -- use TAB characters for indentation, not spaces +- use TAB characters for indentation and vertical alignment, not spaces - make sure NOT to use DOS '\r\n' line feeds -- do not add more than 2 empty lines to source files +- do not add more than 2 consecutive empty lines to source files - do not add trailing empty lines to source files Submissions which do not conform to the standards may be returned @@ -4530,14 +4528,14 @@ it: * For major contributions, your entry to the CREDITS file * When you add support for a new board, don't forget to add this - board to the MAKEALL script, too. + board to the MAINTAINERS file, too. * If your patch adds new configuration options, don't forget to document these in the README file. * The patch itself. If you are using git (which is *strongly* recommended) you can easily generate the patch using the - git-format-patch. If you then use git-send-email to send it to + git format-patch. If you then use git send-email to send it to the U-Boot mailing list, you will avoid most of the common problems with some other mail clients. -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/7] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
Dear Michael Jones, In message 4e2fc14f.6080...@matrix-vision.de you wrote: Question about cosmetics: the README says In sources originating from U-Boot a style corresponding to Lindent -pcs (adding spaces before parameters to function calls) is actually used. Currently this is not This was the old (aka my own) style. But I got overruled. I'm going to post a patch to fix the README. uniform in this file, because checkpatch.pl doesn't like the spaces between function names and '(' (and neither do I). Are there supposed to be such spaces in U-Boot code? Or can we uniformly remove them in this file? Please remove them. 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 little knowledge is a dangerous thing.- Doug Gwyn ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] checkpatch.pl: Add ability to ignore various messages
Dear Joe, In message b41636a5e5756917b07e50a4b8309dbb092b0a17.1303778411.git@perches.com you wrote: Some users would like the ability to not emit some of the messages that checkpatch produces. Add command line option to --ignore various message types. Add .checkpatch.conf file to store a default set of ignore flags Categorize all ERROR, WARN and CHK types with flags. Signed-off-by: Joe Perches j...@perches.com --- scripts/checkpatch.pl | 456 +++-- 1 files changed, 327 insertions(+), 129 deletions(-) Did you receive any feedback for your proposal, especially from Andrew Morton? This feature would be really useful for us, but I'd rather see this in mainline than starting a fork. Best regards, Viele Grüße, 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 IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sh_eth.c: EDMAC descriptor leak
Dear Yoshinori Sato, In message 87vcxbp69w.wl%ys...@users.sourceforge.jp you wrote: Hi, I found memory leak in sh_eth.c. sh_eth_desc_init call for many times in network problem. And it every time allocate new descriptor. So leak old descriptor. I will fix this patch. diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 17dd0d2..f805785 100644 Can you please resubmit this with your Signed-off-by: line added? Please see http://www.denx.de/wiki/U-Boot/Patches for additional help how to create and submit patches. Thanks. 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 If the facts don't fit the theory, change the facts. -- Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv3] bootp: add ntpserver option to bootp request
Dear Chris Packham, In message 1305606559-29993-1-git-send-email-judge.pack...@gmail.com you wrote: From: Luuk Paulussen luuk.paulus...@alliedtelesis.co.nz Signed-off-by: Luuk Paulussen luuk.paulus...@alliedtelesis.co.nz Acked-by: Chris Packham chris.pack...@alliedtelesis.co.nz Cc: Ben Warren biggerbadder...@gmail.com --- Changes since v1: - fixed compile error in BootpVendorProcess when CONFIG_CMD_SNTP is not defined Changes since v2: - run though checkpatch.pl. Address comments from Sergei. net/bootp.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) Applied, thanks. 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 If you want strict real-time behavior, run in the real time schedu- ling class. But there are no seatbelts or airbags; main(){for(;;);} can hard hang your system. -- Bart Smaalders ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] phylib: Detect link on 10G devices correctly
Dear Andy Fleming, In message 1305762259-5639-1-git-send-email-aflem...@freescale.com you wrote: gen10g_startup() had 2 bugs: 1) It had a boolean logic error in checking the MMD mask, and always checked all of them. 2) It checked devices which don't actually report link state, which meant that it would never believe the link was fully up. Fix the boolean logic, and then mask the MMD mask so only link-reporting devices are checked. Signed-off-by: Andy Fleming aflem...@freescale.com Reported-by: Ed Swarthout ed.swarth...@freescale.com --- drivers/net/phy/generic_10g.c |8 ++-- include/linux/mdio.h |8 2 files changed, 14 insertions(+), 2 deletions(-) Applied, thanks. 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 WARNING: This Product Attracts Every Other Piece of Matter in the Universe, Including the Products of Other Manufacturers, with a Force Proportional to the Product of the Masses and Inversely Proportional to the Distance Between Them. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v2] video: Add SHARP LQ084S3LG01 LCD support on P1022DS
Dear Anatolij Gustschin, In message 20110705002700.2e54086d@wker you wrote: arch/powerpc/cpu/mpc512x/diu.c|2 +- board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |2 +- board/freescale/p1022ds/diu.c |2 +- drivers/video/fsl_diu_fb.c| 51 +--- include/fsl_diu_fb.h |2 +- 5 files changed, 40 insertions(+), 19 deletions(-) applied to u-boot-video/master. Thanks! I don't think I have seen your pull request yet. What are your plans for sending it? 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 When the tide of life turns against you And the current upsets your boat Don't waste tears on what might have been Just lie on your back and float. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC: postload: Loading some U-Boot code later
Hi Wolfgang, Thanks for the response. On Thu, Jul 28, 2011 at 7:45 AM, Wolfgang Denk w...@denx.de wrote: Dear Simon Glass, In message capnjgz0y7lnu6kiosm8q4qfqnezh0wg3txffitqhzpzuw8w...@mail.gmail.com you wrote: I am looking to implement a feature where a cut-down U-Boot is initially loaded, which is enough for a normal boot. But then when an abnormal boot is required (e.g. from a USB stick or network), we can load more code to cope with it. ... - has this been done before, or something similar? This has been done before, since the very earliest versions of U-Boot (or PPCboot, as it was called at that times). The feature is called standalone applications. There are _many_ systems around where you can load (and run) manufacturing test code, hardware diagnosis code, burn in test stuff, proprietary code to perform top secret actions nobody ever may know, etc. In my case I am just wanting to run U-Boot code. It seems to me that the standalone code is for being able to jump to a binary which can still find and call U-Boot functions. - any hints, tips, dragon warnings? - does the above approach sound reasonable? I understand what you want, and why you want it. But I disagree with the suggested implementation. If you just need a simple environment, you can probably do well with the existing standalone approach. Hmmm so I think I would need to build some of the U-Boot code into a separate binary. If you are looking for a more powerful solution, that is more tightly integrated with the rest of the U-Boot code (**) then we should make the jump and implement loadable modules. This has been done before, too - see Linux for a big example, or barebox for a smaller, more U-Boot-like one. OK I can certainly see how this could work. My idea is more along the lines that there is a single 'virtual' U-Boot code image, but we just don't have access to it all at the start. With modules we would presumably enhance the y/n CONFIG items to support an 'm' option. We would likely end up with one module per CONFIG item. Then the question arises as to how to detect when a module is needed and load it. Also there is the issue of load overhead - since some modules may only be 1KB each. That suggests the idea of grouping functions into modules, like a NET module. It sounds like a lot of work! Is there a general use for it? (**) The separation and restriction of the standalone code is an intentional one, made not for technical but for political reasons - standalone applications are provided as a means to run closed-source, proprietary code. This is something that has to hurt a bit. OK I understand that. Everything we are doing is open source here. Regards, Simon 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 How many QA engineers does it take to screw in a lightbulb? 3: 1 to screw it in and 2 to say I told you so when it doesn't work. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/5] mpc5200: digsy_mtc: add support for graphic extension board
Dear Anatolij Gustschin, In message 1306739780-19781-1-git-send-email-ag...@denx.de you wrote: Add detection and initialisation for graphic extension board and support splash screen when booting. Enable bmp command in the board configuration and provide disp command to be able to switch the display on/off. Signed-off-by: Anatolij Gustschin ag...@denx.de --- v2: - get rid of exbo.h header and put the needed defines into the .c file - use accessors when reading/writing gpio registers - correct GPIO_EE_DO, GPIO_EE_CTS and GPIO_USB1_9 macros for settings in 8-bit wkup gpio registers board/digsy_mtc/Makefile|7 ++-- board/digsy_mtc/cmd_disp.c | 57 + board/digsy_mtc/digsy_mtc.c | 66 +++ include/configs/digsy_mtc.h | 27 + 4 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 board/digsy_mtc/cmd_disp.c Applied, thanks. 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 Harrisberger's Fourth Law of the Lab: Experience is directly proportional to the amount of equipment ruined. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/5] mpc5200: digsy_mtc: add support for writing 'appreg' value
Dear Anatolij Gustschin, In message 1306739931-19890-1-git-send-email-ag...@denx.de you wrote: Up to now only reading 'appreg' value was implemented in the digsyMTC special 'mtc appreg' command. Extend the command to support writing appreg value, too. Signed-off-by: Werner Pfister pfister_wer...@intercontrol.de Signed-off-by: Anatolij Gustschin ag...@denx.de Acked-by: Detlev Zundel d...@denx.de --- v2: - fix typo in error message board/digsy_mtc/cmd_mtc.c | 46 +++- 1 files changed, 40 insertions(+), 6 deletions(-) Applied, thanks. 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 often quote myself; it adds spice to my conversation. - G. B. Shaw ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] digsy_mtc: move board into vendor dir and add vendor logo
Dear Anatolij Gustschin, In message 1310848010-31271-1-git-send-email-ag...@denx.de you wrote: Signed-off-by: Anatolij Gustschin ag...@denx.de --- Another digsy_mtc patch for this merge window. It applies on top of patch series [PATCH 0/5] mpc5200: digsy_mtc: update for next. board/{ = intercontrol}/digsy_mtc/Makefile|0 board/{ = intercontrol}/digsy_mtc/cmd_disp.c |0 board/{ = intercontrol}/digsy_mtc/cmd_mtc.c |0 board/{ = intercontrol}/digsy_mtc/cmd_mtc.h |0 board/{ = intercontrol}/digsy_mtc/digsy_mtc.c |0 board/{ = intercontrol}/digsy_mtc/eeprom.h|0 .../{ = intercontrol}/digsy_mtc/is42s16800a-7t.h |0 board/{ = intercontrol}/digsy_mtc/is45s16800a2.h |0 boards.cfg |8 include/configs/digsy_mtc.h|1 + tools/Makefile |3 +++ tools/logos/intercontrol.bmp | Bin 0 - 4998 bytes 12 files changed, 8 insertions(+), 4 deletions(-) rename board/{ = intercontrol}/digsy_mtc/Makefile (100%) rename board/{ = intercontrol}/digsy_mtc/cmd_disp.c (100%) rename board/{ = intercontrol}/digsy_mtc/cmd_mtc.c (100%) rename board/{ = intercontrol}/digsy_mtc/cmd_mtc.h (100%) rename board/{ = intercontrol}/digsy_mtc/digsy_mtc.c (100%) rename board/{ = intercontrol}/digsy_mtc/eeprom.h (100%) rename board/{ = intercontrol}/digsy_mtc/is42s16800a-7t.h (100%) rename board/{ = intercontrol}/digsy_mtc/is45s16800a2.h (100%) create mode 100644 tools/logos/intercontrol.bmp Applied, thanks. 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 We don't have to protect the environment -- the Second Coming is at hand. - James Watt ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] net: Add SMSC89128 support
Dear Phil Edworthy, In message 1306849991-10669-1-git-send-email-phil.edwor...@renesas.com you wrote: Signed-off-by: Phil Edworthy phil.edwor...@renesas.com Cc: Ben Warren biggerbadder...@gmail.com --- Changes for v2: - Changed to keep list sorted drivers/net/smc911x.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Applied, thanks. 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 What the gods would destroy they first submit to an IEEE standards committee. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] post, memorytest: fix if vstart is not = 0x0
Dear Heiko Schocher, In message 1306909447-19603-1-git-send-email...@denx.de you wrote: Signed-off-by: Heiko Schocher h...@denx.de --- post/drivers/memory.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Applied, thanks. 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 Don't hit a man when he's down - kick him; it's easier. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] post, memorytest: add support for none powerpc archs
Dear Heiko Schocher, In message 1307079504-5208-1-git-send-email...@denx.de you wrote: change bd-bi_memsize to gd-ram_size, as this is defined on all archs, so this post test can used on none powerpc archs too. Signed-off-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk h...@denx.de cc: Mike Frysinger vap...@gentoo.org --- changes for v2: added comment from Wolfgang Denk: - add comment, that this function is only valid for contiguous memory banks. added comment from Mike Frysinger: - use gd-ram_size instead of bd-bi_memsize - no ifdef needed. post/drivers/memory.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) Applied, thanks. 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 Fascinating, a totally parochial attitude. -- Spock, Metamorphosis, stardate 3219.8 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm, lib/board.c: Coding Style cleanup
Dear Albert, In message 1307088697-12159-2-git-send-email...@denx.de Heiko Schocher wrote: Signed-off-by: Heiko Schocher h...@denx.de cc: Albert Aribaud albert.u.b...@aribaud.net --- arch/arm/lib/board.c | 218 ++ 1 files changed, 113 insertions(+), 105 deletions(-) This is a cosmetic patch (Coding Style cleanup) only. Are you going to take it? 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 Looks clean and obviously correct to me, but then _everything_ I write always looks obviously correct to me. - Linus Torvalds in pine.lnx.4.10.10012090054360.791-100...@penguin.transmeta.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] part_dos: fix crash with big sector size
Dear Sergei Shtylyov, In message 201106032337.43523.sshtyl...@ru.mvista.com you wrote: Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it tries to read the MBR into 512-byte buffer situated on stack. Instead use the variable length arrays to be safe with any large sector size. Signed-off-by: Sergei Shtylyov sshtyl...@ru.mvista.com --- The same change is probably needed for disk/part_amiga.c but I'm not really sure if Amiga supports USB... :-) disk/part_dos.c |6 +++--- disk/part_dos.h |7 --- 2 files changed, 3 insertions(+), 10 deletions(-) Applied, thanks. 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 You don't have to stay up nights to succeed; you have to stay awake days. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/10] km/common: rework and simplify default environment
Dear Holger Brunck, In message 1309850836-21989-1-git-send-email-holger.bru...@keymile.com you wrote: This is the second step to simplify and decrease the default environment for the keymile boards. The release usecase formaly used to set the production environment was removed and the default configuration is now the production environment. So the formar environment variable release which has done a lot of things in the past, simply erase the current environment and do a reset which forces u-boot to setup the default environment again. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- Changes for v2: - fix bug in u-boot update function in powerpc.h s/u-boot_addr_r/load_addr_r/ include/configs/km/keymile-common.h | 105 --- include/configs/km/km-powerpc.h | 12 ++-- include/configs/km/km_arm.h | 12 ++-- 3 files changed, 35 insertions(+), 94 deletions(-) Applied, thanks. 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 In the bathtub of history the truth is harder to hold than the soap, and much more difficult to find ... - Terry Pratchett, _Sourcery_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/10] km/common: add test sw starting variable
Dear Holger Brunck, In message 1307348541-2466-3-git-send-email-holger.bru...@keymile.com you wrote: From: Thomas Herzmann thomas.herzm...@keymile.com The test SW is started when the test_bank variable is set. Signed-off-by: Thomas Herzmann thomas.herzm...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de Signed-off-by: Holger Brunck holger.bru...@keymile.com --- include/configs/km/keymile-common.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Applied, thanks. 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 Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 03/10] km/common: simplify debug environment
Dear Holger Brunck, In message 1309852372-23481-1-git-send-email-holger.bru...@keymile.com you wrote: The debug environment which is stored in textfiles in the scripts directory was reworked. Two usecase are now present which can be executed simply from the default environment: run develop: this configures the environment to setup the rootfs via nfs run ramfs: this configures the environment to setup the rootfs in ram Each architecture now has a arch variable which is used to load the architecture specific debug scripts and to set the rootpath for NFS. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- Changes for v2: - rebased to current HEAD board/keymile/scripts/README | 42 --- board/keymile/scripts/debug-arm-env.txt|2 - board/keymile/scripts/debug-common-env.txt |9 -- board/keymile/scripts/debug-ppc-env.txt|2 - board/keymile/scripts/develop-arm.txt |2 + board/keymile/scripts/develop-common.txt |6 board/keymile/scripts/develop-ppc_82xx.txt |2 + board/keymile/scripts/develop-ppc_8xx.txt |2 + board/keymile/scripts/ramfs-arm.txt|2 + board/keymile/scripts/ramfs-common.txt | 12 board/keymile/scripts/ramfs-ppc_82xx.txt |2 + board/keymile/scripts/ramfs-ppc_8xx.txt|2 + include/configs/km/keymile-common.h| 10 -- include/configs/km/km-powerpc.h|2 - include/configs/km/km82xx-common.h |2 +- include/configs/km/km8321-common.h |3 +- include/configs/km/km83xx-common.h |7 ++-- include/configs/km/km_arm.h|4 +-- 18 files changed, 68 insertions(+), 45 deletions(-) delete mode 100644 board/keymile/scripts/debug-arm-env.txt delete mode 100644 board/keymile/scripts/debug-common-env.txt delete mode 100644 board/keymile/scripts/debug-ppc-env.txt create mode 100644 board/keymile/scripts/develop-arm.txt create mode 100644 board/keymile/scripts/develop-common.txt create mode 100644 board/keymile/scripts/develop-ppc_82xx.txt create mode 100644 board/keymile/scripts/develop-ppc_8xx.txt create mode 100644 board/keymile/scripts/ramfs-arm.txt create mode 100644 board/keymile/scripts/ramfs-common.txt create mode 100644 board/keymile/scripts/ramfs-ppc_82xx.txt create mode 100644 board/keymile/scripts/ramfs-ppc_8xx.txt Applied, thanks. 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 History is only a confused heap of facts. -- Philip Earl of Chesterfield ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 04/10] km/common: remove obsolete defines and header
Dear Holger Brunck, In message 1307348541-2466-5-git-send-email-holger.bru...@keymile.com you wrote: These defines and the header keymile_hdlc_enet.h are obsolete due to the removed hdlc code. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/keymile_hdlc_enet.h | 129 -- include/configs/km/keymile-common.h | 10 --- 2 files changed, 0 insertions(+), 139 deletions(-) delete mode 100644 board/keymile/common/keymile_hdlc_enet.h Applied, thanks. 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 Unsichtbar macht sich die Dummheit, indem sie immer größere Ausmaße annimmt. -- Bertold Brecht: Der Tui-Roman ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/10] km/common: force set ethaddr after reading IVM
Dear Holger Brunck, In message 1307348541-2466-6-git-send-email-holger.bru...@keymile.com you wrote: The ethaddr is stored inside the inventory eeprom. During boottime this value was read out and the ethaddr variable was set. Previously this was only done if it ethaddr == NULL but this is wrong for our ARM boards. Because ethaddr is at this stage never NULL for ARM due to the random calculation of a MAC address in mvgbe.c. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/common.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Applied, thanks. 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 Don't hit a man when he's down - kick him; it's easier. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10] km/common: remove saveenv from do_checkboardidhwkey
Dear Holger Brunck, In message 1307348541-2466-7-git-send-email-holger.bru...@keymile.com you wrote: This is unneeded here because we save the environment when the board boots the first time. At this time we have set the values already. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/common.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) Applied, thanks. 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 Nothing in progression can rest on its original plan. We may as well think of rocking a grown man in the cradle of an infant. - Edmund Burke ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/10] km/common: move ivm functions from to ivm.c
Dear Holger Brunck, In message 1307348541-2466-8-git-send-email-holger.bru...@keymile.com you wrote: The file common.c grows in the past. So move the IVM specific code into an ivm.c file. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/common.c | 324 +-- board/keymile/common/common.h |1 + board/keymile/common/ivm.c| 342 + board/keymile/km82xx/Makefile |2 +- board/keymile/km83xx/Makefile |2 +- board/keymile/km_arm/Makefile |2 +- 6 files changed, 352 insertions(+), 321 deletions(-) create mode 100644 board/keymile/common/ivm.c Applied, thanks. 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 That Microsoft, the Trabant of the operating system world, may be glancing over the Berlin Wall at the Audis and BMWs and Mercedes. In their own universe Trabants and Ladas were mainstream too... -- Evan Leibovitch ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 08/10] km/common: remove fdt_(gs)et_node_and_value
Dear Holger Brunck, In message 1307348541-2466-9-git-send-email-holger.bru...@keymile.com you wrote: This code is unused and therefore dead code. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/common.c | 55 - 1 files changed, 0 insertions(+), 55 deletions(-) Applied, thanks. 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 girl with a future avoids the man with a past. -- Evan Esar, The Humor of Humor ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/10] powerpc/km82xx: remove 82xx specific functions from common.c
Dear Holger Brunck, In message 1307348541-2466-10-git-send-email-holger.bru...@keymile.com you wrote: Common code should be valid for more than one architecture, therefore the km82xx specific code was removed from common.c. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- board/keymile/common/common.c | 69 +-- board/keymile/common/common.h |1 - board/keymile/km82xx/km82xx.c | 60 +++ include/configs/km/km82xx-common.h |7 4 files changed, 69 insertions(+), 68 deletions(-) Applied, thanks. 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 am an atheist, thank God! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 10/10] km/common: enable cramfs and cramfs cmdline
Dear Holger Brunck, In message 1307348541-2466-11-git-send-email-holger.bru...@keymile.com you wrote: All the km boards uses CRAMFS images where the kernel is stored. This isn't architecture specific because we use it on ARM and POWERPC. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com cc: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de --- include/configs/km/keymile-common.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Applied, thanks. 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 At least they're __EXPERIENCED incompetents ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v2] video: Add SHARP LQ084S3LG01 LCD support on P1022DS
Hello Wolfgang, On Wed, 27 Jul 2011 23:25:29 +0200 Wolfgang Denk w...@denx.de wrote: Dear Anatolij Gustschin, In message 20110705002700.2e54086d@wker you wrote: arch/powerpc/cpu/mpc512x/diu.c|2 +- board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |2 +- board/freescale/p1022ds/diu.c |2 +- drivers/video/fsl_diu_fb.c| 51 +--- include/fsl_diu_fb.h |2 +- 5 files changed, 40 insertions(+), 19 deletions(-) applied to u-boot-video/master. Thanks! I don't think I have seen your pull request yet. What are your plans for sending it? I've send a pull request for some video patches, including this one, on 5 Jul 2011, I believe. It is also on patchwork http://patchwork.ozlabs.org/patch/103178/ Best regards, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/2] common: move BUILD_BUG_ON define to common.h
Dear Heiko Schocher, In message 1307610425-10481-1-git-send-email...@denx.de you wrote: see discussion also here: http://patchwork.ozlabs.org/patch/75309/ Signed-off-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de cc: Holger Brunck holger.bru...@keymile.com --- - changes for v3 moved this define only to common.h If we find a good name for a headerfile which is suggested in thread: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/78692 that would be a better place for it. Maybe: include/gp_helpers.h (general purpose helpers ...)? include/common.h|3 +++ include/ubi_uboot.h |3 --- 2 files changed, 3 insertions(+), 3 deletions(-) Applied, thanks. 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 We don't have to protect the environment -- the Second Coming is at hand. - James Watt ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] macb: fix compile warning
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, In message 1307619188-18655-1-git-send-email-andreas.de...@gmail.com you wrote: This patch fixes following compile warning: ---8--- macb.c: In function 'macb_write_hwaddr': macb.c:525:2: warning: dereferencing type-punned pointer will break strict-aliasing rules ---8--- Signed-off-by: Andreas BieÃmann andreas.de...@gmail.com --- BEWARE! this patch is only copile tested! drivers/net/macb.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 72ea1fc..da41054 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -522,9 +522,10 @@ static int macb_write_hwaddr(struct eth_device *dev) u16 hwaddr_top; /* set hardware address */ - hwaddr_bottom = cpu_to_le32(*((u32 *)dev-enetaddr)); + hwaddr_bottom = netdev-enetaddr[0] | netdev-enetaddr[1] 8 | + netdev-enetaddr[2] 16 | netdev-enetaddr[3] 24; macb_writel(macb, SA1B, hwaddr_bottom); - hwaddr_top = cpu_to_le16(*((u16 *)(dev-enetaddr + 4))); + hwaddr_top = netdev-enetaddr[4] | netdev-enetaddr[5] 8; macb_writel(macb, SA1T, hwaddr_top); return 0; This doesn't apply. Can you please rebase and resubmit? Thanks. 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 355/113 -- Not the famous irrational number PI, but an incredible simulation! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] macb: fix compile warning
Dear Wolfgang Denk, Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, In message1307619188-18655-1-git-send-email-andreas.de...@gmail.com you wrote: This patch fixes following compile warning: ---8--- macb.c: In function 'macb_write_hwaddr': macb.c:525:2: warning: dereferencing type-punned pointer will break strict-aliasing rules ---8--- Signed-off-by: Andreas Bießmannandreas.de...@gmail.com This doesn't apply. Can you please rebase and resubmit? Thanks. V2 of this patch has been mainlined in June already. Note: macb is the LAN driver for all Atmel ARM and AVR32 SoCs. Best Regards, Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL
On Wed, 27 Jul 2011 20:25:44 +0530 V, Aneesh ane...@ti.com wrote: Hi Simon, Scott, On Wed, Jul 27, 2011 at 2:52 PM, Simon Schwarz simonschwarz...@googlemail.com wrote: Dear Scott Wood, On 07/26/2011 08:04 PM, Scott Wood wrote: You're assuming all NAND SPLs will want nand_ecc -- this will not fit in most current ones. True. I changed it to: ifdef CONFIG_SPL_BUILD COBJS-y += nand_spl.o ifdef CONFIG_OMAP34XX -ffunction-sections, -fdata-sections and --gc-sections are enabled globally for SPL. Source files are #ifdef'ed out in Makefile's for SPL primarily to reduce build time. Ah, right. I would suggest to enable the super set of all files needed for all SPL's in these Makefile's and not clutter it with any more #ifdef's It's not relevant for nand_ecc, but there will still be a cases where we'll want to select particular object files because we're selecting from alternatives that provide the same symbols, or where an object file has dependencies that are not met for this target. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] macb: fix compile warning
Dear Reinhard Meyer, In message 4e30894c.1030...@emk-elektronik.de you wrote: This doesn't apply. Can you please rebase and resubmit? Thanks. V2 of this patch has been mainlined in June already. I see, thanks. 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 If the car industry behaved like the computer industry over the last 30 years, a Rolls-Royce would cost $5, get 300 miles per gallon, and blow up once a year killing all passengers inside. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT pull] Please pull u-boot-mpc85xx
On Fri, Jul 22, 2011 at 2:55 AM, Kumar Gala ga...@kernel.crashing.org wrote: The following changes since commit 74fac70084bb040342fafc3b0d2ef50fbe35646f: Merge branch 'master' of git://git.denx.de/u-boot-mmc (2011-07-19 22:27:07 +0200) are available in the git repository at: git://git.denx.de/u-boot-mpc85xx.git master What about this patch: http://patchwork.ozlabs.org/patch/93875/ -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] checkpatch.pl: Add ability to ignore various messages
On Wed, 2011-07-27 at 23:17 +0200, Wolfgang Denk wrote: Dear Joe, In message b41636a5e5756917b07e50a4b8309dbb092b0a17.1303778411.git@perches.com you wrote: Some users would like the ability to not emit some of the messages that checkpatch produces. Add command line option to --ignore various message types. Add .checkpatch.conf file to store a default set of ignore flags Categorize all ERROR, WARN and CHK types with flags. Signed-off-by: Joe Perches j...@perches.com --- scripts/checkpatch.pl | 456 +++-- 1 files changed, 327 insertions(+), 129 deletions(-) Did you receive any feedback for your proposal, especially from Andrew Morton? This feature would be really useful for us, but I'd rather see this in mainline than starting a fork. A better version is in Linus' current 3.0+ as of a couple of days ago. It's not in 3.0. commit 000d1cc1829f938c87402fc2fd4bb5e8daed6b52 Author: Joe Perches j...@perches.com Date: Mon Jul 25 17:13:25 2011 -0700 checkpatch.pl: add ability to ignore various messages Some users would like the ability to not emit some of the messages that checkpatch produces. This can make it easier to use checkpatch in other projects and integrate into scm hook scripts. Add command line option to --ignore various message types. Add option --show-types to emit the type of each message. Categorize all ERROR, WARN and CHK messages with types. Add optional .checkpatch.conf file to store default options. 3 paths are searched for .checkpatch.conf . customized per-tree configurations $HOME user global configuration when per-tree configs don't exis ./scripts lk defaults to override script The .conf file can contain any valid command-line argument and the contents are prepended to any additional command line arguments. Multiple lines may be used, blank lines are ignored, # is a comment. Update false positive output for readability. Update version to 0.32 Signed-off-by: Joe Perches j...@perches.com Acked-by: Mike Frysinger vap...@gentoo.org Cc: Andy Whitcroft a...@canonical.com Signed-off-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Linus Torvalds torva...@linux-foundation.org ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Problem while uncompressing kernel image in u-boot
Hello all, I am working on MPC8313 processor with u-boot-1.3.0 I am noticing a problem while uncompressing the kernel images. while uncompressing, it would just reset the processor without any error message. I tried loading in different address for the kernel image, but didnt work. I thought it could be a problem with the gunzip code in the u-boot. I tried linking with zlib present in the ltib(Linux target image builder) which is ported to the MPC83xx, but didnt help. I also linked with the Kernel's zlib(arch/powerpc/boot) files, didnt work either. Kernel version 2.6.23 did anybody faced with this problem before? Any ideas or suggesstions are appreciated. I have pasted the output here. U-Boot 1.3.0 (Jun 7 2011 - 08:31:39) MPC83XX Reset Status: Software Hard, External/Internal Soft, External/Internal Hard CPU: e300c3, MPC8313, Rev: 21 at 399.999 MHz, CSB: 133 MHz Board: Freescale MPC8313ERDB I2C: ready DRAM: 128 MB FLASH: 8 MB NAND: 32 MiB In:serial Out: serial Err: serial Net: TSEC0 [PRIME], TSEC1 Hit any key to stop autoboot: 6 5 4 3 0 = set ramdiskaddr 500 = save Saving Environment to Flash... Un-Protected 1 sectors Erasing Flash... . done Erased 1 sectors Writing to Flash... done Protected 1 sectors = boot setting the speed to GMII ox7205 Speed: 1000, full duplex ecntrl:0x1050 Using TSEC0 device TFTP from server 10.10.2.99; our IP address is 10.10.2.12 Filename 'rootfs_synce2.ext2.gz.uboot'. Load address: 0x500 Loading: *# # # # # # # # # # # # # done Bytes transferred = 4221009 (406851 hex) setting the speed to GMII ox7205 Speed: 1000, full duplex ecntrl:0x1050 Using TSEC0 device TFTP from server 10.10.2.99; our IP address is 10.10.2.12 Filename 'uImage_phy'. Load address: 0x100 Loading: *# # # # # done Bytes transferred = 1620406 (18b9b6 hex) ## Booting image at 0100 ... Image Name: Linux-2.6.23 Created: 2011-07-26 20:33:11 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size:1620342 Bytes = 1.5 MB Load Address: Entry Point: Verifying Checksum ... OK Uncompressing Kernel Image ... U-Boot 1.3.0 (Jun 7 2011 - 08:31:39) MPC83XX Thanks Dinesh -- View this message in context: http://old.nabble.com/Problem-while-uncompressing-kernel-image-in-u-boot-tp32152509p32152509.html Sent from the Uboot - Users mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Auto insurance (7/27/2011)
Hello, Our company represents an online community of over 36 million people, most of which are located in the US and Canada. This advertising allows us to present our online community with a first choice when they search for anything on any of the major search engines. We seek a preferred source to send our users on the major search engines for auto insurance in Milwaukee and surrounding markets. Please feel free to contact me at your convenience. I’m in the office Monday-Friday from 9:00 AM to 5:00 PM Pacific time. Yours truly, Dave Gorman IP Analyst, SP Search Phone: (888) 551-2801, ext. 1663 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problem while uncompressing kernel image in u-boot
On Wed, 27 Jul 2011 15:42:43 -0700 pdineshb pdine...@gmail.com wrote: Hello all, I am working on MPC8313 processor with u-boot-1.3.0 I am noticing a problem while uncompressing the kernel images. while uncompressing, it would just reset the processor without any error message. I tried loading in different address for the kernel image, but didnt work. I thought it could be a problem with the gunzip code in the u-boot. I tried linking with zlib present in the ltib(Linux target image builder) which is ported to the MPC83xx, but didnt help. I also linked with the Kernel's zlib(arch/powerpc/boot) files, didnt work either. Kernel version 2.6.23 did anybody faced with this problem before? Yes. I saw that problem, and fixed it in commit c123098035be8bae3859bbfbd06861f197c07631, which was over 2 years ago. Your U-Boot is even older. Please upgrade. Upgrade your kernel too while you're at it. :-) -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] panic: add noreturn attribute
On Wed, Jul 27, 2011 at 05:24, Wolfgang Denk wrote: Mike Frysinger wrote: Mike Frysinger wrote: Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger vap...@gentoo.org --- include/common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Applied, thanks. Arghh... this is causing build warnings for ALL boards: no, it isnt all boards. if you look at the code, you see it's based on the CONFIG_PANIC_HANG define. and all my boards enable that, so i didnt see any warnings. -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info.
On Wed, Jul 27, 2011 at 11:21:16AM -0700, Prafulla Wadaskar wrote: -Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- arch/arm/cpu/arm926ejs/kirkwood/cpu.c| 46 ++ arch/arm/include/asm/arch-kirkwood/cpu.h |1 + 2 files changed, 47 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index b4a4c04..a69f9f2 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -270,11 +270,26 @@ static void kw_sysrst_check(void) } #if defined(CONFIG_DISPLAY_CPUINFO) +#define MSAR_CPUCLCK_EXTRACT(X)(((X 0x2) 1) | ((X 0x40) 21) | \ + ((X 0x18) 1)) +#define MSAR_L2CLCK_EXTRACT(X) (((X 0x600) 9) | ((X 0x8) 17)) +#define MSAR_DDRCLCK_RTIO_MASK (0xf 5) + +#define MSAR_TCLCK_OFFS21 +#define MSAR_TCLCK_MASK(0x1 MSAR_TCLCK_OFFS) +#define MV_BOARD_TCLK_166MHZ 16667 +#define MV_BOARD_TCLK_200MHZ 2 +#define MSAR_TCLCK_167 (0x1 MSAR_TCLCK_OFFS) +#define MSAR_TCLCK_200 (0x0 MSAR_TCLCK_OFFS) There are one time used macros, can they be optimized? Sure, do you prefer a static assignment: #define MSAR_TCLCK_166 0x0020 or, just do away with it altogether and use the number? + int print_cpuinfo(void) { char *rev; u16 devid = (readl(KW_REG_PCIE_DEVID) 16) 0x; u8 revid = readl(KW_REG_PCIE_REVID) 0xff; + u32 cpu_clk, t_clk, tmp; + u32 sys_clk, l2_clk; + u32 l2_ratio, ddr_ratio; if ((readl(KW_REG_DEVICE_ID) 0x03) 2) { printf(Error.. %s:Unsupported Kirkwood SoC 88F%04x\n, __FUNCTION__, devid); @@ -297,6 +312,37 @@ int print_cpuinfo(void) } printf(SoC: Kirkwood 88F%04x_%s\n, devid, rev); + + tmp = readl(MPP_SAMPLE_AT_RESET); + cpu_clk = MSAR_CPUCLCK_EXTRACT(tmp); + if (cpu_clk == 0x9) + cpu_clk = 1200; + + l2_ratio = MSAR_L2CLCK_EXTRACT(tmp); + l2_clk = cpu_clk / l2_ratio; + + ddr_ratio = tmp MSAR_DDRCLCK_RTIO_MASK; + ddr_ratio = ddr_ratio 5; + if (ddr_ratio == 4) + sys_clk = 400; + + switch (tmp MSAR_TCLCK_MASK) { + case MSAR_TCLCK_167: + t_clk = MV_BOARD_TCLK_166MHZ; + break; + case MSAR_TCLCK_200: + t_clk = MV_BOARD_TCLK_200MHZ; + break; + default: + t_clk = MV_BOARD_TCLK_200MHZ; + break; + } + + printf(CPU running @ %dMHz L2 running @ %dMHz\n, + cpu_clk, l2_clk); + printf(SysClock = %dMHz, TClock = %dMHz\n, + sys_clk, t_clk / 100); It is good to encapsulate this in #ifdef CONFIG_SYS_XXX It's already encapsulated in CONFIG_DISPLAY_CPUINFO, so if enabled, on boot it looks like: SoC: Kirkwood 88F6281_A1 CPU running @ 1200MHz L2 running @ 400MHz SysClock = 400MHz, TClock = 200MHz I can encapsulate it separately if you want, but it seems a little too fine grained for me. Either I want cpu info, or I don't. ymmv. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond.
On Wed, Jul 27, 2011 at 11:23:50AM -0700, Prafulla Wadaskar wrote: -Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond. This fixes 'EHCI timed out on TD...' on the dreamplug board. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- include/usb.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/usb.h b/include/usb.h index 53603a5..168e2b2 100644 --- a/include/usb.h +++ b/include/usb.h @@ -46,7 +46,7 @@ * This is the timeout to allow for submitting an urb in ms. We allow more * time for a BULK device to react - some are slow. */ -#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100) +#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 500) This looks global change, how will it affect other implementations? I dunno, that's why it's RFC. ;-) It's a timeout, so it *shouldn't* adversely affect other systems with well behaved usb chipsets. And boards will ill-tempered usb chipsets should work better. But I'm not familiar enough with the usb code to say that definitively. I could try doing a dreamplug-specific hack to make it work, but if there's no adverse affect to other systems, then this is a cleaner approach. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC.
On Wed, Jul 27, 2011 at 11:12:35AM -0700, Prafulla Wadaskar wrote: -Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- drivers/rtc/Makefile |1 + drivers/rtc/mvinteg_rtc.c | 151 Filename mvrtc.c sounds more relevent Will do. ... +#define INTERNAL_REG_BASE_ADDR 0xf100 This must go in kirkood.h Thanks. That didn't feel right to me, but I didn't know the proper place to put it. ... + +/* register operations macros */ +#define MV_REG_READ(offset) \ + le32_to_cpu( \ + *(volatile unsigned int *)(INTERNAL_REG_BASE_ADDR + offset)) + +#define MV_REG_WRITE(offset, data) \ + do { \ + *(volatile unsigned int *)(INTERNAL_REG_BASE_ADDR + offset) = \ + cpu_to_le32(data); \ + } while (0); + +/* RTC registers */ +#define MVINTEG_RTCTIME_REG 0x10300 +#define MVINTEG_RTCDATE_REG 0x10304 NAK, please use c-strut for register definations So then, in kirkwood.h: #define KW_RTC_BASE (KW_REGISTER(0x10300)) and then use accordingly: struct mvrtc_registers { u32 time; u32 date; }; struct mvrtc_registers *mvrtc_regs = (struct mvrtc_registers *)KW_RTC_BASE; Right? I'm basing this on kirkwood/timer.c ... Regards.. Prafulla . . As always, thanks for the review and comments. thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] RFC [PATCH 4/5 v5] dreamplug: initial board support.
On Wed, Jul 27, 2011 at 11:38:55AM -0700, Prafulla Wadaskar wrote: -Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 4/5 v5] dreamplug: initial board support. Copied wholeheartedly from board/Marvell/guruplug and modified to add support for SPI NOR flash. Also, the following features are used: - Use the Marvell Integrated RTC. - display Marvell CPU/L2/etc speeds if requested. Note: this still uses MACH_TYPE_GURUPLUG until MACH_TYPE_DREAMPLUG is accepted into mainline Linux. The source from Globalscale did the same. Signed-off-by: Jason Cooper u-b...@lakedaemon.net --- There is no change log for all previous versions. Please put them here. Ref: http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions %$#%@#. I knew I forgot something. Here it is: Changes from v1 to v2: - resorted series to move 'make all' support last. Changes from v2 to v3: - Use MACH_TYPE_GURUPLUG for now until dreamplug support is in Linux. - Update MAINTAINERS. - Collapse into one patch. Changes from v3 to v4: - update copyright info as recommended by Prafulla Wadaskar. - maintain proper order in boards.cfg, MAINTAINERS, etc. - label MPP's - change back to MACH_TYPE_DREAMPLUG. This patch is just RFC until the Dreamplug is supported in Linux (and MACH_TYPE_ added). Changes from v4 to v5: - Complete rewrite due to receiving u-boot source indirectly from Global Scale Tech. - Added driver for integrated RTC. (thx GST!) - Added support for displaying CPU frequencies at boot. (thx GST!) - Adjust USB timeout to handle dreamplug EHCI chipset. - Cleaned up MPP registers based on Global Scale code. (thx GST!) - broke out MACH_TYPE_DREAMPLUG changes since it's going to be a while until the Linux arm tree gets sorted and accepts new boards again. Since all Dreamplugs currently on the market set r1 to MACH_TYPE_GURUPLUG, this allows the board to be added to u-boot while waiting for Linux mainline. Once it's in Linux mainline, then the last patch can be integrated to use MACH_TYPE_DREAMPLUG. MAINTAINERS |4 + MAKEALL |1 + board/Marvell/dreamplug/Makefile | 54 +++ board/Marvell/dreamplug/dreamplug.c | 157 board/Marvell/dreamplug/dreamplug.h | 42 + board/Marvell/dreamplug/kwbimage.cfg | 163 ++ boards.cfg |1 + include/configs/dreamplug.h | 138 8 files changed, 560 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/dreamplug/Makefile create mode 100644 board/Marvell/dreamplug/dreamplug.c create mode 100644 board/Marvell/dreamplug/dreamplug.h create mode 100644 board/Marvell/dreamplug/kwbimage.cfg create mode 100644 include/configs/dreamplug.h diff --git a/MAINTAINERS b/MAINTAINERS index 2bba7b4..9affbea 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -70,6 +70,10 @@ Conn Clark cl...@esteem.com ESTEEM192E MPC8xx +Jason Cooper u-b...@lakedaemon.net + + dreamplug ARM926EJS (Kirkwood SoC) + Joe D'Abbraccio ljd...@freescale.com MPC837xERDB MPC837x diff --git a/MAKEALL b/MAKEALL index 51db13e..55a122f 100755 --- a/MAKEALL +++ b/MAKEALL @@ -335,6 +335,7 @@ LIST_ARM9= \ cp966 \ da830evm\ da850evm\ + dreamplug \ edb9301 \ edb9302 \ edb9302a\ diff --git a/board/Marvell/dreamplug/Makefile b/board/Marvell/dreamplug/Makefile new file mode 100644 index 000..9ee5406 --- /dev/null +++ b/board/Marvell/dreamplug/Makefile @@ -0,0 +1,54 @@ +# +# (C) Copyright 2011 +# Jason Cooper u-b...@lakedaemon.net +# +# Based on work by: +# Marvell Semiconductor www.marvell.com +# Written-by: Siddarth Gore go...@marvell.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, +#
Re: [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG
On Wed, Jul 27, 2011 at 11:40:27AM -0700, Prafulla Wadaskar wrote: -Original Message- From: Jason Cooper [mailto:u-b...@lakedaemon.net] Sent: Wednesday, July 27, 2011 2:49 AM To: cl...@debian.org; w...@denx.de; Prafulla Wadaskar Cc: u-boot@lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth Gore; bd...@gag.com; Jason Cooper Subject: RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG Sorry about my related comments in patch 4/5, you can merge this patch to 4/5 to avoid confusion. See my comments in my reply to 4/5. I'd like (if possible) to get this merged before h*ll freezes over (Linux arm tree cleaned up). So, I'm trying to break the patch up into logical migration pieces. Since every Dreamplug on the market sets and uses MACH_TYPE_GURUPLUG, I think it's reasonable to use it (hopefully merged into u-boot) until the linux-arm tree gets sorted out and they accept new boards / machids. Then, the last patch can be added. Am I way off base with that idea? thx, Jason. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v2] powerpc/85xx: enable USB2 gadget mode for corenet ds board
From: Gala Kumar-B11780 Sent: Wednesday, July 27, 2011 8:18 PM To: Xie Shaohui-B21989 Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH][v2] powerpc/85xx: enable USB2 gadget mode for corenet ds board On Jul 18, 2011, at 1:10 AM, Shaohui Xie wrote: to make USB2 worked in gadget mode, we need to set it's 'dr_mode' to 'peripheral' in hwconfig, but driver starts scan from 'usb1', it'll break if it cannot find 'usb1', so we need to tell driver do not break until it scaned all the 'usbx' that the board may have. Signed-off-by: Shaohui Xie shaohui@freescale.com --- changes for v2: 1. fixed a typo in title. 2. Added some details in commit. arch/powerpc/cpu/mpc8xxx/fdt.c |3 ++- board/freescale/corenet_ds/corenet_ds.c |1 + include/configs/corenet_ds.h|2 ++ 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index d9e3e7e..60cb210 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) if (mode_idx 0 phy_idx 0) printf(WARNING: invalid phy or mode\n); } else { -break; +if (i CONFIG_SYS_USB_DEVICE) +break; } } I still dont understand why this is needed. While we might execute the loop more times than needed, will USB_MAX_DEVICE not cover us? [Xie Shaohui] Yes, if we drop the 'else', the USB_MAX_DEVICE will cover our case, If you thought loop more times than needed is OK, fine with me. Best Regards, Shaohui Xie ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot