root/include/asm-sparc/auxio.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* auxio.h:  Definitons and code for the Auxiliary I/O register.
   2  *
   3  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   4  */
   5 #ifndef _SPARC_AUXIO_H
   6 #define _SPARC_AUXIO_H
   7 
   8 /* This defines the register as I know it on the Sun4c, it may be
   9  * different or not exist at all on sun4m's.
  10  */
  11 
  12 #define AUXIO_IOADDR  0xf7400000  /* Physical address is IO space */
  13 
  14 /* This register is an unsigned char in IO space.  It does two things.
  15  * First, it is used to control the front panel LED light on machines
  16  * that have it (good for testing entry points to trap handlers and irq's)
  17  * Secondly, it controls various floppy drive parameters on machines that
  18  * have a drive.
  19  */
  20 
  21 #define AUXIO_ORMEIN      0xf0    /* All writes must set these bits. */
  22 #define AUXIO_FLPY_DENS   0x20    /* Floppy density, high if set. */
  23 #define AUXIO_FLPY_DCHG   0x10    /* A disk change occurred. */
  24 #define AUXIO_FLPY_DSEL   0x08    /* Drive select, 0 'a drive' 1 'b drive'. */
  25 #define AUXIO_FLPY_TCNT   0x04    /* Floppy terminal count... ??? */
  26 #define AUXIO_FLPY_EJCT   0x02    /* Eject floppy disk. */
  27 #define AUXIO_LED         0x01    /* On if set, off if unset. */
  28 
  29 #define AUXREG ((volatile unsigned char *)(AUXIO_VADDR + 3))
  30 
  31 #define TURN_ON_LED  *AUXREG = AUXIO_ORMEIN | AUXIO_FLPY_EJCT | AUXIO_LED
  32 #define TURN_OFF_LED *AUXREG = AUXIO_ORMEIN | AUXIO_FLPY_EJCT
  33 #define FLIP_LED     *AUXREG = (*AUXREG | AUXIO_ORMEIN) ^ AUXIO_LED
  34 
  35 #endif /* !(_SPARC_AUXIO_H) */

/* [previous][next][first][last][top][bottom][index][help] */