Subject: Re: puc based 16550 on macppc?
To: Michael Lorenz <macallan@netbsd.org>
From: Joachim Thiemann <joachim.thiemann@gmail.com>
List: port-macppc
Date: 04/17/2007 19:16:05
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:

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

> 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" :-)

Joe.