demo-pdata.c 826 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) 2013 Google, Inc
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <dm-demo.h>
  9. static const struct dm_demo_pdata red_square = {
  10. .colour = "red",
  11. .sides = 4.
  12. };
  13. static const struct dm_demo_pdata green_triangle = {
  14. .colour = "green",
  15. .sides = 3.
  16. };
  17. static const struct dm_demo_pdata yellow_hexagon = {
  18. .colour = "yellow",
  19. .sides = 6.
  20. };
  21. U_BOOT_DEVICE(demo0) = {
  22. .name = "demo_shape_drv",
  23. .platdata = &red_square,
  24. };
  25. U_BOOT_DEVICE(demo1) = {
  26. .name = "demo_simple_drv",
  27. .platdata = &red_square,
  28. };
  29. U_BOOT_DEVICE(demo2) = {
  30. .name = "demo_shape_drv",
  31. .platdata = &green_triangle,
  32. };
  33. U_BOOT_DEVICE(demo3) = {
  34. .name = "demo_simple_drv",
  35. .platdata = &yellow_hexagon,
  36. };
  37. U_BOOT_DEVICE(demo4) = {
  38. .name = "demo_shape_drv",
  39. .platdata = &yellow_hexagon,
  40. };