Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: snapper does not work on PowerBook5,6



Michael wrote:

> Do you see interrupts when reading or writing to /dev/audio?

Not at all. I have enabled SNAPPER_DEBUG and this is what happens when
reading:

trigger_input 0xd0057000 0xd0067000 0x1000
precision: 16
I2SSetDataWordSizeReg 0x00000000 -> 0x02000200
reg: 1, 1 96
I2SSetSerialFormatReg 0x6c01c193 -> 0x82190000

And when writing:

trigger_output 0xd0047000 0xd0057000 0x1000
precision: 16
I2SSetDataWordSizeReg 0x02000200 -> 0x02000200

Curiously the system freezes not immediately. I can even log in over the
network and inspect everything. But as soon as I press a key on the console
where I typed "cat file > /dev/audio" it freezes.

No such problem when reading from /dev/audio, BTW.


> The cardbus problem looks a bit like missing interrupts as well - you  
> should at the very least see an interrupt when inserting a card, even  
> if it doesn't attach.

No interrupt there as well.


> Leaves the question what could cause /that/ - as far as I can see you  
> have a bog standard UniNorth OpenPIC which works just fine in  
> countless other machines. Wouldn't be the first time that Apple at  
> some point introduced variants that need special handling somewhere.

Maybe there is still a problem with the interrupts, but I think I found
another problem in snapper(4) through SNAPPER_DEBUG.
On initialization it prints:

audio0 at snapper0: full duplex, playback, capture
FCR(0x3c) 0x0x1803440<I2S0EN,I2S0CLKEN>
 /gpio 0xff981cd0
 0xff982290 modem-reset 
 0xff9823e8 modem-power 
 0xff982540 accelerometer-1 
 0xff982700 accelerometer-2 
 0xff9828c0 headphone-mute 
 0xff982a18 amp-mute 
 0xff982b68 hw-reset 
 0xff982cb8 linein-detect 
 0xff982e78 headphone-detect 
 0xff983048 cpu-vcore-select 
 0xff9831b0 extint-gpio1 
 0xff983390 programmer-switch
 0xff983528 gpio4 
 headphone-mute 0x0
 amp-mute 0x0
 headphone-detect 0x0
 headphone-detect active 0
 headphone-detect intr ffffffff
 audio-hw-reset 0x0
[...]

The addresses of the GPIOs are not detected. snapper_init() looks for
properties like "audio-gpio" and "AAPL,address" which do not exist here.
And to make it worse, it doesn't even check the result! So snapper will
access address 0 with gpio_read/write... :)

Looking at the OF tree I should use the "name" or "compatible" property for
"audio-gpio" and "reg" for "AAPL,address". But the contents of "reg" is not
the final address and has probably to be added to some base address of
obio?

I will work on that...


> Something completely different - a fairly recent ofwboot.xcf ( from  
> 5.99.29 ) Just Works(tm) on my beige G3 ( with OF patches from an OSX  
> CD it would happily boot a NetBSD install CD ), to my utter surprise.  
> These machines had to be installed via floppy or network thanks to OF  
> bugs.

That's great! I hope I didn't break anything now. Can you also test with my
patched ofwboot?


-- 
Frank Wille



Home | Main Index | Thread Index | Old Index