From f70673c41f6354e6b2ccba48bc43de79d2483010 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 18 Jan 2007 23:57:26 +0000 Subject: Merged revisions 1812 and 1854 back from trunk. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1856 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp/base.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'wct4xxp') diff --git a/wct4xxp/base.c b/wct4xxp/base.c index 73453fa..487befb 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -401,11 +401,17 @@ static struct t4 *cards[MAX_T4_CARDS]; #define MAX_TDM_CHAN 32 #define MAX_DTMF_DET 16 +static inline unsigned int __t4_pci_in(struct t4 *wc, const unsigned int addr) +{ + unsigned int res = readl(&wc->membase[addr]); + return res; +} + static inline void __t4_pci_out(struct t4 *wc, const unsigned int addr, const unsigned int value) { unsigned int tmp; - wc->membase[addr] = cpu_to_le32(value); - tmp = le32_to_cpu(wc->membase[WC_VERSION]); + writel(value, &wc->membase[addr]); + tmp = __t4_pci_in(wc, WC_VERSION); if ((tmp & 0xffff0000) != 0xc01a0000) printk("TE4XXP: Version Synchronization Error!\n"); #if 0 @@ -416,11 +422,6 @@ static inline void __t4_pci_out(struct t4 *wc, const unsigned int addr, const un #endif } -static inline unsigned int __t4_pci_in(struct t4 *wc, const unsigned int addr) -{ - return le32_to_cpu(wc->membase[addr]); -} - static inline void __t4_gpio_set(struct t4 *wc, unsigned bits, unsigned int val) { unsigned int newgpio; @@ -2417,9 +2418,6 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) inirq = 1; /* Make sure it's really for us */ status = t4_pci_in(wc, WC_INTR); -#if 1 - t4_pci_out(wc, WC_INTR, status & 0x00000008); -#endif /* Ignore if it's not for us */ if (!(status & 0x7)) { @@ -2429,6 +2427,11 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) return; #endif } + +#ifdef ENABLE_WORKQUEUES + t4_pci_out(wc, WC_INTR, status & 0x00000008); +#endif + if (!wc->spansstarted) { printk("Not prepped yet!\n"); #ifdef LINUX26 -- cgit v1.2.3