summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Save environment data to mmc.Terry Lv2010-09-19-1/+156
| | | | | | | | This patch is to save environment data to mmc card. It uses interfaces defined in generic mmc. Signed-off-by: Terry Lv <r65388@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
* mmc: print out partition tableLei Wen2010-09-18-0/+20
| | | | Signed-off-by: Lei Wen <leiwen@marvell.com>
* x86: Add do_bdinfo()Graeme Russ2010-09-13-3/+45
| | | | | x86 failed to compile with a message "a case for this architecture does not exist!" - Add do_bdinfo() for this arch
* Prepare v2010.09-rc1v2010.09-rc1Wolfgang Denk2010-09-10-1/+1
| | | | | | Coding style cleanup. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-samsungWolfgang Denk2010-09-08-2/+2
|\
| * ARMV7: S5P: rename from CONFIG_S5PC1XX to CONFIG_S5PMinkyu Kang2010-08-26-2/+2
| | | | | | | | | | | | | | Use the same configuration around S5P SoCs. (s5pc100, s5pc110, s5pc210 and so on) Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'master' of /home/wd/git/u-boot/masterWolfgang Denk2010-09-07-47/+47
|\ \
| * \ Merge branch 'master' of git://git.denx.de/u-boot-shWolfgang Denk2010-09-07-0/+19
| |\ \
| | * | sh: Add support do_bdinfo functionNobuhiro Iwamatsu2010-08-30-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SH did not support do_bdinfo fuction. This code based avr32 stuff. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * | | Merge branch 'master' of git://git.denx.de/u-boot-i2cWolfgang Denk2010-09-07-10/+7
| |\ \ \
| | * | | CMD_I2C: make alen=0 workReinhard Meyer2010-08-26-10/+7
| | |/ / | | | | | | | | | | | | Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
| * | | fdt: call fdt_parent_offset fewer times while translating addressesScott Wood2010-08-19-37/+21
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdt_parent_offset() is an expensive operation, so we'd like to reduce unnecessary calls to it. Further, the practice of iterating up to the root if address/size cells aren't found was apparently done for Linux for compatibility with certain buggy Open Firmware implementations, and U-Boot inherited the code. The compliant behavior is to treat a missing #address-cells as 2, and a missing #size-cells as 1 -- never looking anywhere but the immediate parent of the node of interest. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | | Merge branch 'master' of /home/wd/git/u-boot/masterWolfgang Denk2010-08-18-1/+3
|\ \ \ | |/ /
| * | env_nand: return error when no device is foundMike Frysinger2010-08-13-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if there is an error probing the NAND chip and the env is based in NAND, the readenv() function will use a NULL function pointer and thus jump to address 0. Here I just check for a non-zero value of blocksize as that shouldn't be zero when a valid device is found, but perhaps there is a better way for someone familiar with the NAND internals to suggest. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
| * | Fixed clobbered output of the "help usb" commandSergei Poselenov2010-08-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "usb help" doesn't format the output correctly: => help usb usb - USB sub-system Usage: usb reset - reset (rescan) USB controller usb stop [f] - stop USB [f]=force stop usb tree - show USB device tree usb info [dev] - show available USB devices usb storage - show details of USB storage devices usb dev [dev] - show or set current USB storage device usb part [dev] - print partition table of one or all USB storage devices usb read addr blk# cnt - read `cnt' blocks starting at block `blk#' to memory address `addr'usb write addr blk# cnt - write `cnt' blocks starting at block `blk#' from memory address `addr' => With fix below applied, the output is correct: => help usb usb - USB sub-system Usage: usb reset - reset (rescan) USB controller usb stop [f] - stop USB [f]=force stop usb tree - show USB device tree usb info [dev] - show available USB devices usb storage - show details of USB storage devices usb dev [dev] - show or set current USB storage device usb part [dev] - print partition table of one or all USB storage devices usb read addr blk# cnt - read `cnt' blocks starting at block `blk#' to memory address `addr' usb write addr blk# cnt - write `cnt' blocks starting at block `blk#' from memory address `addr' => Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-tiWolfgang Denk2010-08-12-81/+76
|\ \ \ | |/ /
| * | Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2010-08-10-10/+17
| |\ \
| * | | miiphy: leverage current_mii cache moreMike Frysinger2010-08-09-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For code that uses miiphy_{read,write}, every call invokes a full look up of the mii list. There is already a "current_mii" cache that is used by some code, but have the miiphy_{read,write} function use it as well. This does increase the code size slightly, but I think it's worth it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | | miiphy: unify device list lookupMike Frysinger2010-08-09-60/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than have every func re-implement the list walking code, do it one local function. This shrinks the resulting object code a little while making the source much more manageable. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| * | | miiphy: constify device nameMike Frysinger2010-08-09-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver name does not need to be writable, so constify it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* | | | ARM: Add support for MB86R0x SoCsMatthias Weisser2010-08-10-3/+3
| |/ / |/| | | | | | | | Signed-off-by: Matthias Weisser <weisserm@arcor.de>
* | | Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk2010-08-10-1/+1
|\ \ \
| * | | fix cmd_mmc.c, line 136 missing "Reinhard Meyer2010-08-10-1/+1
| |/ / | | | | | | | | | | | | | | | Remove warning for missing " at the end of line 136 Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* | | Merge branch 'master' of git://git.denx.de/u-boot-marvellWolfgang Denk2010-08-10-9/+16
|\ \ \ | |/ / |/| |
| * | cmd_ide: add support for KirkwoodPrafulla Wadaskar2010-08-08-0/+2
| | | | | | | | | | | | | | | | | | | | | Added MVSATAC definitions to Kirkwood. Added support for Kirkwood in cmd_ide. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
| * | cmd_ide: add support for orion5xAlbert Aribaud2010-08-08-0/+5
| | | | | | | | | | | | | | | | | | | | | Add MVSATAHC definitions to orion5x. Add support for orion5x in cmd_ide. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
| * | ide: add configurationAlbert Aribaud2010-08-08-9/+9
| |/ | | | | | | | | | | | | | | | | | | CONFIG_IDE_SWAP_IO This configuration option replaces a complex conditional in cmd_ide.c with an explicit define to be added to SoC or board configs. Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
* | fdt: Fix bug in size calculation in fdt_resize() with initrd useFeng Wang2010-08-09-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original bug description from Feng (fdt_resize() bug caused "WARNING: could not set linux, initrd-start FDT_ERR_NOSPACE."): What I got is an error: "WARNING: could not set linux,initrd-start FDT_ERR_NOSPACE." after loading Device Tree blob. This in turn caused linux to miss init part. After some digging, I found out the reason for this error, it is caused by fdt_resize(). FDT blob got resized after filling in all board specific information of PowerPC. (in boot_body_linux()). It reduced blob size with only extra space for two fdt_reserve_entry, one for fdt itself, and one for initrd. Then it's aligned to a 0x1000 page boundary. However, later in fdt_initrd(), it could add two more properties, initrd-start AND initrd-end, each one needs at least two fdt_reserve_entry sizes done by _fdt_add_property() (name and value). Thus, the two fdt_reserve_entry extra space is not sufficient. So for some specific fdt size which is just under the page boundary after resizing, this will cause an error of FDT_ERR_NOSPACE in fdt_initrd() when setting those two properties, and failed to pass initrd information to linux. My fix is in fdt_resize(), leave at least 4 fdt_reserve_entry for initrd. So instead of 2*sizeof(struct fdt_reserve_entry) for actual_totalsize, use 5*sizeof(struc fdt_reserve_entry). Stefan: I got this same error on katmai, when trying to boot with initrd (run flash_self). This patch fixes this issue. Signed-off-by: Feng Wang <fwang02@harris.com> Tested-by: Stefan Roese <sr@denx.de> Cc: Jerry Van Baren <gvb.uboot@gmail.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* | various cmd_* files: fixed layout a little bitFrans Meulenbroeks2010-08-09-13/+26
| | | | | | | | | | | | | | | | | | | | Most of the files have U_BOOT_CMD on a separate line, but a few didn't and had the first line on the same line as U_BOOT_CMD. This changes these files by adding a line break and a tab Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
* | various cmd_* files: remove the command name from the help messageFrans Meulenbroeks2010-08-09-5/+7
| | | | | | | | | | | | | | removed the command name from the help message as it is already printed. for cmd_mmc also rewrote the message a little bit Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
* | flash_protect: check for NULL flash infoMike Frysinger2010-08-09-3/+6
| | | | | | | | | | | | | | | | | | | | | | If a flash is unable to be detected, and then someone calls flash_protect on it (like the common code does in flash_init), the flash_protect logic will dereference a NULL pointer. Since flash_protect already does sanity checking on the info structs, add a NULL pointer check in there. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | getenv_f(): fix handling of too short buffersWolfgang Denk2010-08-09-6/+12
| | | | | | | | | | | | | | | | Fix error handling in getenv_f() when the user provided buffer is too short to hold the variable name; make sure to truncate and NUL-terminate without overwriting the buffer limits. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | dataflash mmc mux: use common cmd_usage functionMike Frysinger2010-08-09-2/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | mflash: use common cmd_usage functionMike Frysinger2010-08-09-2/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | cmd editing: optimize/shrink output blankingMike Frysinger2010-08-09-5/+3
| | | | | | | | | | | | | | | | | | No need to output spaces 1 char at a time in a loop when the printf code can do the same thing with the right format string. This shrinks things and gives a nice speed up when killing off lines more than a byte or two as printf will send out the buffer in one big chunk. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | fdt relocate: have more attention to use a bootmap or notStephan Linz2010-08-08-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platforms with flat device tree support can use a bootmap to relocate the fdt_blob. This is not a must. That's why the relocation function boot_relocate_fdt() should be use only if CONFIG_OF_LIBFDT was defined together with CONFIG_SYS_BOOTMAPSZ (see common/cmd_bootm.c). On MicroBlaze platforms there is no need to use a bootmap to relocate a fdt blob. So we need a more precise focus on the compilation and usage of boot_relocate_fdt(). In general it is valid to exclude the function boot_relocate_fdt() if the bootmap size CONFIG_SYS_BOOTMAPSZ is not defined. Signed-off-by: Stephan Linz <linz@li-pro.net>
* | LZMA and LZO causes compile errorMatthias Weisser2010-08-07-2/+5
| | | | | | | | | | | | | | If both LZMA and LZO compressions are used there is a compile error in cmd_bootm.c Signed-off-by: Matthias Weisser <weisserm@arcor.de>
* | Fix condition where bootm_size not set and wrong memory size reportedMatthew McClintock2010-08-07-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user sets bootm_low and does not set bootm_size, u-boot will report the memory node in the flat device tree incorrectly. Instead of reporting the remaining size of memory, it will report the total available memory which is incorrect. Specifically this fixes the situation when booting a relocatable kernel and the memory is reported as an offset and size in the device tree, and the size needs to be adjusted accordingly. Signed-off-by: Matthew McClintock <msm@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* | Rename getenv_r() into getenv_f()Wolfgang Denk2010-08-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While running from flash, i. e. before relocation, we have only a limited C runtime environment without writable data segment. In this phase, some configurations (for example with environment in EEPROM) must not use the normal getenv(), but a special function. This function had been called getenv_r(), with the idea that the "_r" suffix would mean the same as in the _r_eentrant versions of some of the C library functions (for example getdate vs. getdate_r, getgrent vs. getgrent_r, etc.). Unfortunately this was a misleading name, as in U-Boot the "_r" generally means "running from RAM", i. e. _after_ relocation. To avoid confusion, rename into getenv_f() [as "running from flash"] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* | bootm: fix pointer warning with lzmaMike Frysinger2010-08-04-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Avoid warning: cmd_bootm.c: In function 'bootm_load_os': cmd_bootm.c:394: warning: passing argument 2 of 'lzmaBuffToBuffDecompress' from incompatible pointer type For 32 bit systems, this change shouldn't make a difference to code size since sizeof(size_t) and sizeof(unsigned int) are equal. But it does fix the warning. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | fdt: Add function to alloc phandle valuesKumar Gala2010-07-26-0/+18
|/ | | | | | | | | | If we are creating reference (handles) to nodes in a device tree we need to first create a new phandle in node and this needs a new phandle value. So we search through the whole dtb to find the max phandle value and return the next greater value for a new phandle allocation. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* fs/fat: Big code cleanup.Wolfgang Denk2010-07-24-172/+38
| | | | | | | | - reformat - throw out macros like FAT_DPRINT and FAT_DPRINT - remove dead code Signed-off-by: Wolfgang Denk <wd@denx.de>
* usb_storage.c: change progress output in debug() messageWolfgang Denk2010-07-24-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dots printed by common/usb_storage.c as progress meter corrupt the output for example of "fatls usb" commands like this: => fatls usb 0 . <<==== here 29 file.001 29 file.002 29 file.003 29 file.004 29 file.005 29 file.006 29 file.007 29 file.008 29 file.009 29 file.010 29 file.011 29 file.012 29 file.013 29 file.014 29 file.015 29 file.016 . <<==== here 29 file.017 29 file.018 29 file.019 ... Turn the progress output into a debug message. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net>
* usb_storage.c: initialize device typeWolfgang Denk2010-07-24-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device type was left uninitialized which caused later tests against DEV_TYPE_UNKNOWN to fail. In the result, "usb part" would attempt to print information about non-existent devices like this: => usb part print_part of 0 Partition Map for USB device 0 -- Partition Type: DOS Partition Start Sector Num Sectors Type 1 0 2031616 f8 print_part of 1 ## Unknown partition table print_part of 2 ## Unknown partition table print_part of 3 ## Unknown partition table print_part of 4 ## Unknown partition table => By initializing the type as DEV_TYPE_UNKNOWN we avoid all the "Unknown partition table" messages. [Note: the "print_part of ?" messages is left over debug code that will be removed in another patch.] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-498/+270
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* fdt: Add fdt_node_offset_by_compat_reg helperKumar Gala2010-07-20-0/+27
| | | | | | | | | | | Given a compatible string and physical address try and find a node that matches. This is useful when we want to find a specific device node to update (for example if we have multiple PCI nodes we can use the physical address to distinguish them when trying to update the device tree). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* fdt: Add fdt_translate_address to convert reg node to cpu phys addrKumar Gala2010-07-20-0/+264
| | | | | | | | | | | | | This code is extracted out of the Linux Kernel code from arch/powerpc/kernel/prom_parse.c. We maintain some of the same structure to support multiple bus types even though we only have one in the current code. In the future we might want to translate across a PCI bus and thus it will be easier to add that functionality back in. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Drop support for GTH boardWolfgang Denk2010-07-17-1/+1
| | | | | | | | | | | | | | | The board maintainer states: The GTH board is obsolete and has not been manufactured for several years. To my knowledge, no recent U-Boot build has been tested on that card. So drop support for this board. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Thomas Lange <thomas@corelatus.se> Acked-by: Thomas Lange<thomas@corelatus.se>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxWolfgang Denk2010-07-16-129/+5
|\
| * mpc85xx: Add reginfo commandBecky Bruce2010-07-16-0/+5
| | | | | | | | | | | | | | | | The new command dumps the TLBCAM, the LAWs, and the BR/OR regs. Add CONFIG_CMD_REGINFO to the config for all MPC85xx parts. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>