/*
 * $Header: /smsa/bsd:include/arm/a500io.h:bsd  1.7  $
 * $Source: /smsa/bsd:include/arm/a500io.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */

#ifndef	__arm_a500io_h
#define	__arm_a500io_h
#define	__machine_a500io_h	"arm"

/*
 * External (to IOC) I/O hardware control structures.
 * This is no longer A500-specific!
 */

#ifdef	_KERNEL
extern	unsigned  char	latch_a_softcopy, latch_b_softcopy;
#endif

#define	EXT_A_L4	((volatile unsigned char *)0x03350040)
#define	EXT_A_L5	((volatile unsigned char *)0x03360000)
#define	EXT_B_LATCH	*((volatile unsigned char *)0x03350018)
#define EXT_L6          *((volatile unsigned char *)0x03350040)

/* External Latch A bits */
#define	UNITBITS	0xF
#define	INUSEBIT	(1 << 6)
#define	MOTORBIT	(1 << 5)
#define	SIDEBIT		(1 << 4)

/* External Latch B floppy-specific bits on A500, A4xx */
#define	DENBITS		0x7
#define	DOUBDEN		0x5

#define	FDCRESET	0x08
#define EXTB_FDC_BITS	(DENBITS | FDCRESET)

/* Other External Latch B bits */

/* Printer Strobe Line: bit 0 on A680, bit 4 on the others */
#define EXTB_L45_PR_STROBE	(1 << 4)
#define EXTB_L6_PR_STROBE	(1 << 0)

/* Audio system control (A500 only) */
#define EXTB_AIN_MUTE		(1 << 5)	/* audio input mute */
#define EXTB_AOUT_MUTE		(1 << 6)	/* audio output mute */

/* Extra head select line for ST506 interface (not A680) */
#define EXTB_HS3		(1 << 7)	/* Head Select 3 for HDC */

/* FDC for A680 bits */
#define F6_UNITBITS	((1 << 1)|(1 << 0))
#define F6_DCRST	(1 << 2)		/* Disc change reset */
#define F6_DENSITY	(1 << 3)		/* Density */
#define F6_SIDEBIT	(1 << 4)		/* Side */
#define F6_MOTORON	(1 << 5)		/* Motor on */
#define F6_INUSE	(1 << 6)		/* In use */
#define F6_RESET        (1 << 7)		/* Reset FDC */

#endif/*__arm_a500io_h*/

/* EOF a500io.h */

