I had a look to Oops [1] 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 know resets the I2C flags in HW after first (unsuccesful) scan for ID which returns with an error in the error path. Then second scan for correct ID seems to work okay then.

With this patch kernel boots without an Oops with OSS sound driver enabled. Haven't test sound itself, though. In boot messages I get a

...
aic33 write failed for reg = 8
...

now. Don't know if this is related.

Comments? Can anyone test sound with this? Any I2C expert can comment on this?

Cheers

Dirk

[1]:

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
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to