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

[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>

authored by

Kars de Jong and committed by
James Bottomley
63273134 cc78d30a

+20 -18
+10 -10
drivers/scsi/53c700.c
··· 653 653 { 654 654 struct NCR_700_Host_Parameters *hostdata = 655 655 (struct NCR_700_Host_Parameters *)host->hostdata[0]; 656 - __u32 dcntl_extra = 0; 657 656 __u8 min_period; 658 657 __u8 min_xferp = (hostdata->chip710 ? NCR_710_MIN_XFERP : NCR_700_MIN_XFERP); 659 658 ··· 677 678 burst_disable = BURST_DISABLE; 678 679 break; 679 680 } 680 - dcntl_extra = COMPAT_700_MODE; 681 + hostdata->dcntl_extra |= COMPAT_700_MODE; 681 682 682 - NCR_700_writeb(dcntl_extra, host, DCNTL_REG); 683 + NCR_700_writeb(hostdata->dcntl_extra, host, DCNTL_REG); 683 684 NCR_700_writeb(burst_length | hostdata->dmode_extra, 684 685 host, DMODE_710_REG); 685 - NCR_700_writeb(burst_disable | (hostdata->differential ? 686 - DIFF : 0), host, CTEST7_REG); 686 + NCR_700_writeb(burst_disable | hostdata->ctest7_extra | 687 + (hostdata->differential ? DIFF : 0), 688 + host, CTEST7_REG); 687 689 NCR_700_writeb(BTB_TIMER_DISABLE, host, CTEST0_REG); 688 690 NCR_700_writeb(FULL_ARBITRATION | ENABLE_PARITY | PARITY 689 691 | AUTO_ATN, host, SCNTL0_REG); ··· 719 719 * of spec: sync divider 2, async divider 3 */ 720 720 DEBUG(("53c700: sync 2 async 3\n")); 721 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 723 hostdata->sync_clock = hostdata->clock/2; 724 724 } else if(hostdata->clock > 50 && hostdata->clock <= 75) { 725 725 /* sync divider 1.5, async divider 3 */ 726 726 DEBUG(("53c700: sync 1.5 async 3\n")); 727 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 729 hostdata->sync_clock = hostdata->clock*2; 730 730 hostdata->sync_clock /= 3; 731 731 ··· 733 733 /* sync divider 1, async divider 2 */ 734 734 DEBUG(("53c700: sync 1 async 2\n")); 735 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 737 hostdata->sync_clock = hostdata->clock; 738 738 } else if(hostdata->clock > 25 && hostdata->clock <=37) { 739 739 /* sync divider 1, async divider 1.5 */ 740 740 DEBUG(("53c700: sync 1 async 1.5\n")); 741 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 743 hostdata->sync_clock = hostdata->clock; 744 744 } else { 745 745 DEBUG(("53c700: sync 1 async 1\n")); 746 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 748 /* sync divider 1, async divider 1 */ 749 749 hostdata->sync_clock = hostdata->clock; 750 750 }
+5
drivers/scsi/53c700.h
··· 177 177 __u8 state; 178 178 #define NCR_700_FLAG_AUTOSENSE 0x01 179 179 __u8 flags; 180 + __u8 pad1[2]; /* Needed for m68k where min alignment is 2 bytes */ 180 181 int tag; 181 182 __u32 resume_offset; 182 183 struct scsi_cmnd *cmnd; ··· 197 196 void __iomem *base; /* the base for the port (copied to host) */ 198 197 struct device *dev; 199 198 __u32 dmode_extra; /* adjustable bus settings */ 199 + __u32 dcntl_extra; /* adjustable bus settings */ 200 + __u32 ctest7_extra; /* adjustable bus settings */ 200 201 __u32 differential:1; /* if we are differential */ 201 202 #ifdef CONFIG_53C700_LE_ON_BE 202 203 /* This option is for HP only. Set it if your chip is wired for ··· 355 352 #define SEL_TIMEOUT_DISABLE 0x10 /* 710 only */ 356 353 #define DFP 0x08 357 354 #define EVP 0x04 355 + #define CTEST7_TT1 0x02 358 356 #define DIFF 0x01 359 357 #define CTEST6_REG 0x1A 360 358 #define TEMP_REG 0x1C ··· 389 385 #define SOFTWARE_RESET 0x01 390 386 #define COMPAT_700_MODE 0x01 391 387 #define SCRPTS_16BITS 0x20 388 + #define EA_710 0x20 392 389 #define ASYNC_DIV_2_0 0x00 393 390 #define ASYNC_DIV_1_5 0x40 394 391 #define ASYNC_DIV_1_0 0x80
+5 -8
drivers/scsi/Kconfig
··· 1006 1006 To compile this driver as a module, choose M here: the 1007 1007 module will be called stex. 1008 1008 1009 + config 53C700_BE_BUS 1010 + bool 1011 + depends on M68K 1012 + default y 1013 + 1009 1014 config SCSI_SYM53C8XX_2 1010 1015 tristate "SYM53C8XX Version 2 SCSI support" 1011 1016 depends on PCI && SCSI ··· 1731 1726 The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710 1732 1727 SCSI controller chip. Almost everyone using one of these boards 1733 1728 will want to say Y to this question. 1734 - 1735 - config SCSI_NCR53C7xx_FAST 1736 - bool "allow FAST-SCSI [10MHz]" 1737 - depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI 1738 - help 1739 - This will enable 10MHz FAST-SCSI transfers with your host 1740 - adapter. Some systems have problems with that speed, so it's safest 1741 - to say N here. 1742 1729 1743 1730 config SUN3_SCSI 1744 1731 tristate "Sun3 NCR5380 SCSI"