aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/ohci1394.c
diff options
context:
space:
mode:
authorBen Collins <bcollins@ubuntu.com>2006-06-12 18:13:32 -0400
committerBen Collins <bcollins@ubuntu.com>2006-06-12 18:13:32 -0400
commit4611ed38030a2ce3661de999c3487e5a1eed0dc0 (patch)
treebd0924844e1b5b5ccefc4ee5cf81c917b8781e5c /drivers/ieee1394/ohci1394.c
parent8aef63ff033fb0e7ba02d8e760d268eb0aafc58c (diff)
ohci1394: set address range properties
This patch supplies the API extension introduced by patch "ieee1394: extend lowlevel API for address range properties" with proper addresses. Like in patch ''ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507 based devices'', 1 TeraByte is chosen as physical upper bound. This leaves a window for the middle address range. This choice is only relevant for adapters which actually have a programmable pysical upper bound register. (Only ALi and Fujitsu adapters are known for this. Most adapters have a fixed bound at 4 GB.) The middle address range is suitable for posted writes. AFAIK, PCILynx does not support physical DMA nor posted writes, therefore no equivalent change in the pcilynx driver is necessary. There is also a driver for GP2Lynx, although not in mainline Linux. I assume this hardware does not support these OHCI features either. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r--drivers/ieee1394/ohci1394.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 643094c3339c..63b71fa997fc 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -553,7 +553,8 @@ static void ohci_initialize(struct ti_ohci *ohci)
553 * register content. 553 * register content.
554 * To actually enable physical responses is the job of our interrupt 554 * To actually enable physical responses is the job of our interrupt
555 * handler which programs the physical request filter. */ 555 * handler which programs the physical request filter. */
556 reg_write(ohci, OHCI1394_PhyUpperBound, 0x01000000); 556 reg_write(ohci, OHCI1394_PhyUpperBound,
557 OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED >> 16);
557 558
558 DBGMSG("physUpperBoundOffset=%08x", 559 DBGMSG("physUpperBoundOffset=%08x",
559 reg_read(ohci, OHCI1394_PhyUpperBound)); 560 reg_read(ohci, OHCI1394_PhyUpperBound));
@@ -3414,6 +3415,14 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3414 host->csr.max_rec = (reg_read(ohci, OHCI1394_BusOptions) >> 12) & 0xf; 3415 host->csr.max_rec = (reg_read(ohci, OHCI1394_BusOptions) >> 12) & 0xf;
3415 host->csr.lnk_spd = reg_read(ohci, OHCI1394_BusOptions) & 0x7; 3416 host->csr.lnk_spd = reg_read(ohci, OHCI1394_BusOptions) & 0x7;
3416 3417
3418 if (phys_dma) {
3419 host->low_addr_space =
3420 (u64) reg_read(ohci, OHCI1394_PhyUpperBound) << 16;
3421 if (!host->low_addr_space)
3422 host->low_addr_space = OHCI1394_PHYS_UPPER_BOUND_FIXED;
3423 }
3424 host->middle_addr_space = OHCI1394_MIDDLE_ADDRESS_SPACE;
3425
3417 /* Tell the highlevel this host is ready */ 3426 /* Tell the highlevel this host is ready */
3418 if (hpsb_add_host(host)) 3427 if (hpsb_add_host(host))
3419 FAIL(-ENOMEM, "Failed to register host with highlevel"); 3428 FAIL(-ENOMEM, "Failed to register host with highlevel");