Chinaunix首页 | 论坛 | 博客
  • 博客访问: 58678
  • 博文数量: 8
  • 博客积分: 199
  • 博客等级: 入伍新兵
  • 技术积分: 105
  • 用 户 组: 普通用户
  • 注册时间: 2012-06-10 15:42
文章分类

全部博文(8)

文章存档

2012年(8)

我的朋友

分类:

2012-07-09 10:43:34

u-boot-1.1.6移植到FL2440-I开发板

Author: misty (qixb_11(a)163.com)

1     建立环境 1.1   交叉编译工具

解压arm-linux-gcc-3.3.2.tar.bz2/opt目录下,编辑.bashrc,添加一行设置PATH变量。

[xxx@localhost ~]$ vi .bashrc

export PATH=$PATH:/opt/usr/local/arm/3.3.2/bin

 

1.2   u-boot环境

进入board目录,拷贝smdk2410fl2440;进入board/fl2440,将smdk2410.c重命名为fl2440.c,修改Makefile,将smdk2410.o修改为fl2440.o;修改根目录下的Makefile,添加fl2440_config;进入include/configs目录,将smdk2410.h拷贝为fl2440.h。将include目录下的s3c2410.h拷贝为s3c2440.h;删除cpu/arm920t目录下的除s3c24x0外的其它目录。删除include目录下,除asm-arm外的其它目录。

[xxx@localhost u-boot-1.1.6]$ cd board/

 [xxx@localhost board]$

[xxx@localhost board]$ cp -r smdk2410 fl2440

 [xxx@localhost board]$ cd fl

-bash: cd: fl: No such file or directory

[xxx@localhost board]$ cd fl2440/

[xxx@localhost fl2440]$ ls

config.mk  flash.c  lowlevel_init.S  Makefile  smdk2410.c  u-boot.lds

[xxx@localhost fl2440]$

[xxx@localhost fl2440]$ mv smdk2410.c fl2440.c

[xxx@localhost u-boot-1.1.6]$ vi Makefile

[xxx@localhost u-boot-1.1.6]$ cd include/configs/

[xxx@localhost configs]$ cp smdk2410.h fl2440.h

Makefile中添加的代码如下:

1879 smdk2410_config :       unconfig

1880         @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0

1881

1882 fl2440_config :         unconfig

1883         @$(MKCONFIG) $(@:_config=) arm arm920t fl2440   NULL s3c24x0

做好以后可以编译下试试看是否可以编译通。

[qixb@localhost u-boot-1.1.6]$make fl2440_config

[qixb@localhost u-boot-1.1.6]$make

可以编译通过,但现在编译出来的是smdk2410u-boot,下面修改相应文件移植到FL2440-I开发板上。

 

1.3   删除目录(非必需)

删除cpu目录下,除arm920t之外的其它目录;删除board目录下,除smdk2410fl2440之外的其它目录;删除include/configs目录,除fl2440.h之外的其它文件。

[xxx@localhost u-boot-1.1.6]$ cd cpu/

[xxx@localhost cpu]$ ls

74xx_7xx  arm920t    arm946es   bf533  lh7a40x     mips     mpc8220  mpc83xx  mpc8xx  ppc4xx   sa1100

arm1136   arm925t    arm_intcm  i386   mcf52x2     mpc5xx   mpc824x  mpc85xx  nios    pxa

arm720t   arm926ejs  at32ap     ixp    microblaze  mpc5xxx  mpc8260  mpc86xx  nios2   s3c44b0

 [xxx@localhost cpu]$ ls

arm920t

[xxx@localhost cpu]$

[xxx@localhost board]$ ls

100ask24x0  fl2440  smdk2400  smdk2410

[xxx@localhost configs]$ ls

100ask24x0.h  fl2440.h  smdk2400.h  smdk2410.h

[xxx@localhost configs]$

 

 

2     移植

首先,将使用宏CONFIG_S3C2410的地方也添加CONFIG_S3C2440(可以使用SI的搜索功能找到所有CONFIG_S3C2410的地方)。

修改的部分我用Beyond Compare比较结果贴出来。

2.1   start.S

cpu/arm/arm920t

