为 uboot 添加 wince 唤醒功能
2013-03-20 09:19
281 查看
前一段时间,做了uboot启动wince,但是一直没有实现wince在uboot下的唤醒功能,在这里就不再讲述wince 休眠唤醒的原理了(网上有很多资料),给出解决方法:
修改uboot源码目录下的
cpu\arm920t\start.S 文件
http://blog.chinaunix.net/uid-8087110-id-1989043.html
修改uboot源码目录下的
cpu\arm920t\start.S 文件
/* * we do sys-critical inits only at reboot, * not when booting from */ #ifndef CONFIG_SKIP_LOWLEVEL_INIT bl cpu_init_crit #endif /* 从这个地方开始添加代码 */ /* Apollo +*/ /* Power Manage Check if this is a wake-up from sleep */ ldr r1, =0x560000B4 /* GSTATUS2 */ ldr r0, [r1] tst r0, #0x02 beq BringUpWinCE WakeupStart: ldr r1, =0x56000080 /* ; MISCCR's Bit 17, 18, 19 -> 0 */ ldr r0, [r1] /*; I don't know why, Just fallow Sample Code. */ bic r0, r0, #(7 << 17) /*; SCLK0:0->SCLK, SCLK1:0->SCLK, SCKE:L->H */ str r0, [r1] /* 1. Checksum Calculation saved Data */ ldr r5, =0x30028000 /* pointer to physical address of reserved Sleep mode info data structure */ mov r3, r5 /* pointer for checksum calculation*/ ldr r2, =0x0 ldr r0, =(25-1) /* get size of data structure to do checksum on*/ again: ldr r1, [r3], #4 /* pointer to SLEEPDATA*/ and r1, r1, #0x1 mov r1, r1, ROR #31 add r2, r2, r1 subs r0, r0, #1 /*; dec the count*/ bne again /*; loop till done */ ldr r0,=0x560000B8 /* GSTATUS3 */ ldr r3, [r0] /* get the Sleep data checksum from the Power Manager Scratch pad register*/ cmp r2, r3 /* compare to what we saved before going to sleep*/ bne BringUpWinCE /* bad news - do a cold boot*/ /* 2. MMU Enable */ ldr r10, [r5, #12] /*; load the MMU domain access info*/ ldr r9, [r5, #8] /*; load the MMU TTB info */ ldr r8, [r5, #4] /*; load the MMU control info */ ldr r7, [r5, #0 ] /*; load the LR address*/ nop nop nop nop nop /* if software reset*/ mov r1, #0 teq r1, r7 bne wakeup b BringUpWinCE /*; wakeup routine*/ wakeup: mcr p15, 0, r10, c3, c0, 0 /*; setup access to domain 0*/ mcr p15, 0, r9, c2, c0, 0 /*; PT address*/ mcr p15, 0, r0, c8, c7, 0 /*; flush I+D TLBs*/ mcr p15, 0, r8, c1, c0, 0 /*; restore MMU control*/ /*; 3. Jump to Kernel Image's fw.s (Awake_address)*/ mov pc, r7 /*; jump to new VA (back up Power management stack)*/ nop BringUpWinCE: /* Apollo -*/ /*添加代码结束*/ /***************** CHECK_CODE_POSITION ******************************************/ adr r0, _start /* r0 <- current position of code */ ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ cmp r0, r1 /* don't reloc during debug */ beq stack_setup /***************** CHECK_CODE_POSITION ******************************************/ |
相关文章推荐
- 给Hi3518e的Uboot添加UDP广播收发功能
- spring boot 添加aop功能
- SpringBoot添加Email发送功能及常见异常
- android2.3 -添加自定义按键:作唤醒功能 .
- U-Boot-2010.06添加烧写yaffs根文件系统功能
- S5PV210 Android2.3 添加自定义按键:作唤醒功能
- u-boot添加yaffs2烧写功能代码分析
- 第二十期 U-Boot添加web failsafe功能《路由器就是开发板》
- SpringBoot 为MapperScan添加动态扫描(占位符)功能
- SpringBoot添加Email发送功能及常见异常详解
- 四极管 整理wince挂起和唤醒(suspend/wakeup)以及实现关机功能文章
- android2.3 -添加自定义按键:作唤醒功能
- spring boot 添加aop功能
- u-boot-2009.11移植(适用于TQ2440和MINI2440)第六篇:添加Yaffs(2)镜像烧写功能
- mfc wince 快捷键功能添加
- mfc wince 快捷键功能添加
- spring-boot 添加JSP页面功能
- u-boot-2010.3 添加usb下载功能支持 ( for mini2440)
- springboot实现添加邮件发送及压缩功能
- S3C6410移植u-boot-2010.3(4)uboot的dnw功能添加