summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* sata-imx: i.MX53, use the internal 120MHz clock by defaultEric Bénard2014-02-101-1/+1
| | | | | | | | | | | | | | | | | this allows SATA to work on i.MX53 QSB-R : barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1 imx-sata 10000000.sata: port 0: SATA link ok imx-sata 10000000.sata: port 0: Spinning up device... imx-sata 10000000.sata: port 0: ok. ata0: registered /dev/ata0 before this fix the log was : barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1 imx-sata 10000000.sata: port 0: SATA link timeout set parameter: Connection timed out Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-12-064-1/+5
|\ | | | | | | | | Conflicts: scripts/Makefile
| * barebox: remove double semicolonsAlexander Aring2013-11-181-1/+1
| | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * treewide: Add missing includesSascha Hauer2013-11-084-0/+4
| | | | | | | | | | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: pata-imx: Add missing NULL entry in dt idsSascha Hauer2013-12-021-0/+2
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide-sff: Add missing wait for ready in write functionSascha Hauer2013-09-271-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: Make 'already initialized' a debug messageSascha Hauer2013-06-211-1/+1
| | | | | | This is only interesting for the debug case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: pata-imx: implement detect callback for hardware deviceSascha Hauer2013-06-211-0/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide: embed ata_ioports into struct ide_port and export itSascha Hauer2013-06-213-49/+38
| | | | | | | | Embedding struct ata_ioports into struct ide_port saves us an allocation. Making it available to client drivers is necessary to give them access to struct ata_port which is needed in the next patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: i.MX pata: Add devicetree probe supportSascha Hauer2013-06-191-1/+15
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide: Allow to set the devicenameSascha Hauer2013-06-194-9/+20
| | | | | | | To get persistent devicenames under /dev/ allow to set the devicename from the driver instead of using "ata" unconditionally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: i.MX sata: Add devicetree probe supportSascha Hauer2013-06-061-0/+13
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ahci: Allow 'detect' on hardware deviceSascha Hauer2013-06-061-0/+16
| | | | | | Hook the detect callback to the hardware device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: implement detectSascha Hauer2013-06-061-5/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ahci: only use lba48 on drives which support itSascha Hauer2013-06-061-4/+15
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: move ATA_ID_ fields and functions to include/Sascha Hauer2013-06-061-44/+0
| | | | | | | | We need ata_id_has_lba48() in another C file, so move the ATA_ID_* stuff to include/ata_drive.h like in the Linux Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: Attach info callback to device, not to driverSascha Hauer2013-05-302-2/+2
| | | | | | | | Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/param'Sascha Hauer2013-05-061-11/+10
|\ | | | | | | | | Conflicts: drivers/mci/mci-core.c
| * ata: Use dev_add_param_bool for probe parameterSascha Hauer2013-04-111-11/+10
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ata: Remove wrong DISK_DRIVE symbolAlexander Shiyan2013-04-301-1/+0
|/ | | | | | | DISK_DRIVE is missing in Kconfig, so remove the "select" statement. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>