diff --git a/fthd_drv.c b/fthd_drv.c index 7e81521..8e1397f 100644 --- a/fthd_drv.c +++ b/fthd_drv.c @@ -241,7 +241,7 @@ static void fthd_irq_work(struct work_struct *work) while(i++ < 500) { spin_lock_irq(&dev_priv->io_lock); - pending = FTHD_ISP_REG_READ(ISP_REG_41000); + pending = FTHD_ISP_REG_READ(ISP_IRQ_STATUS); spin_unlock_irq(&dev_priv->io_lock); if (!(pending & 0xf0)) @@ -249,7 +249,7 @@ static void fthd_irq_work(struct work_struct *work) pci_write_config_dword(dev_priv->pdev, 0x94, 0); spin_lock_irq(&dev_priv->io_lock); - FTHD_ISP_REG_WRITE(pending, ISP_REG_41024); + FTHD_ISP_REG_WRITE(pending, ISP_IRQ_CLEAR); spin_unlock_irq(&dev_priv->io_lock); pci_write_config_dword(dev_priv->pdev, 0x90, 0x200); @@ -278,7 +278,7 @@ static irqreturn_t fthd_irq_handler(int irq, void *arg) unsigned long flags; spin_lock_irqsave(&dev_priv->io_lock, flags); - pending = FTHD_ISP_REG_READ(ISP_REG_41000); + pending = FTHD_ISP_REG_READ(ISP_IRQ_STATUS); spin_unlock_irqrestore(&dev_priv->io_lock, flags); if (!(pending & 0xf0)) diff --git a/fthd_hw.c b/fthd_hw.c index 98ac3ed..ea69fcb 100644 --- a/fthd_hw.c +++ b/fthd_hw.c @@ -642,7 +642,7 @@ void fthd_ddr_phy_restore_regs(struct fthd_private *dev_priv) static int fthd_hw_irq_enable(struct fthd_private *dev_priv) { - FTHD_ISP_REG_WRITE(0xf8, ISP_REG_41004); + FTHD_ISP_REG_WRITE(0xf8, ISP_IRQ_ENABLE); pci_write_config_dword(dev_priv->pdev, 0x94, 0x200); return 0; @@ -650,7 +650,7 @@ static int fthd_hw_irq_enable(struct fthd_private *dev_priv) static int fthd_hw_irq_disable(struct fthd_private *dev_priv) { - FTHD_ISP_REG_WRITE(0, ISP_REG_41004); + FTHD_ISP_REG_WRITE(0, ISP_IRQ_ENABLE); pci_write_config_dword(dev_priv->pdev, 0x94, 0x0); return 0; } diff --git a/fthd_isp.c b/fthd_isp.c index 3a4c732..11cd981 100644 --- a/fthd_isp.c +++ b/fthd_isp.c @@ -474,7 +474,7 @@ int isp_powerdown(struct fthd_private *dev_priv) int isp_uninit(struct fthd_private *dev_priv) { FTHD_ISP_REG_WRITE(0x00000000, 0x40004); - FTHD_ISP_REG_WRITE(0x00000000, 0x41004); + FTHD_ISP_REG_WRITE(0x00000000, ISP_IRQ_ENABLE); FTHD_ISP_REG_WRITE(0xffffffff, 0xc0008); FTHD_ISP_REG_WRITE(0xffffffff, 0xc000c); FTHD_ISP_REG_WRITE(0xffffffff, 0xc0010); @@ -496,7 +496,7 @@ int isp_uninit(struct fthd_private *dev_priv) FTHD_ISP_REG_WRITE(0, 0xc0020); FTHD_ISP_REG_WRITE(0, 0xc0024); - FTHD_ISP_REG_WRITE(0xffffffff, 0x41024); + FTHD_ISP_REG_WRITE(0xffffffff, ISP_IRQ_CLEAR); isp_free_channel_info(dev_priv); isp_free_set_file(dev_priv); isp_mem_destroy(dev_priv->firmware); @@ -1288,7 +1288,7 @@ int isp_init(struct fthd_private *dev_priv) FTHD_ISP_REG_WRITE(0, ISP_REG_C3018); FTHD_ISP_REG_WRITE(0, ISP_REG_C301C); - FTHD_ISP_REG_WRITE(0xffffffff, ISP_REG_41024); + FTHD_ISP_REG_WRITE(0xffffffff, ISP_IRQ_CLEAR); /* * Probably the IPC queue @@ -1303,7 +1303,7 @@ int isp_init(struct fthd_private *dev_priv) FTHD_ISP_REG_WRITE(0x1, ISP_REG_40004); for (retries = 0; retries < 1000; retries++) { - reg = FTHD_ISP_REG_READ(ISP_REG_41000); + reg = FTHD_ISP_REG_READ(ISP_IRQ_STATUS); if ((reg & 0xf0) > 0) break; mdelay(10); @@ -1317,7 +1317,7 @@ int isp_init(struct fthd_private *dev_priv) dev_info(&dev_priv->pdev->dev, "ISP woke up after %dms\n", (retries - 1) * 10); - FTHD_ISP_REG_WRITE(0xffffffff, ISP_REG_41024); + FTHD_ISP_REG_WRITE(0xffffffff, ISP_IRQ_CLEAR); num_channels = FTHD_ISP_REG_READ(ISP_IPC_NUM_CHAN); queue_size = FTHD_ISP_REG_READ(ISP_IPC_QUEUE_SIZE) + 1; @@ -1394,7 +1394,7 @@ int isp_init(struct fthd_private *dev_priv) FTHD_ISP_REG_WRITE(0x10, ISP_REG_41020); for (retries = 0; retries < 1000; retries++) { - reg = FTHD_ISP_REG_READ(ISP_REG_41000); + reg = FTHD_ISP_REG_READ(ISP_IRQ_STATUS); if ((reg & 0xf0) > 0) break; mdelay(10); diff --git a/fthd_reg.h b/fthd_reg.h index b81b85e..33c10fc 100644 --- a/fthd_reg.h +++ b/fthd_reg.h @@ -183,10 +183,10 @@ static const u32 fthd_ddr_phy_reg_map[] = { #define ISP_REG_C301C 0xc301c #define ISP_REG_40004 0x40004 #define ISP_REG_40008 0x40008 -#define ISP_REG_41000 0x41000 -#define ISP_REG_41004 0x41004 +#define ISP_IRQ_STATUS 0x41000 +#define ISP_IRQ_ENABLE 0x41004 #define ISP_REG_41020 0x41020 -#define ISP_REG_41024 0x41024 +#define ISP_IRQ_CLEAR 0x41024 #define ISP_IPC_CHAN_START 0x0128 #define ISP_IPC_CHAN_END 0x0220