summaryrefslogtreecommitdiffstats
path: root/board/freescale
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-11-18 11:26:06 -0200
committerStefano Babic <sbabic@denx.de>2014-11-20 10:30:21 +0100
commitae80eecceb9f3eb729d95acd7157bc0310d719c9 (patch)
tree36ce5614f9c3d362ffb8656acbdbaa2a05a9e93e /board/freescale
parentb6d7810e5c13ecb12323625be7932eeb5bea9d7d (diff)
downloadblackbird-obmc-uboot-ae80eecceb9f3eb729d95acd7157bc0310d719c9.tar.gz
blackbird-obmc-uboot-ae80eecceb9f3eb729d95acd7157bc0310d719c9.zip
mx6sabresd: Access SRC_SBMR1 register via structure
In U-boot it is preferred to access the register via structure pointer, so convert it such style. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx6sabresd/mx6sabresd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 8f369b35d9..876d265d09 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -31,8 +31,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define BOOT_CFG 0x020D8004
-
#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)
@@ -300,7 +298,8 @@ int board_mmc_init(bd_t *bis)
return 0;
#else
- unsigned reg = readl(BOOT_CFG) >> 11;
+ struct src *psrc = (struct src *)SRC_BASE_ADDR;
+ unsigned reg = readl(&psrc->sbmr1) >> 11;
/*
* Upon reading BOOT_CFG register the following map is done:
* Bit 11 and 12 of BOOT_CFG register can determine the current
OpenPOWER on IntegriCloud