]>
Commit | Line | Data |
---|---|---|
1 | /* SPDX-License-Identifier: GPL-2.0+ */ | |
2 | /* | |
3 | * Copyright (c) 2016 Google, Inc | |
4 | */ | |
5 | ||
6 | #ifndef __DT_STRUCTS | |
7 | #define __DT_STRUCTS | |
8 | ||
9 | /* These structures may only be used in SPL */ | |
10 | #if CONFIG_IS_ENABLED(OF_PLATDATA) | |
11 | struct driver_info; | |
12 | ||
13 | /** | |
14 | * struct phandle_0_arg - hold a phandle record with no arguments | |
15 | * | |
16 | * This holds a phandle pointing to another device. See 'Indexes' in the | |
17 | * of-plat-rst documentation. | |
18 | * | |
19 | * @idx: udevice index (or driver_info index if !OF_PLATDATA_INST) | |
20 | * @arg: arguments | |
21 | */ | |
22 | struct phandle_0_arg { | |
23 | uint idx; | |
24 | int arg[0]; | |
25 | }; | |
26 | ||
27 | /** | |
28 | * struct phandle_2_arg - hold a phandle record with up to one argument | |
29 | * | |
30 | * This holds a phandle pointing to another device. See 'Indexes' in the | |
31 | * of-plat-rst documentation. | |
32 | * | |
33 | * @idx: udevice index (or driver_info index if !OF_PLATDATA_INST) | |
34 | * @arg: arguments | |
35 | */ | |
36 | struct phandle_1_arg { | |
37 | uint idx; | |
38 | int arg[1]; | |
39 | }; | |
40 | ||
41 | /** | |
42 | * struct phandle_2_arg - hold a phandle record with up to two arguments | |
43 | * | |
44 | * This holds a phandle pointing to another device. See 'Indexes' in the | |
45 | * of-plat-rst documentation. | |
46 | * | |
47 | * @idx: udevice index (or driver_info index if !OF_PLATDATA_INST) | |
48 | * @arg: arguments | |
49 | */ | |
50 | struct phandle_2_arg { | |
51 | uint idx; | |
52 | int arg[2]; | |
53 | }; | |
54 | ||
55 | #include <generated/dt-structs-gen.h> | |
56 | #include <generated/dt-decl.h> | |
57 | #endif | |
58 | ||
59 | #endif |