Tentative fdc patches...
This commit is contained in:
parent
60fda7adb1
commit
4c1e7c072c
@ -63,6 +63,7 @@
|
||||
#include "i386/isa/isa.h"
|
||||
#include "i386/isa/isa_device.h"
|
||||
#include "i386/isa/fdreg.h"
|
||||
#include "i386/isa/fdc.h"
|
||||
#include "i386/isa/icu.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: fdreg.h,v 1.2 1993/10/16 13:45:50 rgrimes Exp $
|
||||
* $Id: fdreg.h,v 1.3 1994/02/07 04:27:10 alm Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -63,41 +63,3 @@
|
||||
#define fdin 7 /* Digital Input Register (R) */
|
||||
#define FDI_DCHG 0x80 /* diskette has been changed */
|
||||
|
||||
/***********************************************************************\
|
||||
* Per controller structure. *
|
||||
\***********************************************************************/
|
||||
struct fdc_data
|
||||
{
|
||||
int fdcu; /* our unit number */
|
||||
int baseport;
|
||||
int dmachan;
|
||||
int flags;
|
||||
#define FDC_ATTACHED 0x01
|
||||
#define FDC_HASFTAPE 0x02
|
||||
#define FDC_TAPE_BUSY 0x04
|
||||
struct fd_data *fd;
|
||||
int fdu; /* the active drive */
|
||||
struct buf head; /* Head of buf chain */
|
||||
struct buf rhead; /* Raw head of buf chain */
|
||||
int state;
|
||||
int retry;
|
||||
int status[7]; /* copy of the registers */
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* Throughout this file the following conventions will be used: *
|
||||
* fd is a pointer to the fd_data struct for the drive in question *
|
||||
* fdc is a pointer to the fdc_data struct for the controller *
|
||||
* fdu is the floppy drive unit number *
|
||||
* fdcu is the floppy controller unit number *
|
||||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
typedef int fdu_t;
|
||||
typedef int fdcu_t;
|
||||
typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
|
||||
#define FDUNIT(s) (((s)>>6)&03)
|
||||
#define FDTYPE(s) ((s)&077)
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "i386/isa/isa.h"
|
||||
#include "i386/isa/isa_device.h"
|
||||
#include "i386/isa/fdreg.h"
|
||||
#include "i386/isa/fdc.h"
|
||||
#include "i386/isa/icu.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
|
||||
|
38
sys/i386/isa/fdc.h
Normal file
38
sys/i386/isa/fdc.h
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
/***********************************************************************\
|
||||
* Per controller structure. *
|
||||
\***********************************************************************/
|
||||
struct fdc_data
|
||||
{
|
||||
int fdcu; /* our unit number */
|
||||
int baseport;
|
||||
int dmachan;
|
||||
int flags;
|
||||
#define FDC_ATTACHED 0x01
|
||||
#define FDC_HASFTAPE 0x02
|
||||
#define FDC_TAPE_BUSY 0x04
|
||||
struct fd_data *fd;
|
||||
int fdu; /* the active drive */
|
||||
struct buf head; /* Head of buf chain */
|
||||
struct buf rhead; /* Raw head of buf chain */
|
||||
int state;
|
||||
int retry;
|
||||
int status[7]; /* copy of the registers */
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* Throughout this file the following conventions will be used: *
|
||||
* fd is a pointer to the fd_data struct for the drive in question *
|
||||
* fdc is a pointer to the fdc_data struct for the controller *
|
||||
* fdu is the floppy drive unit number *
|
||||
* fdcu is the floppy controller unit number *
|
||||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
typedef int fdu_t;
|
||||
typedef int fdcu_t;
|
||||
typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
#define FDUNIT(s) (((s)>>6)&03)
|
||||
#define FDTYPE(s) ((s)&077)
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: fdreg.h,v 1.2 1993/10/16 13:45:50 rgrimes Exp $
|
||||
* $Id: fdreg.h,v 1.3 1994/02/07 04:27:10 alm Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -63,41 +63,3 @@
|
||||
#define fdin 7 /* Digital Input Register (R) */
|
||||
#define FDI_DCHG 0x80 /* diskette has been changed */
|
||||
|
||||
/***********************************************************************\
|
||||
* Per controller structure. *
|
||||
\***********************************************************************/
|
||||
struct fdc_data
|
||||
{
|
||||
int fdcu; /* our unit number */
|
||||
int baseport;
|
||||
int dmachan;
|
||||
int flags;
|
||||
#define FDC_ATTACHED 0x01
|
||||
#define FDC_HASFTAPE 0x02
|
||||
#define FDC_TAPE_BUSY 0x04
|
||||
struct fd_data *fd;
|
||||
int fdu; /* the active drive */
|
||||
struct buf head; /* Head of buf chain */
|
||||
struct buf rhead; /* Raw head of buf chain */
|
||||
int state;
|
||||
int retry;
|
||||
int status[7]; /* copy of the registers */
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* Throughout this file the following conventions will be used: *
|
||||
* fd is a pointer to the fd_data struct for the drive in question *
|
||||
* fdc is a pointer to the fdc_data struct for the controller *
|
||||
* fdu is the floppy drive unit number *
|
||||
* fdcu is the floppy controller unit number *
|
||||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
typedef int fdu_t;
|
||||
typedef int fdcu_t;
|
||||
typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
|
||||
#define FDUNIT(s) (((s)>>6)&03)
|
||||
#define FDTYPE(s) ((s)&077)
|
||||
|
@ -68,6 +68,7 @@
|
||||
#include <machine/pio.h>
|
||||
#include "i386/isa/isa_device.h"
|
||||
#include "i386/isa/fdreg.h"
|
||||
#include "i386/isa/fdc.h"
|
||||
#include "i386/isa/icu.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
#include "ftreg.h"
|
||||
@ -280,9 +281,12 @@ int ftattach(isadev, fdup)
|
||||
fdcu_t fdcu = isadev->id_unit; /* fdc active unit */
|
||||
fdc_p fdc = fdc_data + fdcu; /* pointer to controller structure */
|
||||
ftu_t ftu = fdup->id_unit;
|
||||
ft_p ft = &ft_data[ftu];
|
||||
ft_p ft;
|
||||
ftsu_t ftsu = fdup->id_physid;
|
||||
|
||||
if (ftu >= NFT)
|
||||
return 0;
|
||||
ft = &ft_data[ftu];
|
||||
/* Probe for tape */
|
||||
ft->attaching = 1;
|
||||
ft->type = NO_TYPE;
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "i386/isa/isa.h"
|
||||
#include "i386/isa/isa_device.h"
|
||||
#include "i386/isa/fdreg.h"
|
||||
#include "i386/isa/fdc.h"
|
||||
#include "i386/isa/icu.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
|
||||
|
38
sys/isa/fdc.h
Normal file
38
sys/isa/fdc.h
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
/***********************************************************************\
|
||||
* Per controller structure. *
|
||||
\***********************************************************************/
|
||||
struct fdc_data
|
||||
{
|
||||
int fdcu; /* our unit number */
|
||||
int baseport;
|
||||
int dmachan;
|
||||
int flags;
|
||||
#define FDC_ATTACHED 0x01
|
||||
#define FDC_HASFTAPE 0x02
|
||||
#define FDC_TAPE_BUSY 0x04
|
||||
struct fd_data *fd;
|
||||
int fdu; /* the active drive */
|
||||
struct buf head; /* Head of buf chain */
|
||||
struct buf rhead; /* Raw head of buf chain */
|
||||
int state;
|
||||
int retry;
|
||||
int status[7]; /* copy of the registers */
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* Throughout this file the following conventions will be used: *
|
||||
* fd is a pointer to the fd_data struct for the drive in question *
|
||||
* fdc is a pointer to the fdc_data struct for the controller *
|
||||
* fdu is the floppy drive unit number *
|
||||
* fdcu is the floppy controller unit number *
|
||||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
typedef int fdu_t;
|
||||
typedef int fdcu_t;
|
||||
typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
#define FDUNIT(s) (((s)>>6)&03)
|
||||
#define FDTYPE(s) ((s)&077)
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fdreg.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: fdreg.h,v 1.2 1993/10/16 13:45:50 rgrimes Exp $
|
||||
* $Id: fdreg.h,v 1.3 1994/02/07 04:27:10 alm Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -63,41 +63,3 @@
|
||||
#define fdin 7 /* Digital Input Register (R) */
|
||||
#define FDI_DCHG 0x80 /* diskette has been changed */
|
||||
|
||||
/***********************************************************************\
|
||||
* Per controller structure. *
|
||||
\***********************************************************************/
|
||||
struct fdc_data
|
||||
{
|
||||
int fdcu; /* our unit number */
|
||||
int baseport;
|
||||
int dmachan;
|
||||
int flags;
|
||||
#define FDC_ATTACHED 0x01
|
||||
#define FDC_HASFTAPE 0x02
|
||||
#define FDC_TAPE_BUSY 0x04
|
||||
struct fd_data *fd;
|
||||
int fdu; /* the active drive */
|
||||
struct buf head; /* Head of buf chain */
|
||||
struct buf rhead; /* Raw head of buf chain */
|
||||
int state;
|
||||
int retry;
|
||||
int status[7]; /* copy of the registers */
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* Throughout this file the following conventions will be used: *
|
||||
* fd is a pointer to the fd_data struct for the drive in question *
|
||||
* fdc is a pointer to the fdc_data struct for the controller *
|
||||
* fdu is the floppy drive unit number *
|
||||
* fdcu is the floppy controller unit number *
|
||||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
typedef int fdu_t;
|
||||
typedef int fdcu_t;
|
||||
typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
|
||||
#define FDUNIT(s) (((s)>>6)&03)
|
||||
#define FDTYPE(s) ((s)&077)
|
||||
|
Loading…
Reference in New Issue
Block a user