Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
7698 commits behind the upstream repository.
  • Simon Glass's avatar
    7cf1afce
    dm: ahci: Unwind the confusing init code · 7cf1afce
    Simon Glass authored
    
    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: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
    7cf1afce
    History
    dm: ahci: Unwind the confusing init code
    Simon Glass authored
    
    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: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
sata_ceva.c 3.47 KiB