]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine function comment to follow doxygen format.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 20 May 2010 03:29:26 +0000 (03:29 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 20 May 2010 03:29:26 +0000 (03:29 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10520 6f19259b-4bc3-4df7-8a09-765794883524

PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/ComponentName.c
PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.c
PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.h

index 42f4bc97f7f8875d9726dcccab8d32e1a91db7ae..5e56a62f4730031c2c133ff2d0c12f056acbbef7 100644 (file)
@@ -47,7 +47,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIdeControllerDriverNameT
   }\r
 };\r
 \r
-//\r
+///\r
 /// Controller Name Strings\r
 ///\r
 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIdeControllerControllerNameTable[] = {\r
@@ -61,6 +61,27 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIdeControllerControllerN
   }\r
 };\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
+\r
+  @param This           A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param Language       A pointer to a three character ISO 639-2 language identifier.\r
+                        This is the language of the driver name that that the caller\r
+                        is requesting, and it must match one of the languages specified\r
+                        in SupportedLanguages.  The number of languages supported by a\r
+                        driver is up to the driver writer.\r
+  @param DriverName     A pointer to the Unicode string to return.  This Unicode string\r
+                        is the name of the driver specified by This in the language\r
+                        specified by Language.\r
+  \r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by This\r
+                                and the language specified by Language was returned\r
+                                in DriverName.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                language specified by Language.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerComponentNameGetDriverName (\r
@@ -68,32 +89,6 @@ IdeControllerComponentNameGetDriverName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller\r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a\r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language\r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned\r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the\r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return LookupUnicodeString2 (\r
            Language,\r
@@ -104,6 +99,46 @@ IdeControllerComponentNameGetDriverName (
            );\r
 }\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by an EFI Driver.  \r
+\r
+  @param This                   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param ControllerHandle       The handle of a controller that the driver specified by\r
+                                This is managing.  This handle specifies the controller\r
+                                whose name is to be returned.\r
+  @param OPTIONAL               The handle of the child controller to retrieve the name\r
+                                of.  This is an optional parameter that may be NULL.  It\r
+                                will be NULL for device drivers.  It will also be NULL\r
+                                for a bus drivers that wish to retrieve the name of the\r
+                                bus controller.  It will not be NULL for a bus driver\r
+                                that wishes to retrieve the name of a child controller.\r
+  @param Language               A pointer to a three character ISO 639-2 language\r
+                                identifier.  This is the language of the controller name\r
+                                that that the caller is requesting, and it must match one\r
+                                of the languages specified in SupportedLanguages.  The\r
+                                number of languages supported by a driver is up to the\r
+                                driver writer.\r
+  @param ControllerName         A pointer to the Unicode string to return.  This Unicode\r
+                                string is the name of the controller specified by\r
+                                ControllerHandle and ChildHandle in the language\r
+                                specified by Language from the point of view of the\r
+                                driver specified by This.\r
+  \r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in the\r
+                                language specified by Language for the driver\r
+                                specified by This was returned in DriverName.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                language specified by Language.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerComponentNameGetControllerName (\r
@@ -113,51 +148,6 @@ IdeControllerComponentNameGetControllerName (
   IN  CHAR8                                           *Language,\r
   OUT CHAR16                                          **ControllerName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by\r
-                       This is managing.  This handle specifies the controller\r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name\r
-                       of.  This is an optional parameter that may be NULL.  It\r
-                       will be NULL for device drivers.  It will also be NULL\r
-                       for a bus drivers that wish to retrieve the name of the\r
-                       bus controller.  It will not be NULL for a bus driver\r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language\r
-                       identifier.  This is the language of the controller name\r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The\r
-                       number of languages supported by a driver is up to the\r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by\r
-                       ControllerHandle and ChildHandle in the language\r
-                       specified by Language from the point of view of the\r
-                       driver specified by This.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the\r
-                            language specified by Language for the driver\r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid\r
-                            EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently\r
-                            managing the controller specified by\r
-                            ControllerHandle and ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the\r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
 \r
index 6194eaa612a3411f07e7537e0fdbb91d75609122..a12f536b41a4a708b89fe008f3dcce15869c8d19 100644 (file)
@@ -3,7 +3,7 @@
   IDE Bus driver to support platform dependent timing information. This driver\r
   is responsible for early initialization of IDE controller.\r
 \r
-  Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -28,9 +28,9 @@ EFI_DRIVER_BINDING_PROTOCOL gIdeControllerDriverBinding = {
   NULL\r
 };\r
 \r
-//\r
-//  EFI_IDE_CONTROLLER_PROVATE_DATA Template\r
-//\r
+///\r
+///  EFI_IDE_CONTROLLER_PROVATE_DATA Template\r
+///\r
 EFI_IDE_CONTROLLER_INIT_PROTOCOL  gEfiIdeControllerInit = {\r
   IdeInitGetChannelInfo,\r
   IdeInitNotifyPhase,\r
@@ -42,9 +42,9 @@ EFI_IDE_CONTROLLER_INIT_PROTOCOL  gEfiIdeControllerInit = {
   ICH_IDE_MAX_CHANNEL\r
 };\r
 \r
-//\r
-//  EFI_ATA_COLLECTIVE_MODE Template\r
-//\r
+///\r
+///  EFI_ATA_COLLECTIVE_MODE Template\r
+///\r
 EFI_ATA_COLLECTIVE_MODE  gEfiAtaCollectiveModeTemplate = {\r
   {           \r
     TRUE,                   // PioMode.Valid\r
@@ -64,31 +64,24 @@ EFI_ATA_COLLECTIVE_MODE  gEfiAtaCollectiveModeTemplate = {
   }\r
 };\r
 \r
+/**\r
+  Chipset Ide Driver EntryPoint function. It follows the standard EFI driver model. \r
+  It's called by StartImage() of DXE Core.\r
+\r
+  @param ImageHandle    While the driver image loaded be the ImageLoader(), \r
+                        an image handle is assigned to this driver binary, \r
+                        all activities of the driver is tied to this ImageHandle\r
+  @param SystemTable    A pointer to the system table, for all BS(Boo Services) and\r
+                        RT(Runtime Services)\r
+  \r
+  @return EFI_STATUS    Status of  EfiLibInstallDriverBindingComponentName2().\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeIdeControllerDriver (\r
   IN EFI_HANDLE       ImageHandle,\r
   IN EFI_SYSTEM_TABLE *SystemTable\r
   )\r
-/*++\r
-  Routine Description:\r
-  \r
-    Chipset Ide Driver EntryPoint function. It follows the standard EFI driver \r
-    model. It's called by StartImage() of DXE Core\r
-    \r
-  Argments:\r
-  \r
-    ImageHnadle  -- While the driver image loaded be the ImageLoader(), \r
-                    an image handle is assigned to this driver binary, \r
-                    all activities of the driver is tied to this ImageHandle\r
-    *SystemTable -- A pointer to the system table, for all BS(Boo Services) and\r
-                    RT(Runtime Services)\r
-\r
-  Retruns:\r
-  \r
-    Always call EfiLibInstallDriverBindingProtocol( ) and retrun the result\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -108,6 +101,17 @@ InitializeIdeControllerDriver (
   return Status;\r
 }\r
 \r
+/**\r
+  Register Driver Binding protocol for this driver.\r
+\r
+  @param This                   A pointer points to the Binding Protocol instance\r
+  @param Controller             The handle of controller to be tested. \r
+  @param RemainingDevicePath    A pointer to the device path. Ignored by device\r
+                                driver but used by bus driver\r
+  \r
+  @retval EFI_SUCCESS           Driver loaded. \r
+  @retval !EFI_SUCESS           Driver not loaded. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerSupported (\r
@@ -115,24 +119,6 @@ IdeControllerSupported (
   IN EFI_HANDLE                  Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL    *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-  \r
-  Register Driver Binding protocol for this driver.\r
-  \r
-  Arguments:\r
-  \r
-    This                 -- a pointer points to the Binding Protocol instance\r
-    Controller           -- The handle of controller to be tested. \r
-    *RemainingDevicePath -- A pointer to the device path. Ignored by device\r
-                            driver but used by bus driver\r
-\r
-  Returns:\r
-\r
-    EFI_SUCCESS          -- Driver loaded.\r
-    other                -- Driver not loaded.\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
   EFI_PCI_IO_PROTOCOL       *PciIo;\r
@@ -198,6 +184,19 @@ Done:
   return Status;\r
 }\r
 \r
+/**\r
+  This routine is called right after the .Supported() called and return \r
+  EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols\r
+  are closed.  \r
+\r
+  @param This                   A pointer points to the Binding Protocol instance\r
+  @param Controller             The handle of controller to be tested. Parameter\r
+                                passed by the caller\r
+  @param RemainingDevicePath    A pointer to the device path. Should be ignored by\r
+                                device driver\r
+  \r
+  @return EFI_STATUS            Status of InstallMultipleProtocolInterfaces()\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerStart (\r
@@ -205,22 +204,6 @@ IdeControllerStart (
   IN EFI_HANDLE                     Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-  \r
-    This routine is called right after the .Supported() called and return \r
-    EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols\r
-    are closed.\r
-\r
-  Arguments:\r
-      \r
-    This                 -- a pointer points to the Binding Protocol instance\r
-    Controller           -- The handle of controller to be tested. Parameter\r
-                            passed by the caller\r
-    *RemainingDevicePath -- A pointer to the device path. Should be ignored by\r
-                            device driver\r
---*/\r
 {\r
   EFI_STATUS           Status;\r
   EFI_PCI_IO_PROTOCOL  *PciIo;\r
@@ -258,6 +241,17 @@ IdeControllerStart (
                 );\r
 }\r
 \r
+/**\r
+  Stop this driver on Controller Handle. \r
+\r
+  @param This               Protocol instance pointer.\r
+  @param Controller         Handle of device to stop driver on \r
+  @param NumberOfChildren   Not used\r
+  @param ChildHandleBuffer  Not used\r
+  \r
+  @retval EFI_SUCESS        This driver is removed DeviceHandle \r
+  @retval !EFI_SUCCESS      This driver was not removed from this device \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerStop (\r
@@ -266,22 +260,6 @@ IdeControllerStop (
   IN  UINTN                           NumberOfChildren,\r
   IN  EFI_HANDLE                      *ChildHandleBuffer\r
   )\r
-/*++\r
-  \r
-  Routine Description:\r
-    Stop this driver on Controller Handle. \r
-\r
-  Arguments:\r
-    This              - Protocol instance pointer.\r
-    Controller        - Handle of device to stop driver on \r
-    NumberOfChildren  - Not used\r
-    ChildHandleBuffer - Not used\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - This driver is removed DeviceHandle\r
-    other             - This driver was not removed from this device\r
-  \r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   EFI_IDE_CONTROLLER_INIT_PROTOCOL  *IdeControllerInit;\r
@@ -334,6 +312,20 @@ IdeControllerStop (
 //\r
 // Interface functions of IDE_CONTROLLER_INIT protocol\r
 //\r
+/**\r
+  This function can be used to obtain information about a specified channel. \r
+  It's usually used by IDE Bus driver during enumeration process.  \r
+\r
+  @param This           the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel        Channel number (0 based, either 0 or 1)\r
+  @param Enabled        TRUE if the channel is enabled. If the channel is disabled, \r
+                        then it will no be enumerated.\r
+  @param MaxDevices     The Max number of IDE devices that the bus driver can expect\r
+                        on this channel. For ATA/ATAPI, this number is either 1 or 2.\r
+  \r
+  @retval EFI_SUCCESS           Success to get channel information\r
+  @retval EFI_INVALID_PARAMETER Invalid channel id.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitGetChannelInfo (\r
@@ -342,25 +334,6 @@ IdeInitGetChannelInfo (
   OUT  BOOLEAN                          *Enabled,\r
   OUT  UINT8                            *MaxDevices\r
   )\r
-/*++\r
-Routine Description:\r
-\r
-  This function can be used to obtain information about a specified channel. \r
-  It's usually used by IDE Bus driver during enumeration process.\r
-\r
-Arguments:\r
-\r
-  This       -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Channel    -- Channel number (0 based, either 0 or 1)\r
-  Enabled    -- TRUE if the channel is enabled. If the channel is disabled, \r
-                then it will no be enumerated.\r
-  MaxDevices -- The Max number of IDE devices that the bus driver can expect\r
-                on this channel. For ATA/ATAPI, this number is either 1 or 2.\r
-\r
-Returns:\r
-  EFI_STATUS \r
-\r
---*/\r
 {\r
   //\r
   // Channel number (0 based, either 0 or 1)\r
@@ -375,7 +348,16 @@ Returns:
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
+/**\r
+  This function is called by IdeBus driver before executing certain actions. \r
+  This allows IDE Controller Init to prepare for each action.  \r
 \r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Phase      phase indicator defined by IDE_CONTROLLER_INIT protocol\r
+  @param Channel    Channel number (0 based, either 0 or 1)\r
+  \r
+  @return EFI_SUCCESS Success operation.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitNotifyPhase (\r
@@ -383,26 +365,21 @@ IdeInitNotifyPhase (
   IN  EFI_IDE_CONTROLLER_ENUM_PHASE      Phase,\r
   IN  UINT8                              Channel\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is called by IdeBus driver before executing certain actions. \r
-  This allows IDE Controller Init to prepare for each action.\r
-\r
-Arguments:\r
-\r
-  This     -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Phase    -- phase indicator defined by IDE_CONTROLLER_INIT protocol\r
-  Channel  -- Channel number (0 based, either 0 or 1)\r
-\r
-Returns:\r
-    \r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  This function is called by IdeBus driver to submit EFI_IDENTIFY_DATA data structure\r
+  obtained from IDE deivce. This structure is used to set IDE timing  \r
+\r
+  @param This           The EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel        IDE channel number (0 based, either 0 or 1)\r
+  @param Device         IDE device number\r
+  @param IdentifyData   A pointer to EFI_IDENTIFY_DATA data structure\r
+  \r
+  @return EFI_SUCCESS   Success operation. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitSubmitData (\r
@@ -411,27 +388,21 @@ IdeInitSubmitData (
   IN  UINT8                               Device,\r
   IN  EFI_IDENTIFY_DATA                   *IdentifyData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is called by IdeBus driver to submit EFI_IDENTIFY_DATA data structure\r
-  obtained from IDE deivce. This structure is used to set IDE timing\r
-\r
-Arguments:\r
-\r
-  This         -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Channel      -- IDE channel number (0 based, either 0 or 1)\r
-  Device       -- IDE device number\r
-  IdentifyData -- A pointer to EFI_IDENTIFY_DATA data structure\r
-\r
-Returns:\r
-    \r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  This function is called by IdeBus driver to disqualify unsupported operation\r
+  mode on specfic IDE device  \r
+\r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel    IDE channel number (0 based, either 0 or 1)\r
+  @param Device     IDE device number\r
+  @param BadModes   Operation mode indicator\r
+  \r
+  @return EFI_SUCCESS Success operation. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitDisqualifyMode (\r
@@ -440,27 +411,22 @@ IdeInitDisqualifyMode (
   IN  UINT8                               Device,\r
   IN  EFI_ATA_COLLECTIVE_MODE             *BadModes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is called by IdeBus driver to disqualify unsupported operation\r
-  mode on specfic IDE device\r
-\r
-Arguments:\r
-\r
-  This     -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Channel  -- IDE channel number (0 based, either 0 or 1)\r
-  Device   -- IDE device number\r
-  BadModes -- Operation mode indicator\r
-\r
-Returns:\r
-    \r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  This function is called by IdeBus driver to calculate the best operation mode\r
+  supported by specific IDE device  \r
+\r
+  @param This               the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel            IDE channel number (0 based, either 0 or 1)\r
+  @param Device             IDE device number\r
+  @param SupportedModes     Modes collection supported by IDE device\r
+  \r
+  @retval EFI_OUT_OF_RESOURCES  Fail to allocate pool. \r
+  @retval EFI_INVALID_PARAMETER Invalid channel id and device id.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitCalculateMode (\r
@@ -469,23 +435,6 @@ IdeInitCalculateMode (
   IN  UINT8                                  Device,\r
   OUT EFI_ATA_COLLECTIVE_MODE                **SupportedModes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is called by IdeBus driver to calculate the best operation mode\r
-  supported by specific IDE device\r
-\r
-Arguments:\r
-\r
-  This           -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Channel        -- IDE channel number (0 based, either 0 or 1)\r
-  Device         -- IDE device number\r
-  SupportedModes -- Modes collection supported by IDE device\r
-\r
-Returns:\r
-    \r
---*/\r
 {\r
   if (Channel >= ICH_IDE_MAX_CHANNEL || Device >= ICH_IDE_MAX_DEVICES) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -499,7 +448,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  This function is called by IdeBus driver to set appropriate timing on IDE\r
+  controller according supported operation mode.  \r
 \r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel    IDE channel number (0 based, either 0 or 1)\r
+  @param Device     IDE device number\r
+  @param Modes      IDE device modes\r
+  \r
+  @retval EFI_SUCCESS Sucess operation.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitSetTiming (\r
@@ -508,22 +467,6 @@ IdeInitSetTiming (
   IN  UINT8                               Device,\r
   IN  EFI_ATA_COLLECTIVE_MODE             *Modes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is called by IdeBus driver to set appropriate timing on IDE\r
-  controller according supported operation mode\r
-\r
-Arguments:\r
-\r
-  This           -- the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
-  Channel        -- IDE channel number (0 based, either 0 or 1)\r
-  Device         -- IDE device number\r
-\r
-Returns:\r
-    \r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
index 1683e32a435f2b5bc0378b0775af0690ad658bd3..301b781337e20b784c01e8f0d06294d4cd63c1ef 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for IDE controller driver.\r
 \r
-  Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -49,6 +49,17 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gIdeControllerComponentName2;
 //\r
 // Driver binding functions declaration\r
 //\r
+/**\r
+  Register Driver Binding protocol for this driver.\r
+\r
+  @param This                   A pointer points to the Binding Protocol instance\r
+  @param Controller             The handle of controller to be tested. \r
+  @param RemainingDevicePath    A pointer to the device path. Ignored by device\r
+                                driver but used by bus driver\r
+  \r
+  @retval EFI_SUCCESS           Driver loaded. \r
+  @retval !EFI_SUCESS           Driver not loaded. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerSupported (\r
@@ -56,26 +67,21 @@ IdeControllerSupported (
   IN EFI_HANDLE                        Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL          *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-  \r
-  Register Driver Binding protocol for this driver.\r
-  \r
-  Arguments:\r
-  \r
-    This                 -- a pointer points to the Binding Protocol instance\r
-    Controller           -- The handle of controller to be tested. \r
-    *RemainingDevicePath -- A pointer to the device path. Ignored by device\r
-                            driver but used by bus driver\r
-\r
-  Returns:\r
-\r
-    EFI_SUCCESS          -- Driver loaded.\r
-    other                -- Driver not loaded.\r
---*/\r
 ;\r
 \r
+/**\r
+  This routine is called right after the .Supported() called and return \r
+  EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols\r
+  are closed.  \r
+\r
+  @param This                   A pointer points to the Binding Protocol instance\r
+  @param Controller             The handle of controller to be tested. Parameter\r
+                                passed by the caller\r
+  @param RemainingDevicePath    A pointer to the device path. Should be ignored by\r
+                                device driver\r
+  \r
+  @return EFI_STATUS            Status of InstallMultipleProtocolInterfaces()\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerStart (\r
@@ -83,24 +89,19 @@ IdeControllerStart (
   IN EFI_HANDLE                         Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL           *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-  \r
-    This routine is called right after the .Supported() called and return \r
-    EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols\r
-    are closed.\r
-\r
-  Arguments:\r
-      \r
-    This                 -- a pointer points to the Binding Protocol instance\r
-    Controller           -- The handle of controller to be tested. Parameter\r
-                            passed by the caller\r
-    *RemainingDevicePath -- A pointer to the device path. Should be ignored by\r
-                            device driver\r
---*/\r
 ;\r
 \r
+/**\r
+  Stop this driver on Controller Handle. \r
+\r
+  @param This               Protocol instance pointer.\r
+  @param Controller         Handle of device to stop driver on \r
+  @param NumberOfChildren   Not used\r
+  @param ChildHandleBuffer  Not used\r
+  \r
+  @retval EFI_SUCESS        This driver is removed DeviceHandle \r
+  @retval !EFI_SUCCESS      This driver was not removed from this device \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerStop (\r
@@ -109,27 +110,25 @@ IdeControllerStop (
   IN  UINTN                             NumberOfChildren,\r
   IN  EFI_HANDLE                        *ChildHandleBuffer\r
   )\r
-/*++\r
-  \r
-  Routine Description:\r
-    Stop this driver on Controller Handle. \r
-\r
-  Arguments:\r
-    This              - Protocol instance pointer.\r
-    Controller        - Handle of device to stop driver on \r
-    NumberOfChildren  - Not used\r
-    ChildHandleBuffer - Not used\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - This driver is removed DeviceHandle\r
-    other             - This driver was not removed from this device\r
-  \r
---*/\r
 ;\r
 \r
 //\r
 // IDE controller init functions declaration\r
 //\r
+/**\r
+  This function can be used to obtain information about a specified channel. \r
+  It's usually used by IDE Bus driver during enumeration process.  \r
+\r
+  @param This           the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel        Channel number (0 based, either 0 or 1)\r
+  @param Enabled        TRUE if the channel is enabled. If the channel is disabled, \r
+                        then it will no be enumerated.\r
+  @param MaxDevices     The Max number of IDE devices that the bus driver can expect\r
+                        on this channel. For ATA/ATAPI, this number is either 1 or 2.\r
+  \r
+  @retval EFI_SUCCESS           Success to get channel information\r
+  @retval EFI_INVALID_PARAMETER Invalid channel id.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitGetChannelInfo (\r
@@ -138,26 +137,18 @@ IdeInitGetChannelInfo (
   OUT  BOOLEAN                          *Enabled,\r
   OUT  UINT8                            *MaxDevices\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This        - TODO: add argument description\r
-  Channel     - TODO: add argument description\r
-  Enabled     - TODO: add argument description\r
-  MaxDevices  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  This function is called by IdeBus driver before executing certain actions. \r
+  This allows IDE Controller Init to prepare for each action.  \r
+\r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Phase      phase indicator defined by IDE_CONTROLLER_INIT protocol\r
+  @param Channel    Channel number (0 based, either 0 or 1)\r
+  \r
+  @return EFI_SUCCESS Success operation.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitNotifyPhase (\r
@@ -165,25 +156,19 @@ IdeInitNotifyPhase (
   IN  EFI_IDE_CONTROLLER_ENUM_PHASE     Phase,\r
   OUT UINT8                             Channel\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This    - TODO: add argument description\r
-  Phase   - TODO: add argument description\r
-  Channel - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  This function is called by IdeBus driver to submit EFI_IDENTIFY_DATA data structure\r
+  obtained from IDE deivce. This structure is used to set IDE timing  \r
+\r
+  @param This           The EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel        IDE channel number (0 based, either 0 or 1)\r
+  @param Device         IDE device number\r
+  @param IdentifyData   A pointer to EFI_IDENTIFY_DATA data structure\r
+  \r
+  @return EFI_SUCCESS   Success operation. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitSubmitData (\r
@@ -192,52 +177,19 @@ IdeInitSubmitData (
   IN  UINT8                             Device,\r
   IN  EFI_IDENTIFY_DATA                 *IdentifyData\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This          - TODO: add argument description\r
-  Channel       - TODO: add argument description\r
-  Device        - TODO: add argument description\r
-  IdentifyData  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-IdeInitSubmitFailingModes (\r
-  IN  EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,\r
-  IN  UINT8                             Channel,\r
-  IN  UINT8                             Device\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This    - TODO: add argument description\r
-  Channel - TODO: add argument description\r
-  Device  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-;\r
+/**\r
+  This function is called by IdeBus driver to disqualify unsupported operation\r
+  mode on specfic IDE device  \r
 \r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel    IDE channel number (0 based, either 0 or 1)\r
+  @param Device     IDE device number\r
+  @param BadModes   Operation mode indicator\r
+  \r
+  @return EFI_SUCCESS Success operation. \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitDisqualifyMode (\r
@@ -246,26 +198,20 @@ IdeInitDisqualifyMode (
   IN  UINT8                             Device,\r
   IN  EFI_ATA_COLLECTIVE_MODE           *BadModes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This      - TODO: add argument description\r
-  Channel   - TODO: add argument description\r
-  Device    - TODO: add argument description\r
-  BadModes  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  This function is called by IdeBus driver to calculate the best operation mode\r
+  supported by specific IDE device  \r
+\r
+  @param This               the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel            IDE channel number (0 based, either 0 or 1)\r
+  @param Device             IDE device number\r
+  @param SupportedModes     Modes collection supported by IDE device\r
+  \r
+  @retval EFI_OUT_OF_RESOURCES  Fail to allocate pool. \r
+  @retval EFI_INVALID_PARAMETER Invalid channel id and device id.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitCalculateMode (\r
@@ -274,26 +220,19 @@ IdeInitCalculateMode (
   IN  UINT8                             Device,\r
   IN  EFI_ATA_COLLECTIVE_MODE           **SupportedModes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This            - TODO: add argument description\r
-  Channel         - TODO: add argument description\r
-  Device          - TODO: add argument description\r
-  SupportedModes  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  This function is called by IdeBus driver to set appropriate timing on IDE\r
+  controller according supported operation mode.  \r
+\r
+  @param This       the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r
+  @param Channel    IDE channel number (0 based, either 0 or 1)\r
+  @param Device     IDE device number\r
+  @param Modes      IDE device modes\r
+  \r
+  @retval EFI_SUCCESS Sucess operation.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeInitSetTiming (\r
@@ -302,29 +241,32 @@ IdeInitSetTiming (
   IN  UINT8                             Device,\r
   IN  EFI_ATA_COLLECTIVE_MODE           *Modes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This    - TODO: add argument description\r
-  Channel - TODO: add argument description\r
-  Device  - TODO: add argument description\r
-  Modes   - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
 //\r
 // Forward reference declaration\r
 //\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
+\r
+  @param This           A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param Language       A pointer to a three character ISO 639-2 language identifier.\r
+                        This is the language of the driver name that that the caller\r
+                        is requesting, and it must match one of the languages specified\r
+                        in SupportedLanguages.  The number of languages supported by a\r
+                        driver is up to the driver writer.\r
+  @param DriverName     A pointer to the Unicode string to return.  This Unicode string\r
+                        is the name of the driver specified by This in the language\r
+                        specified by Language.\r
+  \r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by This\r
+                                and the language specified by Language was returned\r
+                                in DriverName.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                language specified by Language.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerComponentNameGetDriverName (\r
@@ -332,34 +274,48 @@ IdeControllerComponentNameGetDriverName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller \r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a \r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language \r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned \r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by an EFI Driver.  \r
+\r
+  @param This                   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
+  @param ControllerHandle       The handle of a controller that the driver specified by\r
+                                This is managing.  This handle specifies the controller\r
+                                whose name is to be returned.\r
+  @param OPTIONAL               The handle of the child controller to retrieve the name\r
+                                of.  This is an optional parameter that may be NULL.  It\r
+                                will be NULL for device drivers.  It will also be NULL\r
+                                for a bus drivers that wish to retrieve the name of the\r
+                                bus controller.  It will not be NULL for a bus driver\r
+                                that wishes to retrieve the name of a child controller.\r
+  @param Language               A pointer to a three character ISO 639-2 language\r
+                                identifier.  This is the language of the controller name\r
+                                that that the caller is requesting, and it must match one\r
+                                of the languages specified in SupportedLanguages.  The\r
+                                number of languages supported by a driver is up to the\r
+                                driver writer.\r
+  @param ControllerName         A pointer to the Unicode string to return.  This Unicode\r
+                                string is the name of the controller specified by\r
+                                ControllerHandle and ChildHandle in the language\r
+                                specified by Language from the point of view of the\r
+                                driver specified by This.\r
+  \r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in the\r
+                                language specified by Language for the driver\r
+                                specified by This was returned in DriverName.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support the\r
+                                language specified by Language.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IdeControllerComponentNameGetControllerName (\r
@@ -369,51 +325,6 @@ IdeControllerComponentNameGetControllerName (
   IN  CHAR8                                           *Language,\r
   OUT CHAR16                                          **ControllerName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by \r
-                       This is managing.  This handle specifies the controller \r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name \r
-                       of.  This is an optional parameter that may be NULL.  It \r
-                       will be NULL for device drivers.  It will also be NULL \r
-                       for a bus drivers that wish to retrieve the name of the \r
-                       bus controller.  It will not be NULL for a bus driver \r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language \r
-                       identifier.  This is the language of the controller name \r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The \r
-                       number of languages supported by a driver is up to the \r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by \r
-                       ControllerHandle and ChildHandle in the language \r
-                       specified by Language from the point of view of the \r
-                       driver specified by This. \r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
-                            language specified by Language for the driver \r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid \r
-                            EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently \r
-                            managing the controller specified by \r
-                            ControllerHandle and ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 ;\r
 \r
 #endif\r