diff mbox series

[U-Boot] board/ls2081ard: Correct code to get QMAP value in checkboard

Message ID 1515394242-15963-1-git-send-email-priyanka.jain@nxp.com
State Accepted
Commit da28a03ed4a1420c5b748cfe08d991cf8da0df32
Delegated to: York Sun
Headers show
Series [U-Boot] board/ls2081ard: Correct code to get QMAP value in checkboard | expand

Commit Message

Priyanka Jain Jan. 8, 2018, 6:50 a.m. UTC
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 <priyanka.jain@nxp.com>
---
This patch is split version of another patch
https://patchwork.ozlabs.org/patch/803117/

 board/freescale/ls2080ardb/ls2080ardb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

York Sun Jan. 19, 2018, 12:52 a.m. UTC | #1
On 01/07/2018 10:51 PM, Priyanka Jain wrote:
> 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 <priyanka.jain@nxp.com>
> ---

Applied to fsl-qoriq master. Thanks.

York
diff mbox series

Patch

diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index ee0f3a2..34843d7 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -75,7 +75,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");