关闭

uboot-2011.12移植到S3C2440(三)——硬件初始化:看门狗、中断、时钟

1259人阅读 评论(0) 收藏 举报
	/*
	 * turn off dog, see C18P3
	 */
	ldr	r0, =pWTCON
	mov	r1, #0x0
	str	r1, [r0]

	/*
	 * C14
	 * mask all IRQs by setting all bits in the INTMR - default
	 */
	mov	r1, #0xffffffff
	ldr	r0, =INTMSK
	str	r1, [r0]
	ldr	r1, =0x7fff
	ldr	r0, =INTSUBMSK
	str	r1, [r0]

	/*
	 * FCLK:HCLK:PCLK = 1:4:8
	 * because we will set fclk, hclk, pclk, at different speed,
	 * the CLKDIVEN should be changed, and the C15 should be set
	 * please see Chapter 7 Page 9
	 */
	ldr	r0, =CLKDIVN
	mov	r1, #5
	str	r1, [r0]
	/*
	 * orr	r0, r0, #R1_nF:OR:R1_iA
	 * This strange thing comes from the C15 co-processor
	 */
	mrc	p15, 0, r0, c1, c0, 0
	orr	r0, r0, #0xc0000000
	mcr	p15, 0, r0, c1, c0, 0
	/*
	 * set mpll to 405Mhz, see C7P21
	 */
	ldr	r0, =MPLLCON
	mov	r1, #0x21
	and	r1, r1, #MPLL405
	str	r1, [r0]
C表示S3C2440A.PDF的章节,P表示页码

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:221028次
    • 积分:3230
    • 等级:
    • 排名:第10939名
    • 原创:86篇
    • 转载:72篇
    • 译文:8篇
    • 评论:16条