@ -326,7 +326,7 @@ void scsi_init(void)
# endif
# endif
bootstage_start ( BOOTSTAGE_ID_ACCUM_SCSI , " ahci " ) ;
bootstage_start ( BOOTSTAGE_ID_ACCUM_SCSI , " ahci " ) ;
scsi_low_level_init ( busdevfunc ) ;
scsi_low_level_init ( busdevfunc ) ;
scsi_scan ( 1 ) ;
scsi_scan ( true ) ;
bootstage_accum ( BOOTSTAGE_ID_ACCUM_SCSI ) ;
bootstage_accum ( BOOTSTAGE_ID_ACCUM_SCSI ) ;
}
}
# endif
# endif
@ -555,7 +555,7 @@ removable:
* to the user if mode = 1
* to the user if mode = 1
*/
*/
# if defined(CONFIG_DM_SCSI)
# if defined(CONFIG_DM_SCSI)
static int do_scsi_scan_one ( struct udevice * dev , int id , int lun , int mod e)
static int do_scsi_scan_one ( struct udevice * dev , int id , int lun , bool verbos e)
{
{
int ret ;
int ret ;
struct udevice * bdev ;
struct udevice * bdev ;
@ -594,21 +594,21 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, int mode)
memcpy ( & bdesc - > revision , & bd . revision , sizeof ( bd . revision ) ) ;
memcpy ( & bdesc - > revision , & bd . revision , sizeof ( bd . revision ) ) ;
part_init ( bdesc ) ;
part_init ( bdesc ) ;
if ( mode = = 1 ) {
if ( verbose ) {
printf ( " Device %d: " , 0 ) ;
printf ( " Device %d: " , 0 ) ;
dev_print ( bdesc ) ;
dev_print ( bdesc ) ;
}
}
return 0 ;
return 0 ;
}
}
int scsi_scan ( int mod e)
int scsi_scan ( bool verbos e)
{
{
unsigned char i , lun ;
unsigned char i , lun ;
struct uclass * uc ;
struct uclass * uc ;
struct udevice * dev ; /* SCSI controller */
struct udevice * dev ; /* SCSI controller */
int ret ;
int ret ;
if ( mode = = 1 )
if ( verbose )
printf ( " scanning bus for devices... \n " ) ;
printf ( " scanning bus for devices... \n " ) ;
blk_unbind_all ( IF_TYPE_SCSI ) ;
blk_unbind_all ( IF_TYPE_SCSI ) ;
@ -630,18 +630,18 @@ int scsi_scan(int mode)
for ( i = 0 ; i < plat - > max_id ; i + + )
for ( i = 0 ; i < plat - > max_id ; i + + )
for ( lun = 0 ; lun < plat - > max_lun ; lun + + )
for ( lun = 0 ; lun < plat - > max_lun ; lun + + )
do_scsi_scan_one ( dev , i , lun , mod e) ;
do_scsi_scan_one ( dev , i , lun , verbos e) ;
}
}
return 0 ;
return 0 ;
}
}
# else
# else
int scsi_scan ( int mod e)
int scsi_scan ( bool verbos e)
{
{
unsigned char i , lun ;
unsigned char i , lun ;
int ret ;
int ret ;
if ( mode = = 1 )
if ( verbose )
printf ( " scanning bus for devices... \n " ) ;
printf ( " scanning bus for devices... \n " ) ;
for ( i = 0 ; i < CONFIG_SYS_SCSI_MAX_DEVICE ; i + + )
for ( i = 0 ; i < CONFIG_SYS_SCSI_MAX_DEVICE ; i + + )
scsi_init_dev_desc ( & scsi_dev_desc [ i ] , i ) ;
scsi_init_dev_desc ( & scsi_dev_desc [ i ] , i ) ;
@ -655,10 +655,10 @@ int scsi_scan(int mode)
continue ;
continue ;
part_init ( & scsi_dev_desc [ scsi_max_devs ] ) ;
part_init ( & scsi_dev_desc [ scsi_max_devs ] ) ;
if ( mode = = 1 ) {
if ( verbose ) {
printf ( " Device %d: " , 0 ) ;
printf ( " Device %d: " , 0 ) ;
dev_print ( & scsi_dev_desc [ scsi_max_devs ] ) ;
dev_print ( & scsi_dev_desc [ scsi_max_devs ] ) ;
} /* if mode */
}
scsi_max_devs + + ;
scsi_max_devs + + ;
} /* next LUN */
} /* next LUN */
}
}