Commit 447c031b authored by Stefan Reinauer's avatar Stefan Reinauer Committed by Tom Rini
Browse files

scsi: Add function and env var to report number of scsi drives

Add a new function to find out the number of available SCSI disks. Also
set the 'scsidevs' environment variable after each scan.
Signed-off-by: default avatarStefan Reinauer <>
Signed-off-by: Simon Glass's avatarSimon Glass <>
parent c4fa493d
......@@ -1041,6 +1041,9 @@ The following options need to be configured:
CONFIG_SYS_SCSI_SYM53C8XX_CCF to fix clock timing (80Mhz)
The environment variable 'scsidevs' is set to the number of
SCSI devices found during the last scan.
- NETWORK Support (PCI):
Support for Intel 8254x/8257x gigabit chips.
......@@ -184,6 +184,14 @@ removable:
scsi_curr_dev = -1;
printf("Found %d device(s).\n", scsi_max_devs);
setenv_ulong("scsidevs", scsi_max_devs);
int scsi_get_disk_count(void)
return scsi_max_devs;
......@@ -189,6 +189,8 @@ void scsi_low_level_init(int busdevfunc);
void scsi_init(void);
void scsi_scan(int mode);
/** @return the number of scsi disks */
int scsi_get_disk_count(void);
#define SCSI_IDENTIFY 0xC0 /* not used */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment