stm32f746-disco: enable flash support
[oweals/u-boot.git] / arch / arm / mach-tegra / gpu.c
index b2fa50b5400e23fbcaba3bc39dd975926016a8e4..0dbddd45d4159293cad21519c7643d06dfc9049e 100644 (file)
@@ -1,17 +1,7 @@
 /*
  * Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier:    GPL-2.0
  */
 
 /* Tegra vpr routines */
@@ -25,7 +15,7 @@
 
 static bool _configured;
 
-void config_gpu(void)
+void tegra_gpu_config(void)
 {
        struct mc_ctlr *mc = (struct mc_ctlr *)NV_PA_MC_BASE;
 
@@ -41,7 +31,21 @@ void config_gpu(void)
        _configured = true;
 }
 
-bool vpr_configured(void)
+#if defined(CONFIG_OF_LIBFDT)
+
+int tegra_gpu_enable_node(void *blob, const char *gpupath)
 {
-       return _configured;
+       int offset;
+
+       if (_configured) {
+               offset = fdt_path_offset(blob, gpupath);
+               if (offset > 0) {
+                       fdt_status_okay(blob, offset);
+                       debug("enabled GPU node %s\n", gpupath);
+               }
+       }
+
+       return 0;
 }
+
+#endif