Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: fdomain: Add register definitions

Add register bit definitions from documentation to header file and use them
instead of magic constants. No changes to generated binary.

Signed-off-by: Ondrej Zary <linux@zary.sk>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Ondrej Zary and committed by
Martin K. Petersen
1697c6a6 aa343c69

+167 -98
+76 -68
drivers/scsi/fdomain.c
··· 99 99 * up the machine. 100 100 */ 101 101 #define FIFO_COUNT 2 /* Number of 512 byte blocks before INTR */ 102 - #define PARITY_MASK 0x08 /* Parity enabled, 0x00 = disabled */ 102 + #define PARITY_MASK ACTL_PAREN /* Parity enabled, 0 = disabled */ 103 103 104 104 enum chip_type { 105 105 unknown = 0x00, ··· 117 117 118 118 static inline void fdomain_make_bus_idle(struct fdomain *fd) 119 119 { 120 - outb(0, fd->base + SCSI_Cntl); 121 - outb(0, fd->base + SCSI_Mode_Cntl); 120 + outb(0, fd->base + REG_BCTL); 121 + outb(0, fd->base + REG_MCTL); 122 122 if (fd->chip == tmc18c50 || fd->chip == tmc18c30) 123 123 /* Clear forced intr. */ 124 - outb(0x21 | PARITY_MASK, fd->base + TMC_Cntl); 124 + outb(ACTL_RESET | ACTL_CLRFIRQ | PARITY_MASK, 125 + fd->base + REG_ACTL); 125 126 else 126 - outb(0x01 | PARITY_MASK, fd->base + TMC_Cntl); 127 + outb(ACTL_RESET | PARITY_MASK, fd->base + REG_ACTL); 127 128 } 128 129 129 130 static enum chip_type fdomain_identify(int port) 130 131 { 131 - u16 id = inb(port + LSB_ID_Code) | inb(port + MSB_ID_Code) << 8; 132 + u16 id = inb(port + REG_ID_LSB) | inb(port + REG_ID_MSB) << 8; 132 133 133 134 switch (id) { 134 135 case 0x6127: ··· 141 140 } 142 141 143 142 /* Try to toggle 32-bit mode. This only works on an 18c30 chip. */ 144 - outb(0x80, port + IO_Control); 145 - if ((inb(port + Configuration2) & 0x80) == 0x80) { 146 - outb(0x00, port + IO_Control); 147 - if ((inb(port + Configuration2) & 0x80) == 0x00) 143 + outb(CFG2_32BIT, port + REG_CFG2); 144 + if ((inb(port + REG_CFG2) & CFG2_32BIT)) { 145 + outb(0, port + REG_CFG2); 146 + if ((inb(port + REG_CFG2) & CFG2_32BIT) == 0) 148 147 return tmc18c30; 149 148 } 150 149 /* If that failed, we are an 18c50. */ ··· 156 155 int i; 157 156 158 157 for (i = 0; i < 255; i++) { 159 - outb(i, base + Write_Loopback); 160 - if (inb(base + Read_Loopback) != i) 158 + outb(i, base + REG_LOOPBACK); 159 + if (inb(base + REG_LOOPBACK) != i) 161 160 return 1; 162 161 } 163 162 ··· 166 165 167 166 static void fdomain_reset(int base) 168 167 { 169 - outb(1, base + SCSI_Cntl); 168 + outb(1, base + REG_BCTL); 170 169 mdelay(20); 171 - outb(0, base + SCSI_Cntl); 170 + outb(0, base + REG_BCTL); 172 171 mdelay(1150); 173 - outb(0, base + SCSI_Mode_Cntl); 174 - outb(PARITY_MASK, base + TMC_Cntl); 172 + outb(0, base + REG_MCTL); 173 + outb(PARITY_MASK, base + REG_ACTL); 175 174 } 176 175 177 176 static int fdomain_select(struct Scsi_Host *sh, int target) ··· 180 179 unsigned long timeout; 181 180 struct fdomain *fd = shost_priv(sh); 182 181 183 - outb(0x82, fd->base + SCSI_Cntl); /* Bus Enable + Select */ 184 - outb(BIT(sh->this_id) | BIT(target), fd->base + SCSI_Data_NoACK); 182 + outb(BCTL_BUSEN | BCTL_SEL, fd->base + REG_BCTL); 183 + outb(BIT(sh->this_id) | BIT(target), fd->base + REG_SCSI_DATA_NOACK); 185 184 186 185 /* Stop arbitration and enable parity */ 187 - outb(PARITY_MASK, fd->base + TMC_Cntl); 186 + outb(PARITY_MASK, fd->base + REG_ACTL); 188 187 189 188 timeout = 350; /* 350 msec */ 190 189 191 190 do { 192 - status = inb(fd->base + SCSI_Status); /* Read adapter status */ 193 - if (status & 1) { /* Busy asserted */ 191 + status = inb(fd->base + REG_BSTAT); 192 + if (status & BSTAT_BSY) { 194 193 /* Enable SCSI Bus */ 195 194 /* (on error, should make bus idle with 0) */ 196 - outb(0x80, fd->base + SCSI_Cntl); 195 + outb(BCTL_BUSEN, fd->base + REG_BCTL); 197 196 return 0; 198 197 } 199 198 mdelay(1); ··· 204 203 205 204 static void fdomain_finish_cmd(struct fdomain *fd, int result) 206 205 { 207 - outb(0x00, fd->base + Interrupt_Cntl); 206 + outb(0, fd->base + REG_ICTL); 208 207 fdomain_make_bus_idle(fd); 209 208 fd->cur_cmd->result = result; 210 209 fd->cur_cmd->scsi_done(fd->cur_cmd); ··· 217 216 unsigned char *virt, *ptr; 218 217 size_t offset, len; 219 218 220 - while ((len = inw(fd->base + FIFO_Data_Count)) > 0) { 219 + while ((len = inw(fd->base + REG_FIFO_COUNT)) > 0) { 221 220 offset = scsi_bufflen(cmd) - scsi_get_resid(cmd); 222 221 virt = scsi_kmap_atomic_sg(scsi_sglist(cmd), scsi_sg_count(cmd), 223 222 &offset, &len); 224 223 ptr = virt + offset; 225 224 if (len & 1) 226 - *ptr++ = inb(fd->base + Read_FIFO); 225 + *ptr++ = inb(fd->base + REG_FIFO); 227 226 if (len > 1) 228 - insw(fd->base + Read_FIFO, ptr, len >> 1); 227 + insw(fd->base + REG_FIFO, ptr, len >> 1); 229 228 scsi_set_resid(cmd, scsi_get_resid(cmd) - len); 230 229 scsi_kunmap_atomic_sg(virt); 231 230 } ··· 239 238 unsigned char *virt, *ptr; 240 239 size_t offset, len; 241 240 242 - while ((len = FIFO_Size - inw(fd->base + FIFO_Data_Count)) > 512) { 241 + while ((len = FIFO_Size - inw(fd->base + REG_FIFO_COUNT)) > 512) { 243 242 offset = scsi_bufflen(cmd) - scsi_get_resid(cmd); 244 243 if (len + offset > scsi_bufflen(cmd)) { 245 244 len = scsi_bufflen(cmd) - offset; ··· 250 249 &offset, &len); 251 250 ptr = virt + offset; 252 251 if (len & 1) 253 - outb(*ptr++, fd->base + Write_FIFO); 252 + outb(*ptr++, fd->base + REG_FIFO); 254 253 if (len > 1) 255 - outsw(fd->base + Write_FIFO, ptr, len >> 1); 254 + outsw(fd->base + REG_FIFO, ptr, len >> 1); 256 255 scsi_set_resid(cmd, scsi_get_resid(cmd) - len); 257 256 scsi_kunmap_atomic_sg(virt); 258 257 } ··· 271 270 spin_lock_irqsave(sh->host_lock, flags); 272 271 273 272 if (cmd->SCp.phase & in_arbitration) { 274 - status = inb(fd->base + TMC_Status); 275 - if (!(status & 0x02)) { 273 + status = inb(fd->base + REG_ASTAT); 274 + if (!(status & ASTAT_ARB)) { 276 275 fdomain_finish_cmd(fd, DID_BUS_BUSY << 16); 277 276 goto out; 278 277 } 279 278 cmd->SCp.phase = in_selection; 280 279 281 - outb(0x40 | FIFO_COUNT, fd->base + Interrupt_Cntl); 282 - outb(0x82, fd->base + SCSI_Cntl); /* Bus Enable + Select */ 283 - outb(BIT(cmd->device->host->this_id) | 284 - BIT(scmd_id(cmd)), fd->base + SCSI_Data_NoACK); 280 + outb(ICTL_SEL | FIFO_COUNT, fd->base + REG_ICTL); 281 + outb(BCTL_BUSEN | BCTL_SEL, fd->base + REG_BCTL); 282 + outb(BIT(cmd->device->host->this_id) | BIT(scmd_id(cmd)), 283 + fd->base + REG_SCSI_DATA_NOACK); 285 284 /* Stop arbitration and enable parity */ 286 - outb(0x10 | PARITY_MASK, fd->base + TMC_Cntl); 285 + outb(ACTL_IRQEN | PARITY_MASK, fd->base + REG_ACTL); 287 286 goto out; 288 287 } else if (cmd->SCp.phase & in_selection) { 289 - status = inb(fd->base + SCSI_Status); 290 - if (!(status & 0x01)) { 288 + status = inb(fd->base + REG_BSTAT); 289 + if (!(status & BSTAT_BSY)) { 291 290 /* Try again, for slow devices */ 292 291 if (fdomain_select(cmd->device->host, scmd_id(cmd))) { 293 292 fdomain_finish_cmd(fd, DID_NO_CONNECT << 16); 294 293 goto out; 295 294 } 296 295 /* Stop arbitration and enable parity */ 297 - outb(0x10 | PARITY_MASK, fd->base + TMC_Cntl); 296 + outb(ACTL_IRQEN | PARITY_MASK, fd->base + REG_ACTL); 298 297 } 299 298 cmd->SCp.phase = in_other; 300 - outb(0x90 | FIFO_COUNT, fd->base + Interrupt_Cntl); 301 - outb(0x80, fd->base + SCSI_Cntl); 299 + outb(ICTL_FIFO | ICTL_REQ | FIFO_COUNT, fd->base + REG_ICTL); 300 + outb(BCTL_BUSEN, fd->base + REG_BCTL); 302 301 goto out; 303 302 } 304 303 305 304 /* cur_cmd->SCp.phase == in_other: this is the body of the routine */ 306 - status = inb(fd->base + SCSI_Status); 305 + status = inb(fd->base + REG_BSTAT); 307 306 308 - if (status & 0x10) { /* REQ */ 307 + if (status & BSTAT_REQ) { 309 308 switch (status & 0x0e) { 310 - case 0x08: /* COMMAND OUT */ 309 + case BSTAT_CMD: /* COMMAND OUT */ 311 310 outb(cmd->cmnd[cmd->SCp.sent_command++], 312 - fd->base + Write_SCSI_Data); 311 + fd->base + REG_SCSI_DATA); 313 312 break; 314 - case 0x00: /* DATA OUT -- tmc18c50/tmc18c30 only */ 313 + case 0: /* DATA OUT -- tmc18c50/tmc18c30 only */ 315 314 if (fd->chip != tmc1800 && !cmd->SCp.have_data_in) { 316 315 cmd->SCp.have_data_in = -1; 317 - outb(0xd0 | PARITY_MASK, fd->base + TMC_Cntl); 316 + outb(ACTL_IRQEN | ACTL_FIFOWR | ACTL_FIFOEN | 317 + PARITY_MASK, fd->base + REG_ACTL); 318 318 } 319 319 break; 320 - case 0x04: /* DATA IN -- tmc18c50/tmc18c30 only */ 320 + case BSTAT_IO: /* DATA IN -- tmc18c50/tmc18c30 only */ 321 321 if (fd->chip != tmc1800 && !cmd->SCp.have_data_in) { 322 322 cmd->SCp.have_data_in = 1; 323 - outb(0x90 | PARITY_MASK, fd->base + TMC_Cntl); 323 + outb(ACTL_IRQEN | ACTL_FIFOEN | PARITY_MASK, 324 + fd->base + REG_ACTL); 324 325 } 325 326 break; 326 - case 0x0c: /* STATUS IN */ 327 - cmd->SCp.Status = inb(fd->base + Read_SCSI_Data); 327 + case BSTAT_CMD | BSTAT_IO: /* STATUS IN */ 328 + cmd->SCp.Status = inb(fd->base + REG_SCSI_DATA); 328 329 break; 329 - case 0x0a: /* MESSAGE OUT */ 330 - outb(MESSAGE_REJECT, fd->base + Write_SCSI_Data); 330 + case BSTAT_MSG | BSTAT_CMD: /* MESSAGE OUT */ 331 + outb(MESSAGE_REJECT, fd->base + REG_SCSI_DATA); 331 332 break; 332 - case 0x0e: /* MESSAGE IN */ 333 - cmd->SCp.Message = inb(fd->base + Read_SCSI_Data); 333 + case BSTAT_MSG | BSTAT_IO | BSTAT_CMD: /* MESSAGE IN */ 334 + cmd->SCp.Message = inb(fd->base + REG_SCSI_DATA); 334 335 if (!cmd->SCp.Message) 335 336 ++done; 336 337 break; ··· 343 340 cmd->SCp.sent_command >= cmd->cmd_len) { 344 341 if (cmd->sc_data_direction == DMA_TO_DEVICE) { 345 342 cmd->SCp.have_data_in = -1; 346 - outb(0xd0 | PARITY_MASK, fd->base + TMC_Cntl); 343 + outb(ACTL_IRQEN | ACTL_FIFOWR | ACTL_FIFOEN | 344 + PARITY_MASK, fd->base + REG_ACTL); 347 345 } else { 348 346 cmd->SCp.have_data_in = 1; 349 - outb(0x90 | PARITY_MASK, fd->base + TMC_Cntl); 347 + outb(ACTL_IRQEN | ACTL_FIFOEN | PARITY_MASK, 348 + fd->base + REG_ACTL); 350 349 } 351 350 } 352 351 ··· 364 359 (DID_OK << 16)); 365 360 } else { 366 361 if (cmd->SCp.phase & disconnect) { 367 - outb(0xd0 | FIFO_COUNT, fd->base + Interrupt_Cntl); 368 - outb(0x00, fd->base + SCSI_Cntl); 362 + outb(ICTL_FIFO | ICTL_SEL | ICTL_REQ | FIFO_COUNT, 363 + fd->base + REG_ICTL); 364 + outb(0, fd->base + REG_BCTL); 369 365 } else 370 - outb(0x90 | FIFO_COUNT, fd->base + Interrupt_Cntl); 366 + outb(ICTL_FIFO | ICTL_REQ | FIFO_COUNT, 367 + fd->base + REG_ICTL); 371 368 } 372 369 out: 373 370 spin_unlock_irqrestore(sh->host_lock, flags); ··· 380 373 struct fdomain *fd = dev_id; 381 374 382 375 /* Is it our IRQ? */ 383 - if ((inb(fd->base + TMC_Status) & 0x01) == 0) 376 + if ((inb(fd->base + REG_ASTAT) & ASTAT_IRQ) == 0) 384 377 return IRQ_NONE; 385 378 386 - outb(0x00, fd->base + Interrupt_Cntl); 379 + outb(0, fd->base + REG_ICTL); 387 380 388 381 /* We usually have one spurious interrupt after each command. */ 389 382 if (!fd->cur_cmd) /* Spurious interrupt */ ··· 413 406 fdomain_make_bus_idle(fd); 414 407 415 408 /* Start arbitration */ 416 - outb(0x00, fd->base + Interrupt_Cntl); 417 - outb(0x00, fd->base + SCSI_Cntl); /* Disable data drivers */ 418 - outb(BIT(cmd->device->host->this_id), 419 - fd->base + SCSI_Data_NoACK); /* Set our id bit */ 420 - outb(0x20, fd->base + Interrupt_Cntl); 421 - outb(0x14 | PARITY_MASK, fd->base + TMC_Cntl); /* Start arbitration */ 409 + outb(0, fd->base + REG_ICTL); 410 + outb(0, fd->base + REG_BCTL); /* Disable data drivers */ 411 + /* Set our id bit */ 412 + outb(BIT(cmd->device->host->this_id), fd->base + REG_SCSI_DATA_NOACK); 413 + outb(ICTL_ARB, fd->base + REG_ICTL); 414 + /* Start arbitration */ 415 + outb(ACTL_ARB | ACTL_IRQEN | PARITY_MASK, fd->base + REG_ACTL); 422 416 423 417 spin_unlock_irqrestore(sh->host_lock, flags); 424 418
+89 -28
drivers/scsi/fdomain.h
··· 12 12 sent_ident = 0x40, 13 13 }; 14 14 15 - enum in_port_type { 16 - Read_SCSI_Data = 0, 17 - SCSI_Status = 1, 18 - TMC_Status = 2, 19 - FIFO_Status = 3, /* tmc18c50/tmc18c30 only */ 20 - Interrupt_Cond = 4, /* tmc18c50/tmc18c30 only */ 21 - LSB_ID_Code = 5, 22 - MSB_ID_Code = 6, 23 - Read_Loopback = 7, 24 - SCSI_Data_NoACK = 8, 25 - Interrupt_Status = 9, 26 - Configuration1 = 10, 27 - Configuration2 = 11, /* tmc18c50/tmc18c30 only */ 28 - Read_FIFO = 12, 29 - FIFO_Data_Count = 14 30 - }; 31 - 32 - enum out_port_type { 33 - Write_SCSI_Data = 0, 34 - SCSI_Cntl = 1, 35 - Interrupt_Cntl = 2, 36 - SCSI_Mode_Cntl = 3, 37 - TMC_Cntl = 4, 38 - Memory_Cntl = 5, /* tmc18c50/tmc18c30 only */ 39 - Write_Loopback = 7, 40 - IO_Control = 11, /* tmc18c30 only */ 41 - Write_FIFO = 12 42 - }; 15 + /* (@) = not present on TMC1800, (#) = not present on TMC1800 and TMC18C50 */ 16 + #define REG_SCSI_DATA 0 /* R/W: SCSI Data (with ACK) */ 17 + #define REG_BSTAT 1 /* R: SCSI Bus Status */ 18 + #define BSTAT_BSY BIT(0) /* Busy */ 19 + #define BSTAT_MSG BIT(1) /* Message */ 20 + #define BSTAT_IO BIT(2) /* Input/Output */ 21 + #define BSTAT_CMD BIT(3) /* Command/Data */ 22 + #define BSTAT_REQ BIT(4) /* Request and Not Ack */ 23 + #define BSTAT_SEL BIT(5) /* Select */ 24 + #define BSTAT_ACK BIT(6) /* Acknowledge and Request */ 25 + #define BSTAT_ATN BIT(7) /* Attention */ 26 + #define REG_BCTL 1 /* W: SCSI Bus Control */ 27 + #define BCTL_RST BIT(0) /* Bus Reset */ 28 + #define BCTL_SEL BIT(1) /* Select */ 29 + #define BCTL_BSY BIT(2) /* Busy */ 30 + #define BCTL_ATN BIT(3) /* Attention */ 31 + #define BCTL_IO BIT(4) /* Input/Output */ 32 + #define BCTL_CMD BIT(5) /* Command/Data */ 33 + #define BCTL_MSG BIT(6) /* Message */ 34 + #define BCTL_BUSEN BIT(7) /* Enable bus drivers */ 35 + #define REG_ASTAT 2 /* R: Adapter Status 1 */ 36 + #define ASTAT_IRQ BIT(0) /* Interrupt active */ 37 + #define ASTAT_ARB BIT(1) /* Arbitration complete */ 38 + #define ASTAT_PARERR BIT(2) /* Parity error */ 39 + #define ASTAT_RST BIT(3) /* SCSI reset occurred */ 40 + #define ASTAT_FIFODIR BIT(4) /* FIFO direction */ 41 + #define ASTAT_FIFOEN BIT(5) /* FIFO enabled */ 42 + #define ASTAT_PAREN BIT(6) /* Parity enabled */ 43 + #define ASTAT_BUSEN BIT(7) /* Bus drivers enabled */ 44 + #define REG_ICTL 2 /* W: Interrupt Control */ 45 + #define ICTL_FIFO_MASK 0x0f /* FIFO threshold, 1/16 FIFO size */ 46 + #define ICTL_FIFO BIT(4) /* Int. on FIFO count */ 47 + #define ICTL_ARB BIT(5) /* Int. on Arbitration complete */ 48 + #define ICTL_SEL BIT(6) /* Int. on SCSI Select */ 49 + #define ICTL_REQ BIT(7) /* Int. on SCSI Request */ 50 + #define REG_FSTAT 3 /* R: Adapter Status 2 (FIFO) - (@) */ 51 + #define FSTAT_ONOTEMPTY BIT(0) /* Output FIFO not empty */ 52 + #define FSTAT_INOTEMPTY BIT(1) /* Input FIFO not empty */ 53 + #define FSTAT_NOTEMPTY BIT(2) /* Main FIFO not empty */ 54 + #define FSTAT_NOTFULL BIT(3) /* Main FIFO not full */ 55 + #define REG_MCTL 3 /* W: SCSI Data Mode Control */ 56 + #define MCTL_ACK_MASK 0x0f /* Acknowledge period */ 57 + #define MCTL_ACTDEASS BIT(4) /* Active deassert of REQ and ACK */ 58 + #define MCTL_TARGET BIT(5) /* Enable target mode */ 59 + #define MCTL_FASTSYNC BIT(6) /* Enable Fast Synchronous */ 60 + #define MCTL_SYNC BIT(7) /* Enable Synchronous */ 61 + #define REG_INTCOND 4 /* R: Interrupt Condition - (@) */ 62 + #define IRQ_FIFO BIT(1) /* FIFO interrupt */ 63 + #define IRQ_REQ BIT(2) /* SCSI Request interrupt */ 64 + #define IRQ_SEL BIT(3) /* SCSI Select interrupt */ 65 + #define IRQ_ARB BIT(4) /* SCSI Arbitration interrupt */ 66 + #define IRQ_RST BIT(5) /* SCSI Reset interrupt */ 67 + #define IRQ_FORCED BIT(6) /* Forced interrupt */ 68 + #define IRQ_TIMEOUT BIT(7) /* Bus timeout */ 69 + #define REG_ACTL 4 /* W: Adapter Control 1 */ 70 + #define ACTL_RESET BIT(0) /* Reset FIFO, parity, reset int. */ 71 + #define ACTL_FIRQ BIT(1) /* Set Forced interrupt */ 72 + #define ACTL_ARB BIT(2) /* Initiate Bus Arbitration */ 73 + #define ACTL_PAREN BIT(3) /* Enable SCSI Parity */ 74 + #define ACTL_IRQEN BIT(4) /* Enable interrupts */ 75 + #define ACTL_CLRFIRQ BIT(5) /* Clear Forced interrupt */ 76 + #define ACTL_FIFOWR BIT(6) /* FIFO Direction (1=write) */ 77 + #define ACTL_FIFOEN BIT(7) /* Enable FIFO */ 78 + #define REG_ID_LSB 5 /* R: ID Code (LSB) */ 79 + #define REG_ACTL2 5 /* Adapter Control 2 - (@) */ 80 + #define ACTL2_RAMOVRLY BIT(0) /* Enable RAM overlay */ 81 + #define ACTL2_SLEEP BIT(7) /* Sleep mode */ 82 + #define REG_ID_MSB 6 /* R: ID Code (MSB) */ 83 + #define REG_LOOPBACK 7 /* R/W: Loopback */ 84 + #define REG_SCSI_DATA_NOACK 8 /* R/W: SCSI Data (no ACK) */ 85 + #define REG_ASTAT3 9 /* R: Adapter Status 3 */ 86 + #define ASTAT3_ACTDEASS BIT(0) /* Active deassert enabled */ 87 + #define ASTAT3_RAMOVRLY BIT(1) /* RAM overlay enabled */ 88 + #define ASTAT3_TARGERR BIT(2) /* Target error */ 89 + #define ASTAT3_IRQEN BIT(3) /* Interrupts enabled */ 90 + #define ASTAT3_IRQMASK 0xf0 /* Enabled interrupts mask */ 91 + #define REG_CFG1 10 /* R: Configuration Register 1 */ 92 + #define CFG1_BUS BIT(0) /* 0 = ISA */ 93 + #define CFG1_IRQ_MASK 0x0e /* IRQ jumpers */ 94 + #define CFG1_IO_MASK 0x30 /* I/O base jumpers */ 95 + #define CFG1_BIOS_MASK 0xc0 /* BIOS base jumpers */ 96 + #define REG_CFG2 11 /* R/W: Configuration Register 2 (@) */ 97 + #define CFG2_ROMDIS BIT(0) /* ROM disabled */ 98 + #define CFG2_RAMDIS BIT(1) /* RAM disabled */ 99 + #define CFG2_IRQEDGE BIT(2) /* Edge-triggered interrupts */ 100 + #define CFG2_NOWS BIT(3) /* No wait states */ 101 + #define CFG2_32BIT BIT(7) /* 32-bit mode */ 102 + #define REG_FIFO 12 /* R/W: FIFO */ 103 + #define REG_FIFO_COUNT 14 /* R: FIFO Data Count */ 43 104 44 105 #ifdef CONFIG_PM_SLEEP 45 106 static const struct dev_pm_ops fdomain_pm_ops;
+2 -2
drivers/scsi/fdomain_isa.c
··· 131 131 if (!request_region(base, FDOMAIN_REGION_SIZE, "fdomain_isa")) 132 132 return 0; 133 133 134 - irq = irqs[(inb(base + Configuration1) & 0x0e) >> 1]; 134 + irq = irqs[(inb(base + REG_CFG1) & 0x0e) >> 1]; 135 135 136 136 137 137 if (sig) ··· 164 164 } 165 165 166 166 if (irq_ <= 0) 167 - irq_ = irqs[(inb(io[ndev] + Configuration1) & 0x0e) >> 1]; 167 + irq_ = irqs[(inb(io[ndev] + REG_CFG1) & 0x0e) >> 1]; 168 168 169 169 sh = fdomain_create(io[ndev], irq_, scsi_id[ndev], dev); 170 170 if (!sh) {