summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorikob <ikob@FreeBSD.org>2002-09-17 12:50:43 +0000
committerikob <ikob@FreeBSD.org>2002-09-17 12:50:43 +0000
commitda2ba83f7bf19cb960eb8d0a1716788f1055deb6 (patch)
treef5d1973c7045243dec5823c523d44f348270f363
parent4a12ebc81170b9d763df1d86d20d2b34325325e7 (diff)
downloadFreeBSD-src-da2ba83f7bf19cb960eb8d0a1716788f1055deb6.zip
FreeBSD-src-da2ba83f7bf19cb960eb8d0a1716788f1055deb6.tar.gz
Firewire device support for Apple eMac with PPC kernel.
Contributed by Peter Grehan <grehan@freebsd.org>
-rw-r--r--sys/dev/firewire/firewire.c2
-rw-r--r--sys/dev/firewire/firewire.h6
-rw-r--r--sys/dev/firewire/fwohci_pci.c17
-rw-r--r--sys/dev/firewire/fwohcireg.h5
4 files changed, 29 insertions, 1 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index a234d95..5d4ab83 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -651,7 +651,7 @@ dvloop:
*/
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;
diff --git a/sys/dev/firewire/firewire.h b/sys/dev/firewire/firewire.h
index e24ddea..c41bb33 100644
--- a/sys/dev/firewire/firewire.h
+++ b/sys/dev/firewire/firewire.h
@@ -402,6 +402,12 @@ struct fw_pkt{
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 {
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index 1ca9866..9524243 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -105,10 +105,27 @@ fwohci_pci_probe( device_t dev )
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;
}
diff --git a/sys/dev/firewire/fwohcireg.h b/sys/dev/firewire/fwohcireg.h
index a766310..cbc556d 100644
--- a/sys/dev/firewire/fwohcireg.h
+++ b/sys/dev/firewire/fwohcireg.h
@@ -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
OpenPOWER on IntegriCloud