summaryrefslogtreecommitdiff
path: root/disk/part.c
Commit message (Collapse)AuthorAgeLines
* disk/part.c: Fix device enumeration through APITim Kientzle2012-03-27-0/+3
| | | | | | | | | | | | | | | The patch below fixes device enumeration through the U-Boot API. Device enumeration crashes when the system in question doesn't have any RAM mapped to address zero (I discovered this on a BeagleBone board), since the enumeration calls get_dev with a NULL ifname sometimes which then gets passed down to strncmp(). This fix simply ensures that get_dev returns NULL when invoked with a NULL ifname. Signed-off-by: Tim Kientzle <kientzle@freebsd.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* disk/part.c: fix potential stack overflow bugLei Wen2011-04-12-1/+1
| | | | | | | | If the param pass to get_dev is not the one defined in the block_drvr, it could make uboot becomes unstable, for it would continue run after search complete the block_drvr table. Signed-off-by: Lei Wen <leiwen@marvell.com>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-29-2/+2
| | | | | | | | | | | By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* disk/part.c: fix relocation fixupHeiko Schocher2010-09-19-2/+9
| | | | | | | Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
* mmc: print out partition tableLei Wen2010-09-18-0/+3
| | | | Signed-off-by: Lei Wen <leiwen@marvell.com>
* disk/part.c: 'usb storage' avoiding overflow when output capacitySergei Trofimovich2010-08-10-5/+23
| | | | | | | | | | | | | | | Before: Marvell>> usb storage Device 0: Vendor: StoreJet Rev: Prod: Transcend Type: Hard Disk Capacity: 28759.9 MB = 28.0 GB (488397168 x 512) After: Marvell>> usb storage Device 0: Vendor: StoreJet Rev: Prod: Transcend Type: Hard Disk Capacity: 238475.1 MB = 232.8 GB (488397168 x 512) Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOULHeiko Schocher2009-12-08-1/+1
| | | | | | | | | There is more and more usage of printing 64bit values, so enable this feature generally, and delete the CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL defines. Signed-off-by: Heiko Schocher <hs@denx.de>
* Conditionally perform common relocation fixupsPeter Tyser2009-10-03-1/+4
| | | | | | | | | | | Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* IDE: bail out of dev_print() for unknown device typesWolfgang Denk2009-05-15-0/+5
| | | | | | | | | | | | | | | | | | | | | Commit 574b319512 introduced a subtle bug by mixing a list of tests for "dev_desc->type" and "dev_desc->if_type" into one switch(), which then mostly did not work because "dev_desc->type" cannot take any "IF_*" type values. A later fix in commit 8ec6e332ea changed the switch() into testing "dev_desc->if_type", but at this point the initial test for unknown device types was completely lost, which resulted in output like that for IDE ports without device attached: Device 1: Model: Firm: Ser#: Type: # 1F # Capacity: not available This patch re-introduces the missing test for unknown device types. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Detlev Zundel <dzu@denx.de> Tested-by: Stefan Roese <sr@denx.de>
* mflash: Initial mflash supportunsik Kim2009-04-03-1/+7
| | | | | | | | | | | | | | | | | | | | Mflash is fusion memory device mainly targeted consumer eletronic and mobile phone. Internally, it have nand flash and other hardware logics and supports some different operation (ATA, IO, XIP) modes. IO mode is custom mode for the host that doesn't have IDE interface. (Many mobile targeted SoC doesn't have IDE bus) This driver support mflash IO mode. Followings are brief descriptions about IO mode. 1. IO mode based on ATA protocol and uses some custom command. (read confirm, write confirm) 2. IO mode uses SRAM bus interface. Signed-off-by: unsik Kim <donari75@gmail.com>
* vsprintf: pull updates from Linux kernelMike Frysinger2009-03-20-1/+1
| | | | | | | | | | | | | This brings in support for the %p modifier which allows us to easily print out things like ip addresses, mac addresses, and pointers. It also converts the rarely used 'q' length modifier to the common 'L' modifier when dealing with quad types. While this new code is a bit larger (~1k .text), most of it should be made up by converting the existing ip/mac address code to use format modifiers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add support for CONFIG_EFI_PARTITION (GUID Partition Table)richardretanubun2008-10-18-3/+30
| | | | | | | | | The GUID (Globally Unique Identifier) Partition Table (GPT) is a part of EFI. See http://en.wikipedia.org/wiki/GUID_Partition_Table Based on linux/fs/partitions/efi.[ch] Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
* Add missing device types to dev_print() in part.cRemy Bohmer2008-09-22-1/+9
| | | | Signed-off-by: Remy Bohmer <linux@bohmer.net>
* Fix dev_print when called from usb_stor_info (usb storage command)NĂ­colas Carneiro Lebedenco2008-09-09-0/+6
| | | | | | | | Fix output of the usb storage command. It was printing "Device 0: not available" because IF_TYPE_USB was not included into the switch statement. Signed-off-by: Nicolas Lebedenco <nicolas.lebedenco@tasksistemas.com.br>
* Fix incorrect switch for IF_TYPE in part.cTor Krill2008-06-03-2/+2
| | | | | | | | | Use correct field in block_dev_desc_t when writing interface type in dev_print. Error introduced in 574b3195. Also added fix from Martin Krause Signed-off-by: Tor Krill <tor@excito.com>
* cosmetic: Adjust coding style for switch statements to be consistentDetlev Zundel2008-05-09-24/+36
| | | | Signed-off-by: Detlev Zundel <dzu@denx.de>
* Fix disk type output in disk/part.cDetlev Zundel2008-05-09-18/+14
| | | | Signed-off-by: Detlev Zundel <dzu@denx.de>
* ata: add the support for SATA frameworkDave Liu2008-03-26-0/+14
| | | | | | | - add the SATA framework - add the SATA command line Signed-off-by: Dave Liu <daveliu@freescale.com>
* Merge branch 'testing' into workingAndy Fleming2007-08-03-14/+14
|\ | | | | | | | | | | | | | | | | | | Conflicts: CHANGELOG fs/fat/fat.c include/configs/MPC8560ADS.h include/configs/pcs440ep.h net/eth.c
| * disk/ doc/ lib_*/ and tools/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger2007-07-10-1/+1
| | | | | | | | | | | | | | | | Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger <jdl@freescale.com>
| * disk/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-09-13/+13
| | | | | | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
| * disk/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* | [PCS440EP] upgrade the PCS440EP board:Heiko Schocher2007-06-22-2/+1
|/ | | | | | | | | | | | - Show on the Status LEDs, some States of the board. - Get the MAC addresses from the EEProm - use PREBOOT - use the CF on the board. - check the U-Boot image in the Flash with a SHA1 checksum. - use dynamic TLB entries generation for the SDRAM Signed-off-by: Heiko Schocher <hs@denx.de>
* Coding Style cleanup; generate new CHANGELOG file.Wolfgang Denk2007-06-06-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Reduce line lengths to 80 characters max.Peter Pearse2007-05-18-2/+4
|
* New board SMN42 branchPeter Pearse2007-05-09-0/+1
|
* Enable partition support with MMCHaavard Skinnemoen2007-04-14-0/+1
| | | | | | | Include implementations of init_part() and get_partition_info() when CONFIG_MMC is set. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* [PATCH] get_dev() now unconditionally uses manual relocationStefan Roese2007-02-22-9/+1
| | | | | | | | Since the relocation fix is not included yet and we're not sure how it will be added, this patch removes code that required relocation to be fixed for now. Signed-off-by: Stefan Roese <sr@denx.de>
* [PATCH] Fix relocation problem with "new" get_dev() functionStefan Roese2007-02-20-0/+12
| | | | | | | | | | | | This patch enables the "new" get_dev() function for block devices introduced by Grant Likely to be used on systems that still suffer from the relocation problems (manual relocation neede because of problems with linker script). Hopefully we can resolve this relocation issue soon for all platform so we don't need this additional code anymore. Signed-off-by: Stefan Roese <sr@denx.de>
* [PATCH 1_4] Merge common get_dev() routines for block devicesGrant Likely2007-02-20-0/+49
| | | | | | | Each of the filesystem drivers duplicate the get_dev routine. This change merges them into a single function in part.c Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* Cleanup USB and partition defineswdenk2005-02-24-1/+2
|
* * Cleanup, minor fixeswdenk2004-04-18-7/+3
| | | | | | | | | * Patch by Rune Torgersen, 16 Apr 2004: LBA48 fixes * Patches by Pantelis Antoniou, 16 Apr 2004: - Fix some compile problems; add "once" functionality for the netretry variable
* Code cleanup; make several boards compile & link.wdenk2004-03-14-4/+4
|
* * Patch by Rune Torgersen, 27 Feb 2004:wdenk2004-03-13-5/+26
| | | | | | | | | | | | | | | | | - Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA) - Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF) - Added support for 64bit strtoul (CFG_64BIT_STRTOUL) * Patch by Masami Komiya, 27 Feb 2004: Fix rarpboot: add autoload by NFS * Patch by Dan Eisenhut, 26 Feb 2004: fix flash_write return value in saveenv * Patch by Stephan Linz, 11 Dec 2003 expand config.mk to avoid trigraph warnings on NIOS * Rename "BMS2003" board into "HMI10"
* * CVS add missing fileswdenk2004-02-23-2/+3
| | | | | | | | | | | | | | | | | | | | | | | * Cleanup compiler warnings * Fix problem with side effects in macros in include/usb.h * Patch by David Benson, 13 Nov 2003: bug 841358 - fix TFTP download size limit * Fixing bug 850768: improper flush_cache() in load_serial() * Fixing bug 834943: MPC8540 - missing volatile declarations * Patch by Stephen Williams, 09 Feb 2004: Add support for Xilinx SystemACE chip: - New files common/cmd_ace.c and include/systemace.h - Hook systemace support into cmd_fat and the partition manager * Patch by Travis Sawyer, 09 Feb 2004: Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux
* Patches by Stephan Linz, 11 Dec 2003:wdenk2004-01-03-1/+6
| | | | | | | | | | | | | | - more documentation for NIOS port - new struct nios_pio_t, struct nios_spi_t - Reconfiguration for NIOS Development Kit DK1C20: o move board related code from board/dk1c20 to board/altera/dk1c20 o create a new common source path board/altera/common and move generic flash access stuff into it o change/expand configuration file DK1C20.h - Add support for NIOS Development Kit DK1S10 - Add status LED support for NIOS systems - Add dual 7-segment LED support for Altera NIOS DevKits
* * Add support for USB Mass Storage Devices (BBB)wdenk2003-09-10-1/+3
| | | | | | (tested with USB memory sticks only) * Avoid flicker on TRAB's VFD
* Fix some missing commands, cleanup header fileswdenk2003-06-29-1/+0
| | | | (autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
* * Code cleanup:wdenk2003-06-27-2/+1
| | | | | | | | | - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
* * Patch by Thomas Frieden, 13 Nov 2002:wdenk2002-11-19-1/+27
| | | | | | | | | | | | | Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined.
* Initial revisionwdenk2002-08-17-0/+227