]> Git Repo - J-u-boot.git/blobdiff - board/toradex/colibri_t20/colibri_t20.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / board / toradex / colibri_t20 / colibri_t20.c
index 4d298e69e64c9d1e9335bde357ce46b6d428ce01..73ef4d2db32ca4dca3d7076b4ee6f60426edd45f 100644 (file)
@@ -1,20 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  *  Copyright (C) 2012 Lucas Stach
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <init.h>
+#include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/funcmux.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch-tegra/ap.h>
 #include <asm/arch-tegra/board.h>
 #include <asm/arch-tegra/tegra.h>
+#include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <i2c.h>
 #include <nand.h>
+#include <linux/delay.h>
 #include "../common/tdx-common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -69,20 +72,20 @@ int checkboard(void)
 {
        printf("Model: Toradex Colibri T20 %dMB V%s\n",
               (gd->ram_size == 0x10000000) ? 256 : 512,
-              (nand_info[0]->erasesize >> 10 == 512) ?
+              (get_nand_dev_by_index(0)->erasesize >> 10 == 512) ?
               ((gd->ram_size == 0x10000000) ? "1.1B" : "1.1C") : "1.2A");
 
        return 0;
 }
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-int ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, struct bd_info *bd)
 {
        return ft_common_board_setup(blob, bd);
 }
 #endif
 
-#ifdef CONFIG_TEGRA_MMC
+#ifdef CONFIG_MMC_SDHCI_TEGRA
 /*
  * Routine: pin_mux_mmc
  * Description: setup the pin muxes/tristate values for the SDMMC(s)
@@ -151,4 +154,13 @@ void pin_mux_display(void)
        pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM);
        pinmux_tristate_disable(PMUX_PINGRP_SDC);
 }
+
+/*
+ * Backlight off before OS handover
+ */
+void board_preboot_os(void)
+{
+       gpio_request(TEGRA_GPIO(T, 4), "BL_ON");
+       gpio_direction_output(TEGRA_GPIO(T, 4), 0);
+}
 #endif
This page took 0.027615 seconds and 4 git commands to generate.