summaryrefslogtreecommitdiff
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* scsi: ceva: add ls2080a soc supportPeng Ma2018-12-061-0/+4
| | | | | | | | | Add ahci compatible support for ls2080a soc. Signed-off-by: Peng Ma <peng.ma@nxp.com> Acked-by: Michal Simek <michal.simek@xilinx.com> [YS: add fallthrough comment] Reviewed-by: York Sun <york.sun@nxp.com>
* scsi: ceva: add ls1088a soc supportPeng Ma2018-12-061-4/+18
| | | | | | | | Add ahci compatible support for ls1088a soc. Signed-off-by: Peng Ma <peng.ma@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
* scsi: ceva: add ls1046a soc supportPeng Ma2018-12-061-0/+3
| | | | | | | Add ahci compatible support for ls1046a soc. Signed-off-by: Peng Ma <peng.ma@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* Merge tag 'fsl-qoriq-for-v2018.11-rc1' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2018-09-291-1/+27
|\ | | | | | | | | | | | | | | Switch to driver model for eSDHC on Layerscape SoCs including LS1021A, LS1043A, LS1046A, LS1088A, LS2088A. Switch to driver model for SATA on LS1021A and LS1043A. Add support for LS1012AFRWY rev C board. Enable SMMU for LS1043A.
| * scsi: ceva: add ls1021a soc support.Peng Ma2018-09-271-1/+24
| | | | | | | | | | | | | | | | Add ahci compatible support for ls1021a soc. Signed-off-by: Peng Ma <peng.ma@nxp.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * scsi: ceva: add ls1043a soc supportPeng Ma2018-09-271-0/+3
| | | | | | | | | | | | | | Add ahci compatible support for ls1043a soc. Signed-off-by: Peng Ma <peng.ma@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSITuomas Tynkkynen2018-09-251-0/+2
| | | | | | | | | | | | | | | | When using device model this sort of hardcoded limits aren't used or necessary. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
* | ata: ahci: Loop over the actual number of ports, not the maximumTuomas Tynkkynen2018-09-251-1/+1
|/ | | | | | | | | | | | The loop in ahci_start_ports() is looping over the maximum number of SCSI devices in the system, which can be larger than the amount of ports a particular AHCI controller has. The extra looping isn't directly harmful because the link_port_map bitmap won't have the bit set for a nonexistent port, but it is wasteful. Replace the loop limit with the port count of the AHCI controller instead. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
* scsi: ceva: add ls1012a soc supportYuantian Tang2018-07-261-35/+52
| | | | | | | | | | | | Make the code structure more general so that more socs can be added easily and also remove speed limitation restriction. Add the ls1012a sata support as well. Signed-off-by: Tang Yuantian <andy.tang@nxp.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (with and without CONFIG_OF_LIVE on zynqmp zcu102) Reviewed-by: York Sun <york.sun@nxp.com>
* ata: ahci_mvebu: add scsi supportKen Ma2018-05-292-1/+17
| | | | | | | | | | | | | Mvebu AHCI is AHCI driver which uses SCSI under the hood. This patch adjusts AHCI setup to support SCSI by creating a SCSI device as a child. Since the functions of creating SCSI device need the kconfig option DM_SCSI, so let AHCI_MVEBU select DM_SCSI. Signed-off-by: Ken Ma <make@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
* ata: ahci_mvebu: a8040 a0: remove bad port register offsets workaroundsDavid Sniatkiwicz2018-05-291-8/+0
| | | | | | | | | | | | This workaround was added for A8040/7040 A0. A8040/7040 A0 is no longer supported so this workaround can be removed. Signed-off-by: David Sniatkiwicz <davidsn@marvell.com> Signed-off-by: Ken Ma <make@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
* ata: mvebu: move mvebu sata driver to drivers/ata directoryKen Ma2018-05-293-0/+62
| | | | | | | | | | | | | Currently mvebu sata driver is in arch/arm/mach_mvebu directory, this patch moves it to drivers/ata directory with renaming "sata.c" to "ahci_mvebu.c" which is aligned to Linux. New ahci driver's kconfig option is added as AHCI_MVEBU which selects SCSI_AHCI and is based on AHCI. Signed-off-by: Ken Ma <make@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stefan Roese <sr@denx.de>
* scsi: ceva: Convert driver to use UCLASS_AHCI instead of SCSIMichal Simek2018-05-111-16/+20
| | | | | | | | | | | In v2018 the patch "dm: ahci: Correct uclass private data" (sha1: bfc1c6b4838501d10aa48c0e92eaf70976f4b2dd) was causing an issue for ceva_sata. But this issue is not in v2018.05-rc1 but still converting to UCLASS_AHCI would make more sense. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0719-39/+19
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-271-2/+0
| | | | | | | | We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
* dwc_ahci: Fix breakageJean-Jacques Hiblot2018-04-131-13/+10
| | | | | | | | | | The dwc_ahci has been broken for quite some time now. The breakage has been introduced by the series "dm: scsi: Enhance SCSI support for driver model" Use ahci_bind_scsi() and ahci_probe_scsi() to properly bind and probe the driver. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
* Move most CONFIG_HAVE_BLOCK_DEVICE to KconfigAdam Ford2018-02-081-0/+1
| | | | | | | | | | | config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE] Signed-off-by: Tom Rini <trini@konsulko.com>
* ata: Migrate CONFIG_MVSATA_IDE to KconfigTuomas Tynkkynen2017-12-121-0/+6
| | | | Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_LIBATA to KconfigTuomas Tynkkynen2017-12-121-0/+11
| | | | | | | | This symbol enables some library code used by various SATA drivers, so make this a non-user-visible symbol select'ed by the respective drivers, and let moveconfig handle the rest. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_SCSI_AHCI to KconfigTuomas Tynkkynen2017-12-121-0/+5
| | | | | | And use 'imply' liberally. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_DWC_AHSATA to KconfigTuomas Tynkkynen2017-12-121-0/+6
| | | | Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_FSL_SATA to KconfigTuomas Tynkkynen2017-12-121-0/+6
| | | | | | | Use 'imply' here liberally to avoid the combinatorial explosion of defconfig changes in the PowerPC boards. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_SATA_MV to KconfigTuomas Tynkkynen2017-12-121-0/+6
| | | | Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_SATA_SIL3114 to KconfigTuomas Tynkkynen2017-12-121-0/+5
| | | | Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Migrate CONFIG_SATA_SIL to KconfigTuomas Tynkkynen2017-12-121-0/+6
| | | | | | | Use 'imply' here liberally to avoid the combinatorial explosion of defconfig changes in the PowerPC boards. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Drop CONFIG_MX51_PATATuomas Tynkkynen2017-12-122-130/+0
| | | | | | | The last user of this driver went away in August 2015 in commit: b6073fd2115 ("arm: Remove mx51_efikamx, mx51_efikasb boards") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Drop CONFIG_SATA_DWCTuomas Tynkkynen2017-12-123-2536/+0
| | | | | | | The last user of this driver went away in June 2017, in commit: 98f705c9ce ("powerpc: remove 4xx support") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* ata: Fix ahci wordingMichal Simek2017-11-283-5/+5
| | | | | | | s/achi_/ahci_/g Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* scsi: ceva: Start port in probeMichal Simek2017-11-031-1/+6
| | | | | | | | | | | | The patch: "dm: ahci: Unwind the confusing init code" (sha1: 7cf1afce7fa3fe64189020fe14b93f7326dd0758) introduce bug for ceva sata because port didn't start. On the other hand the dwc_ahci.c was fixed correctly. Do the same change for ceva too. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
* treewide: replace with error() with pr_err()Masahiro Yamada2017-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
* dma: import linux/dma-direction.h to consolidate enum dma_data_directionMasahiro Yamada2017-09-122-7/+1
| | | | | | | | Import include/linux/dma-direction.h from Linux 4.13-rc7 and delete duplicated definitions of enum dma_data_direction. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* dm: sata: dwc_ahsata: Add support for driver modelSimon Glass2017-08-171-0/+113
| | | | | | | Update this driver to support driver model. This involves implementing the AHCI operations and reusing existing common code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Update the AHCI uclass to support operationsSimon Glass2017-08-171-0/+37
| | | | | | | At present the AHCI uclass is just a shell and we still use the global functions to access SATA. Fix this by adding operations to the uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Set up common versions of operationsSimon Glass2017-08-171-105/+131
| | | | | | | | Driver model wants to use the core functions in this file but accesses the uclass-private data in a different way. Move the code into new 'common' functions and set up stubs to call these. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: More ahci_init_one() futher downSimon Glass2017-08-171-33/+33
| | | | | | | This function will not be used with driver model and it relates to the other exported functions. Move it down next to them. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Drop is_readySimon Glass2017-08-171-4/+0
| | | | | | This variable is set but never used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Rename the dwc_ahsata private headerSimon Glass2017-08-172-4/+4
| | | | | | | Rename dwc_ahsata.h to indicate that it is a private header file. We plan to create another header with some public functions. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Sort #include directivesSimon Glass2017-08-171-7/+6
| | | | | | Sort the header file inclusions into the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Drop unnecessary bracketsSimon Glass2017-08-171-50/+48
| | | | | | | There is a strange &(var) coding style in this driver. Adjust it to use &var instead, which is more usual. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Pass uc_priv to internal functionsSimon Glass2017-08-171-48/+41
| | | | | | | | | With driver model sata_dev_desc[] does not exist. We still want to use the common code of this driver so update it to pass struct ahci_uc_priv * to each of these functions, instead of an integer which must be looked up in sata_dev_desc[]. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Drop unnecessary castsSimon Glass2017-08-171-38/+22
| | | | | | | Most of the casts in this driver are not necessary. With driver model we do not cast from void *. Update the driver to follow this rule. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Rename 'probe_ent' to uc_privSimon Glass2017-08-171-90/+85
| | | | | | | | | | | With driver model this becomes uclass-private data. Rename the parameter varable to reflect this. With the driver model conversion we will not have any exported functions. Move all exported functions to be together at the end of the file so that we can deal with them in one #ifdef block. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Move exported functions to the endSimon Glass2017-08-171-62/+62
| | | | | | | | With the driver model conversion we will not have any exported functions. Move all exported functions to be together at the end of the file so that we can deal with them in one #ifdef block. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()Simon Glass2017-08-171-43/+0
| | | | | | This function is not called from anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: dwc_ahsata: Make functions staticSimon Glass2017-08-171-6/+6
| | | | | | | Some functions are not called from outside this file. Make these static to make that obvious. Signed-off-by: Simon Glass <sjg@chromium.org>
* ahci-pci: Update call to ahci_probe_scsi_pci()Bin Meng2017-08-031-1/+1
| | | | | | | | | ahci_probe_scsi() now takes a 'base' argument, and there is an API that prepares base address for us: ahci_probe_scsi_pci(). Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* Merge git://git.denx.de/u-boot-x86Tom Rini2017-08-013-0/+49
|\
| * dm: scsi: Add a generic PCI-based AHCI driverBin Meng2017-08-013-0/+49
| | | | | | | | | | | | | | | | This adds support for PCI-based AHCI controller based on DM SCSI. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* | dm: ahci: Correct uclass private dataSimon Glass2017-08-012-1/+3
| | | | | | | | | | | | | | | | | | This is expected to be attached to the uclass and the code operates that way, but the uclass has not been updated. Fix it to avoid using memory at address 0. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 47fc61a (dm: ahci: Drop use of probe_ent)
* | dm: scsi: Drop duplicate SCSI and DM_SCSI optionsSimon Glass2017-08-011-18/+0
| | | | | | | | | | | | | | | | | | When the SATA code was moved into drivers/ata these Kconfig options were added to that directory. They already exist in drivers/scsi. Remove them from drivers/ata to fix the duplication. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 7f2b5f4 (sata: Move drivers into new drivers/ata directory)