修改cpu/arm/arm920t目录下的start.S文件,

修改中断和时钟频率。如果在RAM中运行,则修改relocate条件。

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\start.S  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\start.S  

124

#elif defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)

<> 

124

#elif defined(CONFIG_S3C2410)

 

129

 

+-

 

 

130

#if defined(CONFIG_S3C2440)

 

 

 

131

#define CLK_CTL_BASE 0x4c000000

 

 

 

132

#define MDIV_405 0x7f<<12

 

 

 

133

#define PSDIV_405 0x21

 

 

 

134

#endif /* CONFIG_S3C2440 */

 

 

 

 

137

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)

<> 

131

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)

 

149

        ldr        r1, =0x7ff        /*Old Vlaue 0x3ff modify 0x7ff */

<> 

 

 

150

        ldr        r0, =INTSUBMSK

 

143

        ldr        r1, =0x3ff

151

        str        r1, [r0]

 

 

 

152

# endif

 

 

 

153

 

 

 

 

154

# if defined(CONFIG_S3C2440)

 

 

 

155

        ldr        r1, =0x7fff        /* INTSUBMASK have 15bits */

 

 

 

 

160

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)

+-

 

 

 

166

#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */

<> 

153

#endif        /* CONFIG_S3C2400 || CONFIG_S3C2410 */

167

 

 

 

 

168

#if defined(CONFIG_S3C2440)

 

 

 

169

        /* FCLK:HCLK:PCLK = 1:4:8 */

 

 

 

170

        /* default FCLK is 120 MHz ! */

 

 

 

171

        ldr        r0, =CLKDIVN

 

 

 

172

        mov        r1, #5

 

 

 

173

        str        r1, [r0]

 

 

 

174

#endif /* CONFIG_S3C2440 */

 

 

 

175

 

 

 

 

176

        /* if HDIVN is not 0, has to be changed from fast bus mode to Asynchronous bus mode */

 

 

 

177

        /* R1_nF and R1_iA reference to vivi s3c2440.h */

 

 

 

178

        /* MMU_SetAsyncBusMode */

 

 

 

179

        mrc p15,0,r1,c1,c0,0

 

 

 

180

        orr r1,r1,#0xc0000000

 

 

 

181

        mcr p15,0,r1,c1,c0,0

 

 

 

182

       

 

 

 

183

#if defined(CONFIG_S3C2440)

 

 

 

184

    /* set CPU clock 405MHz */

 

 

 

185

    mov r1,#CLK_CTL_BASE

 

 

 

186

        mov r2,#MDIV_405

 

 

 

187

        add r2,r2,#PSDIV_405

 

 

 

188

        str r2,[r1,#0x04]

 

 

 

189

#endif

 

 

 

190

 

 

 

 

191

#endif        /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */

 

 

 

 

 

2.2   lowlevel_init.S

board/fl2440

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\board\fl2440\lowlevel_init.S  
Right file: Z:\work\origin\u-boot-1.1.6\board\fl2440\lowlevel_init.S  

54

#define B1_BWSCON                  (DW16)

<> 

54

#define B1_BWSCON                  (DW32)

55

#define B2_BWSCON                  (DW16 + WAIT + UBLB)

 

55

#define B2_BWSCON                  (DW16)

56

#define B3_BWSCON                  (DW16 + UBLB)

 

56

#define B3_BWSCON                  (DW16 + WAIT + UBLB)

57

#define B4_BWSCON                  (DW16 + WAIT + UBLB)

 

57

#define B4_BWSCON                  (DW16)

58

#define B5_BWSCON                  (DW8)

 

58

#define B5_BWSCON                  (DW16)

 

93

#define B3_Tacp                         0x3 /*  6clk */

<> 

93

#define B3_Tacp                         0x3     /*  6clk */

 

97

#define B4_Tcos                         0x3        /*  4clk */

<> 

97

#define B4_Tcos                         0x0        /*  0clk */

 

99

#define B4_Tcoh                         0x1        /*  1clk */

<> 

99

#define B4_Tcoh                         0x0        /*  0clk */

100

#define B4_Tah                         0x3        /*  4clk */

 

100

#define B4_Tah                         0x0        /*  0clk */

101

#define B4_Tacp                         0x6        /*  6clk */

 

101

#define B4_Tacp                         0x0

 

 

 

-+

123

#define Trp                         0x0        /* 2clk */

 

125

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)

