![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * auxio.h: Definitions and code for the Auxiliary I/O register. 0004 * 0005 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 0006 */ 0007 #ifndef _SPARC_AUXIO_H 0008 #define _SPARC_AUXIO_H 0009 0010 #include <asm/vaddrs.h> 0011 0012 /* This register is an unsigned char in IO space. It does two things. 0013 * First, it is used to control the front panel LED light on machines 0014 * that have it (good for testing entry points to trap handlers and irq's) 0015 * Secondly, it controls various floppy drive parameters. 0016 */ 0017 #define AUXIO_ORMEIN 0xf0 /* All writes must set these bits. */ 0018 #define AUXIO_ORMEIN4M 0xc0 /* sun4m - All writes must set these bits. */ 0019 #define AUXIO_FLPY_DENS 0x20 /* Floppy density, high if set. Read only. */ 0020 #define AUXIO_FLPY_DCHG 0x10 /* A disk change occurred. Read only. */ 0021 #define AUXIO_EDGE_ON 0x10 /* sun4m - On means Jumper block is in. */ 0022 #define AUXIO_FLPY_DSEL 0x08 /* Drive select/start-motor. Write only. */ 0023 #define AUXIO_LINK_TEST 0x08 /* sun4m - On means TPE Carrier detect. */ 0024 0025 /* Set the following to one, then zero, after doing a pseudo DMA transfer. */ 0026 #define AUXIO_FLPY_TCNT 0x04 /* Floppy terminal count. Write only. */ 0027 0028 /* Set the following to zero to eject the floppy. */ 0029 #define AUXIO_FLPY_EJCT 0x02 /* Eject floppy disk. Write only. */ 0030 #define AUXIO_LED 0x01 /* On if set, off if unset. Read/Write */ 0031 0032 #ifndef __ASSEMBLY__ 0033 0034 /* 0035 * NOTE: these routines are implementation dependent-- 0036 * understand the hardware you are querying! 0037 */ 0038 void set_auxio(unsigned char bits_on, unsigned char bits_off); 0039 unsigned char get_auxio(void); /* .../asm/floppy.h */ 0040 0041 /* 0042 * The following routines are provided for driver-compatibility 0043 * with sparc64 (primarily sunlance.c) 0044 */ 0045 0046 #define AUXIO_LTE_ON 1 0047 #define AUXIO_LTE_OFF 0 0048 0049 /* auxio_set_lte - Set Link Test Enable (TPE Link Detect) 0050 * 0051 * on - AUXIO_LTE_ON or AUXIO_LTE_OFF 0052 */ 0053 #define auxio_set_lte(on) \ 0054 do { \ 0055 if(on) { \ 0056 set_auxio(AUXIO_LINK_TEST, 0); \ 0057 } else { \ 0058 set_auxio(0, AUXIO_LINK_TEST); \ 0059 } \ 0060 } while (0) 0061 0062 #define AUXIO_LED_ON 1 0063 #define AUXIO_LED_OFF 0 0064 0065 /* auxio_set_led - Set system front panel LED 0066 * 0067 * on - AUXIO_LED_ON or AUXIO_LED_OFF 0068 */ 0069 #define auxio_set_led(on) \ 0070 do { \ 0071 if(on) { \ 0072 set_auxio(AUXIO_LED, 0); \ 0073 } else { \ 0074 set_auxio(0, AUXIO_LED); \ 0075 } \ 0076 } while (0) 0077 0078 #endif /* !(__ASSEMBLY__) */ 0079 0080 0081 /* AUXIO2 (Power Off Control) */ 0082 extern volatile u8 __iomem *auxio_power_register; 0083 0084 #define AUXIO_POWER_DETECT_FAILURE 32 0085 #define AUXIO_POWER_CLEAR_FAILURE 2 0086 #define AUXIO_POWER_OFF 1 0087 0088 0089 #endif /* !(_SPARC_AUXIO_H) */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |