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> |
Alexey Dobriyan | b7f080c | 2011-06-16 11:01:34 +0000 | [diff] [blame] | 26 | #include <asm/io.h> |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 27 | |
| 28 | #include "dmxdev.h" |
| 29 | #include "dvbdev.h" |
| 30 | #include "dvb_demux.h" |
| 31 | #include "dvb_frontend.h" |
| 32 | #include "dvb_net.h" |
| 33 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 34 | #include "mantis_common.h" |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 35 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 36 | #include "mantis_hif.h" |
| 37 | #include "mantis_link.h" /* temporary due to physical layer stuff */ |
| 38 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 39 | #include "mantis_reg.h" |
| 40 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 41 | |
| 42 | static int mantis_hif_sbuf_opdone_wait(struct mantis_ca *ca) |
| 43 | { |
| 44 | struct mantis_pci *mantis = ca->ca_priv; |
| 45 | int rc = 0; |
| 46 | |
Manu Abraham | ac8f04d | 2009-12-04 05:29:25 -0300 | [diff] [blame] | 47 | if (wait_event_timeout(ca->hif_opdone_wq, |
| 48 | ca->hif_event & MANTIS_SBUF_OPDONE, |
| 49 | msecs_to_jiffies(500)) == -ERESTARTSYS) { |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 50 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 51 | 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] | 52 | rc = -EREMOTEIO; |
| 53 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 54 | dprintk(MANTIS_DEBUG, 1, "Smart Buffer Operation complete"); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 55 | ca->hif_event &= ~MANTIS_SBUF_OPDONE; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 56 | return rc; |
| 57 | } |
| 58 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 59 | static int mantis_hif_write_wait(struct mantis_ca *ca) |
| 60 | { |
| 61 | struct mantis_pci *mantis = ca->ca_priv; |
| 62 | u32 opdone = 0, timeout = 0; |
| 63 | int rc = 0; |
| 64 | |
| 65 | if (wait_event_timeout(ca->hif_write_wq, |
| 66 | mantis->gpif_status & MANTIS_GPIF_WRACK, |
| 67 | msecs_to_jiffies(500)) == -ERESTARTSYS) { |
| 68 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 69 | 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] | 70 | rc = -EREMOTEIO; |
| 71 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 72 | dprintk(MANTIS_DEBUG, 1, "Write Acknowledged"); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 73 | mantis->gpif_status &= ~MANTIS_GPIF_WRACK; |
| 74 | while (!opdone) { |
| 75 | opdone = (mmread(MANTIS_GPIF_STATUS) & MANTIS_SBUF_OPDONE); |
| 76 | udelay(500); |
| 77 | timeout++; |
| 78 | if (timeout > 100) { |
Masanari Iida | 9a56ec5b | 2012-02-08 07:28:23 -0300 | [diff] [blame] | 79 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write operation timed out!", mantis->num); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 80 | rc = -ETIMEDOUT; |
| 81 | break; |
| 82 | } |
| 83 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 84 | dprintk(MANTIS_DEBUG, 1, "HIF Write success"); |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 85 | return rc; |
| 86 | } |
| 87 | |
Manu Abraham | b2d8f5e | 2009-12-04 05:16:24 -0300 | [diff] [blame] | 88 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 89 | int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr) |
| 90 | { |
| 91 | struct mantis_pci *mantis = ca->ca_priv; |
| 92 | u32 hif_addr = 0, data, count = 4; |
| 93 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 94 | 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] | 95 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 96 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 97 | hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 98 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 99 | hif_addr |= addr; |
| 100 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 101 | mmwrite(hif_addr, MANTIS_GPIF_BRADDR); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 102 | mmwrite(count, MANTIS_GPIF_BRBYTES); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 103 | udelay(20); |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 104 | mmwrite(hif_addr | MANTIS_GPIF_HIFRDWRN, MANTIS_GPIF_ADDR); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 105 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 106 | if (mantis_hif_sbuf_opdone_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 107 | 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] | 108 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 109 | return -EREMOTEIO; |
| 110 | } |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 111 | data = mmread(MANTIS_GPIF_DIN); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 112 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 113 | dprintk(MANTIS_DEBUG, 1, "Mem Read: 0x%02x", data); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 114 | return (data >> 24) & 0xff; |
| 115 | } |
| 116 | |
| 117 | int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data) |
| 118 | { |
| 119 | struct mantis_slot *slot = ca->slot; |
| 120 | struct mantis_pci *mantis = ca->ca_priv; |
| 121 | u32 hif_addr = 0; |
| 122 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 123 | 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] | 124 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 125 | hif_addr &= ~MANTIS_GPIF_HIFRDWRN; |
| 126 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 127 | hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 128 | hif_addr |= MANTIS_HIF_STATUS; |
| 129 | hif_addr |= addr; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 130 | |
| 131 | mmwrite(slot->slave_cfg, MANTIS_GPIF_CFGSLA); /* Slot0 alone for now */ |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 132 | mmwrite(hif_addr, MANTIS_GPIF_ADDR); |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 133 | mmwrite(data, MANTIS_GPIF_DOUT); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 134 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 135 | if (mantis_hif_write_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 136 | 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] | 137 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 138 | return -EREMOTEIO; |
| 139 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 140 | 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] | 141 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | 8b9c385 | 2009-12-04 05:23:38 -0300 | [diff] [blame] | 142 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 143 | return 0; |
| 144 | } |
| 145 | |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 146 | int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr) |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 147 | { |
| 148 | struct mantis_pci *mantis = ca->ca_priv; |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 149 | u32 data, hif_addr = 0; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 150 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 151 | 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] | 152 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 153 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 154 | hif_addr |= MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 155 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 156 | hif_addr |= addr; |
| 157 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 158 | mmwrite(hif_addr, MANTIS_GPIF_BRADDR); |
Sigmund Augdal | c63e507 | 2009-12-04 05:30:59 -0300 | [diff] [blame] | 159 | mmwrite(1, MANTIS_GPIF_BRBYTES); |
Sigmund Augdal | c63e507 | 2009-12-04 05:30:59 -0300 | [diff] [blame] | 160 | udelay(20); |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 161 | mmwrite(hif_addr | MANTIS_GPIF_HIFRDWRN, MANTIS_GPIF_ADDR); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 162 | |
| 163 | if (mantis_hif_sbuf_opdone_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 164 | 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] | 165 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 166 | return -EREMOTEIO; |
| 167 | } |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 168 | data = mmread(MANTIS_GPIF_DIN); |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 169 | dprintk(MANTIS_DEBUG, 1, "I/O Read: 0x%02x", data); |
Manu Abraham | 8e0d58e | 2009-12-04 05:22:57 -0300 | [diff] [blame] | 170 | udelay(50); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 171 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 172 | |
Manu Abraham | 9c86795 | 2009-12-04 05:21:05 -0300 | [diff] [blame] | 173 | return (u8) data; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 174 | } |
| 175 | |
Manu Abraham | 6053240 | 2009-12-04 05:11:14 -0300 | [diff] [blame] | 176 | 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] | 177 | { |
| 178 | struct mantis_pci *mantis = ca->ca_priv; |
| 179 | u32 hif_addr = 0; |
| 180 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 181 | 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] | 182 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 183 | hif_addr &= ~MANTIS_GPIF_PCMCIAREG; |
| 184 | hif_addr &= ~MANTIS_GPIF_HIFRDWRN; |
| 185 | hif_addr |= MANTIS_GPIF_PCMCIAIOM; |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 186 | hif_addr |= MANTIS_HIF_STATUS; |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 187 | hif_addr |= addr; |
| 188 | |
Manu Abraham | b29f6ac | 2009-12-04 05:31:21 -0300 | [diff] [blame] | 189 | mmwrite(hif_addr, MANTIS_GPIF_ADDR); |
Sigmund Augdal | a0c5906 | 2009-12-04 05:13:21 -0300 | [diff] [blame] | 190 | mmwrite(data, MANTIS_GPIF_DOUT); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 191 | |
Manu Abraham | e0e099a | 2009-12-04 05:29:48 -0300 | [diff] [blame] | 192 | if (mantis_hif_write_wait(ca) != 0) { |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 193 | 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] | 194 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 195 | return -EREMOTEIO; |
| 196 | } |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 197 | 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] | 198 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | 8e0d58e | 2009-12-04 05:22:57 -0300 | [diff] [blame] | 199 | udelay(50); |
Manu Abraham | c9a750c | 2009-12-04 05:10:25 -0300 | [diff] [blame] | 200 | |
| 201 | return 0; |
| 202 | } |
| 203 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 204 | int mantis_hif_init(struct mantis_ca *ca) |
| 205 | { |
Manu Abraham | ac23f4c | 2009-12-04 05:15:10 -0300 | [diff] [blame] | 206 | struct mantis_slot *slot = ca->slot; |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 207 | struct mantis_pci *mantis = ca->ca_priv; |
| 208 | u32 irqcfg; |
| 209 | |
Manu Abraham | ac23f4c | 2009-12-04 05:15:10 -0300 | [diff] [blame] | 210 | slot[0].slave_cfg = 0x70773028; |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 211 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Initializing Mantis Host Interface", mantis->num); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 212 | |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 213 | mutex_lock(&ca->ca_lock); |
Manu Abraham | c90d345f | 2009-12-04 05:27:53 -0300 | [diff] [blame] | 214 | irqcfg = mmread(MANTIS_GPIF_IRQCFG); |
| 215 | irqcfg = MANTIS_MASK_BRRDY | |
| 216 | MANTIS_MASK_WRACK | |
| 217 | MANTIS_MASK_EXTIRQ | |
| 218 | MANTIS_MASK_WSTO | |
| 219 | MANTIS_MASK_OTHERR | |
| 220 | MANTIS_MASK_OVFLW; |
| 221 | |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 222 | mmwrite(irqcfg, MANTIS_GPIF_IRQCFG); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 223 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 224 | |
| 225 | return 0; |
| 226 | } |
| 227 | |
| 228 | void mantis_hif_exit(struct mantis_ca *ca) |
| 229 | { |
| 230 | struct mantis_pci *mantis = ca->ca_priv; |
| 231 | u32 irqcfg; |
| 232 | |
Manu Abraham | b3b9614 | 2009-12-04 05:41:11 -0300 | [diff] [blame] | 233 | dprintk(MANTIS_ERROR, 1, "Adapter(%d) Exiting Mantis Host Interface", mantis->num); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 234 | mutex_lock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 235 | irqcfg = mmread(MANTIS_GPIF_IRQCFG); |
| 236 | irqcfg &= ~MANTIS_MASK_BRRDY; |
| 237 | mmwrite(irqcfg, MANTIS_GPIF_IRQCFG); |
Manu Abraham | f684336 | 2009-12-04 05:34:19 -0300 | [diff] [blame] | 238 | mutex_unlock(&ca->ca_lock); |
Manu Abraham | d8b14f8 | 2009-12-04 05:09:47 -0300 | [diff] [blame] | 239 | } |