summaryrefslogtreecommitdiff
path: root/drivers/ata/dwc_ahsata.c
AgeCommit message (Collapse)Author
2019-04-13ata: dwc_ahsata: Add ahci driver model supportSoeren Moch
Disable this support for cm_fx6 to avoid breakage. Signed-off-by: Soeren Moch <smoch@web.de>
2019-04-13ata: dwc_ahsata: Fix sector reports for large disksSoeren Moch
Do not report negative sector numbers for disks > 1TB, do not limit sector numbers to 32 bit if CONFIG_SYS_64BIT_LBA is enabled. Signed-off-by: Soeren Moch <smoch@web.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
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>
2017-08-17dm: sata: dwc_ahsata: Add support for driver modelSimon Glass
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>
2017-08-17dm: sata: dw_sata: Set up common versions of operationsSimon Glass
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>
2017-08-17dm: sata: dw_sata: More ahci_init_one() futher downSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop is_readySimon Glass
This variable is set but never used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dw_sata: Rename the dwc_ahsata private headerSimon Glass
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>
2017-08-17dm: sata: dw_sata: Sort #include directivesSimon Glass
Sort the header file inclusions into the correct order. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dw_sata: Drop unnecessary bracketsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Pass uc_priv to internal functionsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop unnecessary castsSimon Glass
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>
2017-08-17dm: sata: dw_sata: Rename 'probe_ent' to uc_privSimon Glass
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>
2017-08-17dm: sata: dw_sata: Move exported functions to the endSimon Glass
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>
2017-08-17dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()Simon Glass
This function is not called from anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17dm: sata: dwc_ahsata: Make functions staticSimon Glass
Some functions are not called from outside this file. Make these static to make that obvious. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: ahci: Rename struct ahci_probe_entSimon Glass
This is not a very useful name since once it is probed it still hangs around. With driver model we will use uclass data for this, so rename the struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11sata: Move drivers into new drivers/ata directorySimon Glass
At present we have the SATA and PATA drivers mixed up in the drivers/block directory. It is better to split them out into their own place. Use drivers/ata which is what Linux does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>