当前位置: 技术问答>linux和unix
求助 Marvell PXA3xx ACLink 驱动
来源: 互联网 发布时间:2016-08-29
本文导语: 大家好, 我来自台湾, 如果有些用词不一样请多见谅. 目前的案子使用 PXA310 SoC, 将公板上的 WM9713 换成 WM9715, SDATA_IN 也换成 GPIO26 这只接脚, 之前用 WinCE 6.0 时一切正常, 最近开始用同一块板子 porting Linux, ...
大家好, 我来自台湾, 如果有些用词不一样请多见谅.
目前的案子使用 PXA310 SoC, 将公板上的 WM9713 换成 WM9715, SDATA_IN 也换成 GPIO26 这只接脚, 之前用 WinCE 6.0 时一切正常, 最近开始用同一块板子 porting Linux, 但是读取 Codec register 会失败, 但是写入 Codec register 则一切正常.
我 trace 了好久, 发现这两个 OS 在 cold reset 之后 ACLink 的 GSR 不太一样, WinCE GSR:0x003C0164, Linux GSR:0x017cf1e7.
以下为本人初步推论:
1. 硬体线路应该没问题, 因为 WinCE 6.0 可以正常读写.
2. Linux 的部份我查了好久还是查不出原因, 所有的 Pin Define 都跟 WinCE 6.0 一模一样, codec reset 设置方式也几乎相同.
请问有没有高手(牛人)能指点一下, 附上错误讯息:
Starting kernel at 0x80800000...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.21 (root@localhost.localdomain) (gcc version 4.1.1) #186 PREEMPT Wed May 19 14:34:25 CST 2010
CPU: XScale-V3 based processor [69056892] revision 2 (ARMv5TE), cr=0000397f
Machine: Intel PXA3xx Development Platform (aka Zylonite)
Memory policy: ECC disabled, Data cache writeback
Run Mode Clock: 312MHz
Turbo Mode Clock: 624MHz
High Speed I/O Bus Clock: 208MHz
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,38400 mem=64M
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61440KB available (3056K code, 262K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: failed, enabling work-around
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Bluetooth: Core ver 2.11
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Time: pxa_timer clocksource has been installed.
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
Intel(c) Memory Management - Heterogeneous Memory Allocation
Intel(c) Memory Management - Page Attribute Manipulation
Intel(c) Memory Management is now Enabled
Register device ipmc successgul.
Initialize IPM performance perfiler.
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
i2c /dev entries driver
I2C: i2c-0: PXA I2C adapter
I2C: i2c-1: PXA I2C adapter
lp3972 unavailable!
lp3972(chip id:0xff) detected.
pxa2xx-fb pxa2xx-fb: machine LCCR3 setting contains illegal bits: 00300000
Console: switching to colour frame buffer device 60x40
Load PXA Overlay driver successfully!
2D Graphics Driver for Monahans Linux
Register MVED driver: major=245, minor=0
pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
Linux video capture interface: v2.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Try to allocate dma buffer(len:2144)for data buffer + 2*descriptor + command buffer
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00060000 : "Bootloader"
0x00060000-0x00260000 : "Kernel"
0x00260000-0x03260000 : "Filesystem"
0x03260000-0x0efa0000 : "MassStorage"
0x0efa0000-0x0f020000 : "BBT"
usbmon: debugfs is not available
pxa3xx-ohci pxa3xx-ohci: PXA3xx OHCI
pxa3xx-ohci pxa3xx-ohci: new USB bus registered, assigned bus number 1
pxa3xx-ohci pxa3xx-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver cdc_subset
mice: PS/2 mouse device common for all mice
touch_codec_zy_init()
touch_codec_zy_probe()
AC97 read from 0x0 error!!
(AC97 GCR:0x00000002, GSR:0x017cf1e7)
AC97 read from 0x0 error!!
[] (show_stack+0x0/0x40) from [] (codec_cold_reset+0x10c/0x15c)
[] (codec_cold_reset+0x0/0x15c) from [] (register_codec+0x60/0x1d0)
r5 = C032BE58 r4 = 00000000
[] (register_codec+0x0/0x1d0) from [] (touch_codec_zy_probe+0x2c/0x248)
r6 = C033DEAC r5 = C032BE58 r4 = C035E398
[] (touch_codec_zy_probe+0x0/0x248) from [] (platform_drv_probe+0x20/0x24)
r5 = C033DEAC r4 = C032BE60
[] (platform_drv_probe+0x0/0x24) from [] (really_probe+0xd0/0x190)
[] (really_probe+0x0/0x190) from [] (driver_probe_device+0xb8/0xc8)
r8 = 00000000 r7 = C033DEAC r6 = C032BE60 r5 = C033DEAC
r4 = C3F8EC20
[] (driver_probe_device+0x0/0xc8) from [] (__driver_attach+0x84/0xe4)
r6 = C015E104 r5 = C032BE60 r4 = C032BF38
[] (__driver_attach+0x0/0xe4) from [] (bus_for_each_dev+0x48/0x80)
r5 = C040DF14 r4 = 00000000
[] (bus_for_each_dev+0x0/0x80) from [] (driver_attach+0x20/0x28)
r7 = 00000000 r6 = C0336E10 r5 = C033DEC0 r4 = C033DEAC
[] (driver_attach+0x0/0x28) from [] (bus_add_driver+0x64/0x184)
[] (bus_add_driver+0x0/0x184) from [] (driver_register+0x94/0x9c)
r8 = 00000000 r7 = 00000001 r6 = C040C000 r5 = C00202C4
r4 = C033DEAC
[] (driver_register+0x0/0x9c) from [] (platform_driver_register+0x6c/0x88)
r4 = C0020844
[] (platform_driver_register+0x0/0x88) from [] (touch_codec_zy_init+0x20/0x30)
[] (touch_codec_zy_init+0x0/0x30) from [] (init+0x98/0x1bc)
[] (init+0x0/0x1bc) from [] (do_exit+0x0/0x90c)
r7 = 00000000 r6 = 00000000 r5 = 00000000 r4 = 00000000
Kernel panic - not syncing: Codec cold reset error!!
目前的案子使用 PXA310 SoC, 将公板上的 WM9713 换成 WM9715, SDATA_IN 也换成 GPIO26 这只接脚, 之前用 WinCE 6.0 时一切正常, 最近开始用同一块板子 porting Linux, 但是读取 Codec register 会失败, 但是写入 Codec register 则一切正常.
我 trace 了好久, 发现这两个 OS 在 cold reset 之后 ACLink 的 GSR 不太一样, WinCE GSR:0x003C0164, Linux GSR:0x017cf1e7.
以下为本人初步推论:
1. 硬体线路应该没问题, 因为 WinCE 6.0 可以正常读写.
2. Linux 的部份我查了好久还是查不出原因, 所有的 Pin Define 都跟 WinCE 6.0 一模一样, codec reset 设置方式也几乎相同.
请问有没有高手(牛人)能指点一下, 附上错误讯息:
Starting kernel at 0x80800000...
Uncompressing Linux........................................................................................................... done, booting the kernel.
Linux version 2.6.21 (root@localhost.localdomain) (gcc version 4.1.1) #186 PREEMPT Wed May 19 14:34:25 CST 2010
CPU: XScale-V3 based processor [69056892] revision 2 (ARMv5TE), cr=0000397f
Machine: Intel PXA3xx Development Platform (aka Zylonite)
Memory policy: ECC disabled, Data cache writeback
Run Mode Clock: 312MHz
Turbo Mode Clock: 624MHz
High Speed I/O Bus Clock: 208MHz
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,38400 mem=64M
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61440KB available (3056K code, 262K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: failed, enabling work-around
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Bluetooth: Core ver 2.11
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Time: pxa_timer clocksource has been installed.
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
Intel(c) Memory Management - Heterogeneous Memory Allocation
Intel(c) Memory Management - Page Attribute Manipulation
Intel(c) Memory Management is now Enabled
Register device ipmc successgul.
Initialize IPM performance perfiler.
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
i2c /dev entries driver
I2C: i2c-0: PXA I2C adapter
I2C: i2c-1: PXA I2C adapter
lp3972 unavailable!
lp3972(chip id:0xff) detected.
pxa2xx-fb pxa2xx-fb: machine LCCR3 setting contains illegal bits: 00300000
Console: switching to colour frame buffer device 60x40
Load PXA Overlay driver successfully!
2D Graphics Driver for Monahans Linux
Register MVED driver: major=245, minor=0
pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
Linux video capture interface: v2.00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Try to allocate dma buffer(len:2144)for data buffer + 2*descriptor + command buffer
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00060000 : "Bootloader"
0x00060000-0x00260000 : "Kernel"
0x00260000-0x03260000 : "Filesystem"
0x03260000-0x0efa0000 : "MassStorage"
0x0efa0000-0x0f020000 : "BBT"
usbmon: debugfs is not available
pxa3xx-ohci pxa3xx-ohci: PXA3xx OHCI
pxa3xx-ohci pxa3xx-ohci: new USB bus registered, assigned bus number 1
pxa3xx-ohci pxa3xx-ohci: irq 3, io mem 0x4c000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver cdc_subset
mice: PS/2 mouse device common for all mice
touch_codec_zy_init()
touch_codec_zy_probe()
AC97 read from 0x0 error!!
(AC97 GCR:0x00000002, GSR:0x017cf1e7)
AC97 read from 0x0 error!!
[] (show_stack+0x0/0x40) from [] (codec_cold_reset+0x10c/0x15c)
[] (codec_cold_reset+0x0/0x15c) from [] (register_codec+0x60/0x1d0)
r5 = C032BE58 r4 = 00000000
[] (register_codec+0x0/0x1d0) from [] (touch_codec_zy_probe+0x2c/0x248)
r6 = C033DEAC r5 = C032BE58 r4 = C035E398
[] (touch_codec_zy_probe+0x0/0x248) from [] (platform_drv_probe+0x20/0x24)
r5 = C033DEAC r4 = C032BE60
[] (platform_drv_probe+0x0/0x24) from [] (really_probe+0xd0/0x190)
[] (really_probe+0x0/0x190) from [] (driver_probe_device+0xb8/0xc8)
r8 = 00000000 r7 = C033DEAC r6 = C032BE60 r5 = C033DEAC
r4 = C3F8EC20
[] (driver_probe_device+0x0/0xc8) from [] (__driver_attach+0x84/0xe4)
r6 = C015E104 r5 = C032BE60 r4 = C032BF38
[] (__driver_attach+0x0/0xe4) from [] (bus_for_each_dev+0x48/0x80)
r5 = C040DF14 r4 = 00000000
[] (bus_for_each_dev+0x0/0x80) from [] (driver_attach+0x20/0x28)
r7 = 00000000 r6 = C0336E10 r5 = C033DEC0 r4 = C033DEAC
[] (driver_attach+0x0/0x28) from [] (bus_add_driver+0x64/0x184)
[] (bus_add_driver+0x0/0x184) from [] (driver_register+0x94/0x9c)
r8 = 00000000 r7 = 00000001 r6 = C040C000 r5 = C00202C4
r4 = C033DEAC
[] (driver_register+0x0/0x9c) from [] (platform_driver_register+0x6c/0x88)
r4 = C0020844
[] (platform_driver_register+0x0/0x88) from [] (touch_codec_zy_init+0x20/0x30)
[] (touch_codec_zy_init+0x0/0x30) from [] (init+0x98/0x1bc)
[] (init+0x0/0x1bc) from [] (do_exit+0x0/0x90c)
r7 = 00000000 r6 = 00000000 r5 = 00000000 r4 = 00000000
Kernel panic - not syncing: Codec cold reset error!!
|
1:不知道在读取codec register之前有没有清除GSR的bit 15.
2:不知道在bootloader中有没有条件可以测试WM9715。bootloader中的环境干净直观一些。
3:另外,你怎么确定写入正常(在不能回读确认的情况下)?
2:不知道在bootloader中有没有条件可以测试WM9715。bootloader中的环境干净直观一些。
3:另外,你怎么确定写入正常(在不能回读确认的情况下)?