已搬家不再更新

暂用这个博客penn.blog.chinaunix.net

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

	/*
	 * 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表示页码

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/blueice8601/article/details/7377030
文章标签: c
个人分类: Uboot Porting
上一篇ARM微处理器的指令集概述(四)——MOV和LDR的区别
下一篇uboot-2011.12移植到S3C2440(四序)——SDRAM分析
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