diff options
author | Ian Romanick <idr@us.ibm.com> | 2007-08-09 18:15:42 -0700 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2007-08-09 18:15:42 -0700 |
commit | 371f0a4d410f02d8db050b51fd2e714f888a71e0 (patch) | |
tree | 1fc0e8a7efeb8f3723e7dab31ef2b10a495c2f30 /linux-core/xgi_drv.c | |
parent | 6dd97099ea5c6dc7931c6b482eb5935f7dd9ed2d (diff) |
Mask off correct bits in M2REG_AUTO_LINK_STATUS for interrupt handling.
Diffstat (limited to 'linux-core/xgi_drv.c')
-rw-r--r-- | linux-core/xgi_drv.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/linux-core/xgi_drv.c b/linux-core/xgi_drv.c index d0878184..f20df585 100644 --- a/linux-core/xgi_drv.c +++ b/linux-core/xgi_drv.c @@ -334,12 +334,19 @@ irqreturn_t xgi_kern_isr(DRM_IRQ_ARGS) { struct drm_device *dev = (struct drm_device *) arg; struct xgi_info *info = dev->dev_private; - const u32 irq_bits = DRM_READ32(info->mmio_map, 0x2810); - - - if ((irq_bits & 0x00000000) != 0) { - DRM_WRITE32(info->mmio_map, 0x2810, - 0x04000000 | irq_bits); + const u32 irq_bits = DRM_READ32(info->mmio_map, + (0x2800 + + M2REG_AUTO_LINK_STATUS_ADDRESS)) + & (M2REG_ACTIVE_TIMER_INTERRUPT_MASK + | M2REG_ACTIVE_INTERRUPT_0_MASK + | M2REG_ACTIVE_INTERRUPT_2_MASK + | M2REG_ACTIVE_INTERRUPT_3_MASK); + + + if (irq_bits != 0) { + DRM_WRITE32(info->mmio_map, + 0x2800 + M2REG_AUTO_LINK_SETTING_ADDRESS, + M2REG_AUTO_LINK_SETTING_COMMAND | irq_bits); return IRQ_HANDLED; } else { return IRQ_NONE; |