]> git.sur5r.net Git - u-boot/commitdiff
board: freescale: common: Add flag for LBMAP brdcfg reg offset
authorAbhimanyu Saini <abhimanyu.saini@nxp.com>
Fri, 3 Jun 2016 13:11:33 +0000 (18:41 +0530)
committerYork Sun <york.sun@nxp.com>
Fri, 3 Jun 2016 21:12:51 +0000 (14:12 -0700)
Add QIXIS_LBMAP_BRDCFG_REG to the save offset of LBMAP
configuration register instead of hardcoding it in
set_lbmap() function.

Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/common/qixis.c

index 2e35d419b20633df71a17e1e2ad4d1bbb4fcead4..0db0ed667002f33d6f532faf1840ad3ab4a6abac 100644 (file)
 #include <i2c.h>
 #include "qixis.h"
 
+#ifndef QIXIS_LBMAP_BRDCFG_REG
+/*
+ * For consistency with existing platforms
+ */
+#define QIXIS_LBMAP_BRDCFG_REG 0x00
+#endif
+
 #ifdef CONFIG_SYS_I2C_FPGA_ADDR
 u8 qixis_read_i2c(unsigned int reg)
 {
@@ -144,9 +151,9 @@ static void __maybe_unused set_lbmap(int lbmap)
 {
        u8 reg;
 
-       reg = QIXIS_READ(brdcfg[0]);
+       reg = QIXIS_READ(brdcfg[QIXIS_LBMAP_BRDCFG_REG]);
        reg = (reg & ~QIXIS_LBMAP_MASK) | lbmap;
-       QIXIS_WRITE(brdcfg[0], reg);
+       QIXIS_WRITE(brdcfg[QIXIS_LBMAP_BRDCFG_REG], reg);
 }
 
 static void __maybe_unused set_rcw_src(int rcw_src)