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
initio-objs := ini9100u.o i91uscsi.o
a100u2w-objs := inia100.o i60uscsi.o
ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \
:= -DCONFIG_NCR53C8XX_PREFETCH \
-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
:= -DCONFIG_NCR53C8XX_PREFETCH -DSCSI_NCR_BIG_ENDIAN \
-DCONFIG_SCSI_NCR53C8XX_NO_WORD_TRANSFERS
CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags-y) $(ncr53c8xx-flags-m)
zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o
......
......@@ -22,10 +22,8 @@
#include "NCR_Q720.h"
static ncr_chip q720_chip __initdata = {
.device_id = PSEUDO_720_ID,
static struct ncr_chip q720_chip __initdata = {
.revision_id = 0x0f,
.name = "720",
.burst_max = 3,
.offset_max = 8,
.nr_divisor = 4,
......@@ -50,7 +48,7 @@ struct NCR_Q720_private {
struct Scsi_Host *hosts[4];
};
Scsi_Host_Template NCR_Q720_tpnt = {
struct scsi_host_template NCR_Q720_tpnt = {
.module = THIS_MODULE,
.proc_name = "NCR_Q720",
};
......
This diff is collapsed.
......@@ -42,6 +42,8 @@
#ifndef NCR53C8XX_H
#define NCR53C8XX_H
#include <scsi/scsi_host.h>
typedef u_long vm_offset_t;
#include "sym53c8xx_defs.h"
......@@ -53,39 +55,17 @@ typedef u_long vm_offset_t;
**
**==========================================================
*/
typedef struct {
int bus;
u_char device_fn;
struct ncr_slot {
u_long base;
u_long base_2;
u_long io_port;
u_long base_c;
u_long base_2_c;
u_long base_v;
u_long base_2_v;
int irq;
/* port and reg fields to use INB, OUTB macros */
u_long base_io;
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 {
*/
struct ncr_device {
struct device *dev;
ncr_slot slot;
ncr_chip chip;
ncr_nvram *nvram;
struct ncr_slot slot;
struct ncr_chip chip;
u_char host_id;
#ifdef SCSI_NCR_PQS_PDS_SUPPORT
u_char pqs_pds;
#endif
__u8 differential;
int attach_done;
u8 differential;
};
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);
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 @@
*/
#include <linux/init.h>
#include <linux/types.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/interrupt.h>
#include <linux/module.h>
#include <scsi/scsicam.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include <linux/types.h>
#include <asm/hardware.h>
#include <asm/delay.h>
#include <asm/io.h>
#include "../parisc/gsc.h"
#include "scsi.h"
#include <scsi/scsi_host.h>
#include "ncr53c8xx.h"
......@@ -40,20 +26,18 @@ MODULE_LICENSE("GPL");
#define IO_MODULE_IO_COMMAND (12*4)
#define IO_MODULE_IO_STATUS (13*4)
#define IOSTATUS_RY 0x40
#define IOSTATUS_FE 0x80
#define IOIIDATA_SMINT5L 0x40000000
#define IOIIDATA_MINT5EN 0x20000000
#define IOIIDATA_PACKEN 0x10000000
#define IOIIDATA_PREFETCHEN 0x08000000
#define IOIIDATA_IOII 0x00000020
#define IOSTATUS_RY 0x40
#define IOSTATUS_FE 0x80
#define IOIIDATA_SMINT5L 0x40000000
#define IOIIDATA_MINT5EN 0x20000000
#define IOIIDATA_PACKEN 0x10000000
#define IOIIDATA_PREFETCHEN 0x08000000
#define IOIIDATA_IOII 0x00000020
#define CMD_RESET 5
static ncr_chip zalon720_chip __initdata = {
.device_id = PSEUDO_720_ID,
static struct ncr_chip zalon720_chip __initdata = {
.revision_id = 0x0f,
.name = "720",
.burst_max = 3,
.offset_max = 8,
.nr_divisor = 4,
......@@ -93,7 +77,7 @@ lasi_scsi_clock(void * hpa, int defaultclock)
}
#endif
static Scsi_Host_Template zalon7xx_template = {
static struct scsi_host_template zalon7xx_template = {
.module = THIS_MODULE,
.proc_name = "zalon7xx",
};
......@@ -123,7 +107,7 @@ zalon_probe(struct parisc_device *dev)
/* Setup the interrupts first.
** Later on request_irq() will register the handler.
*/
irq = gsc_alloc_irq(&gsc_irq);
irq = gsc_alloc_irq(&gsc_irq);
printk("%s: Zalon vers field is 0x%x, IRQ %d\n", __FUNCTION__,
zalon_vers, irq);
......@@ -155,7 +139,7 @@ zalon_probe(struct parisc_device *dev)
if (request_irq(irq, ncr53c8xx_intr, SA_SHIRQ, dev->dev.bus_id, host)) {
printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
dev->dev.bus_id, irq);
dev->dev.bus_id, irq);
goto fail;
}
......
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