summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Fix OneNAND read_oob/write_oob functions compatabilityKyungmin Park2008-08-21-16/+33
| | | | | | | Also sync with kernel OneNAND codes Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* fdt: rework fdt_fixup_ethernet() to use env instead of bd_tKumar Gala2008-08-21-41/+27
| | | | | | | | | | Move to using the environment variables 'ethaddr', 'eth1addr', etc.. instead of bd->bi_enetaddr, bi_enet1addr, etc. This makes the code a bit more flexible to the number of ethernet interfaces. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* hush: Fix printf debug macro in hush.c so that it usable in U-BootStefan Roese2008-08-21-2/+6
| | | | | | | | This patch changes the debug_printf() marco for U-Boot in hush.c and moves the definition of DEBUG_SHELL to a place that is actually compiled under U-Boot. Signed-off-by: Stefan Roese <sr@denx.de>
* mod_i2c_mem() bugfixPeter Tyser2008-08-21-3/+3
| | | | | | | The last used chip, address, and address length were not being stored for the imm and imn commands. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Fix typo in spelling of ATAPI.Steven A. Falco2008-08-21-2/+2
| | | | | | Correct a small spelling mistake. Signed-off-by: Steven A. Falco <sfalco@harris.com>
* Add a hook to allow board-specific PIO mode setting.Steven A. Falco2008-08-21-0/+46
| | | | | | | | | | | | | This patch adds a hook whereby a board-specific routine can be called to configure hardware for a PIO mode. The prototype for the board-specific routine is: int inline ide_set_piomode(int pio_mode) ide_set_piomode should be prepared to configure hardware for a pio_mode between 0 and 6, inclusive. It should return 0 on success or 1 on failure. Signed-off-by: Steven A. Falco <sfalco@harris.com>
* fdt: fdt addr w/o any args reports back the current working addressKumar Gala2008-08-21-0/+8
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* fdt: added the ability to set initrd start/end via chosen commandKumar Gala2008-08-21-4/+17
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Add command to enable/disable interruptsKumar Gala2008-08-21-0/+51
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Clean up usage of icache_disable/dcache_disableKumar Gala2008-08-19-2/+0
| | | | | | | | | | | | There is no point in disabling the icache on 7xx/74xx/86xx parts and not also flushing the icache. All callers of invalidate_l1_instruction_cache() call icache_disable() right after. Make it so icache_disable() calls invalidate_l1_instruction_cache() for us. Also, dcache_disable() already calls dcache_flush() so there is no point in the explicit calls of dcache_flush(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Add 'license' command to U-Boot command lineHarald Welte2008-08-18-0/+60
| | | | | | | | | | | | | | | The 'license' command includes the U-Boot license (GPLv2) into the actual bootloader binary. The license text can be shown interactively at the U-Boot commandline. For products where the commandline can actually be accessed by the end user, this helps to prevent inadvertent GPL violations, since the GPLv2 license text can no longer be 'forgotten' to be included into the product. The 'license' command can be enabled by CONFIG_CMD_LICENSE. Signed-off-by: Harald Welte <laforge@openmoko.org>
* add 'unzip' command to u-boot commandlineHarald Welte2008-08-18-0/+36
| | | | | | | | | | [PATCH] add new 'unzip' command to u-boot commandline common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from memory to memory, and option CONFIG_CMD_UNZIP to enable it Signed-off-by: Werner Almesberger <werner@openmoko.org> Signed-off-by: Harald Welte <laforge@openmoko.org>
* Change CFG_ENV_SIZE to CFG_ENV_SECT_SIZE for SPI sector eraseTsiChung Liew2008-08-14-1/+9
| | | | | | | | | | The CFG_ENV_SIZE is not suitable used for SPI flash erase sector size if CFG_ENV_SIZE is less than CFG_ENV_SECT_SIZE. Add condition check if CFG_ENV_SIZE is larger than CFG_ENV_SECT_SIZE, calculate the right number of sectors for erasing. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
* Coding Style cleanup, update CHANGELOGWolfgang Denk2008-08-14-32/+32
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk2008-08-14-5/+5
|\
| * Fix OneNAND build breakKyungmin Park2008-08-13-5/+5
| | | | | | | | | | | | | | | | | | Since page size field is changed from oobblock to writesize. But OneNAND is not updated. - fix bufferram management at erase operation This patch includes the NAND/OneNAND state filed too. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Merge branch 'Makefile' of git://git.denx.de/u-boot-armWolfgang Denk2008-08-13-112/+32
|\ \
| * | drivers/mtd/nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-9/+9
| | | | | | | | | | | | | | | | | | rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | common: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-103/+23
| |/ | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Merge branch 'master' of /home/stefan/git/u-boot/u-bootStefan Roese2008-08-13-140/+358
|\ \ | |/
| * OneNAND: Fill in MTD function pointers for OneNAND.Fathi BOUDRA2008-08-12-1/+1
| | | | | | | | | | | | | | | | | | | | onenand_print_device_info(): - Now returns a string to be placed in mtd->name, rather than calling printf. - Remove verbose parameter as it becomes useless. Signed-off-by: Fathi Boudra <fabo@debian.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * NAND: Do not write or read a whole block if it is larger than the environmentGuennadi Liakhovetski2008-08-12-9/+9
| | | | | | | | | | | | | | | | Environment can be smaller than NAND block size, do not need to read a whole block and minimum for writing is one page. Also remove an unused variable. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * NAND read/write fixScott Wood2008-08-12-27/+9
| | | | | | | | | | | | | | | | Implement block-skipping read/write, based on a patch from Morten Ebbell Hestens <morten.hestnes@tandberg.com>. Signed-off-by: Morten Ebbell Hestnes <morten.hestnes@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * NAND: Always skip blocks on read/write/boot.Scott Wood2008-08-12-13/+14
| | | | | | | | | | | | | | Use of the non-skipping versions was almost always (if not always) an error, and no valid use case has been identified. Signed-off-by: Scott Wood <scottwood@freescale.com>
| * NAND: Fix compilation warning and small coding style issueStefan Roese2008-08-12-3/+2
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
| * make nand dump and nand dump.oob workWilliam Juul2008-08-12-19/+27
| | | | | | | | | | Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * Incorporate yaffs2 into U-bootWilliam Juul2008-08-12-0/+216
| | | | | | | | | | | | | | To use YAFFS2 define CONFIG_YAFFS2 Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * Whitespace cleanup and marking broken code.William Juul2008-08-12-44/+57
| | | | | | | | | | | | | | | | Changes requested by maintainer Stefan Roese after posting patch to U-boot mailing list. Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * Fixing coding style issuesWilliam Juul2008-08-12-52/+58
| | | | | | | | | | | | | | | | | | - Fixing leading white spaces - Fixing indentation where 4 spaces are used instead of tab - Removing C++ comments (//), wherever I introduced them Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * Remove white space at end.William Juul2008-08-12-1/+1
| | | | | | | | | | Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
| * Update MTD to that of Linux 2.6.22.1William Juul2008-08-12-142/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot changed in the Linux MTD code, since it was last ported from Linux to U-Boot. This patch takes U-Boot NAND support to the level of Linux 2.6.22.1 and will enable support for very large NAND devices (4KB pages) and ease the compatibility between U-Boot and Linux filesystems. This patch is tested on two custom boards with PPC and ARM processors running YAFFS in U-Boot and Linux using gcc-4.1.2 cross compilers. MAKEALL ppc/arm has some issues: * DOC/OneNand/nand_spl is not building (I have not tried porting these parts, and since I do not have any HW and I am not familiar with this code/HW I think its best left to someone else.) Except for the issues mentioned above, I have ported all drivers necessary to run MAKEALL ppc/arm without errors and warnings. Many drivers were trivial to port, but some were not so trivial. The following drivers must be examined carefully and maybe rewritten to some degree: cpu/ppc4xx/ndfc.c cpu/arm926ejs/davinci/nand.c board/delta/nand.c board/zylonite/nand.c Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Stig Olsen <stig.olsen@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Merge branch 'master' of /home/stefan/git/u-boot/u-boot into nextStefan Roese2008-08-12-25/+14
|\ \ | |/
| * 85xx: Rename CONFIG_NR_CPUS to CONFIG_NUM_CPUSKumar Gala2008-08-12-2/+2
| | | | | | | | | | | | | | Use CONFIG_NUM_CPUS to match existing define used by 86xx. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Jon Loeliger <jdl@freescale.com>
| * Fix fallout from autostart revertKumar Gala2008-08-12-20/+2
| | | | | | | | | | | | | | | | The autostart revert caused a bit of duplicated code as well as code that was using images->autostart that needs to get removed so we can build again. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * common/cmd_load.c - Minor code & Coding Style cleanupGururaja Hebbar K R2008-08-11-7/+8
| | | | | | | | | | | | | | | | | | - os_data_header Variable is a carry over feature & unused. So removed all instance of this variable - Minor Code Style Update Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * OneNAND: Remove base address offset usagedirk.behme@googlemail.com2008-08-10-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While locally preparing some U-Boot patches for ARM based OMAP3 boards, some using OneNAND and some using NAND, we found some differences in OneNAND and NAND command address handling. As this might confuse users (it already confused us), we like to align OneNAND and NAND address handling. The issue is that cmd_onenand.c subtracts the onenand base address from the addresses you type into the u-boot command line so, unlike nand, you can't use addresses relative to the start of the onenand part e.g. this won't work: onenand read 82000000 280000 400000 you have to use: onenand read 82000000 20280000 400000 Looking at recent git, the only board currently using OneNAND is Apollon, and for this the OneNAND base address is 0 (apollon.h) #define CFG_ONENAND_BASE 0x00000000 so patch below won't break any existing boards and will align OneNAND and NAND handling on boards where OneNAND base address is != 0. Signed-off-by: Steve Sakoman <sakoman@gmail.com> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com> Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
| * Revert "[new uImage] Add autostart flag to bootm_headers structure"Wolfgang Denk2008-08-10-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f5614e7926863bf0225ec860d9b319741a9c4004. The commit was based on a misunderstanding of the (documented) meaning of the 'autostart' environment variable. It might cause boards to hang if 'autostart' was used, with the potential to brick them. Go back to the documented behaviour. Conflicts: common/cmd_bootm.c common/image.c include/image.h Signed-off-by: Wolfgang Denk <wd@denx.de>
| * FIT: Fix handling of images without ramdisksPeter Tyser2008-08-09-1/+1
| | | | | | | | | | | | | | | | boot_get_ramdisk() should not treat the case when a FIT image does not contain a ramdisk as an error. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Michal Simek <monstr@monstr.eu>
| * TQM823L: re-enable logo support; update LCD_INFO textWolfgang Denk2008-08-08-1/+1
| | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Fix bitmap display for atmel lcd controllerMark Jackson2008-08-01-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The current lcd_display_bitmap() function does not work properly for the Atmel LCD controller. 2 fixes need to be done:- (a) when setting the colour map, use the lcd_setcolreg() function as provided by the Atmel driver (b) the data is never actually written to the lcd framebuffer !! Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
| * Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/masterWolfgang Denk2008-07-31-3/+15
| |\
| | * Add gzipped logo supportMark Jackson2008-07-31-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows: If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the splashscreen support or the bmp command. However, the splashscreen function *only* supports standard BMP images. This patch adds the documented gzip support. Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
| | * Uncompressed images loaded to their start address shall set load_end tooGuennadi Liakhovetski2008-07-31-3/+2
| | | | | | | | | | | | | | | Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Bartlomiej Sieka <tur@semihalf.com>
| * | Fix printf() format problems with configurable promptsWolfgang Denk2008-07-31-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot allows for configurable prompt strings using the CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far, the assumption was that any such user defined problts would contain exactly one "%d" format specifier. But some boards did not. To allow for flexible boot prompts without adding too complex code we now allow to specify the whole list of printf() arguments in the user definition. This is powerful, but requires a responsible user who really understands what he is doing, as he needs to know for exanple which variables are available in the respective context. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Fix compile warnings in dlmallocKumar Gala2008-07-31-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The origional code was using on odd reference to get to the first real element in av_[]. The first two elements of the array are not used for actual bins, but for house keeping. If we are more explicit about how use the first few elements we can get rid of the warnings: dlmalloc.c: In function 'malloc_extend_top': dlmalloc.c:1971: warning: dereferencing type-punned pointer will break strict-aliasing rules dlmalloc.c:1999: warning: dereferencing type-punned pointer will break strict-aliasing rules dlmalloc.c:2029: warning: dereferencing type-punned pointer will break strict-aliasing rules ... The logic of how this code came to be is: bin_at(0) = (char*)&(av_[2]) - 2*SIZE_SZ SIZE_SZ is the size of pointer, and av_ is arry of pointers so: bin_at(0) = &(av_[0]) Going from there to bin_at(0)->fd or bin_at(0)->size should be straight forward. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'Stefan Roese2008-07-31-2/+2
| | | | | | | | | | | | | | | | | | A recent patch used '#if (CONFIG_CMD_USB)' instead of '#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes common/bootm.c compile again. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Markus Klotzbuecher <mk@denx.de>
| * Fix more printf() format warningsJean-Christophe PLAGNIOL-VILLARD2008-07-30-2/+2
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * Fix remaining CFG_CMD_ define, ifdef and commentsJean-Christophe PLAGNIOL-VILLARD2008-07-30-2/+2
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * Fix warnings if compiling with IDE support.Heiko Schocher2008-07-30-24/+22
| | | | | | | | | | | | | | cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior Signed-off-by: Heiko Schocher <hs@denx.de>
| * microblaze: Fix printf() format issuesMichal Simek2008-07-20-4/+4
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>