aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorKars de Jong <jongk@linux-m68k.org>2007-06-17 08:47:05 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-17 17:15:56 -0400
commit632731345bfb87fd1f4dc509928cc4a7efc12a89 (patch)
treeaa656433bc8bd5b48581d15b3e7614bdcafc8ff0 /drivers/scsi/53c700.c
parentcc78d30af0823f33069fb4813c47571d4e0675a2 (diff)
[SCSI] 53c700: m68k support for the 53c700 SCSI core
Add m68k support to the 53c700 SCSI driver Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 405d9d6f9653..92dd7a6b524f 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -653,7 +653,6 @@ NCR_700_chip_setup(struct Scsi_Host *host)
653{ 653{
654 struct NCR_700_Host_Parameters *hostdata = 654 struct NCR_700_Host_Parameters *hostdata =
655 (struct NCR_700_Host_Parameters *)host->hostdata[0]; 655 (struct NCR_700_Host_Parameters *)host->hostdata[0];
656 __u32 dcntl_extra = 0;
657 __u8 min_period; 656 __u8 min_period;
658 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP); 657 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP);
659 658
@@ -678,13 +677,14 @@ NCR_700_chip_setup(struct Scsi_Host *host)
678 burst_disable = BURST_DISABLE; 677 burst_disable = BURST_DISABLE;
679 break; 678 break;
680 } 679 }
681 dcntl_extra = COMPAT_700_MODE; 680 hostdata->dcntl_extra |= COMPAT_700_MODE;
682 681
683 NCR_700_writeb(dcntl_extra, host, DCNTL_REG); 682 NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG);
684 NCR_700_writeb(burst_length | hostdata->dmode_extra, 683 NCR_700_writeb(burst_length | hostdata->dmode_extra,
685 host, DMODE_710_REG); 684 host, DMODE_710_REG);
686 NCR_700_writeb(burst_disable | (hostdata->differential ? 685 NCR_700_writeb(burst_disable | hostdata->ctest7_extra |
687 DIFF : 0), host, CTEST7_REG); 686 (hostdata->differential ? DIFF : 0),
687 host, CTEST7_REG);
688 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG); 688 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG);
689 NCR_700_writeb(FULL_ARBITRATION | ENABLE_PARITY | PARITY 689 NCR_700_writeb(FULL_ARBITRATION | ENABLE_PARITY | PARITY
690 | AUTO_ATN, host, SCNTL0_REG); 690 | AUTO_ATN, host, SCNTL0_REG);
@@ -719,13 +719,13 @@ NCR_700_chip_setup(struct Scsi_Host *host)
719 * of spec: sync divider 2, async divider 3 */ 719 * of spec: sync divider 2, async divider 3 */
720 DEBUG(("53c700: sync 2 async 3\n")); 720 DEBUG(("53c700: sync 2 async 3\n"));
721 NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG); 721 NCR_700_writeb(SYNC_DIV_2_0, host, SBCL_REG);
722 NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG); 722 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG);
723 hostdata->sync_clock = hostdata->clock/2; 723 hostdata->sync_clock = hostdata->clock/2;
724 } else if(hostdata->clock > 50 && hostdata->clock <= 75) { 724 } else if(hostdata->clock > 50 && hostdata->clock <= 75) {
725 /* sync divider 1.5, async divider 3 */ 725 /* sync divider 1.5, async divider 3 */
726 DEBUG(("53c700: sync 1.5 async 3\n")); 726 DEBUG(("53c700: sync 1.5 async 3\n"));
727 NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG); 727 NCR_700_writeb(SYNC_DIV_1_5, host, SBCL_REG);
728 NCR_700_writeb(ASYNC_DIV_3_0 | dcntl_extra, host, DCNTL_REG); 728 NCR_700_writeb(ASYNC_DIV_3_0 | hostdata->dcntl_extra, host, DCNTL_REG);
729 hostdata->sync_clock = hostdata->clock*2; 729 hostdata->sync_clock = hostdata->clock*2;
730 hostdata->sync_clock /= 3; 730 hostdata->sync_clock /= 3;
731 731
@@ -733,18 +733,18 @@ NCR_700_chip_setup(struct Scsi_Host *host)
733 /* sync divider 1, async divider 2 */ 733 /* sync divider 1, async divider 2 */
734 DEBUG(("53c700: sync 1 async 2\n")); 734 DEBUG(("53c700: sync 1 async 2\n"));
735 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); 735 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
736 NCR_700_writeb(ASYNC_DIV_2_0 | dcntl_extra, host, DCNTL_REG); 736 NCR_700_writeb(ASYNC_DIV_2_0 | hostdata->dcntl_extra, host, DCNTL_REG);
737 hostdata->sync_clock = hostdata->clock; 737 hostdata->sync_clock = hostdata->clock;
738 } else if(hostdata->clock > 25 && hostdata->clock <=37) { 738 } else if(hostdata->clock > 25 && hostdata->clock <=37) {
739 /* sync divider 1, async divider 1.5 */ 739 /* sync divider 1, async divider 1.5 */
740 DEBUG(("53c700: sync 1 async 1.5\n")); 740 DEBUG(("53c700: sync 1 async 1.5\n"));
741 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); 741 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
742 NCR_700_writeb(ASYNC_DIV_1_5 | dcntl_extra, host, DCNTL_REG); 742 NCR_700_writeb(ASYNC_DIV_1_5 | hostdata->dcntl_extra, host, DCNTL_REG);
743 hostdata->sync_clock = hostdata->clock; 743 hostdata->sync_clock = hostdata->clock;
744 } else { 744 } else {
745 DEBUG(("53c700: sync 1 async 1\n")); 745 DEBUG(("53c700: sync 1 async 1\n"));
746 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG); 746 NCR_700_writeb(SYNC_DIV_1_0, host, SBCL_REG);
747 NCR_700_writeb(ASYNC_DIV_1_0 | dcntl_extra, host, DCNTL_REG); 747 NCR_700_writeb(ASYNC_DIV_1_0 | hostdata->dcntl_extra, host, DCNTL_REG);
748 /* sync divider 1, async divider 1 */ 748 /* sync divider 1, async divider 1 */
749 hostdata->sync_clock = hostdata->clock; 749 hostdata->sync_clock = hostdata->clock;
750 } 750 }