[#5330] For ad1980 on BF548-EZKIT, kernel fails to wake up
Submitted By: Vivi Li
Open Date
2009-07-09 00:05:51 Close Date
2009-07-14 00:03:44
Priority:
Medium High Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
Drivers Board:
EZKIT Lite
Processor:
BF548 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc4.1_09r1-rc9
App binary format:
N/A
Summary: For ad1980 on BF548-EZKIT, kernel fails to wake up
Details:
For ad1980 on BF548-EZKIT, kernel fails to wake up from mem or standby mode.
Bellow is the log of mem mode:
--
U-Boot 2008.10-svn1956 (ADI-2009R1-rc2) (Jul 2 2009 - 20:20:03)
CPU: ADSP bf548-0.0 (Detected Rev: 0.2) (parallel flash boot)
Board: ADI BF548 EZ-Kit board
Support: http://blackfin.uclinux.org/
Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz
RAM: 64 MB
Flash: 16 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: MAC: 00:E0:22:FE:BD:B8
Hit any key to stop autoboot: 0
smc911x: initializing
smc911x: detected LAN9218 controller
smc911x: phy initialized
smc911x: MAC 00:e0:22:fe:bd:b8
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'uImage'.
Load address: 0x1000000
Loading: T #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
############################
done
Bytes transferred = 5176980 (4efe94 hex)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1-svn69
Created: 2009-07-09 2:09:02 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 5176916 Bytes = 4.9 MB
Load Address: 00001000
Entry Point: 002378bc
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 002378bc
Linux version 2.6.28.10-ADI-2009R1-svn6941 (test@uclinux61-bf548-std) (gcc version 4.1.2 (ADI svn)) #28 Thu Jul 9 02:08:41 GMT 29
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00177220
rodata = 0x00177220-0x001f61e0
bss = 0x001f7000-0x0020ac08
data = 0x0020ac08-0x00222000
stack = 0x00220000-0x00222000
init = 0x00222000-0x00a3e000
available = 0x00a3e000-0x03dff000
DMA Zone = 0x03e00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 1
Recovering from Watchdog event
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF548 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Data Cache (L2 SRAM) Enabled (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 15747
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600 if
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 52428k/65536k RAM, (8304k init code, 1496k kernel code, 684k data, 2048k dma, 572k reserved)
Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)
Blackfin L2 SRAM: 128 KB (128 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
SCSI subsystem initialized
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
NET: Registered protocol family 1
msgmni has been set to 102
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-otp: initialized
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART
brd: module loaded
smsc911x: Driver version 2007-07-13.
eth0: SMSC911x MAC Address: 00:e0:22:fe:bd:b8
Driver 'sd' needs updating - please use bus_type methods
register bfin atapi driver
scsi0 : pata-bf54x
ata1: PATA max UDMA/66 irq 68
ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100
ata1.00: 78140160 sectors, multi 16: LBA
ata1.00: configured for UDMA/66
blk_queue_max_hw_segments: set to minimum 1
scsi 0:0:0:0: Direct-Access ATA FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
physmap platform flash device: 02000000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "bootloader(nor)"
0x00040000-0x00440000 : "linux kernel(nor)"
0x00440000-0x01000000 : "file system(nor)"
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00400000 : "linux kernel(nand)"
0x00400000-0x10000000 : "file system(nand)"
input: bf54x-keys as /devices/platform/bf54x-keys/input/input0
bf54x-keys: Blackfin BF54x Keypad registered IRQ 76
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc00700
i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc02200
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
bfin-sdh bfin-sdh.0: unable to request DMA channel
bfin-sdh: probe of bfin-sdh.0 failed with error -16
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-03-08 08:23:08 UTC (5732588)
eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175
eth0: link down
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf548-ezkit, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 8304k freed
dma_alloc_init: dma_page @ 0x00a3b000 - 512 pages at 0x03e00000
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
_____________________________________
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 - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.13.4 (2009-07-09 02:05:44 GMT) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> modprobe snd-soc-core; modprobe snd-ad1980
ASoC version 0.13.2
dma rx:0 tx:1, err irq:10, regs:ffc00800
AD1980 SoC Audio Codec
asoc: AC97 <-> bf5xx-ac97 mapping ok
root:/> tone &
TONE: generating sine wave at 1000 Hz...
258
root:/> rtcwake -s 15 -m mem
wakeup from "mem" at Sun Mar 8 08:31:27 1970
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
U-Boot 2008.10-svn1956 (ADI-2009R1-rc2) (Jul 2 2009 - 20:20:03)
CPU: ADSP bf548-0.0 (Detected Rev: 0.2) (parallel flash boot)
Board: ADI BF548 EZ-Kit board
Support: http://blackfin.uclinux.org/
Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz
RAM: 64 MB
Flash: 16 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: MAC: 00:E0:22:FE:BD:B8
Hit any key to stop autoboot: 0
--
Log of standby mode:
--
root:/> modprobe snd-soc-core; modprobe snd-ad1980
ASoC version 0.13.2
dma rx:0 tx:1, err irq:10, regs:ffc00800
AD1980 SoC Audio Codec
asoc: AC97 <-> bf5xx-ac97 mapping ok
root:/> tone &
TONE: generating sine wave at 1000 Hz...
258
root:/> rtcwake -s 15 -m standby
wakeup from "standby" at Thu Jan 1 21:20:50 1970
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
U-Boot 2008.10-svn1956 (ADI-2009R1-rc2) (Jul 2 2009 - 20:20:03)
CPU: ADSP bf548-0.0 (Detected Rev: 0.2) (parallel flash boot)
Board: ADI BF548 EZ-Kit board
Support: http://blackfin.uclinux.org/
Clock: VCO: 525 MHz, Core: 525 MHz, System: 131.250 MHz
RAM: 64 MB
Flash: 16 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: MAC: 00:E0:22:FE:BD:B8
Hit any key to stop autoboot: 0
--
Follow-ups
--- Michael Hennerich 2009-07-09 08:45:05
I did some post mortem analysis.
The system suspends and then panics during bf5xx_ac97_resume() in bf5xx-sport.c
err_handler().
Every driver is responsible to gracefully stop all activity and save the
current state in suspend().
The drivers resume function is responsible to restore the pervious state.
This is not happening here.
Assign to Cliff.
-Michael
--- Cliff Cai 2009-07-09 23:32:21
Hi Michael,
I added some printks in
bf5xx_ac97_suspend(),bf5xx_ac97_resume(),err_handler(),
the stange thing is that when run rtcwake the suspend and resume are not called
at all.and it doesn't enter err_handler() as well.
Cliff
--- Vivi Li 2009-07-10 01:24:18
If tone is not running in the background, and run rtcwake, the suspend and
resume functions in audio will be called. After that, the quality of tone is not
good, the sound shakes.
If tone is running in the back and run rtcwake, the suspend and resume
functions in audio are not called.
--- Cliff Cai 2009-07-10 02:09:33
The ac97 driver enable fake mmap by default,and this fake mmap seems doesn't
works well with oss-based applications(tone,vrec/vplay) sometimes.I've tried
running aplay after resume,it works just fine.
If the mmap is disabled,both oss/alsa applications can work correctly.
SSM2602 works fine,it implements the true mmap.
Cliff
--- Michael Hennerich 2009-07-10 03:20:07
Cliff,
My post mortem is when the kernel panics during resume. You will just see the
watchdog kick off and reboot. The snd drivers suspend and resume will always be
called.
Did you try suspend mem or standby?
And do you get kernel messages like this?
root:/> echo mem > sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
sd 0:0:0:0: [sda] Starting disk
ata1.00: configured for UDMA/66
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: detected capacity change from 0 to 40007761920
soc-audio soc-audio: scheduling resume work
soc-audio soc-audio: starting resume work
soc-audio soc-audio: resume work completed
Restarting tasks ... done.
This is when tone was NOT running in bg.
In this case tone won't make any noise after that.
-Michael
--- Cliff Cai 2009-07-10 05:33:31
Micheal,
Thanks,the suspend and resume are always called,it's the driver's problem.
Cliff
--- Cliff Cai 2009-07-10 06:25:45
fixed now,Don't start playback/capture in resume,pcm driver will do it.
btw,for ad1980/1,if runs oss-based application,MMAP should not be enabled,
for the slow copy job involved may cause underrun.
Cliff
--- Vivi Li 2009-07-14 00:03:44
This bug is fixed now. There is a new bug of waking up from mem. I'll close this
bug and open a new one.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.power application/octet-stream 36619 Vivi Li