summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-14 21:28:37 -0600
committerSimon Glass <sjg@chromium.org>2017-07-11 10:08:19 -0600
commit7cf1afce7fa3fe64189020fe14b93f7326dd0758 (patch)
tree5ebfa4fe9113898c4bb7ae87df1f21ede879fbdf /drivers/scsi/scsi-uclass.c
parent62b4ec8e302c7d616e37f2c2c2836edfea712309 (diff)
downloadu-boot-7cf1afce7fa3fe64189020fe14b93f7326dd0758.tar.gz
dm: ahci: Unwind the confusing init code
Two AHCI drivers use SCSI with CONFIG_DM_SCSI. The SCSI uclass calls scsi_low_level_init() which is implemented by ahci.c. If CONFIG_SCSI_AHCI_PLAT is defined it does one thing and if it is not it does something else. We don't need to call through scsi_low_level_init() to get the init completed. Instead, adjust the two drivers to call into AHCI directly. Drop the post-probe init in the SCSI uclass. This means that driver model doesn't need to use scsi_low_level_init(). It is a legacy function and driver model should use a driver's probe() method instead. While we are here, add a comment to the top of the file explaining what ahci.c does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/scsi/scsi-uclass.c')
-rw-r--r--drivers/scsi/scsi-uclass.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index e4ee44bb4c..40c5044f09 100644
--- a/drivers/scsi/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
@@ -13,16 +13,8 @@
#include <dm.h>
#include <scsi.h>
-static int scsi_post_probe(struct udevice *dev)
-{
- debug("%s: device %p\n", __func__, dev);
- scsi_low_level_init(0, dev);
- return 0;
-}
-
UCLASS_DRIVER(scsi) = {
.id = UCLASS_SCSI,
.name = "scsi",
- .post_probe = scsi_post_probe,
.per_device_platdata_auto_alloc_size = sizeof(struct scsi_platdata),
};