- //\r
- // Allocate and Initialize dev structure\r
- //\r
- gDebugPortDevice = AllocateZeroPool (sizeof (DEBUGPORT_DEVICE));\r
- if (gDebugPortDevice == NULL) {\r
- return EFI_OUT_OF_RESOURCES;\r
- }\r
- //\r
- // Fill in static and default pieces of device structure first.\r
- //\r
- gDebugPortDevice->Signature = DEBUGPORT_DEVICE_SIGNATURE;\r
-\r
- gDebugPortDevice->DebugPortInterface.Reset = DebugPortReset;\r
- gDebugPortDevice->DebugPortInterface.Read = DebugPortRead;\r
- gDebugPortDevice->DebugPortInterface.Write = DebugPortWrite;\r
- gDebugPortDevice->DebugPortInterface.Poll = DebugPortPoll;\r
-\r
- gDebugPortDevice->BaudRate = DEBUGPORT_UART_DEFAULT_BAUDRATE;\r
- gDebugPortDevice->ReceiveFifoDepth = DEBUGPORT_UART_DEFAULT_FIFO_DEPTH;\r
- gDebugPortDevice->Timeout = DEBUGPORT_UART_DEFAULT_TIMEOUT;\r
- gDebugPortDevice->Parity = (EFI_PARITY_TYPE) DEBUGPORT_UART_DEFAULT_PARITY;\r
- gDebugPortDevice->DataBits = DEBUGPORT_UART_DEFAULT_DATA_BITS;\r
- gDebugPortDevice->StopBits = (EFI_STOP_BITS_TYPE) DEBUGPORT_UART_DEFAULT_STOP_BITS;\r