diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-15 03:28:42 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-11 16:08:19 (GMT) |
commit | 4e7490145800ea8da5f67a4fbaa66caab7689ce3 (patch) | |
tree | bf8e0d5d91b41eb3e7d01f66035812a24b686188 /drivers | |
parent | 8eab1a58dd53cbf89dca54f91cf3fbb51d714644 (diff) | |
download | u-boot-4e7490145800ea8da5f67a4fbaa66caab7689ce3.tar.xz |
dm: ahci: Create a local version of two SCSI functions
With driver model we need to define implementations of exec() and
bus_reset() separately for each SCSI driver. As a first step, create a
local version of each function in the AHCI driver and call each from its
global version.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/ahci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c3b5f2a..9c7b043 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -928,7 +928,7 @@ static int ata_scsiop_test_unit_ready(struct ahci_uc_priv *uc_priv, } -int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb) +static int ahci_scsi_exec(struct udevice *dev, struct scsi_cmd *pccb) { struct ahci_uc_priv *uc_priv; #ifdef CONFIG_DM_SCSI @@ -1134,10 +1134,21 @@ static int ata_io_flush(struct ahci_uc_priv *uc_priv, u8 port) return 0; } +static int ahci_scsi_bus_reset(struct udevice *dev) +{ + /* Not implemented */ + + return 0; +} + +int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb) +{ + return ahci_scsi_exec(dev, pccb); +} __weak int scsi_bus_reset(struct udevice *dev) { - /*Not implement*/ + return ahci_scsi_bus_reset(dev); return 0; } |