Commit a7ed0dc0 authored by James Bottomley's avatar James Bottomley

ncr53c8xx updates

From: Matthew Wilcox <willy@debian.org>

- remove all of the PCI chips (8xx series) leaving only 720
- pull out stand alone initialisation code (driver becomes a chip only
  driver for NCR Q720 and Zalon)
- remove most vestiges of PCI support (chip driver should be bus neutral)
- tidy up typedefs
- remove simulated intfly (may need putting back for 770)
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 66aed46f
...@@ -148,13 +148,8 @@ sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o ...@@ -148,13 +148,8 @@ sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o
initio-objs := ini9100u.o i91uscsi.o initio-objs := ini9100u.o i91uscsi.o
a100u2w-objs := inia100.o i60uscsi.o a100u2w-objs := inia100.o i60uscsi.o
ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \ ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \
:= -DCONFIG_NCR53C8XX_PREFETCH \ := -DCONFIG_NCR53C8XX_PREFETCH -DSCSI_NCR_BIG_ENDIAN \
-DCONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS \ -DCONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS
-DCONFIG_SCSI_NCR53C8XX_NO_NVRAM \
-DSCSI_NCR_BIG_ENDIAN -DSIMULATED_INTFLY
ncr53c8xx-flags-$(CONFIG_SCSI_NCR_Q720) \
:= -DCONFIG_SCSI_NCR53C8XX_NO_NVRAM \
-DSIMULATED_INTFLY
CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags-y) $(ncr53c8xx-flags-m) CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags-y) $(ncr53c8xx-flags-m)
zalon7xx-objs := zalon.o ncr53c8xx.o zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o
......
...@@ -22,10 +22,8 @@ ...@@ -22,10 +22,8 @@
#include "NCR_Q720.h" #include "NCR_Q720.h"
static ncr_chip q720_chip __initdata = { static struct ncr_chip q720_chip __initdata = {
.device_id = PSEUDO_720_ID,
.revision_id = 0x0f, .revision_id = 0x0f,
.name = "720",
.burst_max = 3, .burst_max = 3,
.offset_max = 8, .offset_max = 8,
.nr_divisor = 4, .nr_divisor = 4,
...@@ -50,7 +48,7 @@ struct NCR_Q720_private { ...@@ -50,7 +48,7 @@ struct NCR_Q720_private {
struct Scsi_Host *hosts[4]; struct Scsi_Host *hosts[4];
}; };
Scsi_Host_Template NCR_Q720_tpnt = { struct scsi_host_template NCR_Q720_tpnt = {
.module = THIS_MODULE, .module = THIS_MODULE,
.proc_name = "NCR_Q720", .proc_name = "NCR_Q720",
}; };
......
This diff is collapsed.
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#ifndef NCR53C8XX_H #ifndef NCR53C8XX_H
#define NCR53C8XX_H #define NCR53C8XX_H
#include <scsi/scsi_host.h>
typedef u_long vm_offset_t; typedef u_long vm_offset_t;
#include "sym53c8xx_defs.h" #include "sym53c8xx_defs.h"
...@@ -53,39 +55,17 @@ typedef u_long vm_offset_t; ...@@ -53,39 +55,17 @@ typedef u_long vm_offset_t;
** **
**========================================================== **==========================================================
*/ */
typedef struct { struct ncr_slot {
int bus;
u_char device_fn;
u_long base; u_long base;
u_long base_2; u_long base_2;
u_long io_port;
u_long base_c; u_long base_c;
u_long base_2_c; u_long base_2_c;
u_long base_v; u_long base_v;
u_long base_2_v; u_long base_2_v;
int irq; int irq;
/* port and reg fields to use INB, OUTB macros */ /* port and reg fields to use INB, OUTB macros */
u_long base_io;
volatile struct ncr_reg *reg; volatile struct ncr_reg *reg;
} ncr_slot; };
/*==========================================================
**
** Structure used to store the NVRAM content.
**
**==========================================================
*/
typedef struct {
int type;
#define SCSI_NCR_SYMBIOS_NVRAM (1)
#define SCSI_NCR_TEKRAM_NVRAM (2)
#ifdef SCSI_NCR_NVRAM_SUPPORT
union {
Symbios_nvram Symbios;
Tekram_nvram Tekram;
} data;
#endif
} ncr_nvram;
/*========================================================== /*==========================================================
** **
...@@ -96,18 +76,13 @@ typedef struct { ...@@ -96,18 +76,13 @@ typedef struct {
*/ */
struct ncr_device { struct ncr_device {
struct device *dev; struct device *dev;
ncr_slot slot; struct ncr_slot slot;
ncr_chip chip; struct ncr_chip chip;
ncr_nvram *nvram;
u_char host_id; u_char host_id;
#ifdef SCSI_NCR_PQS_PDS_SUPPORT u8 differential;
u_char pqs_pds;
#endif
__u8 differential;
int attach_done;
}; };
extern struct Scsi_Host *ncr_attach (Scsi_Host_Template *tpnt, int unit, struct ncr_device *device); extern struct Scsi_Host *ncr_attach(struct scsi_host_template *tpnt, int unit, struct ncr_device *device);
extern int ncr53c8xx_release(struct Scsi_Host *host); extern int ncr53c8xx_release(struct Scsi_Host *host);
irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs); irqreturn_t ncr53c8xx_intr(int irq, void *dev_id, struct pt_regs * regs);
......
This diff is collapsed.
This diff is collapsed.
...@@ -4,27 +4,13 @@ ...@@ -4,27 +4,13 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/interrupt.h>
#include <linux/stat.h>
#include <linux/mm.h>
#include <linux/blkdev.h>
#include <linux/sched.h>
#include <linux/version.h>
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h>
#include <scsi/scsicam.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/delay.h>
#include <asm/io.h> #include <asm/io.h>
#include "../parisc/gsc.h" #include "../parisc/gsc.h"
#include "scsi.h"
#include <scsi/scsi_host.h>
#include "ncr53c8xx.h" #include "ncr53c8xx.h"
...@@ -50,10 +36,8 @@ MODULE_LICENSE("GPL"); ...@@ -50,10 +36,8 @@ MODULE_LICENSE("GPL");
#define CMD_RESET 5 #define CMD_RESET 5
static ncr_chip zalon720_chip __initdata = { static struct ncr_chip zalon720_chip __initdata = {
.device_id = PSEUDO_720_ID,
.revision_id = 0x0f, .revision_id = 0x0f,
.name = "720",
.burst_max = 3, .burst_max = 3,
.offset_max = 8, .offset_max = 8,
.nr_divisor = 4, .nr_divisor = 4,
...@@ -93,7 +77,7 @@ lasi_scsi_clock(void * hpa, int defaultclock) ...@@ -93,7 +77,7 @@ lasi_scsi_clock(void * hpa, int defaultclock)
} }
#endif #endif
static Scsi_Host_Template zalon7xx_template = { static struct scsi_host_template zalon7xx_template = {
.module = THIS_MODULE, .module = THIS_MODULE,
.proc_name = "zalon7xx", .proc_name = "zalon7xx",
}; };
......
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