+-

 

 

126

#define Trp                         0x0        /* 2clk */

 

 

 

 

128

#endif

+-

 

 

129

#if defined(CONFIG_S3C2440)

 

 

 

130

#define Trp                         0x1        /* 3clk */

 

 

 

131

#define REFCNT                         0x4f4        /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */

 

 

 

132

#endif

 

 

 

 

 

2.3   fl2440.c

board/fl2440

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\board\fl2440\fl2440.c  
Right file: Z:\work\origin\u-boot-1.1.6\board\fl2440\fl2440.c  

39

#elif FCLK_SPEED==1       

<> 

39

#elif FCLK_SPEED==1        /* Fout = 202.8MHz */

40

#if defined(CONFIG_S3C2410) /* Fout = 202.8MHz */

 

 

 

 

44

#elif defined(CONFIG_S3C2440) /* Fout = 405MHz */

+-

 

 

45

#define M_MDIV    0x7F

 

 

 

46

#define M_PDIV    0x2

 

 

 

47

#define M_SDIV    0x1

 

 

 

 

49

#endif /* FCLK_SPEED==1 */

+-

 

 

 

58

#if defined(CONFIG_S3C2410)

<> 

 

 

59

#define U_M_MDIV    0x38

 

52

#define U_M_MDIV    0x48

60

#define U_M_PDIV    0x2

 

53

#define U_M_PDIV    0x3

 

62

#elif defined(CONFIG_S3C2440)

+-

 

 

63

#define U_M_MDIV    0x38

 

 

 

64

#define U_M_PDIV    0x2

 

 

 

65

#define U_M_SDIV    0x2

 

 

 

66

#endif

 

 

 

 

118

#ifdef CONFIG_S3C2440

<> 

 

 

119

    gd->bd->bi_arch_number = MACH_TYPE_FL2440;

 

 

 

120

#elif

 

 

 

121

    gd->bd->bi_arch_number = MACH_TYPE_SMDK2410;

 

106

    gd->bd->bi_arch_number = MACH_TYPE_SMDK2410;

122

#endif

 

107

 

 

 

2.4   fl2440.h

include/configs

修改网络的配置

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\include\configs\fl2440.h  
Right file: Z:\work\origin\u-boot-1.1.6\include\configs\fl2440.h  

29

#ifndef __CONFIG_FL2440_H

<> 

29

#ifndef __CONFIG_H

30

#define __CONFIG_FL2440_H

 

30

#define __CONFIG_H

 

32

#define CONFIG_SKIP_LOWLEVEL_INIT

+-

 

 

33

#define CONFIG_SKIP_RELOCATE_UBOOT

 

 

 

34

 

 

 

 

 

40

#define    CONFIG_S3C2440        1    /* in a SAMSUNG S3C2410 SoC     */

<> 

37

#define    CONFIG_S3C2410        1    /* in a SAMSUNG S3C2410 SoC     */

41

//#define CONFIG_SMDK2410        1    /* on a SAMSUNG SMDK2410 Board  */

 

 

 

42

#define CONFIG_FL2440         1   /* on a FL2440 Board */

 

38

#define CONFIG_SMDK2410        1    /* on a SAMSUNG SMDK2410 Board */

 

60

#if 0

+-

 

 

 

64

#endif

+-

 

 

65

#define CONFIG_DRIVER_DM9000        1

 

 

 

66

#define CONFIG_DM9000_USE_16BIT     1

 

 

 

67

#define CONFIG_DM9000_BASE            0x20000000

 

 

 

68

#define DM9000_IO                    CONFIG_DM9000_BASE

 

 

 

69

#define DM9000_DATA                    (CONFIG_DM9000_BASE+4)

 

 

 

 

122

#define    CFG_PROMPT        "FL2440 # "    /* Monitor Command Prompt    */

<> 

111

