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

ata: pata_parport-bpck6: remove parallel port bit defines

Remove port_stb, port_afd, cmd_stb, port_init, data_stb and port_sel
defines and use standard PARPORT_CONTROL_* instead.

Signed-off-by: Ondrej Zary <linux@zary.sk>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

authored by

Ondrej Zary and committed by
Damien Le Moal
5e4696d5 f467fd0e

+27 -32
+27 -32
drivers/ata/pata_parport/ppc6lnx.c
··· 16 16 //*************************************************************************** 17 17 18 18 19 - #define port_stb 1 20 - #define port_afd 2 21 - #define cmd_stb port_afd 22 - #define port_init 4 23 - #define data_stb port_init 24 - #define port_sel 8 25 19 #define port_int 16 26 20 #define port_dir 0x20 27 21 ··· 117 123 118 124 CUR_CTRL = pi->saved_r2; 119 125 120 - CUR_CTRL |= port_sel; 126 + CUR_CTRL |= PARPORT_CONTROL_SELECT; 121 127 122 128 outb(CUR_CTRL, pi->port + 2); 123 129 ··· 129 135 outb(pi->unit, pi->port); 130 136 outb(~pi->unit, pi->port); 131 137 132 - CUR_CTRL &= ~port_sel; 138 + CUR_CTRL &= ~PARPORT_CONTROL_SELECT; 133 139 134 140 outb(CUR_CTRL, pi->port + 2); 135 141 136 - CUR_CTRL = (CUR_CTRL & port_int) | port_init; 142 + CUR_CTRL = (CUR_CTRL & port_int) | PARPORT_CONTROL_INIT; 137 143 138 144 outb(CUR_CTRL, pi->port + 2); 139 145 ··· 144 150 145 151 outb(i, pi->port); 146 152 147 - CUR_CTRL |= port_sel; 153 + CUR_CTRL |= PARPORT_CONTROL_SELECT; 148 154 149 155 outb(CUR_CTRL, pi->port + 2); 150 156 151 157 // DELAY 152 158 153 - CUR_CTRL |= port_afd; 159 + CUR_CTRL |= PARPORT_CONTROL_AUTOFD; 154 160 155 161 outb(CUR_CTRL, pi->port + 2); 156 162 ··· 160 166 161 167 if (j == k) 162 168 { 163 - CUR_CTRL &= ~port_afd; 169 + CUR_CTRL &= ~PARPORT_CONTROL_AUTOFD; 164 170 165 171 outb(CUR_CTRL, pi->port + 2); 166 172 ··· 169 175 if (j == k) 170 176 { 171 177 if (i & 4) // EPP 172 - CUR_CTRL &= ~(port_sel | port_init); 178 + CUR_CTRL &= ~(PARPORT_CONTROL_SELECT | PARPORT_CONTROL_INIT); 173 179 else // PPC/ECP 174 - CUR_CTRL &= ~port_sel; 180 + CUR_CTRL &= ~PARPORT_CONTROL_SELECT; 175 181 176 182 outb(CUR_CTRL, pi->port + 2); 177 183 ··· 191 197 static void ppc6_deselect(struct pi_adapter *pi) 192 198 { 193 199 if (mode_map[pi->mode] & 4) // EPP 194 - CUR_CTRL |= port_init; 200 + CUR_CTRL |= PARPORT_CONTROL_INIT; 195 201 else // PPC/ECP 196 - CUR_CTRL |= port_sel; 202 + CUR_CTRL |= PARPORT_CONTROL_SELECT; 197 203 198 204 outb(CUR_CTRL, pi->port + 2); 199 205 200 206 outb(pi->saved_r0, pi->port); 201 207 202 - outb((pi->saved_r2 | port_sel), pi->port + 2); 208 + outb((pi->saved_r2 | PARPORT_CONTROL_SELECT), pi->port + 2); 203 209 204 210 outb(pi->saved_r2, pi->port + 2); 205 211 } ··· 217 223 { 218 224 outb(cmd, pi->port); 219 225 220 - CUR_CTRL ^= cmd_stb; 226 + CUR_CTRL ^= PARPORT_CONTROL_AUTOFD; 221 227 222 228 outb(CUR_CTRL, pi->port + 2); 223 229 ··· 248 254 { 249 255 outb(data, pi->port); 250 256 251 - CUR_CTRL ^= data_stb; 257 + CUR_CTRL ^= PARPORT_CONTROL_INIT; 252 258 253 259 outb(CUR_CTRL, pi->port + 2); 254 260 ··· 277 283 case PPCMODE_UNI_SW : 278 284 case PPCMODE_UNI_FW : 279 285 { 280 - CUR_CTRL = (CUR_CTRL & ~port_stb) ^ data_stb; 286 + CUR_CTRL = (CUR_CTRL & ~PARPORT_CONTROL_STROBE) ^ PARPORT_CONTROL_INIT; 281 287 282 288 outb(CUR_CTRL, pi->port + 2); 283 289 ··· 287 293 288 294 data = ((data & 0x80) >> 1) | ((data & 0x38) >> 3); 289 295 290 - CUR_CTRL |= port_stb; 296 + CUR_CTRL |= PARPORT_CONTROL_STROBE; 291 297 292 298 outb(CUR_CTRL, pi->port + 2); 293 299 ··· 305 311 306 312 outb(CUR_CTRL, pi->port + 2); 307 313 308 - CUR_CTRL = (CUR_CTRL | port_stb) ^ data_stb; 314 + CUR_CTRL = (CUR_CTRL | PARPORT_CONTROL_STROBE) ^ PARPORT_CONTROL_INIT; 309 315 310 316 outb(CUR_CTRL, pi->port + 2); 311 317 312 318 data = inb(pi->port); 313 319 314 - CUR_CTRL &= ~port_stb; 320 + CUR_CTRL &= ~PARPORT_CONTROL_STROBE; 315 321 316 322 outb(CUR_CTRL, pi->port + 2); 317 323 ··· 370 376 { 371 377 u8 d; 372 378 373 - CUR_CTRL = (CUR_CTRL & ~port_stb) ^ data_stb; 379 + CUR_CTRL = (CUR_CTRL & ~PARPORT_CONTROL_STROBE) 380 + ^ PARPORT_CONTROL_INIT; 374 381 375 382 outb(CUR_CTRL, pi->port + 2); 376 383 ··· 381 386 382 387 d = ((d & 0x80) >> 1) | ((d & 0x38) >> 3); 383 388 384 - CUR_CTRL |= port_stb; 389 + CUR_CTRL |= PARPORT_CONTROL_STROBE; 385 390 386 391 outb(CUR_CTRL, pi->port + 2); 387 392 ··· 403 408 404 409 outb(CUR_CTRL, pi->port + 2); 405 410 406 - CUR_CTRL |= port_stb; 411 + CUR_CTRL |= PARPORT_CONTROL_STROBE; 407 412 408 413 while(count) 409 414 { 410 - CUR_CTRL ^= data_stb; 415 + CUR_CTRL ^= PARPORT_CONTROL_INIT; 411 416 412 417 outb(CUR_CTRL, pi->port + 2); 413 418 ··· 415 420 count--; 416 421 } 417 422 418 - CUR_CTRL &= ~port_stb; 423 + CUR_CTRL &= ~PARPORT_CONTROL_STROBE; 419 424 420 425 outb(CUR_CTRL, pi->port + 2); 421 426 ··· 520 525 { 521 526 outb(*data++, pi->port); 522 527 523 - CUR_CTRL ^= data_stb; 528 + CUR_CTRL ^= PARPORT_CONTROL_INIT; 524 529 525 530 outb(CUR_CTRL, pi->port + 2); 526 531 } ··· 535 540 536 541 ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_FASTWR); 537 542 538 - CUR_CTRL |= port_stb; 543 + CUR_CTRL |= PARPORT_CONTROL_STROBE; 539 544 540 545 outb(CUR_CTRL, pi->port + 2); 541 546 ··· 550 555 551 556 if (this == last) 552 557 { 553 - CUR_CTRL ^= data_stb; 558 + CUR_CTRL ^= PARPORT_CONTROL_INIT; 554 559 555 560 outb(CUR_CTRL, pi->port + 2); 556 561 } ··· 562 567 } 563 568 } 564 569 565 - CUR_CTRL &= ~port_stb; 570 + CUR_CTRL &= ~PARPORT_CONTROL_STROBE; 566 571 567 572 outb(CUR_CTRL, pi->port + 2); 568 573