Skip to content
Snippets Groups Projects
Commit 5e1fe88f authored by Stefano Babic's avatar Stefano Babic Committed by trix
Browse files

Moved board specific values in config file


The lowlevel_init file contained some hard-coded values
to setup the RAM. These board related values are moved into
the board configuration file.

Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
parent 27201785
No related branches found
No related tags found
No related merge requests found
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
/* Switch peripheral to PLL 3 */ /* Switch peripheral to PLL 3 */
ldr r0, =CCM_BASE_ADDR ldr r0, =CCM_BASE_ADDR
ldr r1, =0x000010C0 ldr r1, =0x000010C0
orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
str r1, [r0, #CLKCTL_CBCMR] str r1, [r0, #CLKCTL_CBCMR]
ldr r1, =0x13239145 ldr r1, =0x13239145
str r1, [r0, #CLKCTL_CBCDR] str r1, [r0, #CLKCTL_CBCDR]
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
ldr r1, =0x19239145 ldr r1, =0x19239145
str r1, [r0, #CLKCTL_CBCDR] str r1, [r0, #CLKCTL_CBCDR]
ldr r1, =0x000020C0 ldr r1, =0x000020C0
orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
str r1, [r0, #CLKCTL_CBCMR] str r1, [r0, #CLKCTL_CBCMR]
mov r3, #DP_OP_216 mov r3, #DP_OP_216
...@@ -201,9 +203,10 @@ ...@@ -201,9 +203,10 @@
/* setup the rest */ /* setup the rest */
/* Use lp_apm (24MHz) source for perclk */ /* Use lp_apm (24MHz) source for perclk */
ldr r1, =0x000020C2 ldr r1, =0x000020C2
orr r1,r1,#CONFIG_SYS_DDR_CLKSEL
str r1, [r0, #CLKCTL_CBCMR] str r1, [r0, #CLKCTL_CBCMR]
/* ddr clock from PLL 1, all perclk dividers are 1 since using 24MHz */ /* ddr clock from PLL 1, all perclk dividers are 1 since using 24MHz */
ldr r1, =0x59E35100 ldr r1, =CONFIG_SYS_CLKTL_CBCDR
str r1, [r0, #CLKCTL_CBCDR] str r1, [r0, #CLKCTL_CBCDR]
/* Restore the default values in the Gate registers */ /* Restore the default values in the Gate registers */
......
...@@ -160,6 +160,9 @@ ...@@ -160,6 +160,9 @@
#define PHYS_SDRAM_1 CSD0_BASE_ADDR #define PHYS_SDRAM_1 CSD0_BASE_ADDR
#define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024) #define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024)
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
* FLASH and environment organization * FLASH and environment organization
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment