blob: 602b20e6b7e9323b29d71591ee0f354dcb009c22 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Stephen Warren98898622016-08-08 10:38:34 -06002/*
3 * Copyright (c) 2010-2016, NVIDIA CORPORATION.
Stephen Warren98898622016-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 Yamadab75d8dc2020-06-26 15:13:33 +090013int ft_system_setup(void *blob, struct bd_info *bd)
Stephen Warren98898622016-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}