mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 22:46:47 +07:00
cd354f1ae7
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
139 lines
3.4 KiB
C
139 lines
3.4 KiB
C
/*
|
|
* Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
|
|
* Amiga MacroSystemUS WarpEngine SCSI controller.
|
|
* Amiga Technologies A4000T SCSI controller.
|
|
* Amiga Technologies/DKB A4091 SCSI controller.
|
|
*
|
|
* Written 1997 by Alan Hourihane <alanh@fairlite.demon.co.uk>
|
|
* plus modifications of the 53c7xx.c driver to support the Amiga.
|
|
*/
|
|
#include <linux/types.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/blkdev.h>
|
|
#include <linux/zorro.h>
|
|
#include <linux/stat.h>
|
|
|
|
#include <asm/setup.h>
|
|
#include <asm/page.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/amigaints.h>
|
|
#include <asm/amigahw.h>
|
|
#include <asm/dma.h>
|
|
#include <asm/irq.h>
|
|
|
|
#include "scsi.h"
|
|
#include <scsi/scsi_host.h>
|
|
#include "53c7xx.h"
|
|
#include "amiga7xx.h"
|
|
|
|
|
|
static int amiga7xx_register_one(struct scsi_host_template *tpnt,
|
|
unsigned long address)
|
|
{
|
|
long long options;
|
|
int clock;
|
|
|
|
if (!request_mem_region(address, 0x1000, "ncr53c710"))
|
|
return 0;
|
|
|
|
address = (unsigned long)z_ioremap(address, 0x1000);
|
|
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 | OPTION_INTFLY |
|
|
OPTION_SYNCHRONOUS | OPTION_ALWAYS_SYNCHRONOUS |
|
|
OPTION_DISCONNECT;
|
|
clock = 50000000; /* 50 MHz SCSI Clock */
|
|
ncr53c7xx_init(tpnt, 0, 710, address, 0, IRQ_AMIGA_PORTS, DMA_NONE,
|
|
options, clock);
|
|
return 1;
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_ZORRO
|
|
|
|
static struct {
|
|
zorro_id id;
|
|
unsigned long offset;
|
|
int absolute; /* offset is absolute address */
|
|
} amiga7xx_table[] = {
|
|
{ .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, .offset = 0xf40000,
|
|
.absolute = 1 },
|
|
{ .id = ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx, .offset = 0x40000 },
|
|
{ .id = ZORRO_PROD_CBM_A4091_1, .offset = 0x800000 },
|
|
{ .id = ZORRO_PROD_CBM_A4091_2, .offset = 0x800000 },
|
|
{ .id = ZORRO_PROD_GVP_GFORCE_040_060, .offset = 0x40000 },
|
|
{ 0 }
|
|
};
|
|
|
|
static int __init amiga7xx_zorro_detect(struct scsi_host_template *tpnt)
|
|
{
|
|
int num = 0, i;
|
|
struct zorro_dev *z = NULL;
|
|
unsigned long address;
|
|
|
|
while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
|
|
for (i = 0; amiga7xx_table[i].id; i++)
|
|
if (z->id == amiga7xx_table[i].id)
|
|
break;
|
|
if (!amiga7xx_table[i].id)
|
|
continue;
|
|
if (amiga7xx_table[i].absolute)
|
|
address = amiga7xx_table[i].offset;
|
|
else
|
|
address = z->resource.start + amiga7xx_table[i].offset;
|
|
num += amiga7xx_register_one(tpnt, address);
|
|
}
|
|
return num;
|
|
}
|
|
|
|
#endif /* CONFIG_ZORRO */
|
|
|
|
|
|
int __init amiga7xx_detect(struct scsi_host_template *tpnt)
|
|
{
|
|
static unsigned char called = 0;
|
|
int num = 0;
|
|
|
|
if (called || !MACH_IS_AMIGA)
|
|
return 0;
|
|
|
|
tpnt->proc_name = "Amiga7xx";
|
|
|
|
if (AMIGAHW_PRESENT(A4000_SCSI))
|
|
num += amiga7xx_register_one(tpnt, 0xdd0040);
|
|
|
|
#ifdef CONFIG_ZORRO
|
|
num += amiga7xx_zorro_detect(tpnt);
|
|
#endif
|
|
|
|
called = 1;
|
|
return num;
|
|
}
|
|
|
|
static int amiga7xx_release(struct Scsi_Host *shost)
|
|
{
|
|
if (shost->irq)
|
|
free_irq(shost->irq, NULL);
|
|
if (shost->dma_channel != 0xff)
|
|
free_dma(shost->dma_channel);
|
|
if (shost->io_port && shost->n_io_port)
|
|
release_region(shost->io_port, shost->n_io_port);
|
|
scsi_unregister(shost);
|
|
return 0;
|
|
}
|
|
|
|
static struct scsi_host_template driver_template = {
|
|
.name = "Amiga NCR53c710 SCSI",
|
|
.detect = amiga7xx_detect,
|
|
.release = amiga7xx_release,
|
|
.queuecommand = NCR53c7xx_queue_command,
|
|
.abort = NCR53c7xx_abort,
|
|
.reset = NCR53c7xx_reset,
|
|
.can_queue = 24,
|
|
.this_id = 7,
|
|
.sg_tablesize = 63,
|
|
.cmd_per_lun = 3,
|
|
.use_clustering = DISABLE_CLUSTERING
|
|
};
|
|
|
|
|
|
#include "scsi_module.c"
|