uboot.2016.03 on mini2440 norfalsh start up

Source: Internet
Author: User

I am a little lazy, directly on the basis of smdk2410 to modify

(Note: A red font indicates a change, and a blue font indicates an increase in content)

1. Makefile on the top floor

Add the following two statements in line 247:

ARCH: =arm
Cross_compile: =arm-linux-

2 Modify the Always frequency

Open U-boot-2016.03/arch/arm/cpu/arm920t/start. S

Line 77th #if defined (config_s3c2410)

      #if defined (config_s3c2440)
Line 78th Ldr R1, =0X3FF

       LDR R1, =0X7FF

Line 87th mov r1, #3//fclk:hclk:pclk = 1:2:4

       mov r1, #5//fclk:hclk:pclk = 1:4:8

  Open u-boot-2016.03/board/samsung/smdk2410/smdk2410.c

The contents of line 25th to 27 should read:

  - : #define M_MDIV

: #define M_PDIV 1

: #define M_SDIV 1

The input crystal oscillator frequency of the development Board is 12MHz, and the MPLL frequency is 400MHz by the above modification.

The contents of line 37th to 39 should read:

  Wu: #define U_M_MDIV 56

: #define U_M_PDIV 2

U_m_sdiv: #define 2

With the above modification, the UPLL frequency is 48MHz. Which is the USB clock

Add the following before assigning a value to the register in the Board_early_init_f () function

  __asm__ ("MRC P15, 0, R1, C1, C0, 0\n"
/* Read CTRL Register */

"Orr R1, R1, #0xc0000000 \ n"
/* Asynchronous */

"MCR P15, 0, R1, C1, C0, 0\n"
/* Write CTRL Register */

::: "R1"
);

From the s3c2440 chip book on the Description:

If Hdivn is not 0, the CPU bus mode have to was changed from the fast bus mode to the asynchronous
Bus mode using following instructions (s3c2440 does not support synchronous bus mode).
Mmu_setasyncbusmode
MRC p15,0,r0,c1,c0,0
Orr R0,r0, #R1_nF: Or:r1_ia
MCR p15,0,r0,c1,c0,0  

3. Modifying memory SDRAM Timing

open u-boot-2016.03/board/samsung/smdk2410/lowlevel_init. S

#define B1_BWSCON (DW16)

#define B2_BWSCON (DW16)

#define B3_BWSCON (DW16)

#define B4_BWSCON (DW32)

#define B5_BWSCON (DW16)

#define B6_BWSCON (DW32)

#define B7_BWSCON (DW32)

/* Bank0con */

#define B0_TACS 0x3

#define B0_TCOS 0x3

#define B0_TACC 0x7

#define B0_TCOH 0x3

#define B0_tah 0x3

#define B0_TACP 0x1

#define B0_PMC 0x0

/* Bank1con */

#define B1_TACS 0x1

#define B1_TCOS 0x1

#define B1_TACC 0x6

#define B1_TCOH 0x1

#define B1_tah 0x1

#define B1_TACP 0x0

#define B1_PMC 0x0

#define B2_TACS 0x1

#define B2_TCOS 0x1

#define B2_TACC 0x6

#define B2_TCOH 0x1

#define B2_tah 0x1

#define B2_TACP 0x0

#define B2_PMC 0x0

#define B3_TACS 0x1

#define B3_TCOS 0x1

#define B3_TACC 0x6

#define B3_TCOH 0x1

#define B3_tah 0x1

#define B3_TACP 0x0

#define B3_PMC 0x0

#define B4_TACS 0x1

#define B4_TCOS 0x1

#define B4_TACC 0x6

#define B4_TCOH 0x1

#define B4_tah 0x1

#define B4_TACP 0x0

#define B4_PMC 0x0

#define B5_TACS 0x1

#define B5_TCOS 0x1

#define B5_TACC 0x6

#define B5_TCOH 0x1

#define B5_tah 0x1

#define B5_TACP 0x0

#define B5_PMC 0x0

#define B6_MT 0x3

#define B6_TRCD 0x1

#define B6_scan 0x1

#define B7_MT 0x3

#define B7_TRCD 0x1

#define B7_scan 0x1

/* REFRESH parameter */

#define Refen 0x1

#define TREFMD 0x0

#define TRP 0x1

#define TRC 0x1

#define TCHR 0x2

#define REFCNT 1268

4. modifying macro definitions

Open U-boot-2016.03/include/configs/smdk2410.h

Line 21st #define CONFIG_S3C2410/* Specifically a SAMSUNG s3c2410 soc*/

     #define CONFIG_S3C2440/* Specifically a SAMSUNG s3c2440 SoC */

s3c2410 and s3c2440 some registers are different

Add the following on line 27

  #undef config_sys_prompt
#define CONFIG_SYS_PROMPT "jetli#"//This in the serial output [jetli#] Content

release the defined config_sys_prompt, and then define what you need.

The 157th line, "#define Config_flash_cfi_legacy", should read:

     #define CONFIG_SYS_CFI_FLASH_CONFIG_REGS {0xFFFF}

Because the Norflash interface of the CFI is used in u-boot-2011.06, there is no need to define config_flash_cfi_legacy, but to define Config_sys_cfi_flash_config_regs.

The 162th line, "#define Config_sys_max_flash_sect (19)", should read:

       #define CONFIG_SYS_MAX_FLASH_SECT (35)

Because the Norflash used in this board is EN29LV160AB, it has 35 sectors.

Line 164th "#define CONFIG_ENV_ADDR (config_sys_flash_base + 0x70000)" instead

#define CONFIG_ENV_ADDR (config_sys_flash_base + 0x0100000)

uboot-2016 make generates the U-boot.bin >512k>0x70000, when the environment variable address is 0x70000, the u-boot.bin is overwritten if the environment variable is saved. Saveenv after the command restarts after reboot

uboot.2016.03 on mini2440 norfalsh start up

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.