ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] LPC3250 low power mode?


From: Li Yuan-Lung
Subject: Re: [Ltib] LPC3250 low power mode?
Date: Mon, 14 Feb 2011 14:39:16 +0800

Dear Kevin,
Now this issue raised again, we want to use the OpenSSL service. This application can not work without VFP enabling.
But if we enabled the VFP, the suspend function can not work!

Do you have any idea with such problem? (VFP enabling for suspend work.)

Henry


2010/12/30 Kevin Wells <address@hidden>

Hi Henry,

 

> vfp_pm_resume

I’ve seen this issue before. There appears to be an issue in the ARM VFP suspend code.

 

Are you using any applications that use VFP? If not, disable the VFP context switcher support in the kernel (in the floating point format kernel menu).

I believe this has been fixed in a later kernel version, but won’t be able to check it in the next week..

 

Kevin

 

From: henry.li@wonselor.com [mailto:address@hidden] On Behalf Of Li Yuan-Lung
Sent: Tuesday, December 28, 2010 11:46 PM


To: Kevin Wells
Cc: address@hidden
Subject: Re: [Ltib] LPC3250 low power mode?

 

Dear Kevin,
We tried the alarm test for suspend as you mentioned in web page. The alarm program works well but still stock with suspend running.
Then we use the no_console_suspend as teh code suggested, here is the result after suspend command:

