Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 1 | /* |
| 2 | Mantis PCI bridge driver |
| 3 | |
Manu Abraham | 8825a09 | 2009-12-15 09:13:49 -0300 | [diff] [blame] | 4 | Copyright (C) Manu Abraham (abraham.manu@gmail.com) |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 5 | |
| 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2 of the License, or |
| 9 | (at your option) any later version. |
| 10 | |
| 11 | This program is distributed in the hope that it will be useful, |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | GNU General Public License for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with this program; if not, write to the Free Software |
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 19 | */ |
| 20 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/signal.h> |
| 23 | #include <linux/sched.h> |
| 24 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 25 | #include <linux/interrupt.h> |
| 26 | |
| 27 | #include "dmxdev.h" |
| 28 | #include "dvbdev.h" |
| 29 | #include "dvb_demux.h" |
| 30 | #include "dvb_frontend.h" |
| 31 | #include "dvb_net.h" |
| 32 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 33 | #include "mantis_common.h" |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 34 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 35 | #include "mantis_hif.h" |
| 36 | #include "mantis_link.h" /* temporary due to physical layer stuff */ |
| 37 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 38 | #include "mantis_reg.h" |
| 39 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 40 | |
| 41 | static int mantis_hif_sbuf_opdone_wait(struct mantis_ca *ca) |
| 42 | { |
| 43 | struct mantis_pci *mantis = ca->ca_priv; |
| 44 | int rc = 0; |
| 45 | |
Manu Abraham | ac8f04d | 2009-12-04 05:29:25 -0300 | [diff] [blame] | 46 | if (wait_event_timeout(ca->hif_opdone_wq, |
| 47 | ca->hif_event & MANTIS_SBUF_OPDONE, |
| 48 | msecs_to_jiffies(500)) == -ERESTARTSYS) { |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 49 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 50 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Smart buffer operation timeout !", mantis->num); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 51 | rc = -EREMOTEIO; |
| 52 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 53 | dprintk(MANTIS_DEBUG, 1, "Smart Buffer Operation complete"); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 54 | ca->hif_event &= ~MANTIS_SBUF_OPDONE; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 55 | return rc; |
| 56 | } |
| 57 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 58 | static int mantis_hif_write_wait(struct mantis_ca *ca) |
| 59 | { |
| 60 | struct mantis_pci *mantis = ca->ca_priv; |
| 61 | u32 opdone = 0, timeout = 0; |
| 62 | int rc = 0; |
| 63 | |
| 64 | if (wait_event_timeout(ca->hif_write_wq, |
| 65 | mantis->gpif_status & MANTIS_GPIF_WRACK, |
| 66 | msecs_to_jiffies(500)) == -ERESTARTSYS) { |
| 67 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 68 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write ACK timed out !", mantis->num); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 69 | rc = -EREMOTEIO; |
| 70 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 71 | dprintk(MANTIS_DEBUG, 1, "Write Acknowledged"); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 72 | mantis->gpif_status &= ~MANTIS_GPIF_WRACK; |
| 73 | while (!opdone) { |
| 74 | opdone = (mmread(MANTIS_GPIF_STATUS) & MANTIS_SBUF_OPDONE); |
| 75 | udelay(500); |
| 76 | timeout++; |
| 77 | if (timeout > 100) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 78 | dprintk(MANTIS_ERROR, 1, "Adater(%d) Slot(0): Write operation timed out!", mantis->num); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 79 | rc = -ETIMEDOUT; |
| 80 | break; |
| 81 | } |
| 82 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 83 | dprintk(MANTIS_DEBUG, 1, "HIF Write success"); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 84 | return rc; |
| 85 | } |
| 86 | |
Manu Abraham | b2d8f5e | 2009-12-04 05:16:24 -0300 | [diff] [blame] | 87 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 88 | int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr) |
| 89 | { |
| 90 | struct mantis_pci *mantis = ca->ca_priv; |
| 91 | u32 hif_addr = 0, data, count = 4; |
| 92 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 93 | dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Read", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 94 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 95 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 96 | hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 97 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 98 | hif_addr |= addr; |
| 99 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 100 | mmwrite(hif_addr, MANTIS_GPIF_BRADDR); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 101 | mmwrite(count, MANTIS_GPIF_BRBYTES); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 102 | udelay(20); |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 103 | mmwrite(hif_addr | MANTIS_GPIF_HIFRDWRN, MANTIS_GPIF_ADDR); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 104 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 105 | if (mantis_hif_sbuf_opdone_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 106 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): GPIF Smart Buffer operation failed", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 107 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 108 | return -EREMOTEIO; |
| 109 | } |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 110 | data = mmread(MANTIS_GPIF_DIN); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 111 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 112 | dprintk(MANTIS_DEBUG, 1, "Mem Read: 0x%02x", data); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 113 | return (data >> 24) & 0xff; |
| 114 | } |
| 115 | |
| 116 | int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data) |
| 117 | { |
| 118 | struct mantis_slot *slot = ca->slot; |
| 119 | struct mantis_pci *mantis = ca->ca_priv; |
| 120 | u32 hif_addr = 0; |
| 121 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 122 | dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Write", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 123 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 124 | hif_addr &= ~MANTIS_GPIF_HIFRDWRN; |
| 125 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 126 | hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 127 | hif_addr |= MANTIS_HIF_STATUS; |
| 128 | hif_addr |= addr; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 129 | |
| 130 | mmwrite(slot->slave_cfg, MANTIS_GPIF_CFGSLA); /* Slot0 alone for now */ |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 131 | mmwrite(hif_addr, MANTIS_GPIF_ADDR); |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 132 | mmwrite(data, MANTIS_GPIF_DOUT); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 133 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 134 | if (mantis_hif_write_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 135 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): HIF Smart Buffer operation failed", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 136 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 137 | return -EREMOTEIO; |
| 138 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 139 | dprintk(MANTIS_DEBUG, 1, "Mem Write: (0x%02x to 0x%02x)", data, addr); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 140 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | 8b9c385 | 2009-12-04 05:23:38 -0300 | [diff] [blame] | 141 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 142 | return 0; |
| 143 | } |
| 144 | |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 145 | int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr) |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 146 | { |
| 147 | struct mantis_pci *mantis = ca->ca_priv; |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 148 | u32 data, hif_addr = 0; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 149 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 150 | dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Read", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 151 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 152 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 153 | hif_addr |= MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 154 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 155 | hif_addr |= addr; |
| 156 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 157 | mmwrite(hif_addr, MANTIS_GPIF_BRADDR); |
Sigmund Augdal | c63e507 | 2009-12-04 05:30:59 -0300 | [diff] [blame] | 158 | mmwrite(1, MANTIS_GPIF_BRBYTES); |
Sigmund Augdal | c63e507 | 2009-12-04 05:30:59 -0300 | [diff] [blame] | 159 | udelay(20); |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 160 | mmwrite(hif_addr | MANTIS_GPIF_HIFRDWRN, MANTIS_GPIF_ADDR); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 161 | |
| 162 | if (mantis_hif_sbuf_opdone_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 163 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): HIF Smart Buffer operation failed", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 164 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 165 | return -EREMOTEIO; |
| 166 | } |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 167 | data = mmread(MANTIS_GPIF_DIN); |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 168 | dprintk(MANTIS_DEBUG, 1, "I/O Read: 0x%02x", data); |
Manu Abraham | 8e0d58e | 2009-12-04 05:22:57 -0300 | [diff] [blame] | 169 | udelay(50); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 170 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 171 | |
Manu Abraham | 9c86795 | 2009-12-04 05:21:05 -0300 | [diff] [blame] | 172 | return (u8) data; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 173 | } |
| 174 | |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 175 | int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data) |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 176 | { |
| 177 | struct mantis_pci *mantis = ca->ca_priv; |
| 178 | u32 hif_addr = 0; |
| 179 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 180 | dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Write", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 181 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 182 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 183 | hif_addr &= ~MANTIS_GPIF_HIFRDWRN; |
| 184 | hif_addr |= MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 185 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 186 | hif_addr |= addr; |
| 187 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 188 | mmwrite(hif_addr, MANTIS_GPIF_ADDR); |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 189 | mmwrite(data, MANTIS_GPIF_DOUT); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 190 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 191 | if (mantis_hif_write_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 192 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): HIF Smart Buffer operation failed", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 193 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 194 | return -EREMOTEIO; |
| 195 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 196 | dprintk(MANTIS_DEBUG, 1, "I/O Write: (0x%02x to 0x%02x)", data, addr); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 197 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | 8e0d58e | 2009-12-04 05:22:57 -0300 | [diff] [blame] | 198 | udelay(50); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 199 | |
| 200 | return 0; |
| 201 | } |
| 202 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 203 | int mantis_hif_init(struct mantis_ca *ca) |
| 204 | { |
Manu Abraham | ac23f4c | 2009-12-04 05:15:10 -0300 | [diff] [blame] | 205 | struct mantis_slot *slot = ca->slot; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 206 | struct mantis_pci *mantis = ca->ca_priv; |
| 207 | u32 irqcfg; |
| 208 | |
Manu Abraham | ac23f4c | 2009-12-04 05:15:10 -0300 | [diff] [blame] | 209 | slot[0].slave_cfg = 0x70773028; |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 210 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Initializing Mantis Host Interface", mantis->num); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 211 | |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 212 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c90d345 | 2009-12-04 05:27:53 -0300 | [diff] [blame] | 213 | irqcfg = mmread(MANTIS_GPIF_IRQCFG); |
| 214 | irqcfg = MANTIS_MASK_BRRDY | |
| 215 | MANTIS_MASK_WRACK | |
| 216 | MANTIS_MASK_EXTIRQ | |
| 217 | MANTIS_MASK_WSTO | |
| 218 | MANTIS_MASK_OTHERR | |
| 219 | MANTIS_MASK_OVFLW; |
| 220 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 221 | mmwrite(irqcfg, MANTIS_GPIF_IRQCFG); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 222 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 223 | |
| 224 | return 0; |
| 225 | } |
| 226 | |
| 227 | void mantis_hif_exit(struct mantis_ca *ca) |
| 228 | { |
| 229 | struct mantis_pci *mantis = ca->ca_priv; |
| 230 | u32 irqcfg; |
| 231 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 232 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Exiting Mantis Host Interface", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 233 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 234 | irqcfg = mmread(MANTIS_GPIF_IRQCFG); |
| 235 | irqcfg &= ~MANTIS_MASK_BRRDY; |
| 236 | mmwrite(irqcfg, MANTIS_GPIF_IRQCFG); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 237 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 238 | } |