U-Boot porting (3) adds support for S3C2440

Publisher:快乐时刻Latest update time:2023-08-15 Source: elecfansKeywords:U-Boot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

6. S3C2440 is an improved version of S3C2410. Their operations are basically similar, except for some minor differences in the settings of the system clock and the operation of the NAND Flash controller. . What I have to do next is to make a U-Boot binary code run on both S3C2410 and S3C2440.

        Although my board is also S3C2410, adding U-Boot exercises for S3C2440 can improve our abilities and lay the foundation for subsequent learning.

             The value of the GSTATUS1 register: 0x32410000 represents S3C2410, 0x32410002 represents S3C2440.

             S3C2410:FCLK=200MHZ;S3C2440:FCLK=400MHZ,UCLK=48MHZ;

             After figuring it out, we can get started.

             First, define the following values ​​in front of board/100ask24x0/100ask24x0.c:

             picture

             The input clock of my development board is 12MHZ. If your development board clock is different from mine, you can calculate it according to the formula in the previous code, and then modify the system clock. This is in the macro CONFIG_SYS_CLK_FREQ in include/configs/100ask24x0.h definition.

          Next, use different macros to set the system clock, including S3C2410 and S3C2440.

           

            picture

            picture     

7. When setting the serial port baud rate later, you need to obtain the system clock. This is in the second stage of U-Boot, that is, when the start_armboot function in lib_arm/board.c calls the serial_init function to initialize the serial port, it will call get_PCLK, get_HCLK, and get_PLLCLK. etc. function, which requires us to make corresponding modifications.

         First, you must add the following line to the switch of the board_init function to use the variable gd, because S3C2410 and S3C2440 are recognized and the machine type ID is set: gd->bd->bi_arch_number.                             picture

     

     Then add the following in the get_PLLCLK function:

      picture

        Since the frequency division coefficient setting methods are also different, get_HCLK and get_PCLK also need to be modified. Modify as follows:

       picture

  。。。。。。。。。。。

picture

The above 3:6 should be changed to 6:3. I made a mistake here.

。。。。。。。。

picture

3:6 changed to 6:3

8. The modification has been completed and can be compiled.

          (1)make    100ask24x0_config

          (2)make all

There were a lot of errors later, and I needed to be patient to search and correct them.


Keywords:U-Boot Reference address:U-Boot porting (3) adds support for S3C2440

Previous article:U-Boot transplantation (4) adds support for S3C2440 (modifies compilation errors)
Next article:U-Boot transplantation (2) Modify SDRAM configuration

Recommended ReadingLatest update time:2024-11-22 13:45

Nand Flash Operation (S3C2440)
Overview of Nand Flash Nandflash is mainly read and written in page units, and erased in block units. Each page is divided into a main area and a spare area. The main area is used to store normal data, and the spare area is used to store some additional information, such as the mark of the block, the logical address
[Microcontroller]
Nand Flash Operation (S3C2440)
How to use TF/SD card to create Exynos 4412 u-boot boot disk in Ubuntu
/** ****************************************************************************** * @author Maoxiao Hu * @version V1.0.1 * @date Feb-2015 ****************************************************************************** * COPYRIGHT 2015 ISE of SHANDONG UNIVERSITY *******************************************************
[Microcontroller]
How to use TF/SD card to create Exynos 4412 u-boot boot disk in Ubuntu
11. S3C2440 bare metal—GPIO
11.1 GPIO introduction 11.1.1 GPIO pins GPIO is the input and output port. S3C2440A contains 130 multi-function input/output port pins and they are eight ports as shown below: Port A (GPA): 25-bit output port Port B (GPB): 11-bit input/output port Port C (GPC): 16-bit input/output port Port D (GPD): 16-bit input/o
[Microcontroller]
11. S3C2440 bare metal—GPIO
s3c2440 clock + nandflash copy to SDRAM + turn on mmu
Involving 6 files head.S,init.c,main.c,makefile,nand.c,out.lds head.S .text .global _start _start:     b   Reset HandleUndef:     b   HandleUndef  HandleSWI:     b   HandleSWI HandlePrefetchAbort:     b   HandlePrefetchAbort HandleDataAbort:     b   HandleDataAbort HandleNotUsed:     b   HandleNotUsed     b   Handl
[Microcontroller]
【s3c2440】Lesson 1: Programming Method
This series of notes is based on teacher Wei Dongshan's development board. What you will learn in this section:      How to use openJTAG to burn      How to use DNW and uboot to burn      How to burn the entire operating system 1. Install USB driver and openJTAG driver      Installing openJTAG on Windows 10 re
[Microcontroller]
【s3c2440】Lesson 1: Programming Method
S3C2440 Watchdog Timer Principle
Watchdog Timer I believe everyone has seen an advertisement made by China Mobile some time ago. From cities to mountain villages to the Qinghai-Tibet Plateau, there is China Mobile's network everywhere, and you can make calls everywhere. This can be associated with China Mobile's countless signal base stations
[Microcontroller]
S3C2440 Watchdog Timer Principle
ARM interrupt (S3C2440)
For an interrupt to occur, three parts need to work simultaneously: Interrupt Sources Interrupt Controller CPU Enable Interrupt The function of the interrupt controller is: Collect various interrupt signals and send them to the CPU. Interrupt handling process: 1. The interrupt controller collects various interrupt
[Microcontroller]
ARM interrupt (S3C2440)
Transplantation on Embedded Linux System Based on ADSP BF533
1 Introduction Boot Loader is a boot program that runs before the operating system kernel runs. It is used to initialize hardware devices, change the processor operation mode, reorganize interrupt vectors and establish memory space mapping, thereby bringing the system's hardware and software to an appropr
[Microcontroller]
Transplantation on Embedded Linux System Based on ADSP BF533
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号