summaryrefslogtreecommitdiffstats
path: root/drivers/ata/disk_ata_drive.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-2/+2
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide-sff: add LBA48 supportAntony Pavlov2017-03-301-0/+3
| | | | | | | See http://wiki.osdev.org/ATA_PIO_Mode#48_bit_PIO for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-05-091-0/+9
|\
| * ATA: Implement a hook for 'devinfo'Andrey Smirnov2016-04-281-0/+9
| | | | | | | | | | | | | | | | Implement simple adapter function to serve as a hook for 'devinfo' command. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-1/+1
|/ | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: disk_ata_drive: remove obsolete check for ID validityPeter Mamonov2015-11-021-17/+0
| | | | | | | | The id check does not work on some newer drives. Acked-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> 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: ide: Allow to set the devicenameSascha Hauer2013-06-191-6/+16
| | | | | | | 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: implement detectSascha Hauer2013-06-061-5/+19
| | | | 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>
* ata: Use dev_add_param_bool for probe parameterSascha Hauer2013-04-111-11/+10
| | | | 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: 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: split ide sff suport to separate fileSascha Hauer2012-12-071-311/+33
| | | | | | | | | | 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: 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>
* 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>
* ATA Disk Support: Add support for native ATA type drivesJuergen Beisert2011-11-281-0/+618
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>