summaryrefslogtreecommitdiff
path: root/common/sata.c
Commit message (Collapse)AuthorAgeLines
* sata: fix sata command can not being executed bugTang Yuantian2016-11-28-3/+5
| | | | | | | | | | | | | | | | | | | | | Commit d97dc8a0 separated the non-command code into its own file which caused variable sata_curr_device can not be set to a correct value. Before commit d97dc8a0, variable sata_curr_device can be set correctly in sata_initialize(). After commit d97dc8a0, sata_initialize() is moved out to its own file. Accordingly, variable sata_curr_device is removed from sata_initialize() too. This caused sata_curr_device never gets a chance to be set properly which prevent other commands from being executed. This patch sets variable sata_curr_device properly. Fixes: d97dc8a0 (dm: sata: Separate the non-command code into its own file) Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: sata: Add support for driver-model block devicesSimon Glass2016-05-17-1/+30
| | | | | | | | Add driver-model block-device support to the SATA implementation. This is just a dummy implementation for now, since the SATA low-level API uses numbered devices and that doesn't fit with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sata: Separate the non-command code into its own fileSimon Glass2016-05-17-0/+86
At present the SATA command code includes both the command-processing code and the core SATA functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. With this commit: - All CONFIG option are referenced from the non-command code - The concept of a 'current SATA device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>