summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* ata: ahci: Do not include <scsi.h>Andrey Smirnov2019-03-111-1/+0
| | | | | | | No symbols found in <scsi.h> are used in this file. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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-302-11/+46
| | | | | | | 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>
* ATA: mvebu: select DISK_ATALucas Stach2017-03-221-0/+1
| | | | | | | The already selected DISK_IDE_SFF depends on it. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: new driver to support the internal sata controller on Armada-XPUwe Kleine-König2017-03-023-0/+132
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide-sff: don't call free for ide_port in error pathUwe Kleine-König2017-01-181-5/+4
| | | | | | | | | The ide_port is provided by the caller so it's not in the responsibility of this function to free this memory in case of error. Actually all callers do the free themselves, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata/ahci: simplify ahci_read_idUwe Kleine-König2017-01-101-6/+1
| | | | | | | | This is a dummy commit log body because I consider the change to trivial to write something sensible. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: pata-imx: simplify assignment of device nameUwe Kleine-König2017-01-101-7/+1
| | | | | | | | | If OF_DEVICE isn't enabled, of_alias_get returns NULL. Also xstrdup returns NULL when NULL is passed as argument. This allows to simplify accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ATA: platform_ide: Fix resource allocationAlexander Shiyan2016-05-231-9/+5
| | | | | | | | | | | Fixes: 3bd69ad driver: replace dev_request_mem_region with dev_request_mem_resource The driver trying to use memory resource, then IO resource. The ALT register is optional. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> 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>
* | Merge branch 'for-next/include-pdata'Sascha Hauer2016-05-092-2/+2
|\ \
| * | include: Move ide platform_data to include/platform_dataSascha Hauer2016-04-152-2/+2
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/include-cleanup'Sascha Hauer2016-05-092-2/+2
|\ \
| * | string: Fix (v)asprintf prototypesSascha Hauer2016-04-152-2/+2
| |/ | | | | | | | | | | | | | | | | | | 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>
* / sata-imx: Fix a typoAndrey Smirnov2016-04-281-1/+1
|/ | | | | | | | It looks like comma operator was accidentaly used instead of regular semicolon. Fix this to avoid confusing future readers of the code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-074-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> 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: intf_platform_ide: add OF bindingsPeter Mamonov2015-09-241-5/+25
| | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: ide-sff: fix integer overflow in ata_wait_ready()Peter Mamonov2015-09-041-1/+1
| | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: sata-imx: Add delay to prevent link timeoutSascha Hauer2015-07-311-0/+2
| | | | | | | | On the Utilite board this delay is necessary to prevent a link timeout. It seems the values written to GPR13 have to settle for some time before further accesses may be made. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* AHCI: convert to streaming DMA opsLucas Stach2015-03-061-3/+10
| | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: move DMA alloc functions to dma.hLucas Stach2015-03-061-0/+1
| | | | | | | | | | This better separates the DMA from the MMU functionality. Also move all drivers that only depends on asm/mmu.h for the alloc functions over to the common header. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: change dma_alloc/free_coherent to match other architecturesLucas Stach2015-03-061-6/+9
| | | | | | | | | As a lot drivers currently rely on the 1:1 virt->phys mapping on ARM we define DMA_ADDRESS_BROKEN to mark them. In order to use them on other architectures with a different mapping they need proper fixing. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-164-5/+13
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_get_resource return an error pointerSascha Hauer2014-09-161-3/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let request_iomem_region return an error pointerSascha Hauer2014-09-161-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ata: platform_ide: cleanup resource requestingSascha Hauer2014-09-121-25/+22
| | | | | | | - use dev_request_mem_region to simplify code - check return values and bail out Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sandbox: allow "make ARCH=sandbox allyesconfig"Holger Schurig2014-07-221-0/+1
| | | | | | | | | | | | | Compiling the tree with allyesconfig is helpful because different compilers (gcc, clang) or static checkers (e.g. clang's scan-build) can then process and check more code. This patch introduces two new configuration symbols that Kconfig files can depend on. That way, code that is only working where a cache or DMA implementation exists can be opted out. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove address of the Free Software FoundationAntony Pavlov2014-06-112-10/+0
| | | | | | | | | | | | | | | | | | The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-05-051-3/+0
|\
| * ata: pata-imx: Remove unused variableAlexander Shiyan2014-04-231-3/+0
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | x86: Add support for IDE on the legacy I/O portsMichel Stam2014-04-082-21/+114
|/ | | | | Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>