aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
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
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')
-rw-r--r--drivers/scsi/53c700.c20
-rw-r--r--drivers/scsi/53c700.h5
-rw-r--r--drivers/scsi/Kconfig13
3 files changed, 20 insertions, 18 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 }
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
index 841e1bb27d57..e06bdfeab420 100644
--- a/drivers/scsi/53c700.h
+++ b/drivers/scsi/53c700.h
@@ -177,6 +177,7 @@ struct NCR_700_command_slot {
177 __u8 state; 177 __u8 state;
178 #define NCR_700_FLAG_AUTOSENSE 0x01 178 #define NCR_700_FLAG_AUTOSENSE 0x01
179 __u8 flags; 179 __u8 flags;
180 __u8 pad1[2]; /* Needed for m68k where min alignment is 2 bytes */
180 int tag; 181 int tag;
181 __u32 resume_offset; 182 __u32 resume_offset;
182 struct scsi_cmnd *cmnd; 183 struct scsi_cmnd *cmnd;
@@ -196,6 +197,8 @@ struct NCR_700_Host_Parameters {
196 void __iomem *base; /* the base for the port (copied to host) */ 197 void __iomem *base; /* the base for the port (copied to host) */
197 struct device *dev; 198 struct device *dev;
198 __u32 dmode_extra; /* adjustable bus settings */ 199 __u32 dmode_extra; /* adjustable bus settings */
200 __u32 dcntl_extra; /* adjustable bus settings */
201 __u32 ctest7_extra; /* adjustable bus settings */
199 __u32 differential:1; /* if we are differential */ 202 __u32 differential:1; /* if we are differential */
200#ifdef CONFIG_53C700_LE_ON_BE 203#ifdef CONFIG_53C700_LE_ON_BE
201 /* This option is for HP only. Set it if your chip is wired for 204 /* This option is for HP only. Set it if your chip is wired for
@@ -352,6 +355,7 @@ struct NCR_700_Host_Parameters {
352#define SEL_TIMEOUT_DISABLE 0x10 /* 710 only */ 355#define SEL_TIMEOUT_DISABLE 0x10 /* 710 only */
353#define DFP 0x08 356#define DFP 0x08
354#define EVP 0x04 357#define EVP 0x04
358#define CTEST7_TT1 0x02
355#define DIFF 0x01 359#define DIFF 0x01
356#define CTEST6_REG 0x1A 360#define CTEST6_REG 0x1A
357#define TEMP_REG 0x1C 361#define TEMP_REG 0x1C
@@ -385,6 +389,7 @@ struct NCR_700_Host_Parameters {
385#define SOFTWARE_RESET 0x01 389#define SOFTWARE_RESET 0x01
386#define COMPAT_700_MODE 0x01 390#define COMPAT_700_MODE 0x01
387#define SCRPTS_16BITS 0x20 391#define SCRPTS_16BITS 0x20
392#define EA_710 0x20
388#define ASYNC_DIV_2_0 0x00 393#define ASYNC_DIV_2_0 0x00
389#define ASYNC_DIV_1_5 0x40 394#define ASYNC_DIV_1_5 0x40
390#define ASYNC_DIV_1_0 0x80 395#define ASYNC_DIV_1_0 0x80
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index aac9cd9a172f..da5e888c49d6 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1006,6 +1006,11 @@ config SCSI_STEX
1006 To compile this driver as a module, choose M here: the 1006 To compile this driver as a module, choose M here: the
1007 module will be called stex. 1007 module will be called stex.
1008 1008
1009config 53C700_BE_BUS
1010 bool
1011 depends on M68K
1012 default y
1013
1009config SCSI_SYM53C8XX_2 1014config SCSI_SYM53C8XX_2
1010 tristate "SYM53C8XX Version 2 SCSI support" 1015 tristate "SYM53C8XX Version 2 SCSI support"
1011 depends on PCI && SCSI 1016 depends on PCI && SCSI
@@ -1727,14 +1732,6 @@ config BVME6000_SCSI
1727 SCSI controller chip. Almost everyone using one of these boards 1732 SCSI controller chip. Almost everyone using one of these boards
1728 will want to say Y to this question. 1733 will want to say Y to this question.
1729 1734
1730config SCSI_NCR53C7xx_FAST
1731 bool "allow FAST-SCSI [10MHz]"
1732 depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI
1733 help
1734 This will enable 10MHz FAST-SCSI transfers with your host
1735 adapter. Some systems have problems with that speed, so it's safest
1736 to say N here.
1737
1738config SUN3_SCSI 1735config SUN3_SCSI
1739 tristate "Sun3 NCR5380 SCSI" 1736 tristate "Sun3 NCR5380 SCSI"
1740 depends on SUN3 && SCSI 1737 depends on SUN3 && SCSI