]> git.proxmox.com Git - mirror_edk2.git/blame - ArmVirtPkg/Include/Protocol/FdtClient.h
ArmVirtPkg/FdtClientDxe: report address and size cell count directly
[mirror_edk2.git] / ArmVirtPkg / Include / Protocol / FdtClient.h
CommitLineData
8dbae2c1
AB
1/** @file\r
2\r
3 DISCLAIMER: the FDT_CLIENT_PROTOCOL introduced here is a work in progress,\r
4 and should not be used outside of the EDK II tree.\r
5\r
6 Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
7\r
8 This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#ifndef __FDT_CLIENT_H__\r
19#define __FDT_CLIENT_H__\r
20\r
21#define FDT_CLIENT_PROTOCOL_GUID { \\r
22 0xE11FACA0, 0x4710, 0x4C8E, {0xA7, 0xA2, 0x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C} \\r
23 }\r
24\r
25//\r
26// Protocol interface structure\r
27//\r
28typedef struct _FDT_CLIENT_PROTOCOL FDT_CLIENT_PROTOCOL;\r
29\r
30typedef\r
31EFI_STATUS\r
32(EFIAPI *FDT_CLIENT_GET_NODE_PROPERTY) (\r
33 IN FDT_CLIENT_PROTOCOL *This,\r
34 IN INT32 Node,\r
35 IN CONST CHAR8 *PropertyName,\r
36 OUT CONST VOID **Prop,\r
37 OUT UINT32 *PropSize OPTIONAL\r
38 );\r
39\r
40typedef\r
41EFI_STATUS\r
42(EFIAPI *FDT_CLIENT_SET_NODE_PROPERTY) (\r
43 IN FDT_CLIENT_PROTOCOL *This,\r
44 IN INT32 Node,\r
45 IN CONST CHAR8 *PropertyName,\r
46 IN CONST VOID *Prop,\r
47 IN UINT32 PropSize\r
48 );\r
49\r
50typedef\r
51EFI_STATUS\r
52(EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE) (\r
53 IN FDT_CLIENT_PROTOCOL *This,\r
54 IN CONST CHAR8 *CompatibleString,\r
55 OUT INT32 *Node\r
56 );\r
57\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *FDT_CLIENT_FIND_NEXT_COMPATIBLE_NODE) (\r
61 IN FDT_CLIENT_PROTOCOL *This,\r
62 IN CONST CHAR8 *CompatibleString,\r
63 IN INT32 PrevNode,\r
64 OUT INT32 *Node\r
65 );\r
66\r
67typedef\r
68EFI_STATUS\r
69(EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE_PROPERTY) (\r
70 IN FDT_CLIENT_PROTOCOL *This,\r
71 IN CONST CHAR8 *CompatibleString,\r
72 IN CONST CHAR8 *PropertyName,\r
73 OUT CONST VOID **Prop,\r
74 OUT UINT32 *PropSize OPTIONAL\r
75 );\r
76\r
77typedef\r
78EFI_STATUS\r
79(EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE_REG) (\r
80 IN FDT_CLIENT_PROTOCOL *This,\r
81 IN CONST CHAR8 *CompatibleString,\r
82 OUT CONST VOID **Reg,\r
cfc8d51c
AB
83 OUT UINTN *AddressCells,\r
84 OUT UINTN *SizeCells,\r
8dbae2c1
AB
85 OUT UINT32 *RegSize\r
86 );\r
87\r
88typedef\r
89EFI_STATUS\r
90(EFIAPI *FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE) (\r
91 IN FDT_CLIENT_PROTOCOL *This,\r
92 OUT INT32 *Node\r
93 );\r
94\r
95struct _FDT_CLIENT_PROTOCOL {\r
96 FDT_CLIENT_GET_NODE_PROPERTY GetNodeProperty;\r
97 FDT_CLIENT_SET_NODE_PROPERTY SetNodeProperty;\r
98\r
99 FDT_CLIENT_FIND_COMPATIBLE_NODE FindCompatibleNode;\r
100 FDT_CLIENT_FIND_NEXT_COMPATIBLE_NODE FindNextCompatibleNode;\r
101 FDT_CLIENT_FIND_COMPATIBLE_NODE_PROPERTY FindCompatibleNodeProperty;\r
102 FDT_CLIENT_FIND_COMPATIBLE_NODE_REG FindCompatibleNodeReg;\r
103\r
104 FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE GetOrInsertChosenNode;\r
105};\r
106\r
107extern EFI_GUID gFdtClientProtocolGuid;\r
108\r
109#endif\r