From: qhuang8 Date: Tue, 26 Jan 2010 05:21:52 +0000 (+0000) Subject: Clean up AtaBus driver to not depend on PI IdeControllerInit Protocol definitions X-Git-Tag: edk2-stable201903~16512 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=6ea8e37bfa9990180454ca5d35c9ed935a0f4b49 Clean up AtaBus driver to not depend on PI IdeControllerInit Protocol definitions git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9821 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h index 8ba43459cf..34f5f40d27 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h @@ -4,7 +4,7 @@ This file defines common data structures, macro definitions and some module internal function header files. - Copyright (c) 2009 Intel Corporation.
+ Copyright (c) 2009 - 2010 Intel Corporation.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -109,7 +108,7 @@ typedef struct { // // Cached data for ATA identify data // - EFI_IDENTIFY_DATA *IdentifyData; + ATA_IDENTIFY_DATA *IdentifyData; EFI_UNICODE_STRING_TABLE *ControllerNameTable; CHAR16 ModelName[MAX_MODEL_NAME_LEN + 1]; diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index 05496a9d16..8df584506e 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c @@ -5,7 +5,7 @@ It transforms the high level identity, read/write, reset command to ATA pass through command and protocol. - Copyright (c) 2009 Intel Corporation.
+ Copyright (c) 2009 - 2010 Intel Corporation.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -164,7 +164,7 @@ PrintAtaModelName ( CHAR8 *Source; CHAR16 *Destination; - Source = AtaDevice->IdentifyData->AtaData.ModelName; + Source = AtaDevice->IdentifyData->ModelName; Destination = AtaDevice->ModelName; // @@ -198,10 +198,10 @@ GetAtapi6Capacity ( EFI_LBA Capacity; EFI_LBA TmpLba; UINTN Index; - ATAPI_IDENTIFY_DATA *IdentifyData; + ATA_IDENTIFY_DATA *IdentifyData; - IdentifyData = (ATAPI_IDENTIFY_DATA *) AtaDevice->IdentifyData; - if ((IdentifyData->cmd_set_support_83 & BIT10) == 0) { + IdentifyData = AtaDevice->IdentifyData; + if ((IdentifyData->command_set_supported_83 & BIT10) == 0) { // // The device doesn't support 48 bit addressing // @@ -216,7 +216,7 @@ GetAtapi6Capacity ( // // Lower byte goes first: word[100] is the lowest word, word[103] is highest // - TmpLba = IdentifyData->max_user_lba_for_48bit_addr[Index]; + TmpLba = IdentifyData->maximum_lba_for_48bit_addressing[Index]; Capacity |= LShiftU64 (TmpLba, 16 * Index); } @@ -242,13 +242,13 @@ IdentifyAtaDevice ( IN OUT ATA_DEVICE *AtaDevice ) { - EFI_ATA_IDENTIFY_DATA *IdentifyData; + ATA_IDENTIFY_DATA *IdentifyData; EFI_BLOCK_IO_MEDIA *BlockMedia; EFI_LBA Capacity; UINT16 PhyLogicSectorSupport; UINT16 UdmaMode; - IdentifyData = &AtaDevice->IdentifyData->AtaData; + IdentifyData = AtaDevice->IdentifyData; if ((IdentifyData->config & BIT15) != 0) { //