]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: fsl: lx2160a: Add support to reset to eMMC
authorMeenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Thu, 23 Jan 2020 12:25:10 +0000 (17:55 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 4 Feb 2020 10:49:37 +0000 (16:19 +0530)
Add support of "qixis_reset emmc" command for lx2160a based platforms

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
board/freescale/common/qixis.c
board/freescale/lx2160a/lx2160a.c
include/configs/lx2160aqds.h
include/configs/lx2160ardb.h

index 716c93b2c240734ce0dd4a67ea33241ad1b4eaf0..dd1ee90b3c764eb532a6e3e8376a9c4badeb0a2a 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2011 Freescale Semiconductor
+ * Copyright 2020 NXP
  * Author: Shengzhou Liu <Shengzhou.Liu@freescale.com>
  *
  * This file provides support for the QIXIS of some Freescale reference boards.
@@ -287,7 +288,9 @@ static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const ar
 #ifdef QIXIS_LBMAP_EMMC
                QIXIS_WRITE(rst_ctl, 0x30);
                QIXIS_WRITE(rcfg_ctl, 0);
+#ifndef NON_EXTENDED_DUTCFG
                set_lbmap(QIXIS_LBMAP_EMMC);
+#endif
                set_rcw_src(QIXIS_RCW_SRC_EMMC);
                QIXIS_WRITE(rcfg_ctl, QIXIS_RCFG_CTL_RECONFIG_IDLE);
                QIXIS_WRITE(rcfg_ctl, QIXIS_RCFG_CTL_RECONFIG_START);
@@ -365,6 +368,7 @@ U_BOOT_CMD(
        "qixis watchdog <watchdog_period> - set the watchdog period\n"
        "       period: 1s 2s 4s 8s 16s 32s 1min 2min 4min 8min\n"
        "qixis_reset dump - display the QIXIS registers\n"
+       "qixis_reset emmc - reset to emmc\n"
        "qixis_reset switch - display switch\n"
        );
 #endif
index 6555b5ad3a8b859a4959eb23176ef3f87717fd09..103b0cc65916e7a9003bedef3f42c45d69197d75 100644 (file)
@@ -306,6 +306,8 @@ int checkboard(void)
 
        if (src == BOOT_SOURCE_SD_MMC) {
                puts("SD\n");
+       } else if (src == BOOT_SOURCE_SD_MMC2) {
+               puts("eMMC\n");
        } else {
                sw = QIXIS_READ(brdcfg[0]);
                sw = (sw >> QIXIS_XMAP_SHIFT) & QIXIS_XMAP_MASK;
index f25cab18ae561c5c726ae43dad62d9ddc90c3ce0..1eb63d826f9752fab7f1a9f0c0f1934e1e31af7d 100644 (file)
@@ -22,7 +22,9 @@
 #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE  0x08
 #define QIXIS_LBMAP_MASK               0x0f
 #define QIXIS_LBMAP_SD
+#define QIXIS_LBMAP_EMMC
 #define QIXIS_RCW_SRC_SD               0x08
+#define QIXIS_RCW_SRC_EMMC         0x09
 #define NON_EXTENDED_DUTCFG
 #define QIXIS_SDID_MASK                        0x07
 #define QIXIS_ESDHC_NO_ADAPTER         0x7
index de385f82c89578edc605f15d83a137d658818efe..82d49e53abdd399e73360d52814c71daa59e89d7 100644 (file)
@@ -22,7 +22,9 @@
 #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE  0x08
 #define QIXIS_LBMAP_MASK               0x0f
 #define QIXIS_LBMAP_SD
+#define QIXIS_LBMAP_EMMC
 #define QIXIS_RCW_SRC_SD           0x08
+#define QIXIS_RCW_SRC_EMMC         0x09
 #define NON_EXTENDED_DUTCFG
 
 /* VID */