fsl: common: qixis: Add ifc and emmc switching via qixis
authorAshish Kumar <Ashish.Kumar@nxp.com>
Wed, 17 Jan 2018 06:46:36 +0000 (12:16 +0530)
committerYork Sun <york.sun@nxp.com>
Tue, 23 Jan 2018 19:22:12 +0000 (11:22 -0800)
Currently only SD, NAND can be secondary boot sources controlled
by FPGA/CPLD via qixis commands. For SoC like LS1088 IFC-NOR
can be secondary boot source, while QSPI-NOR is the primary.
Add options in qixis to switch to other boot sources including
ifc and emmc.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/common/qixis.c

index 24459f8635781f227c4398f6c442efebe24c9c8c..844c00a9e3b2154afbec48f67419fca4d54aaca6 100644 (file)
@@ -234,6 +234,28 @@ static int qixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const ar
                QIXIS_WRITE(rcfg_ctl, 0x21);
 #else
                printf("Not implemented\n");
+#endif
+       } else if (strcmp(argv[1], "ifc") == 0) {
+#ifdef QIXIS_LBMAP_IFC
+               QIXIS_WRITE(rst_ctl, 0x30);
+               QIXIS_WRITE(rcfg_ctl, 0);
+               set_lbmap(QIXIS_LBMAP_IFC);
+               set_rcw_src(QIXIS_RCW_SRC_IFC);
+               QIXIS_WRITE(rcfg_ctl, 0x20);
+               QIXIS_WRITE(rcfg_ctl, 0x21);
+#else
+               printf("Not implemented\n");
+#endif
+       } else if (strcmp(argv[1], "emmc") == 0) {
+#ifdef QIXIS_LBMAP_EMMC
+               QIXIS_WRITE(rst_ctl, 0x30);
+               QIXIS_WRITE(rcfg_ctl, 0);
+               set_lbmap(QIXIS_LBMAP_EMMC);
+               set_rcw_src(QIXIS_RCW_SRC_EMMC);
+               QIXIS_WRITE(rcfg_ctl, 0x20);
+               QIXIS_WRITE(rcfg_ctl, 0x21);
+#else
+               printf("Not implemented\n");
 #endif
        } else if (strcmp(argv[1], "sd_qspi") == 0) {
 #ifdef QIXIS_LBMAP_SD_QSPI