diff options
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 11 | ||||
-rw-r--r-- | drivers/ieee1394/ohci1394.h | 10 |
2 files changed, 20 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"); |
diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h index 7df0962144e3..fa05f113f7f0 100644 --- a/drivers/ieee1394/ohci1394.h +++ b/drivers/ieee1394/ohci1394.h | |||
@@ -443,6 +443,16 @@ static inline u32 reg_read(const struct ti_ohci *ohci, int offset) | |||
443 | 443 | ||
444 | #define OHCI1394_TCODE_PHY 0xE | 444 | #define OHCI1394_TCODE_PHY 0xE |
445 | 445 | ||
446 | /* Node offset map (phys DMA area, posted write area). | ||
447 | * The value of OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED may be modified but must | ||
448 | * be lower than OHCI1394_MIDDLE_ADDRESS_SPACE. | ||
449 | * OHCI1394_PHYS_UPPER_BOUND_FIXED and OHCI1394_MIDDLE_ADDRESS_SPACE are | ||
450 | * constants given by the OHCI spec. | ||
451 | */ | ||
452 | #define OHCI1394_PHYS_UPPER_BOUND_FIXED 0x000100000000ULL /* 4 GB */ | ||
453 | #define OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED 0x010000000000ULL /* 1 TB */ | ||
454 | #define OHCI1394_MIDDLE_ADDRESS_SPACE 0xffff00000000ULL | ||
455 | |||
446 | void ohci1394_init_iso_tasklet(struct ohci1394_iso_tasklet *tasklet, | 456 | void ohci1394_init_iso_tasklet(struct ohci1394_iso_tasklet *tasklet, |
447 | int type, | 457 | int type, |
448 | void (*func)(unsigned long), | 458 | void (*func)(unsigned long), |