diff options
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | 2012-08-20 09:00:57 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:54:14 -0700 |
commit | 85d993cef9b8e16431800dfc23e90e23bb144357 (patch) | |
tree | 010a17f5423b84c8b12f857f104ec6a6f5340ba7 /board/karo | |
parent | 9e0081d573442e7234355f0a043218d15df03933 (diff) |
mx25: Clean up lowlevel_init
Clean up mx25 lowlevel_init:
- Add comments.
- Do not use write32 repeatedly with the same value in order not to increase
code size.
- Make register values configurable.
- Use macro parameters with default values instead of literal constants.
- Use defined macros instead of duplicating code.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
Cc: Matthias Weisser <weisserm@arcor.de>
Diffstat (limited to 'board/karo')
-rw-r--r-- | board/karo/tx25/lowlevel_init.S | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/board/karo/tx25/lowlevel_init.S b/board/karo/tx25/lowlevel_init.S index eb3f187806e..3e46ed9774f 100644 --- a/board/karo/tx25/lowlevel_init.S +++ b/board/karo/tx25/lowlevel_init.S @@ -22,37 +22,7 @@ */ #include <asm/macro.h> - -.macro init_aips - write32 0x43f00000, 0x77777777 - write32 0x43f00004, 0x77777777 - write32 0x43f00000, 0x77777777 - write32 0x53f00004, 0x77777777 -.endm - -.macro init_max - write32 0x43f04000, 0x43210 - write32 0x43f04100, 0x43210 - write32 0x43f04200, 0x43210 - write32 0x43f04300, 0x43210 - write32 0x43f04400, 0x43210 - - write32 0x43f04010, 0x10 - write32 0x43f04110, 0x10 - write32 0x43f04210, 0x10 - write32 0x43f04310, 0x10 - write32 0x43f04410, 0x10 - - write32 0x43f04800, 0x0 - write32 0x43f04900, 0x0 - write32 0x43f04a00, 0x0 - write32 0x43f04b00, 0x0 - write32 0x43f04c00, 0x0 -.endm - -.macro init_m3if - write32 0xb8003000, 0x1 -.endm +#include <asm/arch/macro.h> .macro init_clocks /* @@ -64,6 +34,8 @@ * 0x00600000 makes CLKO parent clk the USB clk */ write32 0x53f80064, 0x45600000 + + /* CCTL: ARM = 399 MHz, AHB = 133 MHz */ write32 0x53f80008, 0x20034000 /* |