Lines Matching refs:atpdev
1307 struct atp_unit *atpdev = shost_priv(shpnt); in atp870_init() local
1308 struct pci_dev *pdev = atpdev->pdev; in atp870_init()
1323 atpdev->ioport[0] = shpnt->io_port; in atp870_init()
1324 atpdev->pciport[0] = shpnt->io_port + 0x20; in atp870_init()
1326 atpdev->host_id[0] = host_id; in atp870_init()
1327 scam_on = atp_readb_pci(atpdev, 0, 2); in atp870_init()
1328 atpdev->global_map[0] = atp_readb_base(atpdev, 0x2d); in atp870_init()
1329 atpdev->ultra_map[0] = atp_readw_base(atpdev, 0x2e); in atp870_init()
1331 if (atpdev->ultra_map[0] == 0) { in atp870_init()
1333 atpdev->global_map[0] = 0x20; in atp870_init()
1334 atpdev->ultra_map[0] = 0xffff; in atp870_init()
1338 atp_writeb_base(atpdev, 0x3e, 0x00); /* enable terminator */ in atp870_init()
1340 k = (atp_readb_base(atpdev, 0x3a) & 0xf3) | 0x10; in atp870_init()
1341 atp_writeb_base(atpdev, 0x3a, k); in atp870_init()
1342 atp_writeb_base(atpdev, 0x3a, k & 0xdf); in atp870_init()
1344 atp_writeb_base(atpdev, 0x3a, k); in atp870_init()
1346 atp_set_host_id(atpdev, 0, host_id); in atp870_init()
1349 atp_writeb_base(atpdev, 0x3a, atp_readb_base(atpdev, 0x3a) | 0x10); in atp870_init()
1350 atp_is(atpdev, 0, wide_chip, 0); in atp870_init()
1351 atp_writeb_base(atpdev, 0x3a, atp_readb_base(atpdev, 0x3a) & 0xef); in atp870_init()
1352 atp_writeb_base(atpdev, 0x3b, atp_readb_base(atpdev, 0x3b) | 0x20); in atp870_init()
1359 struct atp_unit *atpdev = shost_priv(shpnt); in atp880_init() local
1360 struct pci_dev *pdev = atpdev->pdev; in atp880_init()
1366 atpdev->ioport[0] = shpnt->io_port + 0x40; in atp880_init()
1367 atpdev->pciport[0] = shpnt->io_port + 0x28; in atp880_init()
1369 host_id = atp_readb_base(atpdev, 0x39) >> 4; in atp880_init()
1374 atpdev->host_id[0] = host_id; in atp880_init()
1376 atpdev->global_map[0] = atp_readb_base(atpdev, 0x35); in atp880_init()
1377 atpdev->ultra_map[0] = atp_readw_base(atpdev, 0x3c); in atp880_init()
1382 atp_writew_base(atpdev, 0x34, n); in atp880_init()
1384 if (atp_readb_base(atpdev, 0x30) == 0xff) in atp880_init()
1387 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x30); in atp880_init()
1388 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x31); in atp880_init()
1389 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x32); in atp880_init()
1390 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x33); in atp880_init()
1391 atp_writew_base(atpdev, 0x34, n); in atp880_init()
1393 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x30); in atp880_init()
1394 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x31); in atp880_init()
1395 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x32); in atp880_init()
1396 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x33); in atp880_init()
1397 atp_writew_base(atpdev, 0x34, n); in atp880_init()
1399 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x30); in atp880_init()
1400 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x31); in atp880_init()
1401 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x32); in atp880_init()
1402 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x33); in atp880_init()
1403 atp_writew_base(atpdev, 0x34, n); in atp880_init()
1405 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x30); in atp880_init()
1406 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x31); in atp880_init()
1407 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x32); in atp880_init()
1408 atpdev->sp[0][m++] = atp_readb_base(atpdev, 0x33); in atp880_init()
1411 atp_writew_base(atpdev, 0x34, 0); in atp880_init()
1412 atpdev->ultra_map[0] = 0; in atp880_init()
1413 atpdev->async[0] = 0; in atp880_init()
1416 if (atpdev->sp[0][k] > 1) in atp880_init()
1417 atpdev->ultra_map[0] |= n; in atp880_init()
1419 if (atpdev->sp[0][k] == 0) in atp880_init()
1420 atpdev->async[0] |= n; in atp880_init()
1422 atpdev->async[0] = ~(atpdev->async[0]); in atp880_init()
1423 atp_writeb_base(atpdev, 0x35, atpdev->global_map[0]); in atp880_init()
1425 k = atp_readb_base(atpdev, 0x38) & 0x80; in atp880_init()
1426 atp_writeb_base(atpdev, 0x38, k); in atp880_init()
1427 atp_writeb_base(atpdev, 0x3b, 0x20); in atp880_init()
1429 atp_writeb_base(atpdev, 0x3b, 0); in atp880_init()
1431 atp_readb_io(atpdev, 0, 0x1b); in atp880_init()
1432 atp_readb_io(atpdev, 0, 0x17); in atp880_init()
1434 atp_set_host_id(atpdev, 0, host_id); in atp880_init()
1436 tscam(shpnt, true, atp_readb_base(atpdev, 0x22)); in atp880_init()
1437 atp_is(atpdev, 0, true, atp_readb_base(atpdev, 0x3f) & 0x40); in atp880_init()
1438 atp_writeb_base(atpdev, 0x38, 0xb0); in atp880_init()
1445 struct atp_unit *atpdev = shost_priv(shpnt); in atp885_init() local
1446 struct pci_dev *pdev = atpdev->pdev; in atp885_init()
1455 atpdev->ioport[0] = shpnt->io_port + 0x80; in atp885_init()
1456 atpdev->ioport[1] = shpnt->io_port + 0xc0; in atp885_init()
1457 atpdev->pciport[0] = shpnt->io_port + 0x40; in atp885_init()
1458 atpdev->pciport[1] = shpnt->io_port + 0x50; in atp885_init()
1460 c = atp_readb_base(atpdev, 0x29); in atp885_init()
1461 atp_writeb_base(atpdev, 0x29, c | 0x04); in atp885_init()
1465 atp_writew_base(atpdev, 0x3c, n); in atp885_init()
1466 if (atp_readl_base(atpdev, 0x38) == 0xffffffff) in atp885_init()
1469 atpdev->global_map[m] = 0; in atp885_init()
1471 atp_writew_base(atpdev, 0x3c, n++); in atp885_init()
1473 atp_readl_base(atpdev, 0x38); in atp885_init()
1476 atp_writew_base(atpdev, 0x3c, n++); in atp885_init()
1477 ((u32 *)&atpdev->sp[m][0])[k] = in atp885_init()
1478 atp_readl_base(atpdev, 0x38); in atp885_init()
1483 c = atp_readb_base(atpdev, 0x29); in atp885_init()
1484 atp_writeb_base(atpdev, 0x29, c & 0xfb); in atp885_init()
1486 atpdev->ultra_map[c] = 0; in atp885_init()
1487 atpdev->async[c] = 0; in atp885_init()
1490 if (atpdev->sp[c][k] > 1) in atp885_init()
1491 atpdev->ultra_map[c] |= n; in atp885_init()
1493 if (atpdev->sp[c][k] == 0) in atp885_init()
1494 atpdev->async[c] |= n; in atp885_init()
1496 atpdev->async[c] = ~(atpdev->async[c]); in atp885_init()
1498 if (atpdev->global_map[c] == 0) { in atp885_init()
1501 atpdev->global_map[c] |= 0x20; in atp885_init()
1503 atpdev->global_map[c] |= k; in atp885_init()
1505 atpdev->global_map[c] |= 0x08; in atp885_init()
1506 atpdev->host_id[c] = setupdata[c][0] & 0x07; in atp885_init()
1510 k = atp_readb_base(atpdev, 0x28) & 0x8f; in atp885_init()
1512 atp_writeb_base(atpdev, 0x28, k); in atp885_init()
1513 atp_writeb_pci(atpdev, 0, 1, 0x80); in atp885_init()
1514 atp_writeb_pci(atpdev, 1, 1, 0x80); in atp885_init()
1516 atp_writeb_pci(atpdev, 0, 1, 0); in atp885_init()
1517 atp_writeb_pci(atpdev, 1, 1, 0); in atp885_init()
1519 atp_readb_io(atpdev, 0, 0x1b); in atp885_init()
1520 atp_readb_io(atpdev, 0, 0x17); in atp885_init()
1521 atp_readb_io(atpdev, 1, 0x1b); in atp885_init()
1522 atp_readb_io(atpdev, 1, 0x17); in atp885_init()
1524 k = atpdev->host_id[0]; in atp885_init()
1527 atp_set_host_id(atpdev, 0, k); in atp885_init()
1529 k = atpdev->host_id[1]; in atp885_init()
1532 atp_set_host_id(atpdev, 1, k); in atp885_init()
1536 atp_is(atpdev, 0, true, atp_readb_io(atpdev, 0, 0x1b) >> 7); in atp885_init()
1537 atp_writeb_io(atpdev, 0, 0x16, 0x80); in atp885_init()
1539 atp_is(atpdev, 1, true, atp_readb_io(atpdev, 1, 0x1b) >> 7); in atp885_init()
1540 atp_writeb_io(atpdev, 1, 0x16, 0x80); in atp885_init()
1541 k = atp_readb_base(atpdev, 0x28) & 0xcf; in atp885_init()
1543 atp_writeb_base(atpdev, 0x28, k); in atp885_init()
1544 k = atp_readb_base(atpdev, 0x1f) | 0x80; in atp885_init()
1545 atp_writeb_base(atpdev, 0x1f, k); in atp885_init()
1546 k = atp_readb_base(atpdev, 0x29) | 0x01; in atp885_init()
1547 atp_writeb_base(atpdev, 0x29, k); in atp885_init()
1549 shpnt->max_lun = (atpdev->global_map[0] & 0x07) + 1; in atp885_init()
1551 shpnt->this_id = atpdev->host_id[0]; in atp885_init()
1558 struct atp_unit *atpdev; in atp870u_probe() local
1586 atpdev = shost_priv(shpnt); in atp870u_probe()
1588 atpdev->host = shpnt; in atp870u_probe()
1589 atpdev->pdev = pdev; in atp870u_probe()
1590 pci_set_drvdata(pdev, atpdev); in atp870u_probe()
1595 atpdev->baseport = shpnt->io_port; in atp870u_probe()
1605 if (is880(atpdev)) in atp870u_probe()
1607 else if (is885(atpdev)) in atp870u_probe()