patch-2.2.18 linux/drivers/scsi/amiga7xx.c
Next file: linux/drivers/scsi/atari_NCR5380.c
Previous file: linux/drivers/scsi/aha1542.c
Back to the patch index
Back to the overall index
- Lines: 96
- Date:
Fri Oct 13 23:58:25 2000
- Orig file:
v2.2.17/drivers/scsi/amiga7xx.c
- Orig date:
Fri Apr 21 12:46:27 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/scsi/amiga7xx.c linux/drivers/scsi/amiga7xx.c
@@ -15,11 +15,14 @@
#include <linux/config.h>
#include <linux/zorro.h>
+#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
+#include <asm/io.h>
#include <asm/irq.h>
+#include <asm/init.h>
#include "scsi.h"
#include "hosts.h"
@@ -33,11 +36,11 @@
S_IFDIR | S_IRUGO | S_IXUGO, 2
};
-extern ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
- u32 base, int io_port, int irq, int dma,
- long long options, int clock);
+extern int ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
+ u32 base, int io_port, int irq, int dma,
+ long long options, int clock);
-int amiga7xx_detect(Scsi_Host_Template *tpnt)
+__initfunc(int amiga7xx_detect(Scsi_Host_Template *tpnt))
{
static unsigned char called = 0;
unsigned int key;
@@ -54,18 +57,13 @@
if ((key = zorro_find(ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, 0, 0)))
{
cd = zorro_get_board(key);
-/*
- unsigned long address;
- address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
- cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);
-*/
+
options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
clock = 50000000; /* 50MHz SCSI Clock */
- ncr53c7xx_init(tpnt, 0, 710, (u32)(unsigned char *)(0x80f40000),
- 0, IRQ_AMIGA_PORTS, DMA_NONE,
- options, clock);
+ ncr53c7xx_init(tpnt, 0, 710, (u32)ZTWO_VADDR(0xf40000), 0,
+ IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
zorro_config_board(key, 0);
num++;
@@ -77,16 +75,15 @@
{
unsigned long address;
cd = zorro_get_board(key);
- address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
- cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);
+ address = (unsigned long)ioremap((unsigned long)cd->cd_BoardAddr,
+ cd->cd_BoardSize);
options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
clock = 50000000; /* 50MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, (u32)(unsigned char *)(address + 0x40000),
- 0, IRQ_AMIGA_PORTS, DMA_NONE,
- options, clock);
+ 0, IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
zorro_config_board(key, 0);
num++;
@@ -100,9 +97,8 @@
clock = 50000000; /* 50MHz SCSI Clock */
- ncr53c7xx_init(tpnt, 0, 710, (u32)(unsigned char *)ZTWO_VADDR(0xDD0040),
- 0, IRQ_AMIGA_PORTS, DMA_NONE,
- options, clock);
+ ncr53c7xx_init(tpnt, 0, 710, (u32)ZTWO_VADDR(0xDD0040), 0,
+ IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
num++;
}
#endif
@@ -113,8 +109,8 @@
{
unsigned long address;
cd = zorro_get_board(key);
- address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
- cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);
+ address = (unsigned long)ioremap((unsigned long)cd->cd_BoardAddr,
+ cd->cd_BoardSize);
options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)