summaryrefslogtreecommitdiffstats
path: root/include/ide.h
Commit message (Collapse)AuthorAgeFilesLines
* ide: add missing prototypeJeroen Hofstee2014-10-251-0/+1
| | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* common: cmd_ide: use __weak and add prototypesJeroen Hofstee2014-07-221-0/+4
| | | | | | | | | | | clang chokes about the concept of having an alias to an always_inlined function. gcc likely just ignores the always inlined since binary sizes are equal before and after this patch. Convert the aliases to weak functions and provide missing prototypes. cc: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* Merge branch 'master' of git://git.denx.de/u-boot-nds32Tom Rini2013-07-251-1/+1
|\
| * block: constify sect_buf argument of ide_write_dataGabor Juhos2013-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a const keyword to the sect_buf argument of ide_write_data to fix the following warning: cmd_ide.c: In function '__ide_output_data': cmd_ide.c:548: warning: passing argument 2 of 'ide_write_data' discards qualifiers from pointer target type /devel/u-boot.git/include/ide.h:76: note: expected 'ulong *' but argument is of type 'const ulong *' Also modify the driver-model documentation to match with the new prototype. Compile tested only. Cc: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
* | Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
|/ | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Fix ext2/ext4 filesystem accesses beyond 2TiBFrederic Leroy2013-07-151-0/+2
| | | | | | | | | | | | | | | | | With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type, which is required to represent block numbers for storage devices that exceed 2TiB (the block size usually is 512B), e.g. recent hard drives We now use lbaint_t for partition offset to reflect the lbaint_t change, and access partitions beyond or crossing the 2.1TiB limit. This required changes to signature of ext4fs_devread(), and type of all variables relatives to block sector. ext2/ext4 fs uses logical block represented by a 32 bit value. Logical block is a multiple of device block sector. To avoid overflow problem when calling ext4fs_devread(), we need to cast the sector parameter. Signed-off-by: Frédéric Leroy <fredo@starox.org>
* Fix block device accesses beyond 2TiBSascha Silbe2013-06-261-2/+3
| | | | | | | | | | | | | | | | | | With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type, which is required to represent block numbers for storage devices that exceed 2TiB (the block size usually is 512B), e.g. recent hard drives. For some obscure reason, the current U-Boot code uses lbaint_t for the number of blocks to read (a rather optimistic estimation of how RAM sizes will evolve), but not for the starting address. Trying to access blocks beyond the 2TiB boundary will simply wrap around and read a block within the 0..2TiB range. We now use lbaint_t for block start addresses, too. This required changes to all block drivers as the signature of block_read(), block_write() and block_erase() in block_dev_desc_t changed. Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de>
* Adjust board_r.c for ppcSimon Glass2013-03-151-0/+7
| | | | | | This adds ppc features to the generic post-relocation board init. Signed-off-by: Simon Glass <sjg@chromium.org>
* ide: Add printf format string for CONFIG_SYS_64BIT_LBA optionGabe Black2012-10-221-0/+2
| | | | | | | | | The size of an LBA type changes depending on this option. We need to use a different printf() string in each case, so create a define for this. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* change all versions of input_data() and output_data() to global weak aliasesPavel Herrmann2012-10-171-0/+11
| | | | | | | | | | This changes input_data() and friends from static function to global symbols under weak alias, to enable board specific overrides (and therefore get rid of board-specific code in cmd_ide.c) Also declare ide_bus_offset in the header file, so other files can use ATA_CURR_BASE as well. Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
* split mpc8xx hooks from cmd_ide.cPavel Herrmann2012-10-171-0/+8
| | | | | | | | | | | | | move most of mpc8xx hooks from cmd_ide.c into ide_preinit() and newly created ide_init_postreset() (invoked after calling ide_reset after ide_preinit), some cleanup to make checkpatch happy, enable IDE init hooks in configs of affected boards. confusingly, these hooks are used by more than just mpc8xx-based boards, and therefore are placed in arch/ppc/lib/ note: checkpatch still emits warnings about using volatile Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
* ide.h: Make ide_(read|write) match block_dev_desc_t block_(read|write)Tom Rini2012-10-151-2/+2
| | | | | | | block_dev_desc_t says that block_(read|write) take lbaint_t for blkcnt not ulong Signed-off-by: Tom Rini <trini@ti.com>
* ide: Correct IDE_BUS(dev) macroLuka Perkov2012-10-081-1/+1
| | | | | | | | | | | | | | The IDE_BUS(dev) macro was previously doing dev >> 1. This however is a mis-match of the usage in common/cmd_ide.c and would cause boards with multiple ports / devices to not correctly detect all devices. For more details please see: http://lists.denx.de/pipermail/u-boot/2012-April/122525.html [Tom Rini: Reword commit message only] Tested-by: Luka Perkov <uboot@lukaperkov.net> Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Tom Rini <trini@ti.com>
* IDE: fix compiler warningsWolfgang Denk2011-04-301-1/+1
| | | | | | | | | | | | The changes introduced by commit 0abddf8 ``cmd_ide: enhance new feature "CONFIG_IDE_AHB"'' caused compiler warnings like cmd_ide.c: In function 'ide_init': cmd_ide.c:716: warning: assignment from incompatible pointer type Constify the respective function arguments to fix this. Signed-off-by: Wolfgang Denk <wd@denx.de>
* cmd_ide: enhance new feature "CONFIG_IDE_AHB"Macpaul Lin2011-04-301-0/+7
| | | | | | | | | | | | | Although most IDE controller is designed to be connected to PCI bridge, there are still some IDE controller support AHB interface for SoC design. The driver implementation of these IDE-AHB controllers differ from other IDE-PCI controller, some additional registers and commands access is required during CMD/DATA I/O. Hence a configuration "CONFIG_IDE_AHB" in cmd_ide.c is required to be defined to support these kinds of SoC controllers. Such as Faraday's FTIDE020 series and Global Unichip's UINF-0301. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* mucmc52, uc101: delete ata@3a00 node, if no CF card is detectedHeiko Schocher2009-09-251-0/+3
| | | | | | | | | | | U-Boot can detect if an IDE device is present or not. If not, and this new config option is activated, U-Boot removes the ATA node from the DTS before booting Linux, so the Linux IDE driver does not probe the device and crash. This is needed for buggy hardware (uc101) where no pull down resistor is connected to the signal IDE5V_DD7. Signed-off-by: Heiko Schocher <hs@denx.de>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* IDE: - make ide_inb () and ide_outb () "weak", so boards canHeiko Schocher2007-08-281-0/+2
| | | | | | | | | define there own I/O functions. (Needed for the pcs440ep board). - The default I/O Functions are again 8 Bit accesses. - Added CONFIG_CMD_IDE for the pcs440ep Board. Signed-off-by: Heiko Schocher <hs@denx.de>
* [PATCH 9_9] Use "void *" not "unsigned long *" for block dev read_write ↵Grant Likely2007-02-201-2/+2
| | | | | | | | | buffer pointers Block device read/write is anonymous data; there is no need to use a typed pointer. void * is fine. Also add a hook for block_read functions Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [PATCH 1_4] Merge common get_dev() routines for block devicesGrant Likely2007-02-201-3/+3
| | | | | | | 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>
* Code cleanup; make several boards compile & link.wdenk2004-03-141-1/+1
|
* * Patch by Rune Torgersen, 27 Feb 2004:wdenk2004-03-131-2/+8
| | | | | | | | | | | | | | | | | - 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"
* Initial revisionwdenk2002-08-271-0/+49
OpenPOWER on IntegriCloud