I had a look to Oops [2] you get with recent git if OSS aic33 sound
driver is enabled.
System oopses because in tlv320aic33_write_value() the variable
"new_client" isn't initialized. This is because aic23_detect_client()
is never called. This is because system scans for AIC33 with the both
I2C address TLV320AIC23ID1 and TLV320AIC23ID2. The second one is the
correct one for DaVinci. Doing the one byte smbus hack scan with first
(non-existing) ID, I2C HW seems to lock up. With this, scan for second
(correct) ID fails, no AIC33 is found, aic23_detect_client() is never
called and never mallocs memory for new_client.
The first workaround was to only scan for the correct, second
TLV320AIC23ID2 ID. But the patch now resets I2C HW after
first (unsuccesful) scan for ID which returns with an error in the
error path. Second scan for correct ID seems to work okay then.
This patch series completely replaces the first series [1]. Changes:
Looking at some older versions of this driver and at the comments for
i2c_davinci_init() "This function also gets called if I2C encounters
any errors.", seems that a complete re-initialization of I2C HW in
error case is good idea. This seems to got lost while driver
evolution. Additionally introduce some delay. Stolen from some old
driver, too.
Note: After applying the patch, a complete kernel rebuild seems to be
a good idea. Had some trouble not doing this... (?)
Cheers
Dirk
[1]:
http://linux.omap.com/pipermail/davinci-linux-open-source/2008-March/005800.html
[2]:
Unable to handle kernel NULL pointer dereference at virtual address
00000002
pgd = c0004000
[00000002] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT
Modules linked in:
CPU: 0 Not tainted (2.6.25-rc6-davinci1-04495-g022ab22-dirty #29)
PC is at i2c_smbus_write_byte_data+0x10/0x50
LR is at tlv320aic33_write_value+0x38/0x44
pc : [<c01976c0>] lr : [<c019a3f8>] psr: 60000013
sp : cfc1df28 ip : cfc1df68 fp : cfc1df64
r10: 00000000 r9 : 00000000 r8 : cfc1c000
r7 : 00000000 r6 : c002147c r5 : 00000000 r4 : c0022404
r3 : c031687c r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 80004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xcfc1c260)
Stack: (0xcfc1df28 to 0xcfc1e000)
df20: c0318fac 00000000 00000000 cfc1c000 00000000
cfc1df58
df40: cfc1df4c c0183b78 c0182190 cfc1df74 cfc1df5c c01bee04 cfc1df74
cfc1df68
df60: c019a3f8 c01976c0 cfc1df8c cfc1df78 c001c064 c019a3d0 c0022404
00000000
df80: cfc1dff4 cfc1df90 c00087a8 c001c050 00000000 c003de5c c003d530
00000000
dfa0: 00000000 cfc1dfb0 c0028a64 c003de4c 00000000 00000000 c00086ec
c0046044
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
dfe0: 00000000 00000000 00000000 cfc1dff8 c0046044 c00086fc f673faff
fbf7f7f7
Backtrace:
[<c01976b0>] (i2c_smbus_write_byte_data+0x0/0x50) from [<c019a3f8>]
(tlv320aic33_write_value+0x38/0x44)
[<c019a3c0>] (tlv320aic33_write_value+0x0/0x44) from [<c001c064>]
(audio_aic33_init+0x24/0xc0)
[<c001c040>] (audio_aic33_init+0x0/0xc0) from [<c00087a8>]
(kernel_init+0xbc/0x28c)
r5:00000000 r4:c0022404
[<c00086ec>] (kernel_init+0x0/0x28c) from [<c0046044>] (do_exit+0x0/0x61c)
Code: e1a0c00d e92dd800 e24cb004 e24dd030 (e1d030b2)
---[ end trace 3d213e39cf6ac35a ]---
Kernel panic - not syncing: Attempted to kill init!
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source