summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2015-10-19 13:57:02 +0900
committerTom Warren <twarren@nvidia.com>2015-11-12 09:21:07 -0700
commitd6bf06c0c7edf347354b208adf7618c96fd61605 (patch)
treea78de1f5cf0fcf163e15755522b4d4f7cd1a015b /arch/arm/mach-tegra
parent36e5f7ce1c64b4fa0a12c82f84086f5be560b706 (diff)
downloadu-boot-imx-d6bf06c0c7edf347354b208adf7618c96fd61605.zip
u-boot-imx-d6bf06c0c7edf347354b208adf7618c96fd61605.tar.gz
u-boot-imx-d6bf06c0c7edf347354b208adf7618c96fd61605.tar.bz2
ARM: tegra: simplify GPU setup
Enable the GPU node in the system-wide ft_system_setup() hook instead of the board-specific ft_board_hook(). This allows us to enable GPU per SoC generation instead of per-board as we did initially. Reported-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 8ecc674..ff9e77c 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -403,3 +403,23 @@ ulong board_get_usable_ram_top(ulong total_size)
{
return CONFIG_SYS_SDRAM_BASE + usable_ram_size_below_4g();
}
+
+/*
+ * This function is called right before the kernel is booted. "blob" is the
+ * device tree that will be passed to the kernel.
+ */
+int ft_system_setup(void *blob, bd_t *bd)
+{
+ const char *gpu_path =
+#if defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA210)
+ "/gpu@0,57000000";
+#else
+ NULL;
+#endif
+
+ /* Enable GPU node if GPU setup has been performed */
+ if (gpu_path != NULL)
+ return gpu_enable_node(blob, gpu_path);
+
+ return 0;
+}