2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2016-07-04 17:58:02 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Google, Inc
|
|
|
|
*/
|
|
|
|
|
2017-07-11 21:30:07 +00:00
|
|
|
#ifndef __DT_STRUCTS
|
|
|
|
#define __DT_STRUCTS
|
2016-07-04 17:58:02 +00:00
|
|
|
|
|
|
|
/* These structures may only be used in SPL */
|
|
|
|
#if CONFIG_IS_ENABLED(OF_PLATDATA)
|
2020-10-03 15:25:21 +00:00
|
|
|
struct driver_info;
|
|
|
|
|
2021-08-07 13:24:08 +00:00
|
|
|
/**
|
|
|
|
* struct phandle_0_arg - hold a phandle record with no arguments
|
|
|
|
*
|
|
|
|
* This holds a phandle pointing to another device. See 'Indexes' in the
|
|
|
|
* of-plat-rst documentation.
|
|
|
|
*
|
|
|
|
* @idx: udevice index (or driver_info index if !OF_PLATDATA_INST)
|
|
|
|
* @arg: arguments
|
|
|
|
*/
|
2017-08-29 20:15:56 +00:00
|
|
|
struct phandle_0_arg {
|
2020-10-03 17:31:40 +00:00
|
|
|
uint idx;
|
2017-08-29 20:15:58 +00:00
|
|
|
int arg[0];
|
2017-08-29 20:15:56 +00:00
|
|
|
};
|
|
|
|
|
2021-08-07 13:24:08 +00:00
|
|
|
/**
|
|
|
|
* struct phandle_2_arg - hold a phandle record with up to one argument
|
|
|
|
*
|
|
|
|
* This holds a phandle pointing to another device. See 'Indexes' in the
|
|
|
|
* of-plat-rst documentation.
|
|
|
|
*
|
|
|
|
* @idx: udevice index (or driver_info index if !OF_PLATDATA_INST)
|
|
|
|
* @arg: arguments
|
|
|
|
*/
|
2017-08-29 20:15:56 +00:00
|
|
|
struct phandle_1_arg {
|
2020-10-03 17:31:40 +00:00
|
|
|
uint idx;
|
2017-08-29 20:15:58 +00:00
|
|
|
int arg[1];
|
2016-07-04 17:58:02 +00:00
|
|
|
};
|
2017-08-29 20:15:59 +00:00
|
|
|
|
2021-08-07 13:24:08 +00:00
|
|
|
/**
|
|
|
|
* struct phandle_2_arg - hold a phandle record with up to two arguments
|
|
|
|
*
|
|
|
|
* This holds a phandle pointing to another device. See 'Indexes' in the
|
|
|
|
* of-plat-rst documentation.
|
|
|
|
*
|
|
|
|
* @idx: udevice index (or driver_info index if !OF_PLATDATA_INST)
|
|
|
|
* @arg: arguments
|
|
|
|
*/
|
2017-08-29 20:15:59 +00:00
|
|
|
struct phandle_2_arg {
|
2020-10-03 17:31:40 +00:00
|
|
|
uint idx;
|
2017-08-29 20:15:59 +00:00
|
|
|
int arg[2];
|
|
|
|
};
|
2021-03-15 04:25:20 +00:00
|
|
|
|
2017-08-29 20:16:00 +00:00
|
|
|
#include <generated/dt-structs-gen.h>
|
2021-03-15 04:25:20 +00:00
|
|
|
#include <generated/dt-decl.h>
|
2016-07-04 17:58:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|