dt-setup.c 690 B

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