5c561763 | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Split out the bus scanning code
Split out the code that scans a single SCSI bus into a separate function. This will allow it to be used from driver model.
Signed-off-by: Simon Glass <sjg@
dm: scsi: Split out the bus scanning code
Split out the code that scans a single SCSI bus into a separate function. This will allow it to be used from driver model.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
f6580ef3 | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Adjust return value of scsi_exec()
Change this function to return an error number instead of true/false. This allows us to return a proper error number.
Signed-off-by: Simon Glass <sjg@ch
dm: scsi: Adjust return value of scsi_exec()
Change this function to return an error number instead of true/false. This allows us to return a proper error number.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
f6ab5a92 | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Add operations for SCSI devices
The SCSI uclass currently has no operations. It just uses the global SCSI functions. Fix this by adding operations to the only two drivers that use the ucla
dm: scsi: Add operations for SCSI devices
The SCSI uclass currently has no operations. It just uses the global SCSI functions. Fix this by adding operations to the only two drivers that use the uclass, and replacing the global functions with those defined locally in the SCSI code.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
8eab1a58 | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Document and rename the scsi_scan() parameter
The 'mode' parameter is actually a flag to determine whether to display a list of devices found during the scan. Rename it to reflect this, ad
dm: scsi: Document and rename the scsi_scan() parameter
The 'mode' parameter is actually a flag to determine whether to display a list of devices found during the scan. Rename it to reflect this, add a function comment and adjust callers to use a boolean.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
4682c8a1 | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Add a device pointer to scan_exec(), scsi_bus_reset()
With driver model these functions need a device pointer. Add one even when CONFIG_DM_SCSI is not defined. This avoids having ugly cond
dm: scsi: Add a device pointer to scan_exec(), scsi_bus_reset()
With driver model these functions need a device pointer. Add one even when CONFIG_DM_SCSI is not defined. This avoids having ugly conditional function prototypes, When CONFIG_DM_SCSI is not defined we can just ignore the pointer.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
7cf1afce | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
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 define
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>
show more ...
|
099c239d | 14-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: scsi: Indent the confusing #ifdefs
These are very confusing without some sort of indentation. At some point we will be able to remove them, but for now, indent them.
Signed-off-by: Simon Glass
dm: scsi: Indent the confusing #ifdefs
These are very confusing without some sort of indentation. At some point we will be able to remove them, but for now, indent them.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|