mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 08:27:23 +00:00
ide: Use a flag for an ATAPI device
Rather than setting a different interface type, use a flag to indicate that a device is ATAPI. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1c2e255334
commit
606e0542b5
1 changed files with 3 additions and 3 deletions
|
@ -525,8 +525,8 @@ static void ide_ident(struct blk_desc *dev_desc)
|
||||||
{
|
{
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
hd_driveid_t iop;
|
hd_driveid_t iop;
|
||||||
|
|
||||||
#ifdef CONFIG_ATAPI
|
#ifdef CONFIG_ATAPI
|
||||||
|
bool is_atapi = false;
|
||||||
int retries = 0;
|
int retries = 0;
|
||||||
#endif
|
#endif
|
||||||
int device;
|
int device;
|
||||||
|
@ -550,7 +550,7 @@ static void ide_ident(struct blk_desc *dev_desc)
|
||||||
(ide_inb(device, ATA_CYL_LOW) == 0x14) &&
|
(ide_inb(device, ATA_CYL_LOW) == 0x14) &&
|
||||||
(ide_inb(device, ATA_CYL_HIGH) == 0xEB)) {
|
(ide_inb(device, ATA_CYL_HIGH) == 0xEB)) {
|
||||||
/* ATAPI Signature found */
|
/* ATAPI Signature found */
|
||||||
dev_desc->if_type = IF_TYPE_ATAPI;
|
is_atapi = true;
|
||||||
/*
|
/*
|
||||||
* Start Ident Command
|
* Start Ident Command
|
||||||
*/
|
*/
|
||||||
|
@ -623,7 +623,7 @@ static void ide_ident(struct blk_desc *dev_desc)
|
||||||
dev_desc->removable = 0;
|
dev_desc->removable = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_ATAPI
|
#ifdef CONFIG_ATAPI
|
||||||
if (dev_desc->if_type == IF_TYPE_ATAPI) {
|
if (is_atapi) {
|
||||||
atapi_inquiry(dev_desc);
|
atapi_inquiry(dev_desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue