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:

> Yeah, macppc predates bus_space. Some drivers have been bus_spacified  
> during ppcoea_renovation but not all of them.

Maybe I should do that when I'm bored. 

Also this driver rarely checks the return values of functions calls. This
was the main reason we were looking for my audio problem for such a long
time (read below) ...


> At least that verifies that the interrupt is enabled and working.  
> Leaves the question why they don't fire on your hardware - I need to  
> stare at the code for a bit, maybe it's something trivial like having  
> to explicitly clear them before use or something.

I found it!

After compiling a kernel with DEBUG I noticed that bus_space_map() failed,
when mapping the DMA channel registers (one of those return values, which
should have been checked ;).

The reason that it fails can be found in the OF tree for i2s:

---8<---
ff9859b0: /pci@f2000000/mac-io@17/i2s@0

#address-cells          00000001 ........ ........ ........     1
AAPL,address            80010000 ........ ........ ........   ....
built-in                
device_type             69327300 ........ ........ ........   "i2s"
name                    69327300 ........ ........ ........   "i2s"
ranges                  
reg                     00000000 00005000 00000000 00000a00  
......P.........

--------------------------------------------------------------------------------


ff985ba8: /pci@f2000000/mac-io@17/i2s@0/i2s-a@10000

built-in                
compatible              69327362 757300.. ........ ........   "i2sbus"
device_type             736f756e 64627573 00...... ........   "soundbus"
interrupt-parent        ff981a58 ........ ........ ........   ...X
interrupts              0000001e 00000001 00000001 00000000  
................
            0010:       00000002 00000000 ........ ........   ........
name                    6932732d 6100.... ........ ........   "i2s-a"
[...]
reg                     00010000 00001000 00008000 00000100  
................
            0010:       00008100 00000100 ........ ........   ........

---8<---

The driver is using the "reg" property of "i2s@0", but it should use the
child's "i2s-a@10000" reg.

I have found an OF dump from a MacMini in the archives, and there both "reg"
properties were identical. So a solution could be to just use the
reg-property of the child (soundbus) for all models?

Can somebody confirm that this is ok? Or would it break any other model?

BTW, when using the correct property, sound works fine on my PowerBook. I
get interrupts and everything... :)


(I am AFK for the next 8 days, in case somebody wonders that I'm not
replying anymore.)

-- 
Frank Wille



Home | Main Index | Thread Index | Old Index