#define    CFG_PROMPT        "SMDK2410 # "    /* Monitor Command Prompt    */

 

 

 

-+

157

#define CONFIG_AMD_LV400    1    /* uncomment this if you have a LV400 flash */

 

169

#define CONFIG_AMD_LV400    1    /* uncomment this if you have a LV400 flash */

<> 

159

#define CONFIG_AMD_LV800    1    /* uncomment this if you have a LV800 flash */

 

171

#define CONFIG_AMD_LV800    1    /* uncomment this if you have a LV800 flash */

+-

 

 

注:如果不在DRAM中调试,则不用定义CONFIG_SKIP_LOWLEVEL_INITCONFIG_SKIP_RELOCATE_UBOOT

DM9000ANGCS4IO映射区为BANK4

CONFIG_DM9000_BASE的值有的选择0x20000300,目前还不知道为什么。但是选择0x20000000可以使用。

因为DM9000ACMD管脚接ADDR2线,所以偏移地址加4

 

2.5   mach_types.h

include/asm目录下

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\include\asm-arm\mach-types.h  
Right file: Z:\work\origin\u-boot-1.1.6\include\asm-arm\mach-types.h  

209

#define MACH_TYPE_FL2440               888

+-

 

 

 

 

2.6   common.h

include

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\include\common.h  
Right file: Z:\work\origin\u-boot-1.1.6\include\common.h  

449

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X) || defined(CONFIG_S3C2440)

<> 

449

#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || defined(CONFIG_LH7A40X)

 

2.7   s3c24x0.h

include

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\include\s3c24x0.h  
Right file: Z:\work\origin\u-boot-1.1.6\include\s3c24x0.h  

89

#ifdef CONFIG_S3C2440

+-

 

 

90

    S3C24X0_REG32    SUBSRCPND;

 

 

 

91

    S3C24X0_REG32    INTSUBMSK;

 

 

 

92

#endif

 

 

 

 

102

#ifdef CONFIG_S3C2440

+-

 

 

103

    S3C24X0_REG32    DISRCC;

 

 

 

104

#endif

 

 

 

 

107

    S3C24X0_REG32    DIDSTC;

+-

 

 

108

#endif

 

 

 

109

#ifdef CONFIG_S3C2440

 

 

 

 

121

    S3C24X0_REG32    res[7];

+-

 

 

122

#endif

 

 

 

123

#ifdef CONFIG_S3C2440

 

 

 

 

142

#if defined (CONFIG_S3C2440)

+-

 

 

143

    S3C24X0_REG32     CAMDIVN;

 

 

 

144

#endif

 

 

 

 

165

    S3C24X0_REG32    LCDINTPND;

+-

 

 

166

    S3C24X0_REG32    LCDSRCPND;

 

 

 

167

    S3C24X0_REG32    LCDINTMSK;

 

 

 

168

    S3C24X0_REG32    LPCSEL;

 

 

 

169

#endif

 

 

 

170

#ifdef CONFIG_S3C2440

 

 

 

 

476

#ifdef CONFIG_S3C2440

+-

 

 

477

    S3C24X0_REG32    GPACON;

 

 

 

478

    S3C24X0_REG32    GPADAT;

 

 

 

479

    S3C24X0_REG32    res1[2];

 

 

 

480

    S3C24X0_REG32    GPBCON;

 

 

 

481

    S3C24X0_REG32    GPBDAT;

 

 

 

482

    S3C24X0_REG32    GPBUP;

 

 

 

483

    S3C24X0_REG32    res2;

 

 

 

484

    S3C24X0_REG32    GPCCON;

 

 

 

485

    S3C24X0_REG32    GPCDAT;

 

 

 

486

    S3C24X0_REG32    GPCUP;

 

 

 

487

    S3C24X0_REG32    res3;

 

 

 

488

    S3C24X0_REG32    GPDCON;

 

 

 

489

    S3C24X0_REG32    GPDDAT;

 

 

 

490

    S3C24X0_REG32    GPDUP;

 

 

 

491

    S3C24X0_REG32    res4;

 

 

 

492

    S3C24X0_REG32    GPECON;

 

 

 

493

    S3C24X0_REG32    GPEDAT;

 

 

 

