summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
...
* ata: ahci: refactor init functionsSascha Hauer2013-03-081-78/+58
| | | | | | Fold ahci_host_init and __ahci_host_init into ahci_add_host Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ahci: implement init callbackSascha Hauer2013-03-082-39/+30
| | | | | | | | Now that we have framework support for delayed probing of ata devices implement it in the ahci driver to actually make use of it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: Add init callback to ata_port_operationsSascha Hauer2013-03-081-0/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: add ata logical device to defer probeSascha Hauer2013-03-081-8/+49
| | | | | | | | | | ata device usually take a long time to spin up, so it makes sense to only spend this time when the device is actually used. This adds a logical ata device and attaches a 'probe' parameter to it, similar to what MMC does. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ahci: fix wrong link checkSascha Hauer2013-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | The following commit accidently bailed out if the link is up, not when it's down as stated in the commit message. | commit a3f74d928ce73f37eab5b398e018aaeb42fd2ba4 | Author: Rob Herring <rob.herring@calxeda.com> | Date: Mon Feb 11 18:02:00 2013 +0100 | | ahci: handle COMINIT received during spin-up | | Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes | the link to go down and we need to re-initialize the link. | | Signed-off-by: Rob Herring <rob.herring@calxeda.com> | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-03-045-28/+5
|\
| * Use new device_platform_driver() macro for driversAlexander Shiyan2013-02-134-28/+4
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * sata-imx: fix depends on ARCH_IMXAlexander Aring2013-02-111-0/+1
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ahci-generic: add oftree supportJean-Christophe PLAGNIOL-VILLARD2013-02-141-0/+9
| | | | | | | | | | | | | | | | | | calxeda use the generic driver but have it's own compatible cf Linux kernel Documentation Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ahci: handle COMINIT received during spin-upRob Herring2013-02-131-2/+9
|/ | | | | | | | | Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes the link to go down and we need to re-initialize the link. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata sff: set device pointer in ata portSascha Hauer2012-12-171-0/+1
| | | | | | | This was forgotten in the last ata updates and leads to NULL pointer dereferences. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-081-2/+1
|\
| * Remove bad Kconfig reference to DISK_DRIVEAlexander Shiyan2012-12-081-1/+0
| | | | | | | | | | | | | | Barebox not contain symbol DISK_DRIVE, so remove all references to it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Cleanup Kconfig filesAlexander Shiyan2012-12-081-1/+1
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: Add i.MX AHCI driverSascha Hauer2012-12-073-0/+160
| | | | | | | | | | | | | | | | | | This adds the glue code for the i.MX SATA controller. This controller needs some i.MX specific setup and some SoC specific setting outside the controller itself. The code for setting up the correct clock source for the SATA phy has been taken from U-Boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: Add ahci supportSascha Hauer2012-12-074-0/+866
| | | | | | | | | | | | | | | | This adds ahci controller support based on U-Boot ahci support. Unlike U-Boot we do not push the SCSI layer in between, but use the ata interface directly. Tested on a Freescale i.MX53. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: Use dma_alloc for bufferSascha Hauer2012-12-071-1/+2
| | | | | | | | | | | | | | ATA devices using DMA may need a sufficiently aligned buffer, so use dma_alloc instead of regular malloc. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: align ata command defines with kernelSascha Hauer2012-12-071-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: split ide sff suport to separate fileSascha Hauer2012-12-076-314/+384
| | | | | | | | | | | | | | | | | | | | Currently we only support oldschool IDE SFF devices. This is done by registering a register layout struct and everything else is done by the generic IDE SFF driver. Since modern ATA devices still use ATA, but not the SFF interface anymore, split out the IDE SFF support to a separate file to allow for other types of ata interfaces. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: fix status flagsSascha Hauer2012-12-071-3/+5
| | | | | | | | | | | | | | Some status flags are wrong, fix them. All of them are currently unused, so no functional change included. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: register disks as /dev/ata*Sascha Hauer2012-12-071-2/+4
| | | | | | | | | | | | | | | | | | Using /dev/disk* for every type of device is not helpful. It increases the chance that the user doesn't know which file corresponds to which device. So rename ata device files to /dev/ata*. Also add a dev_info about which device just has been registered. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: Add i.MX PATA driver supportSascha Hauer2012-12-063-0/+211
|/ | | | | | | Straight forward driver, we only have to configure some additional bits and then use the generic ide support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: Allow partitions > 4GiBSascha Hauer2012-12-031-9/+1
| | | | | | | Since barebox now uses 64bit for device accesses this is no issue anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-042-2/+2
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>