From: Priyanka Jain Date: Mon, 8 Jan 2018 06:50:42 +0000 (+0530) Subject: board/ls2081ard: Correct code to get QMAP value in checkboard X-Git-Tag: v2018.03-rc1~171^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da28a03ed4a1420c5b748cfe08d991cf8da0df32;p=oweals%2Fu-boot.git board/ls2081ard: Correct code to get QMAP value in checkboard QMAP value contains information about QSPI chip-selects. These bits are used to display information of boot device in checkboard() function. QMAP value is stored in most significant 3-bits of 8-bit register brdcfg[0] in Qixis, this patch corrects code to get QMAP bits using below logic: (brdcfg[0] >> 5) & 0x7 Signed-off-by: Priyanka Jain Reviewed-by: York Sun --- diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index 14e16c21b0..d781e3e9ab 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -74,7 +74,7 @@ int checkboard(void) printf("Board version: %c, ", (sw & 0xf) + 'A'); sw = QIXIS_READ(brdcfg[0]); - sw = (sw & QIXIS_QMAP_MASK) >> QIXIS_QMAP_SHIFT; + sw = (sw >> QIXIS_QMAP_SHIFT) & QIXIS_QMAP_MASK; switch (sw) { case 0: puts("boot from QSPI DEV#0\n");