Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dm
[platform/kernel/u-boot.git] / board / atmel / common / video_display.c
index 39ad619..c7d3f8a 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2017 Microchip
  *                   Wenyou Yang <wenyou.yang@microchip.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -19,6 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int at91_video_show_board_info(void)
 {
+       struct vidconsole_priv *priv;
        ulong dram_size, nand_size;
        int i;
        u32 len = 0;
@@ -43,7 +43,7 @@ int at91_video_show_board_info(void)
        nand_size = 0;
 #ifdef CONFIG_NAND_ATMEL
        for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)
-               nand_size += nand_info[i]->size;
+               nand_size += get_nand_dev_by_index(i)->size;
 #endif
 
        len += sprintf(&buf[len], "%ld MB SDRAM, %ld MB NAND\n",
@@ -64,7 +64,9 @@ int at91_video_show_board_info(void)
        if (ret)
                return ret;
 
-       vidconsole_position_cursor(con, 0, logo_info.logo_height);
+       priv = dev_get_uclass_priv(con);
+       vidconsole_position_cursor(con, 0, (logo_info.logo_height +
+                                  priv->y_charsize - 1) / priv->y_charsize);
        for (s = buf, i = 0; i < len; s++, i++)
                vidconsole_put_char(con, *s);