diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 05:21:52 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 05:21:52 +0000 |
commit | 6ea8e37bfa9990180454ca5d35c9ed935a0f4b49 (patch) | |
tree | 415c36beabdb500c301cada278517f100223369e | |
parent | a7ddec115df0929ea7e24379da564e3c44112b48 (diff) | |
download | edk2-platforms-6ea8e37bfa9990180454ca5d35c9ed935a0f4b49.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h | 5 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 16 |
2 files changed, 10 insertions, 11 deletions
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. <BR>
+ Copyright (c) 2009 - 2010 Intel Corporation. <BR>
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 <Protocol/BlockIo.h>
#include <Protocol/DiskInfo.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/IdeControllerInit.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
@@ -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. <BR>
+ Copyright (c) 2009 - 2010 Intel Corporation. <BR>
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) {
//
|