diff options
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index e509e13cb7a7..65c1429e4129 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -2973,7 +2973,7 @@ alloc_dma_trm_ctx(struct ti_ohci *ohci, struct dma_trm_ctx *d, | |||
2973 | return 0; | 2973 | return 0; |
2974 | } | 2974 | } |
2975 | 2975 | ||
2976 | static void ohci_set_hw_config_rom(struct hpsb_host *host, quadlet_t *config_rom) | 2976 | static void ohci_set_hw_config_rom(struct hpsb_host *host, __be32 *config_rom) |
2977 | { | 2977 | { |
2978 | struct ti_ohci *ohci = host->hostdata; | 2978 | struct ti_ohci *ohci = host->hostdata; |
2979 | 2979 | ||
@@ -3199,15 +3199,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, | |||
3199 | /* Now enable LPS, which we need in order to start accessing | 3199 | /* Now enable LPS, which we need in order to start accessing |
3200 | * most of the registers. In fact, on some cards (ALI M5251), | 3200 | * most of the registers. In fact, on some cards (ALI M5251), |
3201 | * accessing registers in the SClk domain without LPS enabled | 3201 | * accessing registers in the SClk domain without LPS enabled |
3202 | * will lock up the machine. Wait 50msec to make sure we have | 3202 | * will lock up the machine. */ |
3203 | * full link enabled. */ | ||
3204 | reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); | 3203 | reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); |
3205 | 3204 | ||
3206 | /* Disable and clear interrupts */ | 3205 | /* Disable and clear interrupts */ |
3207 | reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); | 3206 | reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); |
3208 | reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); | 3207 | reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); |
3209 | 3208 | ||
3210 | mdelay(50); | 3209 | /* Flush MMIO writes and wait to make sure we have full link enabled. */ |
3210 | reg_read(ohci, OHCI1394_Version); | ||
3211 | msleep(50); | ||
3211 | 3212 | ||
3212 | /* Determine the number of available IR and IT contexts. */ | 3213 | /* Determine the number of available IR and IT contexts. */ |
3213 | ohci->nb_iso_rcv_ctx = | 3214 | ohci->nb_iso_rcv_ctx = |
@@ -3233,8 +3234,9 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, | |||
3233 | * we need to get to that "no event", so enough should be initialized | 3234 | * we need to get to that "no event", so enough should be initialized |
3234 | * by that point. | 3235 | * by that point. |
3235 | */ | 3236 | */ |
3236 | if (request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, | 3237 | err = request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, |
3237 | OHCI1394_DRIVER_NAME, ohci)) { | 3238 | OHCI1394_DRIVER_NAME, ohci); |
3239 | if (err) { | ||
3238 | PRINT_G(KERN_ERR, "Failed to allocate interrupt %d", dev->irq); | 3240 | PRINT_G(KERN_ERR, "Failed to allocate interrupt %d", dev->irq); |
3239 | goto err; | 3241 | goto err; |
3240 | } | 3242 | } |
@@ -3381,6 +3383,7 @@ static int ohci1394_pci_suspend(struct pci_dev *dev, pm_message_t state) | |||
3381 | ohci_devctl(ohci->host, RESET_BUS, LONG_RESET_NO_FORCE_ROOT); | 3383 | ohci_devctl(ohci->host, RESET_BUS, LONG_RESET_NO_FORCE_ROOT); |
3382 | ohci_soft_reset(ohci); | 3384 | ohci_soft_reset(ohci); |
3383 | 3385 | ||
3386 | free_irq(dev->irq, ohci); | ||
3384 | err = pci_save_state(dev); | 3387 | err = pci_save_state(dev); |
3385 | if (err) { | 3388 | if (err) { |
3386 | PRINT(KERN_ERR, "pci_save_state failed with %d", err); | 3389 | PRINT(KERN_ERR, "pci_save_state failed with %d", err); |
@@ -3420,7 +3423,16 @@ static int ohci1394_pci_resume(struct pci_dev *dev) | |||
3420 | reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); | 3423 | reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); |
3421 | reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); | 3424 | reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); |
3422 | reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); | 3425 | reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); |
3423 | mdelay(50); | 3426 | reg_read(ohci, OHCI1394_Version); |
3427 | msleep(50); | ||
3428 | |||
3429 | err = request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, | ||
3430 | OHCI1394_DRIVER_NAME, ohci); | ||
3431 | if (err) { | ||
3432 | PRINT_G(KERN_ERR, "Failed to allocate interrupt %d", dev->irq); | ||
3433 | return err; | ||
3434 | } | ||
3435 | |||
3424 | ohci_initialize(ohci); | 3436 | ohci_initialize(ohci); |
3425 | 3437 | ||
3426 | hpsb_resume_host(ohci->host); | 3438 | hpsb_resume_host(ohci->host); |