Re: [U-Boot] Microblaze patches
Hi Wolfgang, I am going to do some test today and send you pull request. Thanks, Michal Wolfgang Denk wrote: Dear Michal Simek, In message [EMAIL PROTECTED] you wrote: here are 4 microblaze patches. All patches are in microblaze custodian repository - master branch. But you did not send any pull request yet. Will you do this any time soon? Best regards, Wolfgang Denk -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fs/fat: handle FAT on SATA
Dear Mike Frysinger, In message [EMAIL PROTECTED] you wrote: From: Sonic Zhang [EMAIL PROTECTED] The FAT file system driver should also handle FAT on SATA devices. Signed-off-by: Sonic Zhang [EMAIL PROTECTED] Signed-off-by: Mike Frysinger [EMAIL PROTECTED] --- fs/fat/fat.c |3 +++ 1 files changed, 3 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: [EMAIL PROTECTED] Q: Why do mountain climbers rope themselves together? A: To prevent the sensible ones from going home. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] HOSTCC version
Hello, What version of host gcc is needed for building the tools such as mkimage.exe? My embedded Linux development environment is Cygwin (1.3.22) based and includes gcc 3.4.4 which gives compiler errors for versions of U-Boot 1.3.3 and later. make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-2008.10/tools' gcc -g -Wall -idirafter /home/andy/bootloaders/uboot/u-boot-2008.10/include -idi rafter /home/andy/bootloaders/uboot/u-boot-2008.10/include2 -idirafter /home/and y/bootloaders/uboot/u-boot-2008.10/include -DTEXT_BASE=0xFE00 -DUSE_HOSTCC - O -c -o mkimage.o mkimage.c In file included from ../include/libfdt.h:54, from fdt_host.h:25, from mkimage.h:36, from mkimage.c:25: /home/andy/bootloaders/uboot/u-boot-2008.10/include/libfdt_env.h:50: error: conf licting types for 'uintptr_t' /usr/include/cygwin/types.h:167: error: previous declaration of 'uintptr_t' was here In file included from fdt_host.h:25, from mkimage.h:36, from mkimage.c:25: ../include/libfdt.h: In function `fdt_set_magic': ../include/libfdt.h:162: warning: implicit declaration of function `__cpu_to_be3 2' In file included from mkimage.c:26: /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h: At top level: /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:193: error: parse error before ulong /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:195: error: parse error before load /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:197: error: parse error before '}' token /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:211: error: parse error before ulong /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:231: error: parse error before os /home/andy/bootloaders/uboot/u-boot-2008.10/include/image.h:231: error: conflicting types for 'os' And so it goes on! If I remove mkimage from the BIN_FILES line of tools/Makefile then the rest builds OK. Thanks in advance, A. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools/netconsole: new script for working with netconsole over UDP
Dear Mike Frysinger, In message [EMAIL PROTECTED] you wrote: While the doc/README.NetConsole does have a snippet for people to create their own netcat script, it's a lot easier to make a simple dedicated script and tell people to use it. Could you please restrict the line length to some 70+ characters? Thanks. Also spruce it up a bit to make it user friendly. Signed-off-by: Mike Frysinger [EMAIL PROTECTED] --- doc/README.NetConsole | 18 -- tools/netconsole | 42 ++ 2 files changed, 46 insertions(+), 14 deletions(-) create mode 100755 tools/netconsole 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: [EMAIL PROTECTED] Oh, that sound of male ego. You travel halfway across the galaxy and it's still the same song. -- Eve McHuron, Mudd's Women, stardate 1330.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] easylogo: add optional gzip support
Dear Mike Frysinger, In message [EMAIL PROTECTED] you wrote: Some images can be quite large, so add an option to compress the image data with gzip in the U-Boot image. Then at runtime, the board can decompress it with the normal zlib functions. Good idea. + FILE *gz; + + sprintf (str, %s.gz, filename); Lenght checking? + sprintf (app, gzip %s, str); Lenght checking? + gz = popen (app, w); Erorr checking? + fwrite (image-data, image-size, 1, gz); Erorr checking? + pclose (gz); Erorr checking? And so on... 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: [EMAIL PROTECTED] There is is no reason for any individual to have a computer in their home. -- Ken Olsen (President of Digital Equipment Corporation), Convention of the World Future Society, in Boston, 1977 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix compile error in building MBX860T.
Dear Ben Warren, In message [EMAIL PROTECTED] you wrote: Signed-off-by: Ben Warren [EMAIL PROTECTED] --- cpu/mpc8xx/cpu.c |2 +- 1 files changed, 1 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: [EMAIL PROTECTED] Uncontrolled power will turn even saints into savages. And we can all be counted on to live down to our lowest impulses. -- Parmen, Plato's Stepchildren, stardate 5784.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HOSTCC version
Dear Andy Pont, In message [EMAIL PROTECTED] you wrote: What version of host gcc is needed for building the tools such as mkimage.exe? My embedded Linux development environment is Cygwin (1.3.22) based and includes gcc 3.4.4 which gives compiler errors for versions of U-Boot 1.3.3 and later. Do you also get these errors for the current code, i. e. top of tree from git repository? 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: [EMAIL PROTECTED] And they told us, what they wanted... Was a sound that could kill some-one, from a distance. - Kate Bush ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request - microblaze
Hi Wolfgang, please pull these changes. Thanks, Michal The following changes since commit 97a24a78ee6f34b89b821cb70eda1cf34aa11d97: Jerry Van Baren (1): libfdt: Fix redefined uintptr_t warning for USE_HOSTCC are available in the git repository at: git://www.denx.de/git/u-boot-microblaze.git master Michal Simek (4): microblaze: Set up relocation is done microblaze: Fix ml401 uart16550 setting microblaze: Remove CONFIG_LIBFDT due to error in common files microblaze: Remove XUPV2P board MAINTAINERS |1 - MAKEALL |1 - Makefile |5 - board/xilinx/xupv2p/Makefile | 50 board/xilinx/xupv2p/config.mk | 32 - board/xilinx/xupv2p/u-boot.lds| 68 --- board/xilinx/xupv2p/xparameters.h | 58 -- board/xilinx/xupv2p/xupv2p.c | 49 include/configs/ml401.h | 18 ++-- include/configs/xupv2p.h | 227 - lib_microblaze/board.c|1 + 11 files changed, 11 insertions(+), 499 deletions(-) delete mode 100644 board/xilinx/xupv2p/Makefile delete mode 100644 board/xilinx/xupv2p/config.mk delete mode 100644 board/xilinx/xupv2p/u-boot.lds delete mode 100644 board/xilinx/xupv2p/xparameters.h delete mode 100644 board/xilinx/xupv2p/xupv2p.c delete mode 100644 include/configs/xupv2p.h -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: Remove some features from ALPR to fit into 256k again
Hi Stefan, This patch looks good to me. In my opinion we don't need PCI either, when we need it for debugging, we can enable it... Best regards, Pieter -Original Message- From: Stefan Roese [mailto:[EMAIL PROTECTED] Sent: dinsdag 9 december 2008 20:09 To: u-boot@lists.denx.de Cc: Pieter Voorthuijsen Subject: [PATCH] ppc4xx: Remove some features from ALPR to fit into 256k again Signed-off-by: Stefan Roese [EMAIL PROTECTED] --- include/configs/alpr.h |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/include/configs/alpr.h b/include/configs/alpr.h index 6e9f5e5..7ce8205 100644 --- a/include/configs/alpr.h +++ b/include/configs/alpr.h @@ -235,18 +235,15 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_DIAG #define CONFIG_CMD_EEPROM -#define CONFIG_CMD_ELF #define CONFIG_CMD_FPGA #define CONFIG_CMD_I2C #define CONFIG_CMD_IRQ #define CONFIG_CMD_MII #define CONFIG_CMD_NAND #define CONFIG_CMD_NET -#define CONFIG_CMD_NFS #define CONFIG_CMD_PCI #define CONFIG_CMD_PING -#define CONFIG_CMD_REGINFO - +#undef CONFIG_CMD_NFS #undef CONFIG_WATCHDOG /* watchdog disabled */ -- 1.6.0.5 Disclaimer: The information contained in this email, including any attachments is confidential and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: Remove some features from ALPR to fit into 256k again
Hi Pieter, On Wednesday 10 December 2008, Pieter Voorthuijsen wrote: This patch looks good to me. OK, I'll push it upstream then. In my opinion we don't need PCI either, when we need it for debugging, we can enable it... And then you will find out, that it probably won't fit into the 256k anymore. No, let's keep it in for now. 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: [EMAIL PROTECTED] = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HOSTCC version
Dear Wolfgang, What version of host gcc is needed for building the tools such as mkimage.exe? My embedded Linux development environment is Cygwin (1.3.22) based and includes gcc 3.4.4 which gives compiler errors for versions of U-Boot 1.3.3 and later. Do you also get these errors for the current code, i. e. top of tree from git repository? I have downloaded the code from the git using the command: git clone git://git.denx.de/u-boot.git The errors that I see are now slightly different. It is complaining that endian.h and byteswap.h don't exist - and that appears to be correct for the system that I have. The error regarding 'uintptr_t' has been fixed based on the patch from Jerry Van Baren but I still get an number of parse errors regarding image.h. Your thoughts and comments would be much appreciated. Compiler output is shown below. Thanks and regards, Andy. In file included from ../include/libfdt.h:54, from fdt_host.h:25, from mkimage.h:36, from image.c:71: /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:27:20: endian.h: No such file or directory /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:28:22: byteswap.h: No such file or directory In file included from ../include/libfdt.h:54, from fdt_host.h:25, from mkimage.h:36, from mkimage.c:25: /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:27:20: endian.h: No such file or directory /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:28:22: byteswap.h: No such file or directory make[1]: Leaving directory `/home/andy/bootloaders/uboot/u-boot-git/tools' make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-git/tools' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/andy/bootloaders/uboot/u-boot-git/tools' make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-git/examples' make[1]: Leaving directory `/home/andy/bootloaders/uboot/u-boot-git/examples' make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-git/examples' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/andy/bootloaders/uboot/u-boot-git/examples' make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-git/api_example s' make[1]: Nothing to be done for `_depend'. make[1]: Leaving directory `/home/andy/bootloaders/uboot/u-boot-git/api_examples ' Generating include/autoconf.mk make -C tools all make[1]: Entering directory `/home/andy/bootloaders/uboot/u-boot-git/tools' gcc -Wall -pedantic -ansi -idirafter /home/andy/bootloaders/uboot/u-boot-git/inc lude -idirafter /home/andy/bootloaders/uboot/u-boot-git/include2 -idirafter /hom e/andy/bootloaders/uboot/u-boot-git/include -DTEXT_BASE=0xFE00 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c gcc -Wall -pedantic -ansi -idirafter /home/andy/bootloaders/uboot/u-boot-git/inc lude -idirafter /home/andy/bootloaders/uboot/u-boot-git/include2 -idirafter /hom e/andy/bootloaders/uboot/u-boot-git/include -DTEXT_BASE=0xFE00 -DUSE_HOSTCC -O -o img2srec.exe img2srec.o strip img2srec.exe gcc -g -Wall -idirafter /home/andy/bootloaders/uboot/u-boot-git/include -idiraft er /home/andy/bootloaders/uboot/u-boot-git/include2 -idirafter /home/andy/bootlo aders/uboot/u-boot-git/include -DTEXT_BASE=0xFE00 -DUSE_HOSTCC -O -c -o mkim age.o mkimage.c In file included from ../include/libfdt.h:54, from fdt_host.h:25, from mkimage.h:36, from mkimage.c:25: /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:27:20: endian.h: No such file or directory /home/andy/bootloaders/uboot/u-boot-git/include/libfdt_env.h:28:22: byteswap.h: No such file or directory In file included from mkimage.c:26: /home/andy/bootloaders/uboot/u-boot-git/include/image.h:195: error: parse error before ulong /home/andy/bootloaders/uboot/u-boot-git/include/image.h:197: error: parse error before load /home/andy/bootloaders/uboot/u-boot-git/include/image.h:199: error: parse error before '}' token /home/andy/bootloaders/uboot/u-boot-git/include/image.h:213: error: parse error before ulong /home/andy/bootloaders/uboot/u-boot-git/include/image.h:266: error: parse error before '}' token /home/andy/bootloaders/uboot/u-boot-git/include/image.h:384: error: parse error before image_get_data /home/andy/bootloaders/uboot/u-boot-git/include/image.h: In function `image_get_ data': /home/andy/bootloaders/uboot/u-boot-git/include/image.h:386: error: `ulong' unde clared (first use in this function) /home/andy/bootloaders/uboot/u-boot-git/include/image.h:386: error: (Each undecl ared identifier is reported only once /home/andy/bootloaders/uboot/u-boot-git/include/image.h:386: error: for each fun ction it appears in.) /home/andy/bootloaders/uboot/u-boot-git/include/image.h:386: error: parse error before hdr /home/andy/bootloaders/uboot/u-boot-git/include/image.h: At top level:
Re: [U-Boot] show_boot_progess @ ppc not working
Heiko Schocher schrieb: Hello Andre, Andre Schwarz wrote: All, can someone tell me why the board specific function void show_boot_progress(int arg) is no longer called (at least on MPC5200). Of course this line is present in the board config : #define CONFIG_SHOW_BOOT_PROGRESS 1 What have I missed ? Nothing! Good catch. I tried it on a mpc8xx and on a mpx82xx based board and it also didnt worked :-( Can you try the following patch? (This patch solved it on my boards ...) thanks, Heiko [PATCH] all platforms: make show_boot_progress () again working. Signed-off-by: Heiko Schocher [EMAIL PROTECTED] --- include/common.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/common.h b/include/common.h index 5968036..6583f00 100644 --- a/include/common.h +++ b/include/common.h @@ -693,7 +693,7 @@ intpcmcia_init (void); /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ -void __attribute__((weak)) show_boot_progress (int val); +void show_boot_progress (int val); #ifdef CONFIG_INIT_CRITICAL #error CONFIG_INIT_CRITICAL is deprecated! Heiko, of course this patch makes it work again. But the question is : Why is this specific weak function not replaced by the board specific one ? This gives me some pain when looking at the other weak functions In order to be able to compile u-boot I also (still) have to change config.h into ../include/config.h inside common/env_embedded.c. Otherwise the config file is not taken into account and complains about CFG_ENV_SIZE undeclared. I've discussed this with Wolfgang already a few weeks ago - he blamed my system configuration. This issues occur on my gentoo and ubuntu system. There's nothing special about this systems (out of the box + ELDK-4.2). How can we solve this without making a guessing game out of it ? regards, André MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HOSTCC version
Dear Andy, In message [EMAIL PROTECTED] you wrote: The errors that I see are now slightly different. It is complaining that endian.h and byteswap.h don't exist - and that appears to be correct for the system that I have. The error regarding 'uintptr_t' has been fixed based on the patch from Jerry Van Baren but I still get an number of parse errors regarding image.h. Hm... I don't know Cygwin (and we oficially don't support it). Can't you run a real OS? 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: [EMAIL PROTECTED] Nature is very un-American. Nature never hurries. - William George Jordan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] show_boot_progess @ ppc not working
Hi All, I had some 'fun' with weak functions a little while ago, and I'm wondering if maybe we should fix up a few inconsistencies... Andre Schwarz wrote: Heiko Schocher schrieb: Hello Andre, Andre Schwarz wrote: All, can someone tell me why the board specific function void show_boot_progress(int arg) is no longer called (at least on MPC5200). snip Can you try the following patch? (This patch solved it on my boards ...) snip -void __attribute__((weak)) show_boot_progress (int val); +void show_boot_progress (int val); This makes show_boot_progress () consistent with nearly every other weak function (see below) Interesting that this is the only function defined weak in this way. All other weak functions are defined normally (no attributes) and then declared weak with an alias. Good examples can be found in /include/status_led.h lines 391-396 and /lib_arm/board.c lines 125-138 snip Heiko, of course this patch makes it work again. This patch leaves only a handful of inconsistent weak functions: /include/asm-avr32/arch-at32ap700x/clk.h line 85: extern void gclk_init(void) __attribute__((weak)); But this is not designed to be overridable - It is designed to not require a declaration - See /cpu/at32ap/cpu.c lines 68-69: if(gclk_init) gclk_init(); /common/cmd_boot.c lines 32-36: (/common/cmd_elf.c lines 31-54 and /cpu/mips/cpu.c lines 41-43 are same semantics) __attribute__((weak)) unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) { return entry (argc, argv); } snip But the question is : Why is this specific weak function not replaced by the board specific one ? Good question - maybe because this function is inlined? (just a wild guess) - could be any of a number of reasons as far as I can tell. This gives me some pain when looking at the other weak functions Is there any reason _not_ to fix up these last four weak functions so that all weak functions are defined and declared the same way? I can do up a patch if the consensus is to make them consistent. Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] show_boot_progess @ ppc not working
Graeme Russ schrieb: Hi All, I had some 'fun' with weak functions a little while ago, and I'm wondering if maybe we should fix up a few inconsistencies... Andre Schwarz wrote: Heiko Schocher schrieb: Hello Andre, Andre Schwarz wrote: All, can someone tell me why the board specific function void show_boot_progress(int arg) is no longer called (at least on MPC5200). snip Can you try the following patch? (This patch solved it on my boards ...) snip -void __attribute__((weak)) show_boot_progress (int val); +void show_boot_progress (int val); This makes show_boot_progress () consistent with nearly every other weak function (see below) Interesting that this is the only function defined weak in this way. All other weak functions are defined normally (no attributes) and then declared weak with an alias. Good examples can be found in /include/status_led.h lines 391-396 and /lib_arm/board.c lines 125-138 snip Heiko, of course this patch makes it work again. This patch leaves only a handful of inconsistent weak functions: /include/asm-avr32/arch-at32ap700x/clk.h line 85: extern void gclk_init(void) __attribute__((weak)); But this is not designed to be overridable - It is designed to not require a declaration - See /cpu/at32ap/cpu.c lines 68-69: if(gclk_init) gclk_init(); /common/cmd_boot.c lines 32-36: (/common/cmd_elf.c lines 31-54 and /cpu/mips/cpu.c lines 41-43 are same semantics) __attribute__((weak)) unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) { return entry (argc, argv); } snip But the question is : Why is this specific weak function not replaced by the board specific one ? Good question - maybe because this function is inlined? (just a wild guess) - could be any of a number of reasons as far as I can tell. This gives me some pain when looking at the other weak functions Is there any reason _not_ to fix up these last four weak functions so that all weak functions are defined and declared the same way? I can do up a patch if the consensus is to make them consistent. Please send a proper patch with explanation. Since I can not explain this effect 100% I'm not able to fix it. Regards, Graeme MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] Add support for boards where the NOR FLASH is not memory-mapped
This patch adds the CONFIG_FLASH_NOT_MEM_MAPPED define which can be used on boards where the NOR FLASH is not memory-mapped and special accessor functions are needed to access the NOR FLASH. This affects the memory commands (cmd_mem.c) and the environment (env_flash.c). Boards using CONFIG_FLASH_NOT_MEM_MAPPED need to additionally specify CONFIG_FLASH_BASE and CONFIG_FLASH_END so that the NOR FLASH region can be detected. This will be used by the upcoming VCTH board support. Signed-off-by: Stefan Roese [EMAIL PROTECTED] --- v2: - Added configuration option description to the README - Fix bug in NOR FLASH end detection in env_flash.c (spotted by Wolfgang) - Further cleanup of the env_flash code supporting non memory-mapped NOR FLASH. - Macros in crc32.h now wrapped in do { ... } while (0) as suggested by Wolfgang README | 17 common/cmd_mem.c| 66 +--- common/env_flash.c | 70 +- lib_generic/crc32.c | 27 --- 4 files changed, 148 insertions(+), 32 deletions(-) diff --git a/README b/README index 861ea83..0fd07a9 100644 --- a/README +++ b/README @@ -2180,6 +2180,23 @@ Configuration Settings: digits and dots. Recommended value: 45 (9..1) for 80 column displays, 15 (3..1) for 40 column displays. +- CONFIG_FLASH_NOT_MEM_MAPPED + Unfortunately there are boards, where the NOR FLASH can't + be accessed memory mapped. So we needed to find a way to + access those FLASH's from the CFI driver and the environment. + For the non-memory-mapped NOR FLASH, we need to define the + NOR FLASH area. This can't be detected via the addr2info() + function, since we check for flash access in the very early + U-Boot code, before the NOR FLASH is detected. So we need + to additionally define the following options to configure + the NOR FLASH range: + + - CONFIG_FLASH_BASE + Starting address of the NOR FLASH area + + - CONFIG_FLASH_END + Highest possible address of the NOR FLASH area + - CONFIG_SYS_RX_ETH_BUFFER: Defines the number of Ethernet receive buffers. On some Ethernet controllers it is recommended to set this value diff --git a/common/cmd_mem.c b/common/cmd_mem.c index d7666c2..f545f6a 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -43,6 +43,43 @@ #define PRINTF(fmt,args...) #endif +#if defined(CONFIG_HAS_DATAFLASH) +#define CONFIG_FLASH_NOT_MEM_MAPPED +#define OK DATAFLASH_OK +#endif + +#if !defined(OK) +#define OK 1 +#endif + +void *board_flash_read_memcpy(void *__to, __const__ void *__from, int n); + +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED) +static inline int flash_read(void *__to, __const__ void *__from, int n) +{ +#if defined(CONFIG_HAS_DATAFLASH) + return read_dataflash(__from, n, __to); +#elif defined(CONFIG_FLASH_NOT_MEM_MAPPED) + if ((addr2info((u32)__from) != NULL)) + board_flash_read_memcpy(__to, __from, n); + else + memcpy(__to, __from, n); + return OK; +#endif +} +#endif /* defined(CONFIG_FLASH_NOT_MEM_MAPPED) */ + +static inline int is_flash_addr(u32 addr) +{ +#if defined(CONFIG_HAS_DATAFLASH) + return addr_dataflash(addr); +#elif defined(CONFIG_FLASH_NOT_MEM_MAPPED) + return (addr2info(addr) != NULL); +#else + return 1; +#endif +} + static int mod_mem(cmd_tbl_t *, int, int, int, char *[]); /* Display values from last command. @@ -63,7 +100,7 @@ static ulong base_address = 0; int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { ulong addr, length; -#if defined(CONFIG_HAS_DATAFLASH) +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED) ulong nbytes, linebytes; #endif int size; @@ -100,7 +137,7 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) length = simple_strtoul(argv[2], NULL, 16); } -#if defined(CONFIG_HAS_DATAFLASH) +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED) /* Print the lines. * * We buffer all read data, so we can make sure data is read only @@ -112,10 +149,13 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) void* p; linebytes = (nbytesDISP_LINE_LEN)?DISP_LINE_LEN:nbytes; - rc = read_dataflash(addr, (linebytes/size)*size, linebuf); - p = (rc == DATAFLASH_OK) ? linebuf : (void*)addr; + rc = flash_read(linebuf, (void *)addr, (linebytes/size)*size); + p = (rc == OK) ? linebuf : (void *)addr; print_buffer(addr, p, size, linebytes/size, DISP_LINE_LEN/size); + /* Clear rc, otherwise command repeat doesn't work */ +
[U-Boot] [PATCH] ppc4xx: Update TEXT_BASE for CPCI405 boards
This patch fixes building U-Boot for CPCI405 boards. Signed-off-by: Matthias Fuchs [EMAIL PROTECTED] --- Makefile|5 + board/esd/cpci405/config.mk |6 +- include/configs/CPCI405.h |4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index f8fe29c..2f07657 100644 --- a/Makefile +++ b/Makefile @@ -1261,14 +1261,11 @@ CMS700_config: unconfig CPCI2DP_config:unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd -CPCI405_config:unconfig - @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd - +CPCI405_config \ CPCI4052_config\ CPCI405DT_config \ CPCI405AB_config: unconfig @mkdir -p $(obj)board/esd/cpci405 - @echo TEXT_BASE = 0xFFFC $(obj)board/esd/cpci405/config.tmp @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd CPCIISER4_config: unconfig diff --git a/board/esd/cpci405/config.mk b/board/esd/cpci405/config.mk index 6cfb891..1bdf5e4 100644 --- a/board/esd/cpci405/config.mk +++ b/board/esd/cpci405/config.mk @@ -21,8 +21,4 @@ # MA 02111-1307 USA # -sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - -ifndef TEXT_BASE -TEXT_BASE = 0xFFFD -endif +TEXT_BASE = 0xFFFC diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h index 1a2bc1c..eb90620 100644 --- a/include/configs/CPCI405.h +++ b/include/configs/CPCI405.h @@ -196,9 +196,9 @@ * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 */ #define CONFIG_SYS_SDRAM_BASE 0x -#define CONFIG_SYS_FLASH_BASE 0xFFFD +#define CONFIG_SYS_FLASH_BASE 0xFFFC #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MONITOR_LEN (192 * 1024)/* Reserve 196 kB for Monitor */ +#define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 196 kB for Monitor */ #define CONFIG_SYS_MALLOC_LEN (128 * 1024)/* Reserve 128 kB for malloc() */ /* -- 1.5.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: Update TEXT_BASE for CPCI405 boards
Hi Matthias, On Wednesday 10 December 2008, Matthias Fuchs wrote: This patch fixes building U-Boot for CPCI405 boards. I have a small improvement suggestion below: Signed-off-by: Matthias Fuchs [EMAIL PROTECTED] --- Makefile|5 + board/esd/cpci405/config.mk |6 +- include/configs/CPCI405.h |4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index f8fe29c..2f07657 100644 --- a/Makefile +++ b/Makefile @@ -1261,14 +1261,11 @@ CMS700_config:unconfig CPCI2DP_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd -CPCI405_config: unconfig - @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd - +CPCI405_config \ CPCI4052_config \ CPCI405DT_config \ CPCI405AB_config:unconfig @mkdir -p $(obj)board/esd/cpci405 - @echo TEXT_BASE = 0xFFFC $(obj)board/esd/cpci405/config.tmp @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd CPCIISER4_config:unconfig diff --git a/board/esd/cpci405/config.mk b/board/esd/cpci405/config.mk index 6cfb891..1bdf5e4 100644 --- a/board/esd/cpci405/config.mk +++ b/board/esd/cpci405/config.mk @@ -21,8 +21,4 @@ # MA 02111-1307 USA # -sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - -ifndef TEXT_BASE -TEXT_BASE = 0xFFFD -endif +TEXT_BASE = 0xFFFC diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h index 1a2bc1c..eb90620 100644 --- a/include/configs/CPCI405.h +++ b/include/configs/CPCI405.h @@ -196,9 +196,9 @@ * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 */ #define CONFIG_SYS_SDRAM_BASE0x -#define CONFIG_SYS_FLASH_BASE0xFFFD +#define CONFIG_SYS_FLASH_BASE0xFFFC #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MONITOR_LEN (192 * 1024)/* Reserve 196 kB for Monitor */ +#define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 196 kB for Monitor */ How about this: #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* Start of U-Boot */ #define CONFIG_SYS_MONITOR_LEN (0x - CONFIG_SYS_MONITOR_BASE + 1) You only need to change TEXT_BASE this way. 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: [EMAIL PROTECTED] = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] UBI: Return -ENOMEM upon failing malloc
Return with correct error code (-ENOMEM) from ubi_attach_mtd_dev() upon failing malloc(). Thanks to Michael Lawnick for pointing this out. Signed-off-by: Stefan Roese [EMAIL PROTECTED] --- v2: - Slightly improved version drivers/mtd/ubi/build.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index bdf75c9..f4b01a9 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -784,19 +784,20 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset) if (err) goto out_free; + err = -ENOMEM; ubi-peb_buf1 = vmalloc(ubi-peb_size); if (!ubi-peb_buf1) goto out_free; ubi-peb_buf2 = vmalloc(ubi-peb_size); if (!ubi-peb_buf2) -goto out_free; + goto out_free; #ifdef CONFIG_MTD_UBI_DEBUG mutex_init(ubi-dbg_buf_mutex); ubi-dbg_peb_buf = vmalloc(ubi-peb_size); if (!ubi-dbg_peb_buf) -goto out_free; + goto out_free; #endif err = attach_by_scanning(ubi); -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] init FEC @ MPC5200
Ben, after cloning the latest u-boot git I can see that you've added this inside the mvBC-P board setup : int board_eth_init(bd_t *bis) { cpu_eth_init(bis); /* Built in FEC comes first */ return pci_eth_init(bis); } Are you aware that there's no PHY connected and the ETH-Pins are used otherwise ? CONFIG_MPC5xxx_FEC is _not_ defined. Can you tell me where cpu_eth_init(bis) is actually pointing to ? regards, André MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] ppc4xx: Update TEXT_BASE for CPCI405 boards
This patch fixes building U-Boot for CPCI405 boards. Signed-off-by: Matthias Fuchs [EMAIL PROTECTED] --- Makefile|5 + board/esd/cpci405/config.mk |6 +- include/configs/CPCI405.h |6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f8fe29c..2f07657 100644 --- a/Makefile +++ b/Makefile @@ -1261,14 +1261,11 @@ CMS700_config: unconfig CPCI2DP_config:unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd -CPCI405_config:unconfig - @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd - +CPCI405_config \ CPCI4052_config\ CPCI405DT_config \ CPCI405AB_config: unconfig @mkdir -p $(obj)board/esd/cpci405 - @echo TEXT_BASE = 0xFFFC $(obj)board/esd/cpci405/config.tmp @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd CPCIISER4_config: unconfig diff --git a/board/esd/cpci405/config.mk b/board/esd/cpci405/config.mk index 6cfb891..1bdf5e4 100644 --- a/board/esd/cpci405/config.mk +++ b/board/esd/cpci405/config.mk @@ -21,8 +21,4 @@ # MA 02111-1307 USA # -sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - -ifndef TEXT_BASE -TEXT_BASE = 0xFFFD -endif +TEXT_BASE = 0xFFFC diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h index 1a2bc1c..89ba139 100644 --- a/include/configs/CPCI405.h +++ b/include/configs/CPCI405.h @@ -196,9 +196,9 @@ * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 */ #define CONFIG_SYS_SDRAM_BASE 0x -#define CONFIG_SYS_FLASH_BASE 0xFFFD -#define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MONITOR_LEN (192 * 1024)/* Reserve 196 kB for Monitor */ +#define CONFIG_SYS_FLASH_BASE TEXT_BASE +#define CONFIG_SYS_MONITOR_BASETEXT_BASE +#define CONFIG_SYS_MONITOR_LEN (~(TEXT_BASE) + 1) #define CONFIG_SYS_MALLOC_LEN (128 * 1024)/* Reserve 128 kB for malloc() */ /* -- 1.5.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Create a Bootable DAS U-Boot pen drive
Hello all, I'm wondering if in theory it's possible to create a bootable pen-drive with U-Boot on it to allow the following: 1st) Take a PPC Mac Mini for instance that runs OpenFirmware. 2nd) Boot it from the USB Pen-drive 3rd) U-Boot will be loaded 4th) U-Boot would offer the possibility to boot directly from a OS that it's expecting U-Boot as native boot device, like: Amiga OS 4 on Sam440p 5th) Boot occurs normally as it should be if Mac was equipped with U-Boot. That would be somehow similar with Efi-X that allows installation of OS X directly on regular pc's, right? Is that possible? Att, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] ppc4xx: Fix Ethernet PHY LED configuration on PMC440 boards
Signed-off-by: Matthias Fuchs [EMAIL PROTECTED] --- board/esd/pmc440/pmc440.c | 22 ++ 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index 8563d7d..4d81c33 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -755,17 +755,31 @@ int post_hotkeys_pressed(void) #ifdef CONFIG_RESET_PHY_R void reset_phy(void) { + char *s; + unsigned short val_method, val_behavior; + + /* special LED setup for NGCC/CANDES */ + if ((s = getenv(bd_type)) + ((!strcmp(s, ngcc)) || (!strcmp(s, candes { + val_method = 0x0e0a; + val_behavior = 0x0cf2; + } else { + /* PMC440 standard type */ + val_method = 0x0e10; + val_behavior = 0x0cf0; + } + if (miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x1f, 0x0001) == 0) { miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x11, 0x0010); - miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x11, 0x0df0); - miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x10, 0x0e10); + miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x11, val_behavior); + miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x10, val_method); miiphy_write(ppc_4xx_eth0, CONFIG_PHY_ADDR, 0x1f, 0x); } if (miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x1f, 0x0001) == 0) { miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x11, 0x0010); - miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x11, 0x0df0); - miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x10, 0x0e10); + miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x11, val_behavior); + miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x10, val_method); miiphy_write(ppc_4xx_eth1, CONFIG_PHY1_ADDR, 0x1f, 0x); } } -- 1.5.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] ppc4xx: Disable EEPROM write access on PMC440 boards
This patch disables EEPROM wrtie access by default on PMC440 board. Signed-off-by: Matthias Fuchs [EMAIL PROTECTED] --- board/esd/pmc440/pmc440.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index 4d81c33..3824105 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -107,7 +107,7 @@ int board_early_init_f(void) * Setup the GPIO pins * TODO: setup GPIOs via CONFIG_SYS_4xx_GPIO_TABLE in board's config file */ - out32(GPIO0_OR,0x4002); + out32(GPIO0_OR,0x4102); out32(GPIO0_TCR, 0x4c90011f); out32(GPIO0_OSRL, 0x28051400); out32(GPIO0_OSRH, 0x55005000); -- 1.5.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] USB storage cleanup patch
Cleanup usb storage Signed-off-by: Michael Trimarchi [EMAIL PROTECTED] --- diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..973d82f 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -63,9 +63,9 @@ #undef BBB_XPORT_TRACE #ifdef USB_STOR_DEBUG -#define USB_STOR_PRINTF(fmt,args...) printf (fmt ,##args) +#define USB_STOR_PRINTF(fmt, args...) printf(fmt , ##args) #else -#define USB_STOR_PRINTF(fmt,args...) +#define USB_STOR_PRINTF(fmt, args...) #endif #include scsi.h @@ -110,7 +110,7 @@ typedef struct { __u8CBWCDB[CBWCDBLENGTH]; } umass_bbb_cbw_t; #define UMASS_BBB_CBW_SIZE 31 -static __u32 CBWTag = 0; +static __u32 CBWTag; /* Command Status Wrapper */ typedef struct { @@ -126,34 +126,35 @@ typedef struct { #define UMASS_BBB_CSW_SIZE 13 #define USB_MAX_STOR_DEV 5 -static int usb_max_devs = 0; /* number of highest available usb device */ +static int usb_max_devs; /* number of highest available usb device */ static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV]; struct us_data; -typedef int (*trans_cmnd)(ccb*, struct us_data*); -typedef int (*trans_reset)(struct us_data*); +typedef int (*trans_cmnd)(ccb *cb, struct us_data *data); +typedef int (*trans_reset)(struct us_data *data); struct us_data { - struct usb_device *pusb_dev; /* this usb_device */ - unsigned intflags; /* from filter initially */ - unsigned char ifnum; /* interface number */ - unsigned char ep_in; /* in endpoint */ - unsigned char ep_out; /* out ... */ - unsigned char ep_int; /* interrupt . */ - unsigned char subclass;/* as in overview */ - unsigned char protocol;/* .. */ - unsigned char attention_done; /* force attn on first cmd */ - unsigned short ip_data; /* interrupt data */ - int action; /* what to do */ - int ip_wanted; /* needed */ - int *irq_handle; /* for USB int requests */ - unsigned intirqpipe; /* pipe for release_irq */ - unsigned char irqmaxp;/* max packed for irq Pipe */ - unsigned char irqinterval; /* Intervall for IRQ Pipe */ - ccb *srb; /* current srb */ - trans_reset transport_reset; /* reset routine */ - trans_cmnd transport; /* transport routine */ + struct usb_device *pusb_dev; /* this usb_device */ + + unsigned intflags; /* from filter initially */ + unsigned char ifnum; /* interface number */ + unsigned char ep_in; /* in endpoint */ + unsigned char ep_out; /* out ... */ + unsigned char ep_int; /* interrupt . */ + unsigned char subclass; /* as in overview */ + unsigned char protocol; /* .. */ + unsigned char attention_done; /* force attn on first cmd */ + unsigned short ip_data;/* interrupt data */ + int action; /* what to do */ + int ip_wanted; /* needed */ + int *irq_handle;/* for USB int requests */ + unsigned intirqpipe;/* pipe for release_irq */ + unsigned char irqmaxp;/* max packed for irq Pipe */ + unsigned char irqinterval;/* Intervall for IRQ Pipe */ + ccb *srb; /* current srb */ + trans_reset transport_reset;/* reset routine */ + trans_cmnd transport; /* transport routine */ }; static struct us_data usb_stor[USB_MAX_STOR_DEV]; @@ -163,10 +164,12 @@ static struct us_data usb_stor[USB_MAX_STOR_DEV]; #define USB_STOR_TRANSPORT_FAILED -1 #define USB_STOR_TRANSPORT_ERROR -2 - -int usb_stor_get_info(struct usb_device *dev, struct us_data *us, block_dev_desc_t *dev_desc); -int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,struct us_data *ss); -unsigned long usb_stor_read(int device, unsigned long blknr, unsigned long blkcnt, void *buffer); +int usb_stor_get_info(struct usb_device *dev, struct us_data *us, + block_dev_desc_t *dev_desc); +int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, + struct us_data *ss); +unsigned long usb_stor_read(int device, unsigned long blknr, + unsigned long blkcnt, void *buffer); struct usb_device *
[U-Boot] [GIT PULL] MIPS updates
Hi Wolfgang, please pull U-Boot/MIPS repository to pick up the following changes. Thanks in advance, Shinya --- The following changes since commit 2145188bea2df8f2b47a87ec3071b55027e8d0ae: Ben Warren (1): Fix compile error in building MBX860T. are available in the git repository at: git://git.denx.de/u-boot-mips.git master Stefan Roese (4): MIPS: Add onenand_init() to board.c and move nand_init() MIPS: Add board_early_init_f() to init_sequence MIPS: Add CONFIG_SKIP_LOWLEVEL_INIT MIPS: Flush data cache upon relocation cpu/mips/start.S | 32 +--- lib_mips/board.c | 25 - 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/cpu/mips/start.S b/cpu/mips/start.S index 6a22302..57db589 100644 --- a/cpu/mips/start.S +++ b/cpu/mips/start.S @@ -243,9 +243,11 @@ reset: mtc0zero, CP0_COUNT mtc0zero, CP0_COMPARE +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) /* CONFIG0 register */ li t0, CONF_CM_UNCACHED mtc0t0, CP0_CONFIG +#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */ /* Initialize $gp. */ @@ -255,6 +257,7 @@ reset: 1: lw gp, 0(ra) +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) /* Initialize any external memory. */ la t9, lowlevel_init @@ -271,6 +274,7 @@ reset: */ li t0, CONF_CM_CACHABLE_NONCOHERENT mtc0t0, CP0_CONFIG +#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */ /* Set up temporary stack. */ @@ -307,6 +311,7 @@ relocate_code: la t3, in_ram lw t2, -12(t3) /* t2 -- uboot_end_data*/ movet1, a2 + moves2, a2 /* s2 -- destination address */ /* * Fix $gp: @@ -316,13 +321,21 @@ relocate_code: movet6, gp sub gp, CONFIG_SYS_MONITOR_BASE add gp, a2 /* gp now adjusted */ - sub t6, gp, t6 /* t6 -- relocation offset */ + sub s1, gp, t6 /* s1 -- relocation offset */ /* * t0 = source address * t1 = target address * t2 = source end address */ + + /* +* Save destination address and size for later usage in flush_cache() +*/ + moves0, a1 /* save gd in s0*/ + movea0, t1 /* a0 -- destination addr */ + sub a1, t2, t0 /* a1 -- size */ + /* On the purple board we copy the code earlier in a special way * in order to solve flash problems */ @@ -338,9 +351,14 @@ relocate_code: /* If caches were enabled, we would have to flush them here. */ + /* a0 a1 are already set up for flush_cache(start, size) */ + la t9, flush_cache + jalrt9 + nop + /* Jump to where we've relocated ourselves. */ - addit0, a2, in_ram - _start + addit0, s2, in_ram - _start jr t0 nop @@ -367,7 +385,7 @@ in_ram: 1: lw t1, 0(t4) beqzt1, 2f - add t1, t6 + add t1, s1 sw t1, 0(t4) 2: addit2, 1 @@ -378,8 +396,8 @@ in_ram: */ lw t1, -12(t0) /* t1 -- uboot_end_data*/ lw t2, -8(t0) /* t2 -- uboot_end */ - add t1, t6 /* adjust pointers */ - add t2, t6 + add t1, s1 /* adjust pointers */ + add t2, s1 sub t1, 4 1: @@ -387,10 +405,10 @@ in_ram: bltlt1, t2, 1b sw zero, 0(t1) /* delay slot */ - movea0, a1 + movea0, s0 /* a0 -- gd*/ la t9, board_init_r jr t9 - movea1, a2 /* delay slot */ + movea1, s2 /* delay slot */ .endrelocate_code diff --git a/lib_mips/board.c b/lib_mips/board.c index 9c997f1..dfe6831 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -30,6 +30,7 @@ #include net.h #include environment.h #include nand.h +#include onenand_uboot.h #include spi.h DECLARE_GLOBAL_DATA_PTR; @@ -71,6 +72,15 @@ static ulong mem_malloc_brk; */ unsigned long mips_io_port_base = -1; +int __board_early_init_f(void) +{ + /* +* Nothing to do in this dummy implementation +*/ + return 0; +} +int board_early_init_f(void) __attribute__((weak, alias(__board_early_init_f))); + /* * The Malloc area is immediately below the monitor copy in DRAM */ @@ -168,6 +178,7 @@ static int init_baudrate (void) typedef int (init_fnc_t) (void); init_fnc_t *init_sequence[] = { + board_early_init_f, timer_init, env_init, /* initialize environment */
[U-Boot] [RFC USB PATCH 1/3 V3] Prepare USB layer for ehci support
Prepare USB layer for support ehci Signed-off-by: Michael Trimarchi [EMAIL PROTECTED] --- common/cmd_usb.c |2 +- common/usb.c |2 +- include/usb.h | 19 +++ include/usb_defs.h | 10 ++ 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 8b19240..9e55c7c 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -310,7 +310,7 @@ void usb_show_tree_graph(struct usb_device *dev, char *pre) pre[index] = 0; printf( %s (%s, %dmA)\n, usb_get_class_desc( dev-config.if_desc[0].bInterfaceClass), - dev-slow ? 1.5MBit/s : 12MBit/s, + dev-speed ? 1.5MBit/s : 12MBit/s, dev-config.MaxPower * 2); if (strlen(dev-mf) || strlen(dev-prod) || strlen(dev-serial)) printf( %s %s %s %s\n, pre, dev-mf, dev-prod, dev-serial); diff --git a/common/usb.c b/common/usb.c index ee18152..3138452 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1136,7 +1136,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port) /* Allocate a new device struct for it */ usb = usb_alloc_new_device(); - usb-slow = (portstatus USB_PORT_STAT_LOW_SPEED) ? 1 : 0; + usb-speed = (portstatus USB_PORT_STAT_LOW_SPEED) ? 1 : 0; dev-children[port] = usb; usb-parent = dev; diff --git a/include/usb.h b/include/usb.h index 84a77b2..b85afec 100644 --- a/include/usb.h +++ b/include/usb.h @@ -138,7 +138,7 @@ enum { struct usb_device { int devnum; /* Device number on USB bus */ - int slow; /* Slow device? */ + int speed; /* full/low/high */ charmf[32]; /* manufacturer */ charprod[32]; /* product */ charserial[32]; /* serial number */ @@ -171,6 +171,7 @@ struct usb_device { unsigned long status; int act_len;/* transfered bytes */ int maxchild; /* Number of ports if hub */ + int portnr; struct usb_device *parent; struct usb_device *children[USB_MAXCHILDREN]; }; @@ -180,8 +181,9 @@ struct usb_device { */ #if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || \ - defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_SL811HS) || \ - defined(CONFIG_USB_ISP116X_HCD) || defined(CONFIG_USB_R8A66597_HCD) + defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_OHCI_NEW) || \ + defined(CONFIG_USB_SL811HS) || defined(CONFIG_USB_ISP116X_HCD) || \ + defined(CONFIG_USB_R8A66597_HCD) int usb_lowlevel_init(void); int usb_lowlevel_stop(void); @@ -279,7 +281,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate); * - endpoint number (4 bits) * - current Data0/1 state (1 bit) * - direction (1 bit) - * - speed (1 bit) + * - speed (2 bits) * - max packet size (2 bits: 8, 16, 32 or 64) * - pipe type (2 bits: control, interrupt, bulk, isochronous) * @@ -296,7 +298,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate); * - device: bits 8-14 * - endpoint:bits 15-18 * - Data0/1: bit 19 - * - speed: bit 26 (0 = Full, 1 = Low Speed) + * - speed: bit 26 (0 = Full, 1 = Low Speed, 2 = High) * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt, * 10 = control, 11 = bulk) * @@ -308,8 +310,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate); /* Create various pipes... */ #define create_pipe(dev,endpoint) \ (((dev)-devnum 8) | (endpoint 15) | \ - ((dev)-slow 26) | (dev)-maxpacketsize) -#define default_pipe(dev) ((dev)-slow 26) + ((dev)-speed 26) | (dev)-maxpacketsize) +#define default_pipe(dev) ((dev)-speed 26) #define usb_sndctrlpipe(dev, endpoint) ((PIPE_CONTROL 30) | \ create_pipe(dev, endpoint)) @@ -359,7 +361,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate); #define usb_pipe_endpdev(pipe) (((pipe) 8) 0x7ff) #define usb_pipeendpoint(pipe) (((pipe) 15) 0xf) #define usb_pipedata(pipe) (((pipe) 19) 1) -#define usb_pipeslow(pipe) (((pipe) 26) 1) +#define usb_pipespeed(pipe)(((pipe) 26) 3) +#define usb_pipeslow(pipe) (usb_pipespeed(pipe) == USB_SPEED_LOW) #define usb_pipetype(pipe) (((pipe) 30) 3) #define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS) #define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT) diff --git a/include/usb_defs.h b/include/usb_defs.h index 353019f..8032e57 100644 --- a/include/usb_defs.h +++
[U-Boot] [RFC USB PATCH 2/3 V3] USB ehci core support
USB ehci core support Signed-off-by: Michael Trimarchi [EMAIL PROTECTED] --- drivers/usb/Makefile|1 + drivers/usb/usb_ehci.h | 167 +++ drivers/usb/usb_ehci_core.c | 661 +++ drivers/usb/usb_ehci_core.h | 29 ++ 4 files changed, 858 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/usb_ehci.h create mode 100644 drivers/usb/usb_ehci_core.c create mode 100644 drivers/usb/usb_ehci_core.h diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 856f51a..fbc6521 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -28,6 +28,7 @@ LIB := $(obj)libusb.a # core COBJS-y += usbdcore.o COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o +COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o # host COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o diff --git a/drivers/usb/usb_ehci.h b/drivers/usb/usb_ehci.h new file mode 100644 index 000..017174a --- /dev/null +++ b/drivers/usb/usb_ehci.h @@ -0,0 +1,167 @@ +/*- + * Copyright (c) 2007-2008, Juniper Networks, Inc. + * All rights reserved. + * + * 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 version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef USB_EHCI_H +#define USB_EHCI_H + +/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ +#define DeviceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) 8) +#define DeviceOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE) 8) + +#define InterfaceRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) 8) + +#define EndpointRequest \ + ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) 8) + +#define EndpointOutRequest \ +#define EndpointOutRequest \ + ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) 8) + +/* + * Register Space. + */ +struct ehci_hccr { + uint32_t cr_capbase; +#define HC_LENGTH(p) (((p) 0) 0x00ff) +#define HC_VERSION(p) (((p) 16) 0x) + uint32_t cr_hcsparams; + uint32_t cr_hccparams; + uint8_t cr_hcsp_portrt[8]; +}; + +struct ehci_hcor { + uint32_t or_usbcmd; +#define CMD_ASE(1 5) + uint32_t or_usbsts; +#defineSTD_ASS (1 15) + uint32_t or_usbintr; + uint32_t or_frindex; + uint32_t or_ctrldssegment; + uint32_t or_periodiclistbase; + uint32_t or_asynclistaddr; + uint32_t _reserved_[9]; + uint32_t or_configflag; + uint32_t or_portsc[2]; + uint32_t or_systune; +}; + +/* Interface descriptor */ +struct usb_linux_interface_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bInterfaceNumber; + unsigned char bAlternateSetting; + unsigned char bNumEndpoints; + unsigned char bInterfaceClass; + unsigned char bInterfaceSubClass; + unsigned char bInterfaceProtocol; + unsigned char iInterface; +} __attribute__ ((packed)); + +/* Configuration descriptor information.. */ +struct usb_linux_config_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wTotalLength; + unsigned char bNumInterfaces; + unsigned char bConfigurationValue; + unsigned char iConfiguration; + unsigned char bmAttributes; + unsigned char MaxPower; +} __attribute__ ((packed)); + +#if defined CONFIG_EHCI_DESC_BIG_ENDIAN +#defineehci_readl(x) (x) +#define ehci_writel(a, b) (a) = (b) +#else +#define ehci_readl(x) cpu_to_le32((x)) +#define ehci_writel(a, b) (a) = cpu_to_le32((b)) +#endif + +#if defined CONFIG_EHCI_MMIO_BIG_ENDIAN +#define hc32_to_cpu(x) be32_to_cpu((x)) +#define cpu_to_hc32(x) cpu_to_be32((x)) +#else +#define hc32_to_cpu(x) le32_to_cpu((x)) +#define cpu_to_hc32(x) cpu_to_le32((x)) +#endif + +#define EHCI_PS_WKOC_E 0x0040 /* RW wake on over current */ +#define EHCI_PS_WKDSCNNT_E 0x0020 /* RW wake on disconnect */ +#define EHCI_PS_WKCNNT_E 0x0010 /* RW wake on connect */ +#define EHCI_PS_PTC0x000f /* RW port test control */ +#define EHCI_PS_PIC0xc000 /* RW port indicator control */ +#define EHCI_PS_PO 0x2000 /* RW port owner */ +#define
[U-Boot] [RFC USB PATCH 3/3 V3] USB ehci freescale support
Add USB ehci freescale support Signed-off-by: Michael Trimarchi [EMAIL PROTECTED] --- drivers/usb/Makefile |1 + drivers/usb/usb_ehci_fsl.c | 99 drivers/usb/usb_ehci_fsl.h | 86 ++ 3 files changed, 186 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/usb_ehci_fsl.c create mode 100644 drivers/usb/usb_ehci_fsl.h diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index fbc6521..6ba154b 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -34,6 +34,7 @@ COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o +COBJS-$(CONFIG_USB_EHCI_FSL) += usb_ehci_fsl.o # device ifdef CONFIG_USB_DEVICE diff --git a/drivers/usb/usb_ehci_fsl.c b/drivers/usb/usb_ehci_fsl.c new file mode 100644 index 000..9ca6c56 --- /dev/null +++ b/drivers/usb/usb_ehci_fsl.c @@ -0,0 +1,99 @@ +/* + * (C) Copyright 2008, Excito Elektronik i Sk=E5ne AB + * + * Author: Tor Krill [EMAIL PROTECTED] + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include pci.h +#include usb.h +#include mpc83xx.h +#include asm/io.h +#include asm/bitops.h + +#include usb_ehci.h +#include usb_ehci_fsl.h +#include usb_ehci_core.h + +/* + * Create the appropriate control structures to manage + * a new EHCI host controller. + * + * Excerpts from linux ehci fsl driver. + */ +int ehci_hcd_init(void) +{ + volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; + uint32_t addr, temp; + + addr = (uint32_t)(im-usb[0]); + hccr = (struct ehci_hccr *)(addr + FSL_SKIP_PCI); + hcor = (struct ehci_hcor *)((uint32_t) hccr + hccr-cr_caplength); + + /* Configure clock */ + clrsetbits_be32((im-clk.sccr), MPC83XX_SCCR_USB_MASK, + MPC83XX_SCCR_USB_DRCM_11); + + /* Confgure interface. */ + temp = in_be32((void *)(addr + FSL_SOC_USB_CTRL)); + out_be32((void *)(addr + FSL_SOC_USB_CTRL), temp +| REFSEL_16MHZ | UTMI_PHY_EN); + + /* Wait for clock to stabilize */ + do { + temp = in_be32((void *)(addr + FSL_SOC_USB_CTRL)); + udelay(1000); + } while (!(temp PHY_CLK_VALID)); + + /* Set to Host mode */ + temp = in_le32((void *)(addr + FSL_SOC_USB_USBMODE)); + out_le32((void *)(addr + FSL_SOC_USB_USBMODE), temp | CM_HOST); + + out_be32((void *)(addr + FSL_SOC_USB_SNOOP1), SNOOP_SIZE_2GB); + out_be32((void *)(addr + FSL_SOC_USB_SNOOP2), +0x8000 | SNOOP_SIZE_2GB); + + /* Init phy */ + /* TODO: handle different phys? */ + out_le32((hcor-or_portsc[0]), PORT_PTS_UTMI); + + /* Enable interface. */ + temp = in_be32((void *)(addr + FSL_SOC_USB_CTRL)); + out_be32((void *)(addr + FSL_SOC_USB_CTRL), temp | USB_EN); + + out_be32((void *)(addr + FSL_SOC_USB_PRICTRL), 0x000c); + out_be32((void *)(addr + FSL_SOC_USB_AGECNTTHRSH), 0x0040); + out_be32((void *)(addr + FSL_SOC_USB_SICTRL), 0x0001); + + /* Enable interface. */ + temp = in_be32((void *)(addr + FSL_SOC_USB_CTRL)); + out_be32((void *)(addr + FSL_SOC_USB_CTRL), temp | USB_EN); + + temp = in_le32((void *)(addr + FSL_SOC_USB_USBMODE)); + + return 0; +} + +/* + * Destroy the appropriate control structures corresponding + * the the EHCI host controller. + */ +int ehci_hcd_stop(void) +{ + return 0; +} diff --git a/drivers/usb/usb_ehci_fsl.h b/drivers/usb/usb_ehci_fsl.h new file mode 100644 index 000..c429af1 --- /dev/null +++ b/drivers/usb/usb_ehci_fsl.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2005 freescale semiconductor + * Copyright (c) 2005 MontaVista Software + * Copyright (c) 2008 Excito Elektronik i Sk=E5ne AB + * + * 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
[U-Boot] [PATCH] common/main: support bootdelay=0 for CONFIG_AUTOBOOT_KEYED
Support bootdelay=0 in abortboot for the CONFIG_AUTOBOOT_KEYED case similar to the CONFIG_ZERO_BOOTDELAY_CHECK support for the !CONFIG_AUTOBOOT_KEYED case. Do this by reversing the loop so we do atleast one iteration before checking for timeout. Signed-off-by: Peter Korsgaard [EMAIL PROTECTED] --- common/main.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/main.c b/common/main.c index a999a5d..4c4f780 100644 --- a/common/main.c +++ b/common/main.c @@ -158,7 +158,19 @@ static __inline__ int abortboot(int bootdelay) /* In order to keep up with incoming data, check timeout only * when catch up. */ - while (!abort get_ticks() = etime) { + do { + if (tstc()) { + if (presskey_len presskey_max) { + presskey [presskey_len ++] = getc(); + } + else { + for (i = 0; i presskey_max - 1; i ++) + presskey [i] = presskey [i + 1]; + + presskey [i] = getc(); + } + } + for (i = 0; i sizeof(delaykey) / sizeof(delaykey[0]); i ++) { if (delaykey[i].len 0 presskey_len = delaykey[i].len @@ -178,19 +190,8 @@ static __inline__ int abortboot(int bootdelay) abort = 1; } } + } while (!abort get_ticks() = etime); - if (tstc()) { - if (presskey_len presskey_max) { - presskey [presskey_len ++] = getc(); - } - else { - for (i = 0; i presskey_max - 1; i ++) - presskey [i] = presskey [i + 1]; - - presskey [i] = getc(); - } - } - } # if DEBUG_BOOTKEYS if (!abort) puts(key timeout\n); -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [ppc4xx] Please pull git://www.denx.de/git/u-boot-ppc4xx.git
The following changes since commit 2145188bea2df8f2b47a87ec3071b55027e8d0ae: Ben Warren (1): Fix compile error in building MBX860T. are available in the git repository at: git://www.denx.de/git/u-boot-ppc4xx.git master Matthias Fuchs (3): ppc4xx: Update TEXT_BASE for CPCI405 boards ppc4xx: Fix Ethernet PHY LED configuration on PMC440 boards ppc4xx: Disable EEPROM write access on PMC440 boards Stefan Roese (1): ppc4xx: Remove some features from ALPR to fit into 256k again Makefile|5 + board/esd/cpci405/config.mk |6 +- board/esd/pmc440/pmc440.c | 24 +++- include/configs/CPCI405.h |6 +++--- include/configs/alpr.h |5 + 5 files changed, 25 insertions(+), 21 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC USB PATCH 1/3 V3] Prepare USB layer for ehci support
Hi, Remy Bohmer wrote: Hello Michael, I already have those patches (V2) in the u-boot-usb tree, next branch. Can you please rebase these patches on top of that tree, or at least describe what you changed? Kind Regards, Remy I'll prepare another patch with various fixes. I will continue on the usb-next branch Regards Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC USB PATCH V2] USB ehci fix (truncate problem)
From 1662c619f3b082f60ed8367ec245f36cb33a7ea7 Mon Sep 17 00:00:00 2001 From: michael [EMAIL PROTECTED] Date: Wed, 10 Dec 2008 17:55:19 +0100 Subject: [PATCH] Fix EHCI usb. I start to test on a IXP465 board and I find some errors in the code. This patch fix: - descriptor initizialization (config, interface and endpoint must be one next-to the other when the USB_DT_CONFIG message is send. - FIX little/endian bigendian (introduce the CONFIG_EHCI_DESC_BIG_ENDIAN and the CONFIG_EHCI_MMIO_BIG_ENDIAN) - Introduce the linux version of the usb_config_descriptor and usb_interface descriptor. This descriptor does't contains u-boot extension. Signed-off-by: Michael Trimarchi [EMAIL PROTECTED] --- drivers/usb/usb_ehci.h | 50 ++- drivers/usb/usb_ehci_core.c | 343 +++ drivers/usb/usb_ehci_core.h |2 +- 3 files changed, 234 insertions(+), 161 deletions(-) diff --git a/drivers/usb/usb_ehci.h b/drivers/usb/usb_ehci.h index ebffb44..3e7a2ab 100644 --- a/drivers/usb/usb_ehci.h +++ b/drivers/usb/usb_ehci.h @@ -24,6 +24,7 @@ /* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ #define DeviceRequest \ ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) 8) + #define DeviceOutRequest \ ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE) 8) @@ -32,6 +33,7 @@ #define EndpointRequest \ ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) 8) + #define EndpointOutRequest \ ((USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) 8) @@ -39,8 +41,9 @@ * Register Space. */ struct ehci_hccr { - uint8_t cr_caplength; - uint16_t cr_hciversion; + uint32_t cr_capbase; +#define HC_LENGTH(p) (((p) 0) 0x00ff) +#define HC_VERSION(p) (((p) 16) 0x) uint32_t cr_hcsparams; uint32_t cr_hccparams; uint8_t cr_hcsp_portrt[8]; @@ -48,7 +51,9 @@ struct ehci_hccr { struct ehci_hcor { uint32_t or_usbcmd; +#define CMD_ASE(1 5) uint32_t or_usbsts; +#defineSTD_ASS (1 15) uint32_t or_usbintr; uint32_t or_frindex; uint32_t or_ctrldssegment; @@ -60,6 +65,47 @@ struct ehci_hcor { uint32_t or_systune; }; +/* Interface descriptor */ +struct usb_linux_interface_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned char bInterfaceNumber; + unsigned char bAlternateSetting; + unsigned char bNumEndpoints; + unsigned char bInterfaceClass; + unsigned char bInterfaceSubClass; + unsigned char bInterfaceProtocol; + unsigned char iInterface; +} __attribute__ ((packed)); + +/* Configuration descriptor information.. */ +struct usb_linux_config_descriptor { + unsigned char bLength; + unsigned char bDescriptorType; + unsigned short wTotalLength; + unsigned char bNumInterfaces; + unsigned char bConfigurationValue; + unsigned char iConfiguration; + unsigned char bmAttributes; + unsigned char MaxPower; +} __attribute__ ((packed)); + +#if defined CONFIG_EHCI_DESC_BIG_ENDIAN +#defineehci_readl(x) (x) +#define ehci_writel(a, b) (a) = (b) +#else +#define ehci_readl(x) cpu_to_le32((x)) +#define ehci_writel(a, b) (a) = cpu_to_le32((b)) +#endif + +#if defined CONFIG_EHCI_MMIO_BIG_ENDIAN +#define hc32_to_cpu(x) be32_to_cpu((x)) +#define cpu_to_hc32(x) cpu_to_be32((x)) +#else +#define hc32_to_cpu(x) le32_to_cpu((x)) +#define cpu_to_hc32(x) cpu_to_le32((x)) +#endif + #define EHCI_PS_WKOC_E 0x0040 /* RW wake on over current */ #define EHCI_PS_WKDSCNNT_E 0x0020 /* RW wake on disconnect */ #define EHCI_PS_WKCNNT_E 0x0010 /* RW wake on connect */ diff --git a/drivers/usb/usb_ehci_core.c b/drivers/usb/usb_ehci_core.c index 765b5dd..869bea3 100644 --- a/drivers/usb/usb_ehci_core.c +++ b/drivers/usb/usb_ehci_core.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007-2008, Juniper Networks, Inc. - * Copyright (c) 2008, Excito Elektronik i Sk�ne AB + * Copyright (c) 2008, Excito Elektronik i Skåne AB * All rights reserved. * * This program is free software; you can redistribute it and/or @@ -18,10 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ - +#define DEBUG #include common.h +#include asm/byteorder.h #include usb.h #include asm/io.h +#include malloc.h #include usb_ehci.h int rootdev; @@ -31,67 +33,75 @@ volatile struct ehci_hcor *hcor; static uint16_t portreset; static struct QH qh_list __attribute__((aligned(32))); -struct usb_device_descriptor device = { - sizeof(struct usb_device_descriptor), /* bLength */ - 1, /* bDescriptorType: UDESC_DEVICE */ - 0x0002, /* bcdUSB: v2.0 */ - 9, /* bDeviceClass:
[U-Boot] About assign parameters for bootm command
Hi, I'd like to assign some kernel parameters via bootm cmd, but its failed. For example, I'de like to pass the below parameters for the kernel: root=/dev/mtdblock0 ro rootfstype=jffs2 Could someone show me how I can pass them into kernel? Thanks in advance! The flash on my board couldn't be overwrotten currently, so I have to boot os from RAM... All the best, Mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Adding NAND Boot to uboot
Hello, I am relatively new to uboot development and was wondering if someone can give me some pointers. I am trying to configure uboot to bootup from NAND on CS0 on an MPC8536 platform. I am trying to disable the FLASH CFI driver (No NOR flash on the board ) and add support for the FSM NAND flash controller on the 8536. Thus far I have written the NAND flash driver but I am having some issues disabling the NOR driver. From by board.h file I tried just commenting out the lines: CFG_FLASH_CFI_DRIVER CFG_FLASH_CFI and added the line: CFG_NO_FLASH but I get compile errors. How do I tell uboot to disable the FLASH CFI driver, for instance if I want to load uboot into ram and run from ram? Fahd Abidi Sr. Field Application Engineer Ultimate Solutions, Inc. Your Single Source for Professional Development Tools and Embedded Solutions Ph: 978-455-3383 x255 Fx: 978-926-3091 Email: [EMAIL PROTECTED] Visit: http://www.ultsol.com http://www.ultsol.com/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Add support for boards where the NOR FLASH is not memory-mapped
On Wed, Dec 10, 2008 at 11:41:11AM +0100, Stefan Roese wrote: +void *board_flash_read_memcpy(void *__to, __const__ void *__from, int n); + +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED) +static inline int flash_read(void *__to, __const__ void *__from, int n) __const__? The other underscores seem gratuitous as well. +{ +#if defined(CONFIG_HAS_DATAFLASH) + return read_dataflash(__from, n, __to); +#elif defined(CONFIG_FLASH_NOT_MEM_MAPPED) + if ((addr2info((u32)__from) != NULL)) + board_flash_read_memcpy(__to, __from, n); + else + memcpy(__to, __from, n); + return OK; +#endif +} What if a board has dataflash *and* NOR flash? diff --git a/common/env_flash.c b/common/env_flash.c index 75ee8dd..ee7c4d7 100644 --- a/common/env_flash.c +++ b/common/env_flash.c @@ -85,9 +85,50 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1; extern uchar default_environment[]; extern int default_environment_size; +void *board_flash_read_memcpy(void *__to, __const__ void *__from, int n); +u8 flash_read8(void *addr); +u32 flash_read32(void *addr); Should go in a header file. +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED) +#define FLASH_READ_MEMCPY(d, s, n) board_flash_read_memcpy(d, s, n) +#else +#define FLASH_READ_MEMCPY(d, s, n) memcpy(d, s, n); +#endif /* CONFIG_FLASH_NOT_MEM_MAPPED */ No semicolon after memcpy, or FLASH_READ_MEMCPY won't behave like a function call in certain contexts (if/else, for loops, etc). +#define DO1(buf) \ + do {\ + if (((u32)buf = CONFIG_FLASH_BASE) \ + ((u32)buf CONFIG_FLASH_END)) {\ + crc = crc_table[ ((int)crc ^\ + (flash_read8((void *)buf++))) 0xff] ^ \ + (crc 8); \ + } else {\ + crc = crc_table[((int)crc ^ \ + (*buf++)) 0xff] ^ (crc 8); \ + } \ + } while (0) Maybe make this an inline function? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Adding NAND Boot to uboot
On Wed, Dec 10, 2008 at 11:37:10AM -0500, Fahd Abidi wrote: I am relatively new to uboot development and was wondering if someone can give me some pointers. I am trying to configure uboot to bootup from NAND on CS0 on an MPC8536 platform. This isn't yet supported, at least in mainline (the BSP u-boot may have support; I'm not sure). I am trying to disable the FLASH CFI driver (No NOR flash on the board ) and add support for the FSM NAND flash controller on the 8536. Thus far I have written the NAND flash driver There's already a NAND driver, in drivers/mtd/nand/fsl_elbc_nand.c and nand_spl/nand_boot_fsl_elbc.c. See the MPC8536DS config for how to enable it. but I am having some issues disabling the NOR driver. From by board.h file I tried just commenting out the lines: CFG_FLASH_CFI_DRIVER CFG_FLASH_CFI and added the line: CFG_NO_FLASH but I get compile errors. What errors? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] init FEC @ MPC5200
Andre Schwarz wrote: Ben, after cloning the latest u-boot git I can see that you've added this inside the mvBC-P board setup : int board_eth_init(bd_t *bis) { cpu_eth_init(bis); /* Built in FEC comes first */ return pci_eth_init(bis); } Are you aware that there's no PHY connected and the ETH-Pins are used otherwise ? CONFIG_MPC5xxx_FEC is _not_ defined. Can you tell me where cpu_eth_init(bis) is actually pointing to ? Since CONFIG_MPC5xxx_FEC isn't defined, the default weak cpu_eth_init() function in net/eth.c should get called, which does essentially nothing. I assumed that since you #undef'd the FEC controller in your board header file (instead of leaving it out completely), that it was perhaps optional, and so kept the call to cpu_eth_init() as shown above. Are you seeing a problem with this? regards, André MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner regards, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools/netconsole: new script for working with netconsole over UDP
On Wednesday 10 December 2008 03:24:08 Wolfgang Denk wrote: In message ... you wrote: While the doc/README.NetConsole does have a snippet for people to create their own netcat script, it's a lot easier to make a simple dedicated script and tell people to use it. Could you please restrict the line length to some 70+ characters? Thanks. i'm assuming you're talking about the commit message ... it's already restricted to 77 characters ... -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HOSTCC version
On Wednesday 10 December 2008 05:58:08 Wolfgang Denk wrote: In message [EMAIL PROTECTED] you wrote: The errors that I see are now slightly different. It is complaining that endian.h and byteswap.h don't exist - and that appears to be correct for the system that I have. The error regarding 'uintptr_t' has been fixed based on the patch from Jerry Van Baren but I still get an number of parse errors regarding image.h. Hm... I don't know Cygwin (and we oficially don't support it). Can't you run a real OS? CoLinux works surprisingly well imo -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] easylogo: add optional gzip support
Some images can be quite large, so add an option to compress the image data with gzip in the U-Boot image. Then at runtime, the board can decompress it with the normal zlib functions. Signed-off-by: Mike Frysinger [EMAIL PROTECTED] --- v2: - add error checking tools/easylogo/easylogo.c | 91 ++--- 1 files changed, 85 insertions(+), 6 deletions(-) diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c index 00a1e4e..c7e146f 100644 --- a/tools/easylogo/easylogo.c +++ b/tools/easylogo/easylogo.c @@ -2,16 +2,20 @@ ** Easylogo TGA-header converter ** == ** (C) 2000 by Paolo Scaffardi ([EMAIL PROTECTED]) +** (C) 2007-2008 Mike Frysinger [EMAIL PROTECTED] ** AIRVENT SAM s.p.a - RIMINI(ITALY) ** ** This is still under construction! */ +#include errno.h #include getopt.h #include stdbool.h #include stdio.h #include stdlib.h #include string.h +#include unistd.h +#include sys/stat.h #pragma pack(1) @@ -49,6 +53,17 @@ typedef struct { int width, height, pixels, bpp, pixel_size, size, palette_size, yuyv; } image_t; +void *xmalloc (size_t size) +{ + void *ret = malloc (size); + if (!ret) { + fprintf (stderr, \nerror: malloc(%zu) failed: %s, + size, strerror(errno)); + exit(1); + } + return ret; +} + void StringUpperCase (char *str) { int count = strlen (str); @@ -171,7 +186,7 @@ int image_load_tga (image_t * image, char *filename) image-pixel_size = ((image-bpp - 1) / 8) + 1; image-pixels = image-width * image-height; image-size = image-pixels * image-pixel_size; - image-data = malloc (image-size); + image-data = xmalloc (image-size); if (image-bpp != 24) { printf (Bpp not supported: %d!\n, image-bpp); @@ -192,7 +207,7 @@ int image_load_tga (image_t * image, char *filename) /* Swapping image */ if (!(header.ImageDescriptorByte 0x20)) { - unsigned char *temp = malloc (image-size); + unsigned char *temp = xmalloc (image-size); int linesize = image-pixel_size * image-width; void *dest = image-data, *source = temp + image-size - linesize; @@ -239,7 +254,7 @@ int image_rgb_to_yuyv (image_t * rgb_image, image_t * yuyv_image) yuyv_image-pixels = yuyv_image-width * yuyv_image-height; yuyv_image-size = yuyv_image-pixels * yuyv_image-pixel_size; dest = (unsigned short *) (yuyv_image-data = - malloc (yuyv_image-size)); + xmalloc (yuyv_image-size)); yuyv_image-palette = 0; yuyv_image-palette_size = 0; @@ -261,6 +276,8 @@ int image_rgb_to_yuyv (image_t * rgb_image, image_t * yuyv_image) return 0; } +int use_gzip = 0; + int image_save_header (image_t * image, char *filename, char *varname) { FILE *file = fopen (filename, w); @@ -283,6 +300,58 @@ int image_save_header (image_t * image, char *filename, char *varname) fprintf (file, *\t\t'x'\t\tis the horizontal position\n); fprintf (file, *\t\t'y'\t\tis the vertical position\n */\n\n); + /* gzip compress */ + if (use_gzip 0x1) { + unsigned char *compressed; + struct stat st; + FILE *gz; + char *gzfilename = xmalloc(strlen (filename) + 20); + char *gzcmd = xmalloc(strlen (filename) + 20); + + sprintf (gzfilename, %s.gz, filename); + sprintf (gzcmd, gzip %s, gzfilename); + gz = popen (gzcmd, w); + if (!gz) { + perror (\nerror: popen() failed); + return -1; + } + if (fwrite (image-data, image-size, 1, gz) != 1) { + perror (\nerror: writing data to gzip failed); + return -1; + } + if (pclose (gz)) { + perror (\nerror: gzip process failed); + return -1; + } + + gz = fopen (gzfilename, r); + if (!gz) { + perror (\nerror: open() on gzip data failed); + return -1; + } + if (stat (gzfilename, st)) { + perror (\nerror: stat() on gzip file failed); + return -1; + } + compressed = xmalloc (st.st_size); + if (fread (compressed, st.st_size, 1, gz) != 1) { + perror (\nerror: reading gzip data failed); + return -1; + } + fclose (gz); + + unlink (gzfilename); + + dataptr = compressed; + count = st.st_size; + fprintf (file, #define
Re: [U-Boot] About assign parameters for bootm command
Dear mike xu, In message [EMAIL PROTECTED] you wrote: I'd like to assign some kernel parameters via bootm cmd, but its failed. I guess you didn't bother to read the documentation, or did you? For example, I'de like to pass the below parameters for the kernel: root=/dev/mtdblock0 ro rootfstype=jffs2 Could someone show me how I can pass them into kernel? Thanks in advance! Read the manual, please. Search for boot arguments and/or command line. 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: [EMAIL PROTECTED] Q: Why do mountain climbers rope themselves together? A: To prevent the sensible ones from going home. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] easylogo: add optional gzip support
On Wednesday 10 December 2008 14:57:27 Wolfgang Denk wrote: In message ... you wrote: diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c index 00a1e4e..c7e146f 100644 --- a/tools/easylogo/easylogo.c +++ b/tools/easylogo/easylogo.c @@ -2,16 +2,20 @@ ** Easylogo TGA-header converter ** == ** (C) 2000 by Paolo Scaffardi ([EMAIL PROTECTED]) +** (C) 2007-2008 Mike Frysinger [EMAIL PROTECTED] ** AIRVENT SAM s.p.a - RIMINI(ITALY) This is a bad place to add your copyright - splitting Paolo's entry. oops, i didnt notice + if (fread (compressed, st.st_size, 1, gz) != 1) { + perror (\nerror: reading gzip data failed); + return -1; + } All the returns above leak the gzfilename and gzcmd memory. Not that it really matters, but it's not clean. ok Also, please omit the \n at the begin of the perror strings. easylogo's output is byte by byte, so no \n means the error message and the normal output run together -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] easylogo: add optional gzip support
Some images can be quite large, so add an option to compress the image data with gzip in the U-Boot image. Then at runtime, the board can decompress it with the normal zlib functions. Signed-off-by: Mike Frysinger [EMAIL PROTECTED] --- v3 - fix copyright - free buffers on error v2 - add error checking tools/easylogo/easylogo.c | 94 ++--- 1 files changed, 88 insertions(+), 6 deletions(-) diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c index 00a1e4e..4129827 100644 --- a/tools/easylogo/easylogo.c +++ b/tools/easylogo/easylogo.c @@ -3,15 +3,19 @@ ** == ** (C) 2000 by Paolo Scaffardi ([EMAIL PROTECTED]) ** AIRVENT SAM s.p.a - RIMINI(ITALY) +** (C) 2007-2008 Mike Frysinger [EMAIL PROTECTED] ** ** This is still under construction! */ +#include errno.h #include getopt.h #include stdbool.h #include stdio.h #include stdlib.h #include string.h +#include unistd.h +#include sys/stat.h #pragma pack(1) @@ -49,6 +53,17 @@ typedef struct { int width, height, pixels, bpp, pixel_size, size, palette_size, yuyv; } image_t; +void *xmalloc (size_t size) +{ + void *ret = malloc (size); + if (!ret) { + fprintf (stderr, \nerror: malloc(%zu) failed: %s, + size, strerror(errno)); + exit(1); + } + return ret; +} + void StringUpperCase (char *str) { int count = strlen (str); @@ -171,7 +186,7 @@ int image_load_tga (image_t * image, char *filename) image-pixel_size = ((image-bpp - 1) / 8) + 1; image-pixels = image-width * image-height; image-size = image-pixels * image-pixel_size; - image-data = malloc (image-size); + image-data = xmalloc (image-size); if (image-bpp != 24) { printf (Bpp not supported: %d!\n, image-bpp); @@ -192,7 +207,7 @@ int image_load_tga (image_t * image, char *filename) /* Swapping image */ if (!(header.ImageDescriptorByte 0x20)) { - unsigned char *temp = malloc (image-size); + unsigned char *temp = xmalloc (image-size); int linesize = image-pixel_size * image-width; void *dest = image-data, *source = temp + image-size - linesize; @@ -239,7 +254,7 @@ int image_rgb_to_yuyv (image_t * rgb_image, image_t * yuyv_image) yuyv_image-pixels = yuyv_image-width * yuyv_image-height; yuyv_image-size = yuyv_image-pixels * yuyv_image-pixel_size; dest = (unsigned short *) (yuyv_image-data = - malloc (yuyv_image-size)); + xmalloc (yuyv_image-size)); yuyv_image-palette = 0; yuyv_image-palette_size = 0; @@ -261,6 +276,8 @@ int image_rgb_to_yuyv (image_t * rgb_image, image_t * yuyv_image) return 0; } +int use_gzip = 0; + int image_save_header (image_t * image, char *filename, char *varname) { FILE *file = fopen (filename, w); @@ -283,6 +300,61 @@ int image_save_header (image_t * image, char *filename, char *varname) fprintf (file, *\t\t'x'\t\tis the horizontal position\n); fprintf (file, *\t\t'y'\t\tis the vertical position\n */\n\n); + /* gzip compress */ + if (use_gzip 0x1) { + unsigned char *compressed; + struct stat st; + FILE *gz; + char *gzfilename = xmalloc(strlen (filename) + 20); + char *gzcmd = xmalloc(strlen (filename) + 20); + + sprintf (gzfilename, %s.gz, filename); + sprintf (gzcmd, gzip %s, gzfilename); + gz = popen (gzcmd, w); + if (!gz) { + perror (\nerror: popen() failed); + gzerr: + free (gzfilename); + free (gzcmd); + return -1; + } + if (fwrite (image-data, image-size, 1, gz) != 1) { + perror (\nerror: writing data to gzip failed); + goto gzerr; + } + if (pclose (gz)) { + perror (\nerror: gzip process failed); + goto gzerr; + } + + gz = fopen (gzfilename, r); + if (!gz) { + perror (\nerror: open() on gzip data failed); + goto gzerr; + } + if (stat (gzfilename, st)) { + perror (\nerror: stat() on gzip file failed); + goto gzerr; + } + compressed = xmalloc (st.st_size); + if (fread (compressed, st.st_size, 1, gz) != 1) { + perror (\nerror: reading gzip data failed); + goto gzerr; + } + fclose (gz); + + unlink (gzfilename); + +
[U-Boot] Commit at91: Choose environment variables location within make config target
Hello Nicholas, The commit mentioned in the subject cause these error messages here during make at91sam9261ek_config: These are my steps: $ export BUILD_DIR=/tmp/build $ rm -rf /tmp/build $ make at91sam9261ek_config /bin/bash: line 7: /tmp/build/include/config.h: No such file or directory ... with environment variable in SPI DATAFLASH CS0 Configuring for at91sam9261ek board... Is this what you had in mind? Or is this something that you need to fix... Kind Regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC USB PATCH V2] USB ehci fix (truncate problem)
Hello Michael, 2008/12/10 Michael Trimarchi [EMAIL PROTECTED]: From 1662c619f3b082f60ed8367ec245f36cb33a7ea7 Mon Sep 17 00:00:00 2001 From: michael [EMAIL PROTECTED] Date: Wed, 10 Dec 2008 17:55:19 +0100 Subject: [PATCH] Fix EHCI usb. I start to test on a IXP465 board and I find some errors in the code. This patch fix: - descriptor initizialization (config, interface and endpoint must be one next-to the other when the USB_DT_CONFIG message is send. - FIX little/endian bigendian (introduce the CONFIG_EHCI_DESC_BIG_ENDIAN and the CONFIG_EHCI_MMIO_BIG_ENDIAN) - Introduce the linux version of the usb_config_descriptor and usb_interface descriptor. This descriptor does't contains u-boot extension. Applied to u-boot-usb next Thanks. Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] at91: Fix Choose environment variables location out of tree build
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index 2ac8141..0e31697 100644 --- a/Makefile +++ b/Makefile @@ -2586,6 +2586,7 @@ at91sam9260ek_nandflash_config \ at91sam9260ek_dataflash_cs0_config \ at91sam9260ek_dataflash_cs1_config \ at91sam9260ek_config : unconfig + @mkdir -p $(obj)include @if [ $(findstring _nandflash,$@) ] ; then \ echo #define CONFIG_SYS_USE_NANDFLASH 1 $(obj)include/config.h ; \ $(XECHO) ... with environment variable in NAND FLASH ; \ @@ -2602,6 +2603,7 @@ at91sam9261ek_nandflash_config \ at91sam9261ek_dataflash_cs0_config \ at91sam9261ek_dataflash_cs3_config \ at91sam9261ek_config : unconfig + @mkdir -p $(obj)include @if [ $(findstring _nandflash,$@) ] ; then \ echo #define CONFIG_SYS_USE_NANDFLASH 1 $(obj)include/config.h ; \ $(XECHO) ... with environment variable in NAND FLASH ; \ @@ -2618,6 +2620,7 @@ at91sam9263ek_nandflash_config \ at91sam9263ek_dataflash_config \ at91sam9263ek_dataflash_cs0_config \ at91sam9263ek_config : unconfig + @mkdir -p $(obj)include @if [ $(findstring _nandflash,$@) ] ; then \ echo #define CONFIG_SYS_USE_NANDFLASH 1 $(obj)include/config.h ; \ $(XECHO) ... with environment variable in NAND FLASH ; \ @@ -2631,6 +2634,7 @@ at91sam9rlek_nandflash_config \ at91sam9rlek_dataflash_config \ at91sam9rlek_dataflash_cs0_config \ at91sam9rlek_config: unconfig + @mkdir -p $(obj)include @if [ $(findstring _nandflash,$@) ] ; then \ echo #define CONFIG_SYS_USE_NANDFLASH 1 $(obj)include/config.h ; \ $(XECHO) ... with environment variable in NAND FLASH ; \ -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] bootm command: is there any load address limitation for fdt?
Hi, I am using u-boot version 2008.10 + git commit 13d36ec849785453953d00220b2c7dc66644a3c2 The board is a custom MPC8360E, similar to MPC8360EMDS from freescale. My DDR-SDRAM is at address 0x0 - 0x1FFF I am trying to limit the amount of memory needed to load and boot a linux kernel (2.6.26) to do this I loaded my fdt at address 0x20_ and uImage at 0x_30_ When I run bootm, I both the kernel and fdt passed their checksum tests, and then I got this error. ERROR: image is not a fdt - must RESET the board to recover. However, if I loaded my fdt at address 0x40_ and uImage at 0x50_, bootm works fine. Is there a reason why fdt must be loaded at a specific offset from the start of RAM? Thank you for all your time - Richard Retanubun. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] init FEC @ MPC5200
Ben Warren wrote: Andre Schwarz wrote: Ben, after cloning the latest u-boot git I can see that you've added this inside the mvBC-P board setup : int board_eth_init(bd_t *bis) { cpu_eth_init(bis); /* Built in FEC comes first */ return pci_eth_init(bis); } Are you aware that there's no PHY connected and the ETH-Pins are used otherwise ? CONFIG_MPC5xxx_FEC is _not_ defined. Can you tell me where cpu_eth_init(bis) is actually pointing to ? Since CONFIG_MPC5xxx_FEC isn't defined, the default weak cpu_eth_init() function in net/eth.c should get called, which does essentially nothing. I assumed that since you #undef'd the FEC controller in your board header file (instead of leaving it out completely), that it was perhaps optional, and so kept the call to cpu_eth_init() as shown above. ok - missed that. Are you seeing a problem with this? no - just wanted to know. Thanks for the hint, André regards, André MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner regards, Ben MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] bootm command: is there any load address limitation for fdt?
Dear Richard Retanubun, In message [EMAIL PROTECTED] you wrote: I am trying to limit the amount of memory needed to load and boot a linux kernel (2.6.26) to do this I loaded my fdt at address 0x20_ and uImage at 0x_30_ When I run bootm, I both the kernel and fdt passed their checksum tests, and then I got this error. ERROR: image is not a fdt - must RESET the board to recover. ...so the uncompressed Linux kernel image was written on top of your FDT image, corrupting it. However, if I loaded my fdt at address 0x40_ and uImage at 0x50_, bootm works fine. Makes sense. Is there a reason why fdt must be loaded at a specific offset from the start of RAM? Yes, there is - you need free space to load the uncompressed Linux kernel to low memory. 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: [EMAIL PROTECTED] Dealing with failure is easy: work hard to improve. Success is also easy to handle: you've solved the wrong problem. Work hard to improve. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] jffs2: rewrite jffs2 scanning code based on Linux one
Hi Stefan, Stefan Roese wrote: After this patch is now applied to the main u-boot repo, I get the following warning when compiling my new board with OneNAND JFFS2 support: [EMAIL PROTECTED] u-boot (vcth-onenand-ubi-ver3)]$ make -s -j5 jffs2_1pass.c:1411:1: warning: min_t redefined In file included from /home/stefan/git/u-boot/u-boot/include/linux/mtd/mtd-abi.h:11, from /home/stefan/git/u-boot/u-boot/include/linux/mtd/mtd.h:11, from jffs2_1pass.c:275: /home/stefan/git/u-boot/u-boot/include/linux/mtd/compat.h:34:1: warning: this is the location of the previous definition As it seems you added the min_t define to this file (see below). Why was this needed? I can safely remove it from my version. Do you see a problem with removing it on your test platform? Thanks for reporting. That's obviously because we already have min_t definition in linux/mtd/compat.h and OneNAND support includes this header from somewhere while NOR support doesn't. I've changed jffs2_1pass.c to directly include linux/mtd/compat.h directly instead of defining own min_t. Please see patch in the follow up message. Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] jffs2: include linux/mtd/compat.h instead of defining own min_t
Include linux/mtd/compat.h header for min_t definition instead of providing our own one. Removes warnings in case of OneNAND support enabled. Although I thinks it's a bit silly to include linux/mtd/compat.h just for min_t... Signed-off-by: Ilya Yanok [EMAIL PROTECTED] --- fs/jffs2/jffs2_1pass.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index be7c1a1..11b66ab 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -119,6 +119,7 @@ #include watchdog.h #include jffs2/jffs2.h #include jffs2/jffs2_1pass.h +#include linux/mtd/compat.h #include jffs2_private.h @@ -1408,11 +1409,6 @@ dump_dirents(struct b_lists *pL) } #endif -#define min_t(type, x, y) ({\ - type __min1 = (x); \ - type __min2 = (y); \ - __min1 __min2 ? __min1: __min2; }) - #define DEFAULT_EMPTY_SCAN_SIZE4096 static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) -- 1.5.6.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] jffs2: include linux/mtd/compat.h instead of defining own min_t
On Thursday 11 December 2008, Ilya Yanok wrote: Include linux/mtd/compat.h header for min_t definition instead of providing our own one. Removes warnings in case of OneNAND support enabled. Although I thinks it's a bit silly to include linux/mtd/compat.h just for min_t... Signed-off-by: Ilya Yanok [EMAIL PROTECTED] Acked-by: Stefan Roese [EMAIL PROTECTED] 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: [EMAIL PROTECTED] = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot