dt-structs.h 1.3 KB

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