=========================Result area====================
# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
PM: suspend of devices complete after 3.285 msecs
PM: suspend devices took 0.010 seconds
PM: late suspend of devices complete after 1.075 msecs
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT
last sysfs file: /sys/power/state
Modules linked in:
CPU: 0    Not tainted  (2.6.34 #54)
PC is at vfp_pm_resume+0xc/0x2c
LR is at __sysdev_resume+0x24/0xe4
pc : [<c0036684>]    lr : [<c01bc970>]    psr: a0000093
sp : c3e11e58  ip : c3e11e68  fp : c3e11e64
r10: 00000004  r9 : c3dd45b8  r8 : c0314100
r7 : c03e88bc  r6 : 00000003  r5 : c03e8870  r4 : c03e88bc
r3 : c0036678  r2 : 00000000  r1 : 00009cdc  r0 : c03e88bc
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: 83e98000  DAC: 00000015
Process echo (pid: 446, stack limit = 0xc3e10270)
Stack: (0xc3e11e58 to 0xc3e12000)
1e40:                                                       c3e11e84 c3e11e68
1e60: c01bc970 c0036688 c03e88bc c03e8870 00000003 003fffff c3e11e9c c3e11e88
1e80: c01bd31c c01bc95c 00000000 c042ef44 c3e11ebc c3e11ea0 c0070d38 c01bd2b0
1ea0: 00000000 c038ef60 00000003 00000003 c3e11edc c3e11ec0 c0070ecc c0070c04
1ec0: 00000000 c038ef60 00000003 c3e2a000 c3e11f04 c3e11ee0 c0070488 c0070e1c
1ee0: c3c0fcc8 c3dd45a0 00000004 c3c28ca0 c032912c c3e11f78 c3e11f14 c3e11f08
1f00: c01869b0 c00703ec c3e11f44 c3e11f18 c00f0d34 c01869a0 c3e171e0 c3e27ee0
1f20: 40000000 c3e11f78 00000000 00000004 c3e10000 00000000 c3e11f74 c3e11f48
1f40: c00a3924 c00f0c24 00000000 40000000 00000000 c3e27ee0 fffffff7 00000000
1f60: 00000000 c0024068 c3e11fa4 c3e11f78 c00a3f34 c00a387c 00000000 00000000
1f80: ffffffff 00000000 00000004 40000000 0012fbd8 00000004 00000000 c3e11fa8
1fa0: c0023ec0 c00a3f00 00000004 40000000 00000001 40000000 00000004 00000000
1fc0: 00000004 40000000 0012fbd8 00000004 00000004 00000020 00000001 00000002
1fe0: 00000004 bef2e938 000241fc 00008f1c 60000010 00000001 00000000 00000000
Backtrace:
[<c0036678>] (vfp_pm_resume+0x0/0x2c) from [<c01bc970>] (__sysdev_resume+0x24/0xe4)
[<c01bc94c>] (__sysdev_resume+0x0/0xe4) from [<c01bd31c>] (sysdev_resume+0x7c/0xec)
 r7:003fffff r6:00000003 r5:c03e8870 r4:c03e88bc
[<c01bd2a0>] (sysdev_resume+0x0/0xec) from [<c0070d38>] (suspend_devices_and_enter+0x144/0x218)
 r5:c042ef44 r4:00000000
[<c0070bf4>] (suspend_devices_and_enter+0x0/0x218) from [<c0070ecc>] (enter_state+0xc0/0x130)
 r7:00000003 r6:00000003 r5:c038ef60 r4:00000000
[<c0070e0c>] (enter_state+0x0/0x130) from [<c0070488>] (state_store+0xac/0xc0)
 r6:c3e2a000 r5:00000003 r4:c038ef60
[<c00703dc>] (state_store+0x0/0xc0) from [<c01869b0>] (kobj_attr_store+0x20/0x2c)
[<c0186990>] (kobj_attr_store+0x0/0x2c) from [<c00f0d34>] (sysfs_write_file+0x120/0x178)
[<c00f0c14>] (sysfs_write_file+0x0/0x178) from [<c00a3924>] (vfs_write+0xb8/0x164)
[<c00a386c>] (vfs_write+0x0/0x164) from [<c00a3f34>] (sys_write+0x44/0x70)
 r8:c0024068 r7:00000000 r6:00000000 r5:fffffff7 r4:c3e27ee0
[<c00a3ef0>] (sys_write+0x0/0x70) from [<c0023ec0>] (ret_fast_syscall+0x0/0x2c)
 r7:00000004 r6:0012fbd8 r5:40000000 r4:00000004
Code: c040beb0 e1a0c00d e92dd800 e24cb004 (ee113f50)
---[ end trace 59ae93e8f6834865 ]---

=========================Result end=====================

Seems the program counter may go the wrong place and got the bad data as undefined instruction in "vfp_pm_resume". Please help us to dig more. Thank you very much!

In the earlier mail, we said that we comment the "sysdev_suspend"; in fact, we comment the "sysdev_suspend" and "sysdev_resume" as a pair, then the resume works well.
The related code is just like below in kernel/power/suspend.c:
===
...
arch_suspend_disable_irqs();
//sysdev_suspend(PMSG_SUSPEND);
suspend_ops->enter(state);
//sysdev_resume();
arch_suspend_enable_irqs();
enable_nonboot_cpus();
...
===


Henry

2010/12/29 Li Yuan-Lung <henry.li@climax.com.tw>

Dear Kevin,
Sorry, forgot to tell you one more thing. We use the kernel version 2.6.34.

Henry

2010/12/29 Li Yuan-Lung <henry.li@climax.com.tw>

 

Dear Kevin,
We are using our custom board base on "Phytec 3250 development board", so in kernel config we still using the "Phytec 3250 development board" for LPC32XX SoC based board implementations.
Due to the hardware issue, we did not use the DDR menory.

After deeper tracing, we found we are stocking at "
sysdev_suspend(PMSG_SUSPEND)" function under kernel/power/suspend.c.

If we comment the fucntion and test, the suspending works!

But we think it is not a good way to comment the function to prevent this problem. Now we just trying to trace into the "
sysdev_suspend()" function. Do you have any direction for us?
Thank you very much!

Henry


2010/12/29 Kevin Wells <address@hidden>

 

Hi Henry,

 

Which board and kernel version are you using? If you are using a custom board, are you using DDR memory?

 

thanks,

Kevin

 

 

From: henry.li@wonselor.com [mailto:address@hidden] On Behalf Of Li Yuan-Lung
Sent: Tuesday, December 28, 2010 1:30 AM


To: Kevin Wells
Cc: address@hidden

Subject: Re: [Ltib] LPC3250 low power mode?

 

Dear Kevin,
Thank you for replying. We have tried the suspend function as the link said, but we got stock after the system suspending. The kernel did not come back after showing the suspending message.
Is there any other settings or tunning we should take care?

Say, after trace the suspend source code, we found the 'lpc32xx_sys_suspend()' will be moved to IRAM(0x8000000) and execute for suspending. The only related issue is: we have enabled the "CONFIG_ARCH_LPC32XX_IRAM_FOR_NET=y" in kernel config. Should we have to disable the option for the suspend function running?

Henry

2010/12/28 Kevin Wells <address@hidden>

Hi Henry,

 

The CPU and system clocks speeds are changed with the boot loader (S1L or kick start).

You may need to build a new version of the boot loader with your desired setup.

 

The Linux kernel has built-in power management and you should be able to enter the

suspend-to-mem state on the LPC32x0 and then wakeup on a specific event (ie, gpio,

SD card insertion, RTC alarm, etc.)

 

A basic write-up using the RTC alarm is here:

http://www.lpclinux.com/Forums/ForumLPC32xx0005

 

I know this works for the Phytec board, but it hasn’t been tested on the EA and FDI

boards with DDR memory, although the code should be complete.

 

Kevin

 

From: henry.li@wonselor.com [mailto:address@hidden] On Behalf Of Li Yuan-Lung
Sent: Friday, December 24, 2010 2:24 AM
To: Kevin Wells
Cc: address@hidden
Subject: [Ltib] LPC3250 low power mode?

 

Dear NXP members,
Now we have a new question, does the ltib have the ability to control the LPC3250 board to slow down the CPU frequency or any function to make the power saving(or power management?) with portable device requirement?

Merry Christmas!

Henry




--
Best Regards,

Henry Li
SW Engineer of Climax Co.
TEL: +886-2-2794-0001 ext.231
FAX: +886-2-2792-6618




--
Best Regards,

Henry Li
SW Engineer of Climax Co.
TEL: +886-2-2794-0001 ext.231
FAX: +886-2-2792-6618




--
Best Regards,

Henry Li
SW Engineer of Climax Co.
TEL: +886-2-2794-0001 ext.231
FAX: +886-2-2792-6618




--
Best Regards,

Henry Li
SW Engineer of Climax Co.
TEL: +886-2-2794-0001 ext.231
FAX: +886-2-2792-6618




--
Best Regards,

Henry Li
SW Engineer of Climax Co.
TEL: +886-2-2794-0001 ext.231
FAX: +886-2-2792-6618

reply via email to

[Prev in Thread] Current Thread [Next in Thread]