diff options
author | Abhimanyu Saini <abhimanyu.saini@nxp.com> | 2016-06-03 18:41:33 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2016-06-03 14:12:51 -0700 |
commit | 16dacb26a5e5ec58e00ec9d1a83d0ccceb8b0de5 (patch) | |
tree | b7f5c02d59249341293a08acada2f88e78b36588 /board | |
parent | 3faaa24b1138e720e065ae7ee6c63f751e6867be (diff) | |
download | u-boot-imx-16dacb26a5e5ec58e00ec9d1a83d0ccceb8b0de5.zip u-boot-imx-16dacb26a5e5ec58e00ec9d1a83d0ccceb8b0de5.tar.gz u-boot-imx-16dacb26a5e5ec58e00ec9d1a83d0ccceb8b0de5.tar.bz2 |
board: freescale: common: Add flag for LBMAP brdcfg reg offset
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>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/common/qixis.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c index 2e35d41..0db0ed6 100644 --- a/board/freescale/common/qixis.c +++ b/board/freescale/common/qixis.c @@ -14,6 +14,13 @@ #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) |