blob: 8ac723f41e4c21d12cbc4e05652abb14b9da20aa [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 */
13int ft_system_setup(void *blob, bd_t *bd)
14{
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}