2 Include for Serial Driver
4 Copyright (c) 2006 - 2009, Intel Corporation.<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include <FrameworkDxe.h>
21 #include <Protocol/IsaIo.h>
22 #include <Protocol/SerialIo.h>
23 #include <Protocol/DevicePath.h>
25 #include <Library/DebugLib.h>
26 #include <Library/UefiDriverEntryPoint.h>
27 #include <Library/UefiLib.h>
28 #include <Library/DevicePathLib.h>
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/MemoryAllocationLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/ReportStatusCodeLib.h>
33 #include <Library/PcdLib.h>
36 // Driver Binding Externs
38 extern EFI_DRIVER_BINDING_PROTOCOL gSerialControllerDriver
;
39 extern EFI_COMPONENT_NAME_PROTOCOL gIsaSerialComponentName
;
40 extern EFI_COMPONENT_NAME2_PROTOCOL gIsaSerialComponentName2
;
43 // Internal Data Structures
45 #define SERIAL_DEV_SIGNATURE SIGNATURE_32 ('s', 'e', 'r', 'd')
46 #define SERIAL_MAX_BUFFER_SIZE 16
47 #define TIMEOUT_STALL_INTERVAL 10
50 // Name: SERIAL_DEV_FIFO
51 // Purpose: To define Receive FIFO and Transmit FIFO
52 // Context: Used by serial data transmit and receive
54 // First UINT32: The index of the first data in array Data[]
55 // Last UINT32: The index, which you can put a new data into array Data[]
56 // Surplus UINT32: Identify how many data you can put into array Data[]
57 // Data[] UINT8 : An array, which used to store data
63 UINT8 Data
[SERIAL_MAX_BUFFER_SIZE
];
75 // Purpose: To provide device specific information
78 // Signature UINTN: The identity of the serial device
79 // SerialIo SERIAL_IO_PROTOCOL: Serial I/O protocol interface
80 // SerialMode SERIAL_IO_MODE:
81 // DevicePath EFI_DEVICE_PATH_PROTOCOL *: Device path of the serial device
82 // Handle EFI_HANDLE: The handle instance attached to serial device
83 // BaseAddress UINT16: The base address of specific serial device
84 // Receive SERIAL_DEV_FIFO: The FIFO used to store data,
85 // which is received by UART
86 // Transmit SERIAL_DEV_FIFO: The FIFO used to store data,
87 // which you want to transmit by UART
88 // SoftwareLoopbackEnable BOOLEAN:
89 // Type EFI_UART_TYPE: Specify the UART type of certain serial device
95 EFI_SERIAL_IO_PROTOCOL SerialIo
;
96 EFI_SERIAL_IO_MODE SerialMode
;
97 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
99 EFI_DEVICE_PATH_PROTOCOL
*ParentDevicePath
;
100 UART_DEVICE_PATH UartDevicePath
;
101 EFI_ISA_IO_PROTOCOL
*IsaIo
;
104 SERIAL_DEV_FIFO Receive
;
105 SERIAL_DEV_FIFO Transmit
;
106 BOOLEAN SoftwareLoopbackEnable
;
107 BOOLEAN HardwareFlowControl
;
109 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
112 #define SERIAL_DEV_FROM_THIS(a) CR (a, SERIAL_DEV, SerialIo, SERIAL_DEV_SIGNATURE)
115 // Serial Driver Defaults
117 #define SERIAL_PORT_DEFAULT_RECEIVE_FIFO_DEPTH 1
118 #define SERIAL_PORT_DEFAULT_TIMEOUT 1000000
119 #define SERIAL_PORT_SUPPORT_CONTROL_MASK (EFI_SERIAL_CLEAR_TO_SEND | \
120 EFI_SERIAL_DATA_SET_READY | \
121 EFI_SERIAL_RING_INDICATE | \
122 EFI_SERIAL_CARRIER_DETECT | \
123 EFI_SERIAL_REQUEST_TO_SEND | \
124 EFI_SERIAL_DATA_TERMINAL_READY | \
125 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | \
126 EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | \
127 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE | \
128 EFI_SERIAL_OUTPUT_BUFFER_EMPTY | \
129 EFI_SERIAL_INPUT_BUFFER_EMPTY)
133 // (24000000/13)MHz input clock
135 #define SERIAL_PORT_INPUT_CLOCK 1843200
138 // 115200 baud with rounding errors
140 #define SERIAL_PORT_MAX_BAUD_RATE 115400
141 #define SERIAL_PORT_MIN_BAUD_RATE 50
143 #define SERIAL_PORT_MAX_RECEIVE_FIFO_DEPTH 16
144 #define SERIAL_PORT_MIN_TIMEOUT 1 // 1 uS
145 #define SERIAL_PORT_MAX_TIMEOUT 100000000 // 100 seconds
149 #define SERIAL_REGISTER_THR 0 // WO Transmit Holding Register
150 #define SERIAL_REGISTER_RBR 0 // RO Receive Buffer Register
151 #define SERIAL_REGISTER_DLL 0 // R/W Divisor Latch LSB
152 #define SERIAL_REGISTER_DLM 1 // R/W Divisor Latch MSB
153 #define SERIAL_REGISTER_IER 1 // R/W Interrupt Enable Register
154 #define SERIAL_REGISTER_IIR 2 // RO Interrupt Identification Register
155 #define SERIAL_REGISTER_FCR 2 // WO FIFO Cotrol Register
156 #define SERIAL_REGISTER_LCR 3 // R/W Line Control Register
157 #define SERIAL_REGISTER_MCR 4 // R/W Modem Control Register
158 #define SERIAL_REGISTER_LSR 5 // R/W Line Status Register
159 #define SERIAL_REGISTER_MSR 6 // R/W Modem Status Register
160 #define SERIAL_REGISTER_SCR 7 // R/W Scratch Pad Register
163 // Name: SERIAL_PORT_IER_BITS
164 // Purpose: Define each bit in Interrupt Enable Register
167 // Ravie Bit0: Receiver Data Available Interrupt Enable
168 // Theie Bit1: Transmistter Holding Register Empty Interrupt Enable
169 // Rie Bit2: Receiver Interrupt Enable
170 // Mie Bit3: Modem Interrupt Enable
171 // Reserved Bit4-Bit7: Reserved
179 } SERIAL_PORT_IER_BITS
;
182 // Name: SERIAL_PORT_IER
186 // Bits SERIAL_PORT_IER_BITS: Bits of the IER
187 // Data UINT8: the value of the IER
190 SERIAL_PORT_IER_BITS Bits
;
195 // Name: SERIAL_PORT_FCR_BITS
196 // Purpose: Define each bit in FIFO Control Register
199 // TrFIFOE Bit0: Transmit and Receive FIFO Enable
200 // ResetRF Bit1: Reset Reciever FIFO
201 // ResetTF Bit2: Reset Transmistter FIFO
202 // Dms Bit3: DMA Mode Select
203 // Reserved Bit4-Bit5: Reserved
204 // Rtb Bit6-Bit7: Receive Trigger Bits
213 } SERIAL_PORT_FCR_BITS
;
216 // Name: SERIAL_PORT_FCR
220 // Bits SERIAL_PORT_FCR_BITS: Bits of the FCR
221 // Data UINT8: the value of the FCR
224 SERIAL_PORT_FCR_BITS Bits
;
229 // Name: SERIAL_PORT_LCR_BITS
230 // Purpose: Define each bit in Line Control Register
233 // SerialDB Bit0-Bit1: Number of Serial Data Bits
234 // StopB Bit2: Number of Stop Bits
235 // ParEn Bit3: Parity Enable
236 // EvenPar Bit4: Even Parity Select
237 // SticPar Bit5: Sticky Parity
238 // BrCon Bit6: Break Control
239 // DLab Bit7: Divisor Latch Access Bit
249 } SERIAL_PORT_LCR_BITS
;
252 // Name: SERIAL_PORT_LCR
256 // Bits SERIAL_PORT_LCR_BITS: Bits of the LCR
257 // Data UINT8: the value of the LCR
260 SERIAL_PORT_LCR_BITS Bits
;
265 // Name: SERIAL_PORT_MCR_BITS
266 // Purpose: Define each bit in Modem Control Register
269 // DtrC Bit0: Data Terminal Ready Control
270 // Rts Bit1: Request To Send Control
271 // Out1 Bit2: Output1
272 // Out2 Bit3: Output2, used to disable interrupt
273 // Lme; Bit4: Loopback Mode Enable
274 // Reserved Bit5-Bit7: Reserved
283 } SERIAL_PORT_MCR_BITS
;
286 // Name: SERIAL_PORT_MCR
290 // Bits SERIAL_PORT_MCR_BITS: Bits of the MCR
291 // Data UINT8: the value of the MCR
294 SERIAL_PORT_MCR_BITS Bits
;
299 // Name: SERIAL_PORT_LSR_BITS
300 // Purpose: Define each bit in Line Status Register
303 // Dr Bit0: Receiver Data Ready Status
304 // Oe Bit1: Overrun Error Status
305 // Pe Bit2: Parity Error Status
306 // Fe Bit3: Framing Error Status
307 // Bi Bit4: Break Interrupt Status
308 // Thre Bit5: Transmistter Holding Register Status
309 // Temt Bit6: Transmitter Empty Status
310 // FIFOe Bit7: FIFO Error Status
321 } SERIAL_PORT_LSR_BITS
;
324 // Name: SERIAL_PORT_LSR
328 // Bits SERIAL_PORT_LSR_BITS: Bits of the LSR
329 // Data UINT8: the value of the LSR
332 SERIAL_PORT_LSR_BITS Bits
;
337 // Name: SERIAL_PORT_MSR_BITS
338 // Purpose: Define each bit in Modem Status Register
341 // DeltaCTS Bit0: Delta Clear To Send Status
342 // DeltaDSR Bit1: Delta Data Set Ready Status
343 // TrailingEdgeRI Bit2: Trailing Edge of Ring Indicator Status
344 // DeltaDCD Bit3: Delta Data Carrier Detect Status
345 // Cts Bit4: Clear To Send Status
346 // Dsr Bit5: Data Set Ready Status
347 // Ri Bit6: Ring Indicator Status
348 // Dcd Bit7: Data Carrier Detect Status
353 UINT8 TrailingEdgeRI
: 1;
359 } SERIAL_PORT_MSR_BITS
;
362 // Name: SERIAL_PORT_MSR
366 // Bits SERIAL_PORT_MSR_BITS: Bits of the MSR
367 // Data UINT8: the value of the MSR
370 SERIAL_PORT_MSR_BITS Bits
;
376 // Define serial register I/O macros
378 #define READ_RBR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_RBR)
379 #define READ_DLL(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_DLL)
380 #define READ_DLM(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_DLM)
381 #define READ_IER(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_IER)
382 #define READ_IIR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_IIR)
383 #define READ_LCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_LCR)
384 #define READ_MCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_MCR)
385 #define READ_LSR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_LSR)
386 #define READ_MSR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_MSR)
387 #define READ_SCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_SCR)
389 #define WRITE_THR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_THR, D)
390 #define WRITE_DLL(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_DLL, D)
391 #define WRITE_DLM(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_DLM, D)
392 #define WRITE_IER(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_IER, D)
393 #define WRITE_FCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_FCR, D)
394 #define WRITE_LCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_LCR, D)
395 #define WRITE_MCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_MCR, D)
396 #define WRITE_LSR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_LSR, D)
397 #define WRITE_MSR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_MSR, D)
398 #define WRITE_SCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_SCR, D)
402 // Driver model protocol interface
405 Check to see if this driver supports the given controller
407 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
408 @param Controller The handle of the controller to test.
409 @param RemainingDevicePath A pointer to the remaining portion of a device path.
411 @return EFI_SUCCESS This driver can support the given controller
416 SerialControllerDriverSupported (
417 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
418 IN EFI_HANDLE Controller
,
419 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
423 Start to management the controller passed in
425 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
426 @param Controller The handle of the controller to test.
427 @param RemainingDevicePath A pointer to the remaining portion of a device path.
429 @return EFI_SUCCESS Driver is started successfully
433 SerialControllerDriverStart (
434 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
435 IN EFI_HANDLE Controller
,
436 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
440 Disconnect this driver with the controller, uninstall related protocol instance
442 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
443 @param Controller The handle of the controller to test.
444 @param NumberOfChildren Number of child device.
445 @param ChildHandleBuffer A pointer to the remaining portion of a device path.
447 @retval EFI_SUCCESS Operation successfully
448 @retval EFI_DEVICE_ERROR Cannot stop the driver successfully
453 SerialControllerDriverStop (
454 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
455 IN EFI_HANDLE Controller
,
456 IN UINTN NumberOfChildren
,
457 IN EFI_HANDLE
*ChildHandleBuffer
461 // Serial I/O Protocol Interface
466 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
468 @retval EFI_SUCCESS Reset successfully
469 @retval EFI_DEVICE_ERROR Failed to reset
475 IN EFI_SERIAL_IO_PROTOCOL
*This
479 Set new attributes to a serial device.
481 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
482 @param BaudRate The baudrate of the serial device
483 @param ReceiveFifoDepth The depth of receive FIFO buffer
484 @param Timeout The request timeout for a single char
485 @param Parity The type of parity used in serial device
486 @param DataBits Number of databits used in serial device
487 @param StopBits Number of stopbits used in serial device
489 @retval EFI_SUCCESS The new attributes were set
490 @retval EFI_INVALID_PARAMETERS One or more attributes have an unsupported value
491 @retval EFI_UNSUPPORTED Data Bits can not set to 5 or 6
492 @retval EFI_DEVICE_ERROR The serial device is not functioning correctly (no return)
497 IsaSerialSetAttributes (
498 IN EFI_SERIAL_IO_PROTOCOL
*This
,
500 IN UINT32 ReceiveFifoDepth
,
502 IN EFI_PARITY_TYPE Parity
,
504 IN EFI_STOP_BITS_TYPE StopBits
510 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
511 @param Control Control bits that can be settable
513 @retval EFI_SUCCESS New Control bits were set successfully
514 @retval EFI_UNSUPPORTED The Control bits wanted to set are not supported
519 IsaSerialSetControl (
520 IN EFI_SERIAL_IO_PROTOCOL
*This
,
527 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
528 @param Control Control signals of the serial device
530 @retval EFI_SUCCESS Get Control signals successfully
535 IsaSerialGetControl (
536 IN EFI_SERIAL_IO_PROTOCOL
*This
,
541 Write the specified number of bytes to serial device.
543 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
544 @param BufferSize On input the size of Buffer, on output the amount of
545 data actually written
546 @param Buffer The buffer of data to write
548 @retval EFI_SUCCESS The data were written successfully
549 @retval EFI_DEVICE_ERROR The device reported an error
550 @retval EFI_TIMEOUT The write operation was stopped due to timeout
556 IN EFI_SERIAL_IO_PROTOCOL
*This
,
557 IN OUT UINTN
*BufferSize
,
562 Read the specified number of bytes from serial device.
564 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
565 @param BufferSize On input the size of Buffer, on output the amount of
566 data returned in buffer
567 @param Buffer The buffer to return the data into
569 @retval EFI_SUCCESS The data were read successfully
570 @retval EFI_DEVICE_ERROR The device reported an error
571 @retval EFI_TIMEOUT The read operation was stopped due to timeout
577 IN EFI_SERIAL_IO_PROTOCOL
*This
,
578 IN OUT UINTN
*BufferSize
,
583 // Internal Functions
586 Use scratchpad register to test if this serial port is present.
588 @param SerialDevice Pointer to serial device structure
590 @return if this serial port is present
593 IsaSerialPortPresent (
594 IN SERIAL_DEV
*SerialDevice
598 Detect whether specific FIFO is full or not.
600 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
602 @return whether specific FIFO is full or not
607 IN SERIAL_DEV_FIFO
*Fifo
611 Detect whether specific FIFO is empty or not.
613 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
615 @return whether specific FIFO is empty or not
620 IN SERIAL_DEV_FIFO
*Fifo
624 Add data to specific FIFO.
626 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
627 @param Data the data added to FIFO
629 @retval EFI_SUCCESS Add data to specific FIFO successfully
630 @retval EFI_OUT_OF_RESOURCE Failed to add data because FIFO is already full
635 IN SERIAL_DEV_FIFO
*Fifo
,
640 Remove data from specific FIFO.
642 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
643 @param Data the data removed from FIFO
645 @retval EFI_SUCCESS Remove data from specific FIFO successfully
646 @retval EFI_OUT_OF_RESOURCE Failed to remove data because FIFO is empty
650 IsaSerialFifoRemove (
651 IN SERIAL_DEV_FIFO
*Fifo
,
656 Reads and writes all avaliable data.
658 @param SerialDevice The device to flush
660 @retval EFI_SUCCESS Data was read/written successfully.
661 @retval EFI_OUT_OF_RESOURCE Failed because software receive FIFO is full. Note, when
662 this happens, pending writes are not done.
666 IsaSerialReceiveTransmit (
667 IN SERIAL_DEV
*SerialDevice
671 Use IsaIo protocol to read serial port.
673 @param IsaIo Pointer to EFI_ISA_IO_PROTOCOL instance
674 @param BaseAddress Serial port register group base address
675 @param Offset Offset in register group
677 @return Data read from serial port
682 IN EFI_ISA_IO_PROTOCOL
*IsaIo
,
683 IN UINT16 BaseAddress
,
688 Use IsaIo protocol to write serial port.
690 @param IsaIo Pointer to EFI_ISA_IO_PROTOCOL instance
691 @param BaseAddress Serial port register group base address
692 @param Offset Offset in register group
693 @param Data data which is to be written to some serial port register
698 IN EFI_ISA_IO_PROTOCOL
*IsaIo
,
699 IN UINT16 BaseAddress
,
706 // EFI Component Name Functions
709 Retrieves a Unicode string that is the user readable name of the driver.
711 This function retrieves the user readable name of a driver in the form of a
712 Unicode string. If the driver specified by This has a user readable name in
713 the language specified by Language, then a pointer to the driver name is
714 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
715 by This does not support the language specified by Language,
716 then EFI_UNSUPPORTED is returned.
718 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
719 EFI_COMPONENT_NAME_PROTOCOL instance.
721 @param Language[in] A pointer to a Null-terminated ASCII string
722 array indicating the language. This is the
723 language of the driver name that the caller is
724 requesting, and it must match one of the
725 languages specified in SupportedLanguages. The
726 number of languages supported by a driver is up
727 to the driver writer. Language is specified
728 in RFC 4646 or ISO 639-2 language code format.
730 @param DriverName[out] A pointer to the Unicode string to return.
731 This Unicode string is the name of the
732 driver specified by This in the language
733 specified by Language.
735 @retval EFI_SUCCESS The Unicode string for the Driver specified by
736 This and the language specified by Language was
737 returned in DriverName.
739 @retval EFI_INVALID_PARAMETER Language is NULL.
741 @retval EFI_INVALID_PARAMETER DriverName is NULL.
743 @retval EFI_UNSUPPORTED The driver specified by This does not support
744 the language specified by Language.
749 IsaSerialComponentNameGetDriverName (
750 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
752 OUT CHAR16
**DriverName
757 Retrieves a Unicode string that is the user readable name of the controller
758 that is being managed by a driver.
760 This function retrieves the user readable name of the controller specified by
761 ControllerHandle and ChildHandle in the form of a Unicode string. If the
762 driver specified by This has a user readable name in the language specified by
763 Language, then a pointer to the controller name is returned in ControllerName,
764 and EFI_SUCCESS is returned. If the driver specified by This is not currently
765 managing the controller specified by ControllerHandle and ChildHandle,
766 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
767 support the language specified by Language, then EFI_UNSUPPORTED is returned.
769 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
770 EFI_COMPONENT_NAME_PROTOCOL instance.
772 @param ControllerHandle[in] The handle of a controller that the driver
773 specified by This is managing. This handle
774 specifies the controller whose name is to be
777 @param ChildHandle[in] The handle of the child controller to retrieve
778 the name of. This is an optional parameter that
779 may be NULL. It will be NULL for device
780 drivers. It will also be NULL for a bus drivers
781 that wish to retrieve the name of the bus
782 controller. It will not be NULL for a bus
783 driver that wishes to retrieve the name of a
786 @param Language[in] A pointer to a Null-terminated ASCII string
787 array indicating the language. This is the
788 language of the driver name that the caller is
789 requesting, and it must match one of the
790 languages specified in SupportedLanguages. The
791 number of languages supported by a driver is up
792 to the driver writer. Language is specified in
793 RFC 4646 or ISO 639-2 language code format.
795 @param ControllerName[out] A pointer to the Unicode string to return.
796 This Unicode string is the name of the
797 controller specified by ControllerHandle and
798 ChildHandle in the language specified by
799 Language from the point of view of the driver
802 @retval EFI_SUCCESS The Unicode string for the user readable name in
803 the language specified by Language for the
804 driver specified by This was returned in
807 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
809 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
812 @retval EFI_INVALID_PARAMETER Language is NULL.
814 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
816 @retval EFI_UNSUPPORTED The driver specified by This is not currently
817 managing the controller specified by
818 ControllerHandle and ChildHandle.
820 @retval EFI_UNSUPPORTED The driver specified by This does not support
821 the language specified by Language.
826 IsaSerialComponentNameGetControllerName (
827 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
828 IN EFI_HANDLE ControllerHandle
,
829 IN EFI_HANDLE ChildHandle OPTIONAL
,
831 OUT CHAR16
**ControllerName
835 Add the component name for the serial io device
837 @param SerialDevice A pointer to the SERIAL_DEV instance.
839 @param IsaIo A pointer to the EFI_ISA_IO_PROTOCOL instance.
844 IN SERIAL_DEV
*SerialDevice
,
845 IN EFI_ISA_IO_PROTOCOL
*IsaIo