summaryrefslogtreecommitdiff
path: root/disk
AgeCommit message (Collapse)Author
2012-04-30part_dos: align disk buffers on cache line to enable DMA and cacheEric Nelson
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-03-27disk/part.c: Fix device enumeration through APITim Kientzle
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>
2011-12-06part_efi: Fix compile errorsSanjeev Premi
Fix errors noticed after enabling CONFIG_EFI_PARTITION for the OMAP3 EVM board: part_efi.c: In function 'print_part_efi': part_efi.c:133:5: warning: passing argument 3 of 'is_gpt_valid' from incompatible pointer type part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **' part_efi.c: In function 'get_partition_info_efi': part_efi.c:173:4: warning: passing argument 3 of 'is_gpt_valid ' from incompatible pointer type part_efi.c:95:12: note: expected 'struct gpt_header *' but arg ument is of type 'struct gpt_header **' part_efi.c: In function 'alloc_read_gpt_entries': part_efi.c:384:18: error: 'CONFIG_SYS_CACHELINE_SIZE' undeclare d (first use in this function) Signed-off-by: Sanjeev Premi <premi@ti.com> Cc: Tom Rini <tom.rini@gmail.com> Cc: Anton staaf <robotboy@chromium.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-12-05disk: part_efi: fix regression due to incorrect buffer usageStephen Warren
Commit deb5ca80275e8cfa74d5680b41204e08a095eca5 "disk: part_efi: fix **pgpt_pte == NULL" modified the code to pass "&gpt_head" to is_gpt_valid() rather than the previous "gpt_head". However, gpt_head is a pointer to the buffer, not the actual buffer, since it was allocated using ALLOC_CACHE_ALIGN_BUFFER. This caused is_gpt_valid() to read the disk block onto the stack rather than into the buffer, causing the code to fail. This change reverts that portion of the commit mentioned above. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Doug Anderson <dianders@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Anton Staaf <robotboy@chromium.org>
2011-10-27disk: part_efi: fix **pgpt_pte == NULLDoug Anderson
Code was setting **pgpt_pte == NULL, which meant that the pointer to the gpt_pte would be stored at RAM address 00000000. This 'worked' on T20 (SDRAM starts @ 0x00000000), but hung gpt/EFI access on T30 (SDRAM starts @ 0x80000000). Signed-off-by: Tom Warren <twarren@nvidia.com> Signed-off-by: Doug Anderson <dianders@chromium.org>
2011-10-27cosmetic: Replace __FUNCTION__ with __func__ in part_efi.cDoug Anderson
This makes checkpatch happy. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-25part_efi: dcache: allocate cacheline aligned buffersAnton staaf
Currently part_efi.c allocates buffers for the gpt_header, the legacy_mbr, and the pte (partition table entry) that may be incorrectly aligned for DMA operations. This patch uses ALLOC_CACHE_ALIGN_BUFFER for the stack allocated buffers and memalign to replace the malloc of the pte. Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-06part: show efi partition name when print out partition infoLei Wen
Previous output: Marvell>> mmc part Partition Map for MMC device 1 -- Partition Type: EFI Part Start LBA End LBA gpt1 0x8C00 0xCBFF gpt2 0xCC00 0x57BFF gpt3 0x57C00 0xA2BFF gpt4 0xA2C00 0xECBFDE With the patch, the output becomes: Marvell>> mmc part Partition Map for MMC device 1 -- Partition Type: EFI Part Name Start LBA End LBA 1 ramdisk 0x00008C00 0x0000CBFF 2 system 0x0000CC00 0x00057BFF 3 userdata 0x00057C00 0x000A2BFF 4 remaining 0x000A2C00 0x00ECBFDE Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-07-27part_dos: fix crash with big sector sizeSergei Shtylyov
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it tries to read the MBR into 512-byte buffer situated on stack. Instead use the variable length arrays to be safe with any large sector size. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2011-07-26disk/part.c: Make features optionalMatthew McClintock
If we don't want to build support for any partition types we can now add #undef CONFIG_PARTITIONS in a board config file to keep this from being compiled in. Otherwise boards assume this is compiled in by default Signed-off-by: Matthew McClintock <msm@freescale.com>
2011-04-12disk/part.c: fix potential stack overflow bugLei Wen
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>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
2010-10-29Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk
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>
2010-09-19disk/part.c: fix relocation fixupHeiko Schocher
Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-18mmc: print out partition tableLei Wen
Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-08-10disk/part.c: 'usb storage' avoiding overflow when output capacitySergei Trofimovich
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>
2010-07-24FAT32: fix support for superfloppy-format (PBR)Wolfgang Denk
"Superfloppy" format (in U-Boot called PBR) did not work for FAT32 as the file system type string is at a different location. Add support for FAT32. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-08common: delete CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOULHeiko Schocher
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>
2009-10-18part_dos: check status flags of partitionsDaniel Mack
Only read partitions which have 0x00 or 0x80 set in their status field. All others are invalid. Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-10-03Conditionally perform common relocation fixupsPeter Tyser
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>
2009-08-09Partition support: remove newline from partition nameWolfgang Denk
Remove bogus newline character that got added to the .name field of the disk_partition_t structure. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-05-15IDE: bail out of dev_print() for unknown device typesWolfgang Denk
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>
2009-04-03mflash: Initial mflash supportunsik Kim
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>
2009-03-20vsprintf: pull updates from Linux kernelMike Frysinger
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>
2009-02-18disk: convert part_* files to COBJ-$(CONFIG_XXX) styleMike Frysinger
Move the CONFIG_XXX out of the part_XXX.c file and into Makefile to avoid pointless compiles. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-27part_efi: Fix partition size calculation due to inclusive ending LBA.Richard Retanubun
The ending LBA is inclusive. Hence, the partition size should be ((ending-LBA + 1) - starting-LBA) to get the proper partition size. This is confirmed against the results from the parted tool. (e.g. use parted /dev/sda -s unit S print) and observe the size. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
2008-11-02Coding Style cleanup, update CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18Add support for CONFIG_EFI_PARTITION (GUID Partition Table)richardretanubun
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>
2008-09-22Add missing device types to dev_print() in part.cRemy Bohmer
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2008-09-09Fix dev_print when called from usb_stor_info (usb storage command)NĂ­colas Carneiro Lebedenco
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>
2008-06-03Fix incorrect switch for IF_TYPE in part.cTor Krill
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>
2008-05-21Big white-space cleanup.Wolfgang Denk
This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-09cosmetic: Adjust coding style for switch statements to be consistentDetlev Zundel
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-05-09Fix disk type output in disk/part.cDetlev Zundel
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-03-26ata: add the support for SATA frameworkDave Liu
- add the SATA framework - add the SATA command line Signed-off-by: Dave Liu <daveliu@freescale.com>
2007-11-15Build: split COBJS value into multiple linesGrant Likely
This change is in preparation for condtitionial compile support in the build system. By spliting them all into seperate lines now, subsequent patches that change 'COBJS-y += ' into 'COBJS-$(CONFIG_<blah>) += ' will be less invasive and easier to review Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-08-03Merge branch 'testing' into workingAndy Fleming
Conflicts: CHANGELOG fs/fat/fat.c include/configs/MPC8560ADS.h include/configs/pcs440ep.h net/eth.c
2007-07-10disk/ doc/ lib_*/ and tools/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger
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>
2007-07-09disk/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04disk/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
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>
2007-06-22[PCS440EP] upgrade the PCS440EP board:Heiko Schocher
- 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>
2007-06-06Coding Style cleanup; generate new CHANGELOG file.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-05-18Reduce line lengths to 80 characters max.Peter Pearse
2007-05-09New board SMN42 branchPeter Pearse
2007-04-14Enable partition support with MMCHaavard Skinnemoen
Include implementations of init_part() and get_partition_info() when CONFIG_MMC is set. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-02-22[PATCH] get_dev() now unconditionally uses manual relocationStefan Roese
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>
2007-02-20[PATCH] Fix relocation problem with "new" get_dev() functionStefan Roese
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>
2007-02-20[PATCH 1_4] Merge common get_dev() routines for block devicesGrant Likely
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>
2006-10-09Move "ar" flags to config.mk to allow for silent "make -s"Wolfgang Denk
Based on patch by Mike Frysinger, 20 Jun 2006