494

    S3C24X0_REG32    GPEUP;

 

 

 

495

    S3C24X0_REG32    res5;

 

 

 

496

    S3C24X0_REG32    GPFCON;

 

 

 

497

    S3C24X0_REG32    GPFDAT;

 

 

 

498

    S3C24X0_REG32    GPFUP;

 

 

 

499

    S3C24X0_REG32    res6;

 

 

 

500

    S3C24X0_REG32    GPGCON;

 

 

 

501

    S3C24X0_REG32    GPGDAT;

 

 

 

502

    S3C24X0_REG32    GPGUP;

 

 

 

503

    S3C24X0_REG32    res7;

 

 

 

504

    S3C24X0_REG32    GPHCON;

 

 

 

505

    S3C24X0_REG32    GPHDAT;

 

 

 

506

    S3C24X0_REG32    GPHUP;

 

 

 

507

    S3C24X0_REG32    res8;

 

 

 

508

 

 

 

 

509

    S3C24X0_REG32    MISCCR;

 

 

 

510

    S3C24X0_REG32    DCLKCON;

 

 

 

511

    S3C24X0_REG32    EXTINT0;

 

 

 

512

    S3C24X0_REG32    EXTINT1;

 

 

 

513

    S3C24X0_REG32    EXTINT2;

 

 

 

514

    S3C24X0_REG32    EINTFLT0;

 

 

 

515

    S3C24X0_REG32    EINTFLT1;

 

 

 

516

    S3C24X0_REG32    EINTFLT2;

 

 

 

517

    S3C24X0_REG32    EINTFLT3;

 

 

 

518

    S3C24X0_REG32    EINTMASK;

 

 

 

519

    S3C24X0_REG32    EINTPEND;

 

 

 

520

    S3C24X0_REG32    GSTATUS0;

 

 

 

521

    S3C24X0_REG32    GSTATUS1;

 

 

 

522

    S3C24X0_REG32    GSTATUS2;

 

 

 

523

    S3C24X0_REG32    GSTATUS3;

 

 

 

524

    S3C24X0_REG32    GSTATUS4;

 

 

 

525

#endif

 



 

2.8   s3c2440.h

include

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\include\s3c2440.h  
Right file: Z:\work\origin\u-boot-1.1.6\include\s3c2440.h  

25

* NAME        : s3c2440.h

<> 

25

* NAME        : s3c2410.h

26

* Version  : 03.06.2011

 

26

* Version  : 31.3.2003

 

31

#ifndef __S3C2440_H__

<> 

31

#ifndef __S3C2410_H__

32

#define __S3C2440_H__

 

32

#define __S3C2410_H__

 

 

2.9   s3c24x0_rtc.h

rtc

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\rtc\s3c24x0_rtc.c  
Right file: Z:\work\origin\u-boot-1.1.6\rtc\s3c24x0_rtc.c  

37

#elif defined(CONFIG_S3C2440)

+-

 

 

38

#include

 

 

 

 

2.10     serial.c

cpu/arm/arm920t/s3c24x0

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\s3c24x0\serial.c  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\s3c24x0\serial.c  

22

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) || defined(CONFIG_S3C2440)

<> 

22

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB)

 

28

#elif defined(CONFIG_S3C2440)

+-

 

 

29

#include

 

 

 

 

185

#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) || defined (CONFIG_S3C2440) */

<> 

183

#endif /* defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) */

 

 

2.11     speed.c

cpu/arm/arm920t/s3c24x0

修改get_PLLCLK函数

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\s3c24x0\speed.c  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\s3c24x0\speed.c  

33

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) || defined(CONFIG_S3C2440)

<> 

33

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB)

 

39

#elif defined(CONFIG_S3C2440)

+-

 

 

40

#include

 

 

 

 

72

#if defined(CONFIG_S3C2440)

+-

 

 

73

    if (pllreg == MPLL)

 

 

 

74

    return((CONFIG_SYS_CLK_FREQ * m * 2) / (p << s));

 

 

 

75

    else if (pllreg == UPLL)

 

 

 

76

#endif

 

 

 

77

 

 

 

 

 

87

