summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-08-12 16:53:35 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2012-08-17 20:13:48 +0200
commit9a16f310c0182e0744341b85c43ec8c4f50ae4dc (patch)
treec84bef3908aa025be304be9d715da88cf9aea093
parent8b82cefbfc88d12cdffa0970f03047b74d08487e (diff)
downloadu-boot-imx-9a16f310c0182e0744341b85c43ec8c4f50ae4dc.zip
u-boot-imx-9a16f310c0182e0744341b85c43ec8c4f50ae4dc.tar.gz
u-boot-imx-9a16f310c0182e0744341b85c43ec8c4f50ae4dc.tar.bz2
dm: mips: Fix warnings in lb60 board
The lb60 board accesses the clkgr register, which is 32bit via 16bit IO ops. This causes malfunction. Fix this. qi_lb60.c: In function ‘cpm_init’: qi_lb60.c:72:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] qi_lb60.c:84:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Marek Vasut <marex@denx.de> Cc: Daniel <zpxu@ingenic.cn> Cc: Shinya Kuribayashi <skuribay@pobox.com> Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
-rw-r--r--board/qi/qi_lb60/qi_lb60.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/qi/qi_lb60/qi_lb60.c b/board/qi/qi_lb60/qi_lb60.c
index 3583d01..d975209 100644
--- a/board/qi/qi_lb60/qi_lb60.c
+++ b/board/qi/qi_lb60/qi_lb60.c
@@ -69,7 +69,7 @@ static void gpio_init(void)
static void cpm_init(void)
{
struct jz4740_cpm *cpm = (struct jz4740_cpm *)JZ4740_CPM_BASE;
- uint32_t reg = readw(&cpm->clkgr);
+ uint32_t reg = readl(&cpm->clkgr);
reg |= CPM_CLKGR_IPU |
CPM_CLKGR_CIM |
@@ -81,7 +81,7 @@ static void cpm_init(void)
CPM_CLKGR_UDC |
CPM_CLKGR_AIC1;
- writew(reg, &cpm->clkgr);
+ writel(reg, &cpm->clkgr);
}
int board_early_init_f(void)