]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up AtaBus driver to not depend on PI IdeControllerInit Protocol definitions
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jan 2010 05:21:52 +0000 (05:21 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Jan 2010 05:21:52 +0000 (05:21 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9821 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c

index 8ba43459cf7d82b155531202228f4d71a7d23d12..34f5f40d274fecb9746a7f319f1aa5da13686550 100644 (file)
@@ -4,7 +4,7 @@
   This file defines common data structures, macro definitions and some module\r
   internal function header files.\r
 \r
-  Copyright (c) 2009 Intel Corporation. <BR>\r
+  Copyright (c) 2009 - 2010 Intel Corporation. <BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,7 +24,6 @@
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/DiskInfo.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/IdeControllerInit.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -109,7 +108,7 @@ typedef struct {
   //\r
   // Cached data for ATA identify data\r
   //\r
-  EFI_IDENTIFY_DATA                 *IdentifyData;\r
+  ATA_IDENTIFY_DATA                 *IdentifyData;\r
 \r
   EFI_UNICODE_STRING_TABLE          *ControllerNameTable;\r
   CHAR16                            ModelName[MAX_MODEL_NAME_LEN + 1];\r
index 05496a9d1682fce5020414f621c667f251026042..8df584506e0028431bcd5fe2af8a267458d060d7 100644 (file)
@@ -5,7 +5,7 @@
   It transforms the high level identity, read/write, reset command to ATA pass\r
   through command and protocol. \r
     \r
-  Copyright (c) 2009 Intel Corporation. <BR>\r
+  Copyright (c) 2009 - 2010 Intel Corporation. <BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -164,7 +164,7 @@ PrintAtaModelName (
   CHAR8   *Source;\r
   CHAR16  *Destination;\r
 \r
-  Source = AtaDevice->IdentifyData->AtaData.ModelName;\r
+  Source = AtaDevice->IdentifyData->ModelName;\r
   Destination = AtaDevice->ModelName;\r
 \r
   //\r
@@ -198,10 +198,10 @@ GetAtapi6Capacity (
   EFI_LBA                       Capacity;\r
   EFI_LBA                       TmpLba;\r
   UINTN                         Index;\r
-  ATAPI_IDENTIFY_DATA           *IdentifyData;\r
+  ATA_IDENTIFY_DATA             *IdentifyData;\r
 \r
-  IdentifyData = (ATAPI_IDENTIFY_DATA *) AtaDevice->IdentifyData;\r
-  if ((IdentifyData->cmd_set_support_83 & BIT10) == 0) {\r
+  IdentifyData = AtaDevice->IdentifyData;\r
+  if ((IdentifyData->command_set_supported_83 & BIT10) == 0) {\r
     //\r
     // The device doesn't support 48 bit addressing\r
     //\r
@@ -216,7 +216,7 @@ GetAtapi6Capacity (
     //\r
     // Lower byte goes first: word[100] is the lowest word, word[103] is highest\r
     //\r
-    TmpLba = IdentifyData->max_user_lba_for_48bit_addr[Index];\r
+    TmpLba = IdentifyData->maximum_lba_for_48bit_addressing[Index];\r
     Capacity |= LShiftU64 (TmpLba, 16 * Index);\r
   }\r
 \r
@@ -242,13 +242,13 @@ IdentifyAtaDevice (
   IN OUT ATA_DEVICE                 *AtaDevice\r
   )\r
 {\r
-  EFI_ATA_IDENTIFY_DATA             *IdentifyData;\r
+  ATA_IDENTIFY_DATA                 *IdentifyData;\r
   EFI_BLOCK_IO_MEDIA                *BlockMedia;\r
   EFI_LBA                           Capacity;\r
   UINT16                            PhyLogicSectorSupport;\r
   UINT16                            UdmaMode;\r
 \r
-  IdentifyData = &AtaDevice->IdentifyData->AtaData;\r
+  IdentifyData = AtaDevice->IdentifyData;\r
 \r
   if ((IdentifyData->config & BIT15) != 0) {\r
     //\r