/* for s3c2440 */

+-

 

 

88

#define S3C2440_CLKDIVN_PDIVN        (1<<0)

 

 

 

89

#define S3C2440_CLKDIVN_HDIVN_MASK   (3<<1)

 

 

 

90

#define S3C2440_CLKDIVN_HDIVN_1      (0<<1)

 

 

 

91

#define S3C2440_CLKDIVN_HDIVN_2      (1<<1)

 

 

 

92

#define S3C2440_CLKDIVN_HDIVN_4_8    (2<<1)

 

 

 

93

#define S3C2440_CLKDIVN_HDIVN_3_6    (3<<1)

 

 

 

94

#define S3C2440_CLKDIVN_UCLK         (1<<3)

 

 

 

95

 

 

 

 

96

#define S3C2440_CAMDIVN_CAMCLK_MASK  (0xf<<0)

 

 

 

97

#define S3C2440_CAMDIVN_CAMCLK_SEL   (1<<4)

 

 

 

98

#define S3C2440_CAMDIVN_HCLK3_HALF   (1<<8)

 

 

 

99

#define S3C2440_CAMDIVN_HCLK4_HALF   (1<<9)

 

 

 

100

#define S3C2440_CAMDIVN_DVSEN        (1<<12)

 

 

 

101

 

 

 

 

 

106

    unsigned long clkdiv;

+-

 

 

107

    unsigned long camdiv;

 

 

 

108

    int hdiv = 1;

 

 

 

109

   

 

 

 

110

#if defined(CONFIG_S3C2440)

 

 

 

111

    clkdiv = clk_power->CLKDIVN;

 

 

 

112

    camdiv = clk_power->CAMDIVN;

 

 

 

 

114

    /* work out clock scalings */

+-

 

 

115

    switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK)

 

 

 

116

    {

 

 

 

117

    case S3C2440_CLKDIVN_HDIVN_1:

 

 

 

118

        hdiv = 1;

 

 

 

119

        break;

 

 

 

120

 

 

 

 

121

    case S3C2440_CLKDIVN_HDIVN_2:

 

 

 

122

        hdiv = 2;

 

 

 

123

        break;

 

 

 

124

 

 

 

 

125

    case S3C2440_CLKDIVN_HDIVN_4_8:

 

 

 

126

        hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4;

 

 

 

127

        break;

 

 

 

128

 

 

 

 

129

    case S3C2440_CLKDIVN_HDIVN_3_6:

 

 

 

130

        hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3;

 

 

 

131

        break;

 

 

 

132

    }

 

 

 

133

 

 

 

 

134

    return get_FCLK() / hdiv;

 

 

 

135

#else

 

 

 

 

137

#endif

+-

 

 

 

2.12     usb_ohci.c

cpu/arm/arm920t/s3c24x0

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\s3c24x0\usb_ohci.c  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\s3c24x0\usb_ohci.c  

47

#elif defined(CONFIG_S3C2440)

+-

 

 

48

#include

 

 

 

 

2.13     interrupts.c

cpu/arm/arm920t/s3c24x0

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\s3c24x0\interrupts.c  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\s3c24x0\interrupts.c  

33

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB) || defined(CONFIG_S3C2440)

<> 

33

#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB)

 

40

#elif defined(CONFIG_S3C2440)

+-

 

 

41

#include

 

 

 

 

183

      defined(CONFIG_FL2440)   || \

+-

 

 

 

2.14     i2c.c

cpu/arm/arm920t/s3c24x0

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\cpu\arm920t\s3c24x0\i2c.c  
Right file: Z:\work\origin\u-boot-1.1.6\cpu\arm920t\s3c24x0\i2c.c  

37

#elif defined(CONFIG_S3C2440)

+-

 

 

38

#include

 

 

 

 

67

   

<> 

65

 

68

#ifdef CONFIG_S3C2440

 

 

 

69

    return (gpio->GPEDAT & 0x8000) >> 15;

 

 

 

70

#endif

 

 

 

 

90

#ifdef CONFIG_S3C2440

+-

 

 

91

    gpio->GPEDAT = (gpio->GPEDAT & ~0x4000) | (x&1) << 14;

 

 

 

