* [U-Boot] [PATCH] mx6sabresd: Access SRC_SBMR1 register via structure
@ 2014-11-18 13:26 Fabio Estevam
2014-11-20 9:42 ` Stefano Babic
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2014-11-18 13:26 UTC (permalink / raw)
To: u-boot
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>
---
board/freescale/mx6sabresd/mx6sabresd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index d5cd37d..bd8f55a 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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] mx6sabresd: Access SRC_SBMR1 register via structure
2014-11-18 13:26 [U-Boot] [PATCH] mx6sabresd: Access SRC_SBMR1 register via structure Fabio Estevam
@ 2014-11-20 9:42 ` Stefano Babic
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2014-11-20 9:42 UTC (permalink / raw)
To: u-boot
On 18/11/2014 14:26, Fabio Estevam wrote:
> 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>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-20 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 13:26 [U-Boot] [PATCH] mx6sabresd: Access SRC_SBMR1 register via structure Fabio Estevam
2014-11-20 9:42 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox