[#6622] Can not wake from mem by rtcwake on bf537-stamp
Submitted By: Vivi Li
Open Date
2011-06-02 01:15:56
Priority:
Low Assignee:
steven miao
Status:
Open Fixed In Release:
N/A
Found In Release:
2011R1 Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Under Debugging
Uboot version or rev.:
Toolchain version or rev.:
gcc4.3-2010_Dec_09
App binary format:
N/A
Summary: Can not wake from mem by rtcwake on bf537-stamp
Details:
Can not wake from mem by rtcwake on bf537-stamp. Other boards are OK.
It failed some time between kernel version 9869 and 9876.
Bellow is the log:
--
Linux version 2.6.39-rc6-ADI-2011R1-pre-svn9876 (test@linux58-mmc-usblan-btuart) (gcc version 4.3.5 (ADI-trunk/svn-5013) ) #138 Sat May 7 10:59:01 CST 2011
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00123830
rodata = 0x00123830-0x00184318
bss = 0x00185000-0x00195a44
data = 0x00195a44-0x001a8000
stack = 0x001a6000-0x001a8000
init = 0x001a8000-0x0082b000
available = 0x0082b000-0x03800000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace active and enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2010 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf537-stamp:eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 48372k/65536k RAM, (6668k init code, 1162k kernel code, 530k data, 1024k dma, 7780k reserved)
NR_IRQS:146
Configuring Blackfin Priority Driven Interrupts
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (35 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
bio: create slab <bio-0> at 0
Switching to clocksource bfin_cs_cycles
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
debug-mmrs: setting up Blackfin MMR debugfs
msgmni has been set to 94
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0: eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-16 04:55:40 UTC (1313740)^M^RIP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf537-stamp, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
dma_alloc_init: dma_page @ 0x0289c000 - 256 pages at 0x03f00000
Freeing unused kernel memory: 6668k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.18.4 (2011-05-07 10:55:01 CST) hush - the humble shell
root:/> PHY: 0:01 - Link is Up - 100/Full
root:/> version
kernel: Linux release 2.6.39-rc6-ADI-2011R1-pre-svn9876, build #138 Sat May 7 10:59:01 CST 2011
toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)
user-dist: release svn-10163, build #1946 Sat May 7 10:57:38 CST 2011
root:/>
root:/> rtcwake -s 10 -m mem
wakeup from "mem" at Fri Jan 16 04:56:18 1970
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
--
Follow-ups
--- Mike Frysinger 2011-06-02 10:44:50
quoting svn revs isnt useful anymore now that the kernel is in git. please
start using git hashids and using the git tree instead of the svn tree.
--- Vivi Li 2011-06-10 02:18:09
OK.
It failed between git version 32adcf2faa18928b8027086bf93d330119c122b2 and
cbbcbee02d8994c0828c6394a52c92864811d023.
--- Mike Frysinger 2011-06-10 13:14:44
of the changes committed in that time frame, we have:
- anomaly header updates
- net2272 changes
- [#6188] anomaly 05000480 workaround specific to the bf537
i'd obviously suspect the last one. but there has been a follow up fix since,
so does the latest kernel fail ? if so, does removing the
bfin_write_DMAC_TC_PER() from arch/blackfin/kernel/bfin_dma_5xx.c make things
work again ?
--- Vivi Li 2011-06-13 02:31:53
It still fail in latest trunk. After I remove bfin_write_DMAC_TC_PER(), it can
work again.
--- steven miao 2011-06-13 03:01:12
you're right. anomaly 05000480 workaround make it hang when saving l1 mem into
mem with dma_memcpy_noncache().
--- steven miao 2011-06-13 05:32:46
it hangs when copy the whole L1_DATA_A_LENGTH(16K) area, if the size is less
than
L1_DATA_A_LENGTH, for example 12K, it will pass.
size = (L1_DATA_A_LENGTH/4) * 3;
dma_memcpy_nocache(memptr + L1_CODE_LENGTH,
(const void *) L1_DATA_A_START, size);
--- steven miao 2011-06-13 05:48:06
fix anomaly 05000480 in dma suspend and resume
--- Vivi Li 2011-06-14 02:41:53
OK now and close it.
--- Mike Frysinger 2011-06-17 01:30:57
the DMAC_TC_PER settings should not affect the ability to DMA into/out of L1.
as such, the change committed doesnt sound like a proper fix.
we need to understand why the DMA doesnt work under these DMAC_TC_PER settings.
--- steven miao 2011-06-17 02:47:58
yes, should not affect mdma to L1, and dma_memcopy through syscall can pass.
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
#define L1_CODE_START 0xFFA00000
#define L1_DATA_A_START 0xFF800000
#define L1_DATA_B_START 0xFF900000
#define L1_CODE_LENGTH 0xC000
#define L1_DATA_A_LENGTH (0x8000 - 0x4000)
#define L1_DATA_B_LENGTH 0x8000
int main(int argc, char *argv[])
{
char *buf = malloc(L1_CODE_LENGTH + L1_DATA_A_LENGTH +
L1_DATA_B_LENGTH);
if (!buf)
printf("FAIL: malloc() failed\n");
dma_memcpy(buf, L1_CODE_START, L1_CODE_LENGTH);
dma_memcpy(buf + L1_CODE_LENGTH, L1_DATA_A_START, L1_DATA_A_LENGTH);
return 0;
}
--- Vivi Li 2011-09-05 04:45:35
Close it.
--- Mike Frysinger 2011-09-17 22:58:24
the root cause still has not been located. the code in the tree is a workaround
only until the correct solution is figured out.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.power application/octet-stream 34769 Vivi Li