From owner-freebsd-firewire Tue Sep 17 4:16: 8 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 222F637B4C2 for ; Tue, 17 Sep 2002 04:16:04 -0700 (PDT) Received: from gt3.OntheNet.com.au (nt.com.au [203.13.70.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9BC643E75 for ; Tue, 17 Sep 2002 04:16:02 -0700 (PDT) (envelope-from grehan@freebsd.org) Received: from freebsd.org (CPE-203-45-245-212.qld.bigpond.net.au [203.45.245.212]) by gt3.OntheNet.com.au (8.11.4/8.11.4) with ESMTP id g8HBPwg86814 for ; Tue, 17 Sep 2002 21:25:58 +1000 (EST) Message-ID: <3D870EE3.1A07857C@freebsd.org> Date: Tue, 17 Sep 2002 21:15:47 +1000 From: Peter Grehan X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.2.14-12 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-firewire@freebsd.org Subject: test on FreeBSD/ppc Content-Type: multipart/mixed; boundary="------------CAFA75C95CC53D89687F8041" Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------CAFA75C95CC53D89687F8041 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit With some slight mods (attached), I dropped the base firewire code into a PPC kernel and booted it on an eMac, with an iPod attached. Here's the relevant lines from the boot log. I might look into this if I get some more time: I suspect there are some endian issues. ... fwohci0: mem 0xf5000000-0xf500ffff irq 40 at device 14.0 on pci2 fwohci0: PCI bus latency was changing to 250. cache_size 8. fwohci0: OHCI version 1.0 (ROM=0) fwohci0: resetting OHCI...done (0) fwohci0: BUS_OPT 0xa082 -> 0xf800a082 fwohci0: Link 1394a available S400, 2 ports, maxrec 2048 bytes fwohci0: Enable 1394a Enhancements fwohci0: cannot read phy fwohci0: cannot read phy fwohci0: EUI64 00:03:93:ff:fe:a4:36:fe fwochi_set_intr: 1 firewire0: bus> on fwohci0 firewire0: firewire bus attach firewire0: cannot read phy ... firewire0: BUS reset firewire0: node id = 0xc800ffc1, CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, Not found IRM capable nodefirewire0: BMR = 3f ... start AT DMA status=0 firewire0: unrecoverable error later, Peter. --------------CAFA75C95CC53D89687F8041 Content-Type: text/plain; charset=us-ascii; name="firewire.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="firewire.diff" Index: firewire.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/firewire.c,v retrieving revision 1.1 diff -u -r1.1 firewire.c --- firewire.c 2002/09/13 12:31:56 1.1 +++ firewire.c 2002/09/17 11:12:26 @@ -651,7 +651,7 @@ */ fp = (struct fw_pkt *)(it->stproc->buf); /* XXX: Parameter relies on NTSC type DV video */ - tmpsync = 3072 * 8000 * 100 / 2997; + tmpsync = (u_int64_t)3072 * 8000 * 100 / 2997; tmpsync *= it->dvsync; dvsync = tmpsync; dvsync %= 0xc00; Index: firewire.h =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/firewire.h,v retrieving revision 1.1 diff -u -r1.1 firewire.h --- firewire.h 2002/09/13 12:31:56 1.1 +++ firewire.h 2002/09/17 11:12:27 @@ -402,6 +402,12 @@ u_int32_t dest_lo; u_int16_t extcode; u_int16_t len; +#define FW_LREQ_MSKSWAP 1 +#define FW_LREQ_CMPSWAP 2 +#define FW_LREQ_FTADD 3 +#define FW_LREQ_LTADD 4 +#define FW_LREQ_BDADD 5 +#define FW_LREQ_WRADD 6 u_int32_t payload[0]; }lreq; struct { Index: fwohci_pci.c =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/fwohci_pci.c,v retrieving revision 1.1 diff -u -r1.1 fwohci_pci.c --- fwohci_pci.c 2002/09/13 12:31:56 1.1 +++ fwohci_pci.c 2002/09/17 11:12:27 @@ -105,10 +105,27 @@ device_set_desc(dev, "Ricoh R5C552"); return 0; } + if ((pci_get_vendor(dev) == FW_VENDORID_APPLE) && + (pci_get_device(dev) == FW_DEVICE_PANGEA)) { + device_set_desc(dev, "Apple Pangea"); + return 0; + } + if ((pci_get_vendor(dev) == FW_VENDORID_APPLE) && + (pci_get_device(dev) == FW_DEVICE_UNINORTH)) { + device_set_desc(dev, "Apple UniNorth"); + return 0; + } + if ((pci_get_vendor(dev) == FW_VENDORID_LUCENT) && + (pci_get_device(dev) == FW_DEVICE_FW322)) { + device_set_desc(dev, "Lucent FW322/323"); + return 0; + } #endif if (pci_get_class(dev) == PCIC_SERIALBUS && pci_get_subclass(dev) == PCIS_SERIALBUS_FW && pci_get_progif(dev) == PCI_INTERFACE_OHCI) { + printf("XXXfw: vendid=%x, dev=%x\n", pci_get_vendor(dev), + pci_get_device(dev)); device_set_desc(dev, "1394 Open Host Controller Interface"); return 0; } Index: fwohcireg.h =================================================================== RCS file: /home/ncvs/src/sys/dev/firewire/fwohcireg.h,v retrieving revision 1.1 diff -u -r1.1 fwohcireg.h --- fwohcireg.h 2002/09/13 12:31:56 1.1 +++ fwohcireg.h 2002/09/17 11:12:28 @@ -40,6 +40,8 @@ #define FW_VENDORID_SONY 0x104d #define FW_VENDORID_VIA 0x1106 #define FW_VENDORID_RICOH 0x1180 +#define FW_VENDORID_APPLE 0x106b +#define FW_VENDORID_LUCENT 0x11c1 #define FW_DEVICE_UPD861 0x0063 #define FW_DEVICE_TITSB22 0x8009 @@ -49,6 +51,9 @@ #define FW_DEVICE_CX3022 0x8039 #define FW_DEVICE_VT6306 0x3044 #define FW_DEVICE_R5C552 0x1180 +#define FW_DEVICE_PANGEA 0x0030 +#define FW_DEVICE_UNINORTH 0x0031 +#define FW_DEVICE_FW322 0x5811 #define PCI_INTERFACE_OHCI 0x10 --------------CAFA75C95CC53D89687F8041-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message