]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Pci/UhciDxe/UhciDebug.c
modify coding style to pass ecc tool
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / UhciDxe / UhciDebug.c
1 /** @file
2
3 This file provides the information dump support for Uhci when in debug mode.
4
5 Copyright (c) 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #include "Uhci.h"
17 #include "UhciDebug.h"
18
19
20 /**
21 Dump the content of QH structure.
22
23 @param QhSw Pointer to software QH structure.
24
25 @return None.
26
27 **/
28 VOID
29 UhciDumpQh (
30 IN UHCI_QH_SW *QhSw
31 )
32 {
33 DEBUG ((EFI_D_INFO, "&QhSw @ 0x%x\n", QhSw));
34 DEBUG ((EFI_D_INFO, "QhSw.NextQh - 0x%x\n", QhSw->NextQh));
35 DEBUG ((EFI_D_INFO, "QhSw.TDs - 0x%x\n", QhSw->TDs));
36 DEBUG ((EFI_D_INFO, "QhSw.QhHw:\n"));
37 DEBUG ((EFI_D_INFO, " Horizon Link - %x\n", QhSw->QhHw.HorizonLink));
38 DEBUG ((EFI_D_INFO, " Vertical Link - %x\n\n", QhSw->QhHw.VerticalLink));
39 }
40
41
42 /**
43 Dump the content of TD structure.
44
45 @param TdSw Pointer to software TD structure.
46 @param IsCur Whether dump the whole list, or only dump the current TD.
47
48 @return None.
49
50 **/
51 VOID
52 UhciDumpTds (
53 IN UHCI_TD_SW *TdSw
54 )
55 {
56 UHCI_TD_SW *CurTdSw;
57
58 CurTdSw = TdSw;
59
60 while (CurTdSw != NULL) {
61 DEBUG ((EFI_D_INFO, "TdSw @ 0x%x\n", CurTdSw));
62 DEBUG ((EFI_D_INFO, "TdSw.NextTd - 0x%x\n", CurTdSw->NextTd));
63 DEBUG ((EFI_D_INFO, "TdSw.DataLen - %d\n", CurTdSw->DataLen));
64 DEBUG ((EFI_D_INFO, "TdSw.Data - 0x%x\n", CurTdSw->Data));
65 DEBUG ((EFI_D_INFO, "TdHw:\n"));
66 DEBUG ((EFI_D_INFO, " NextLink - 0x%x\n", CurTdSw->TdHw.NextLink));
67 DEBUG ((EFI_D_INFO, " ActualLen - %d\n", CurTdSw->TdHw.ActualLen));
68 DEBUG ((EFI_D_INFO, " Status - 0x%x\n", CurTdSw->TdHw.Status));
69 DEBUG ((EFI_D_INFO, " IOC - %d\n", CurTdSw->TdHw.IntOnCpl));
70 DEBUG ((EFI_D_INFO, " IsIsoCh - %d\n", CurTdSw->TdHw.IsIsoch));
71 DEBUG ((EFI_D_INFO, " LowSpeed - %d\n", CurTdSw->TdHw.LowSpeed));
72 DEBUG ((EFI_D_INFO, " ErrorCount - %d\n", CurTdSw->TdHw.ErrorCount));
73 DEBUG ((EFI_D_INFO, " ShortPacket - %d\n", CurTdSw->TdHw.ShortPacket));
74 DEBUG ((EFI_D_INFO, " PidCode - 0x%x\n", CurTdSw->TdHw.PidCode));
75 DEBUG ((EFI_D_INFO, " DevAddr - %d\n", CurTdSw->TdHw.DeviceAddr));
76 DEBUG ((EFI_D_INFO, " EndPoint - %d\n", CurTdSw->TdHw.EndPoint));
77 DEBUG ((EFI_D_INFO, " DataToggle - %d\n", CurTdSw->TdHw.DataToggle));
78 DEBUG ((EFI_D_INFO, " MaxPacketLen - %d\n", CurTdSw->TdHw.MaxPacketLen));
79 DEBUG ((EFI_D_INFO, " DataBuffer - 0x%x\n\n",CurTdSw->TdHw.DataBuffer));
80
81 CurTdSw = CurTdSw->NextTd;
82 }
83 }
84