Subject: Re: puc based 16550 on macppc?
To: Joachim Thiemann <joachim.thiemann@gmail.com>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 04/18/2007 00:51:52
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On Apr 17, 2007, at 19:16, Joachim Thiemann wrote:
> On 17/04/07, Michael Lorenz <macallan@netbsd.org> wrote:
>> Maybe - please run ofctl -p ( this will dump the OF tree including
>> properties ) and post the relevant part ( or the whole thing if you're
>> unsure )
>
> No prob, though ofctl is not in 3.1, I just compiled ofctl.c from
> -current. I assume the result is not affected, though:
Nope, same thing. The OF interface hasn't changed in ages.
> ff87ab28: /pci@80000000/pci-bridge@d/pci1407,200@2
>
> vendor-id 00001407 ........ ........ ........ ....
> device-id 00000200 ........ ........ ........ ....
> revision-id 00000000 ........ ........ ........ ....
> class-code 00070003 ........ ........ ........ ....
> interrupts 00000001 ........ ........ ........ ....
> min-grant 00000000 ........ ........ ........ ....
> max-latency 00000000 ........ ........ ........ ....
> subsystem-vendor-id 00001407 ........ ........ ........ ....
> subsystem-id 00000200 ........ ........ ........ ....
> devsel-speed 00000002 ........ ........ ........ ....
> fast-back-to-back
> name 70636931 3430372c 32303000 ........
> "pci1407,200"
> compatible 70636931 3430372c 32303000 ........
> "pci1407,200"
> 000c: 70636931 3430372c 32303000 ........
> "pci1407,200"
> 0018: 70636963 6c617373 2c303730 30303300
> "pciclass,070003"
> reg 00011000 00000000 00000000 00000000
> ................
> 0010: 00000000 21011010 00000000 00000000
> ....!...........
> 0020: 00000000 00000010 21011014 00000000
> ........!.......
> 0030: 00000000 00000000 00000010 ........
> ............
> assigned-addresses
Hmm, so OF did try to set up something. The reg property looks weird
though.
>> Maybe OF put something into device properties and for some reason
>> failed to program the card's config space - if that's the case I can
>> likely fix it.
>
> Your efforts are greatly appreciated :-) Do you need the changes to
> pucdata.c? I already submitted a pr but can't seem to find it anymore
> (??? I am _sure_ I submitted a pr, but can't even see it the
> netbsd-bugs archive. Strange.)
>
> Anyways, it's simply
> /* Lava Computers new serial */
> { "Lava Computers new serial",
> { 0x1407, 0x0200, 0, 0 },
> { 0xffff, 0xfffc, 0, 0 },
> {
> { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ*4 },
> { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ*4 },
> },
> },
>
> The COM_FREQ multiplier was found "empirically" :-)
Looks like I'll need to look at the puc code - I have no idea what this
code does ;)
One final thing to test though - could you please build a kernel
without the puc driver and check if the card's config space looks any
different?
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iQEVAwUBRiWj6MpnzkX8Yg2nAQJZKAf/W/nae2Tm10UF5ywFfwY9fCbdUYyK0Jxo
4vqHrDK8a+FHdApEocKI7D7Mr6iXX9CRtn1+xGOuSTD24kVQmAiL12/TmmQ5b98C
ZxVXeMp4GDQvDICEhQhNGOShNq4kUA7xdOmY091sgrHUzTriHR9CVaLjMD9B1fWS
Vnz/afkhJ+M3giIhkBD9A/DRyKSEe9Xp8+EioGfglRPaxvR0N/DNmIEdig2+2gWJ
dbgFpgXVad1Y42R1hG/lYPrViLRF8yHl4AcPHT3iKDxTONNRQh4COoY/7mUcBOku
mv7XrDiq+0i6KHewyJdAlJj4xSv3oIgX7VgJSQQxL7F2jio3U0xBCA==
=1efk
-----END PGP SIGNATURE-----