dt-setup.c 683 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2010-2016, NVIDIA CORPORATION.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/arch-tegra/gpu.h>
  8. /*
  9. * This function is called right before the kernel is booted. "blob" is the
  10. * device tree that will be passed to the kernel.
  11. */
  12. int ft_system_setup(void *blob, bd_t *bd)
  13. {
  14. const char *gpu_compats[] = {
  15. #if defined(CONFIG_TEGRA124)
  16. "nvidia,gk20a",
  17. #endif
  18. #if defined(CONFIG_TEGRA210)
  19. "nvidia,gm20b",
  20. #endif
  21. };
  22. int i, ret;
  23. /* Enable GPU node if GPU setup has been performed */
  24. for (i = 0; i < ARRAY_SIZE(gpu_compats); i++) {
  25. ret = tegra_gpu_enable_node(blob, gpu_compats[i]);
  26. if (ret)
  27. return ret;
  28. }
  29. return 0;
  30. }