92

#endif

 

 

 

 

150

#ifdef CONFIG_S3C2440

+-

 

 

151

        ulong old_gpecon = gpio->GPECON;

 

 

 

152

#endif

 

 

 

 

161

#ifdef CONFIG_S3C2440

+-

 

 

162

        /* set I2CSDA and I2CSCL (GPE15, GPE14) to GPIO */

 

 

 

163

        gpio->GPECON = (gpio->GPECON & ~0xF0000000) | 0x10000000;

 

 

 

164

#endif

 

 

 

 

189

#ifdef CONFIG_S3C2440

+-

 

 

190

        gpio->GPECON = old_gpecon;

 

 

 

191

#endif

 



 

2.15     dm9000x.c

drivers

Mode:  Differences  
Left file: Z:\work\u-boot-1.1.6\drivers\dm9000x.c  
Right file: Z:\work\origin\u-boot-1.1.6\drivers\dm9000x.c  

266

    DM9000_DBG("resetting DM9000A\n");

<> 

266

    DM9000_DBG("resetting\n");

 

中运行

修改后,重新编译成功。

使用JLink Commander通过JLink下载到DRAM0x33f80000地址后运行,串口有输出如下:

U-Boot 1.1.6 (Jun  2 2011 - 20:38:32)

 

 

DRAM:  64 MB

 

Flash: 512 kB

 

*** Warning - bad CRC, using default environment

 

 

In:    serial

 

Out:   serial

 

Err:   serial

 

FL2440 #

 

FL2440 # ?

 

?       - alias for 'help'

 

autoscr - run script from memory

 

base    - print or set address offset

 

bdinfo  - print Board Info structure

 

boot    - boot default, i.e., run 'bootcmd'

 

bootd   - boot default, i.e., run 'bootcmd'

 

bootelf - Boot from an ELF image in memory

 

bootm   - boot application image from memory

 

bootp    - boot image via network using BootP/TFTP protocol

 

bootvx  - Boot vxWorks from an ELF image

 

cmp     - memory compare

 

coninfo - print console devices and information

 

cp      - memory copy

 

crc32   - checksum calculation

 

date    - get/set/reset date & time

 

dcache  - enable or disable data cache

 

echo    - echo args to console

 

erase   - erase FLASH memory

 

flinfo  - print FLASH memory information

 

go      - start application at address 'addr'

 

help    - print online help

 

icache  - enable or disable instruction cache

 

iminfo  - print header information for application image

 

imls    - list all images found in flash

 

itest    - return true/false on integer compare

 

loadb   - load binary file over serial line (kermit mode)

 

loads   - load S-Record file over serial line

 

loady   - load binary file over serial line (ymodem mode)

 

loop    - infinite loop on address range

 

md      - memory display

 

mm      - memory modify (auto-incrementing)

 

mtest   - simple RAM test

 

mw      - memory write (fill)

 

nfs    - boot image via network using NFS protocol

 

nm      - memory modify (constant address)

 

printenv- print environment variables

 

protect - enable or disable FLASH write protection

 

rarpboot- boot image via network using RARP/TFTP protocol

 

reset   - Perform RESET of the CPU

 

run     - run commands in an environment variable

 

saveenv - save environment variables to persistent storage

 

setenv  - set environment variables

 

sleep   - delay execution for some time

 

tftpboot- boot image via network using TFTP protocol

 

version - print monitor version

 

FL2440 # version

 

 

U-Boot 1.1.6 (Jun  2 2011 - 20:38:32)

 

FL2440 #

FL2440 # date

 

Date: 2005-07-08 (unknown day)    Time: 13:12:04

 

FL2440 # printenv

 

bootdelay=3

 

baudrate=115200

 

ipaddr=10.0.0.110

 

serverip=10.0.0.1

 

netmask=255.255.255.0

 

stdin=serial

 

stdout=serial

 

stderr=serial

 

 

Environment size: 127/65532 bytes

 先跑通了再说。

阅读(395) | 评论(0) | 转发(0) |
0

上一篇:对vim-addon-manager的完善

下一篇:没有了

给主人留下些什么吧!~~