Commit 0d31f875 authored by Finn Thain's avatar Finn Thain Committed by Christoph Hellwig

sun3_scsi: Convert to platform device

Convert sun3_scsi to platform device and eliminate scsi_register().
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 4e705205
......@@ -16,6 +16,7 @@
#include <linux/console.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <linux/platform_device.h>
#include <asm/oplib.h>
#include <asm/setup.h>
......@@ -27,6 +28,7 @@
#include <asm/sun3mmu.h>
#include <asm/rtc.h>
#include <asm/machdep.h>
#include <asm/machines.h>
#include <asm/idprom.h>
#include <asm/intersil.h>
#include <asm/irq.h>
......@@ -169,3 +171,61 @@ static void __init sun3_sched_init(irq_handler_t timer_routine)
intersil_clear();
}
#ifdef CONFIG_SUN3_SCSI
static const struct resource sun3_scsi_vme_rsrc[] __initconst = {
{
.flags = IORESOURCE_IRQ,
.start = SUN3_VEC_VMESCSI0,
.end = SUN3_VEC_VMESCSI0,
}, {
.flags = IORESOURCE_MEM,
.start = 0xff200000,
.end = 0xff200021,
}, {
.flags = IORESOURCE_IRQ,
.start = SUN3_VEC_VMESCSI1,
.end = SUN3_VEC_VMESCSI1,
}, {
.flags = IORESOURCE_MEM,
.start = 0xff204000,
.end = 0xff204021,
},
};
/*
* Int: level 2 autovector
* IO: type 1, base 0x00140000, 5 bits phys space: A<4..0>
*/
static const struct resource sun3_scsi_rsrc[] __initconst = {
{
.flags = IORESOURCE_IRQ,
.start = 2,
.end = 2,
}, {
.flags = IORESOURCE_MEM,
.start = 0x00140000,
.end = 0x0014001f,
},
};
int __init sun3_platform_init(void)
{
switch (idprom->id_machtype) {
case SM_SUN3 | SM_3_160:
case SM_SUN3 | SM_3_260:
platform_device_register_simple("sun3_scsi_vme", -1,
sun3_scsi_vme_rsrc, ARRAY_SIZE(sun3_scsi_vme_rsrc));
break;
case SM_SUN3 | SM_3_50:
case SM_SUN3 | SM_3_60:
platform_device_register_simple("sun3_scsi", -1,
sun3_scsi_rsrc, ARRAY_SIZE(sun3_scsi_rsrc));
break;
}
return 0;
}
arch_initcall(sun3_platform_init);
#endif
This diff is collapsed.
......@@ -18,25 +18,8 @@
#ifndef SUN3_SCSI_H
#define SUN3_SCSI_H
/*
* Int: level 2 autovector
* IO: type 1, base 0x00140000, 5 bits phys space: A<4..0>
*/
#define IRQ_SUN3_SCSI 2
#define IOBASE_SUN3_SCSI 0x00140000
#define IOBASE_SUN3_VMESCSI 0xff200000
#define MAX_TAGS 32
#include <scsi/scsicam.h>
#ifdef SUN3_SCSI_VME
#define SUN3_SCSI_NAME "Sun3 NCR5380 VME SCSI"
#else
#define SUN3_SCSI_NAME "Sun3 NCR5380 SCSI"
#endif
#define NCR5380_implementation_fields /* none */
#define NCR5380_local_declare() \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment