Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[platform/kernel/u-boot.git] / board / toradex / colibri_t20 / colibri_t20.c
index 7d574fb..e0b27e9 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  *  Copyright (C) 2012 Lucas Stach
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -69,7 +68,7 @@ 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;
@@ -151,4 +150,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