summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* Change byte order detection mechanism to kernel styleSascha Hauer2012-06-281-1/+1
| | | | | | | | | | | | | | | The Linux Kernel defines only one of __LITTLE_ENDIAN and __BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then be tested with #if __BYTE_ORDER == __xx_ENDIAN. As we tend to use a lot of Kernel code in barebox we switch to use the kernel way of determing the byte order. As this always causes a lot of confusion add a check to include/common.h to make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Allow use platform_ide driver without ALT-registersAlexander Shiyan2012-04-181-4/+10
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add driver for IDE like interfacesJuergen Beisert2011-11-283-0/+138
| | | | | | | | This simple driver enables a generic driver for ATA type of devices to get access to the so called 'register file' of an ATA drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA Disk Support: Add support for native ATA type drivesJuergen Beisert2011-11-283-0/+625
| | | | | | | | | | | | | | | This changed patch removes more of the u-boot like code and replace it with kernel like code. commit 2a8966936af6b54573483ade559d0633e489b515 Author: Juergen Beisert <jbe@pengutronix.de> Date: Fri Sep 30 15:06:26 2011 +0200 ATA Disk Support: Add support for native ATA type drives Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove 'disk_drive.c' as it is now replaced by generic partition handlingJuergen Beisert2011-11-283-256/+0
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use generic block layer to access the drives and do partition parsingJuergen Beisert2011-11-282-43/+61
| | | | | | | Change all relevant blockdevice users to the simplified interface. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA/DISK: The BIOS based disk driver is not an interfaceJuergen Beisert2011-11-284-9/+9
| | | | | | | | Using the BIOS to access attached hard disks means a full disk driver, not only an interface to the drives. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA/DISK: Reorganize file structure and names for future updatesJuergen Beisert2011-11-283-13/+16
| | | | | | | | 'ATA' means more an interface than a disk drive. Change the names to reflect their real meaning. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA/DISK: Enabling write support does not belong to 'drive types'Juergen Beisert2011-11-281-2/+2
| | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA/DISK: Add generic disk support when enabling the BIOS disk driverJuergen Beisert2011-11-281-0/+1
| | | | | | | The BIOS based disk driver makes no sense without the generic disk support. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fixed unaligned accessFabian van der Werf2011-10-091-5/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* disk_drive: fix x86 supportJean-Christophe PLAGNIOL-VILLARD2011-08-151-3/+3
| | | | | | | switch to resource Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: switch to resourceJean-Christophe PLAGNIOL-VILLARD2011-07-301-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ata/bios: convert to struct resourceJean-Christophe PLAGNIOL-VILLARD2011-07-231-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ata: guessing disk sizes is only needed on X86Sascha Hauer2011-05-061-1/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: make write support optionalSascha Hauer2011-04-112-0/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: use block supportSascha Hauer2011-04-112-158/+35
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* x86 ATA: Don't touch the size entry for the BIOS disk based deviceJuergen Beisert2011-03-101-1/+0
| | | | | | | Only the platform sets this entry to setup the correct size or signals the driver to guess the size of the attached disk. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* Don't try to guess the size of a disk if its size value is already givenJuergen Beisert2010-10-111-9/+18
| | | | | | | | | | | | | | | | | Guessing the size of an attached harddisk (access via x86 BIOS) was needed due to the fact, barebox can't query this information from the BIOS easily. But with the SD/MMC cards, there will be a second user of the generic disk handling routines. And with this media it is very easy to know its size. This patch provides a workaround to keep the guessing feature if the size of the registered disk is 0. If it is not 0, the given value will be used instead. Note: This is in preparation to add MCI card support, which can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Don't use a sector buffer on stackJuergen Beisert2010-10-111-5/+12
| | | | | | | | | | | | | | | Using a temp. buffer for a disk sector on the stack, seems not work. Doing so lets the system run crazy (the stack seems to be destroyd). Don't know the correct stack handling on ARM, but (IMHO) I also can exclude any writing across the buffer boundaries. Using a temp. buffer via malloc() runs also on ARM. Note: This patch was required to add MCI card support, which can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make the disk driver less noisyJuergen Beisert2010-10-111-1/+2
| | | | | | | | | | | | In real life this output is only a "nice to have", but most of the time its useless and confusing. So, make it a debug feature for the interested developer. Note: This is in preparation to add MCI card support, which mostly come with a partition table and can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* x-functions do not return in case of failure.Juergen Beisert2010-10-111-4/+0
| | | | | | | | Remove error handling, because in case of failure the xzalloc() function does not return. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add a low level disk drive access driverJuergen Beisert2010-01-143-0/+302
| | | | | | | | | This is a low level disk drive communication driver. It uses the real mode BIOS found on most x86 platforms, to read and write sectors. Used by the generic disk driver. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add the main disk driverJuergen Beisert2010-01-143-0/+353
| | | | | | | | This is the generic disk driver. It does not know how to access the drives. Other low level drivers are required for this. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Start to add ATA support to bareboxJuergen Beisert2010-01-142-0/+15
Add the basic files, declarations and folders to bring in ATA support. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>