From 7cf1afce7fa3fe64189020fe14b93f7326dd0758 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 14 Jun 2017 21:28:37 -0600 Subject: 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 Reviewed-by: Bin Meng --- drivers/scsi/scsi-uclass.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/scsi') 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 #include -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), }; -- cgit v1.2.3