blob: 602b20e6b7e9323b29d71591ee0f354dcb009c22 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Stephen Warren56aca902016-08-08 10:38:34 -06002/*
3 * Copyright (c) 2010-2016, NVIDIA CORPORATION.
Stephen Warren56aca902016-08-08 10:38:34 -06004 */
5
6#include <common.h>
7#include <asm/arch-tegra/gpu.h>
8
9/*
10 * This function is called right before the kernel is booted. "blob" is the
11 * device tree that will be passed to the kernel.
12 */
Masahiro Yamadaf7ed78b2020-06-26 15:13:33 +090013int ft_system_setup(void *blob, struct bd_info *bd)
Stephen Warren56aca902016-08-08 10:38:34 -060014{
15 const char *gpu_compats[] = {
16#if defined(CONFIG_TEGRA124)
17 "nvidia,gk20a",
18#endif
19#if defined(CONFIG_TEGRA210)
20 "nvidia,gm20b",
21#endif
22 };
23 int i, ret;
24
25 /* Enable GPU node if GPU setup has been performed */
26 for (i = 0; i < ARRAY_SIZE(gpu_compats); i++) {
27 ret = tegra_gpu_enable_node(blob, gpu_compats[i]);
28 if (ret)
29 return ret;
30 }
31
32 return 0;
33}