diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 12:40:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 12:40:26 -0400 |
commit | f8b71a3a92d69cb1c9c2162f9235d3dd550e4aa0 (patch) | |
tree | d0853186f33314a6e45903876d0e94d1619fcca9 /include/asm-sparc/auxio.h | |
parent | 42a77a1b8fe4fd78cf8d8fccbaac918bbe888192 (diff) | |
parent | e4f25060b87a627f5cda84b8134911d43c919458 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
sparc: Remove Sparc's asm-offsets for sclow.S
sparc64: Update defconfig.
sparc64: Add Niagara2 RNG driver.
sparc64: Add missing hypervisor service group numbers.
sparc64: Remove 4MB and 512K base page size options.
sparc64: Convert to generic helpers for IPI function calls.
sparc: Use new '%pS' infrastructure to print symbols.
sparc32: fix init.c allnoconfig build error
sparc64: Config category "Processor type and features" absent
sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
sparc: join the remaining header files
sparc: merge header files with trivial differences
sparc: when header files are equal use asm-sparc version
sparc: copy sparc64 specific files to asm-sparc
sparc: Merge asm-sparc{,64}/asi.h
sparc: export openprom.h to userspace
sparc: Merge asm-sparc{,64}/types.h
sparc: Merge asm-sparc{,64}/termios.h
sparc: Merge asm-sparc{,64}/termbits.h
sparc: Merge asm-sparc{,64}/setup.h
...
Diffstat (limited to 'include/asm-sparc/auxio.h')
-rw-r--r-- | include/asm-sparc/auxio.h | 97 |
1 files changed, 8 insertions, 89 deletions
diff --git a/include/asm-sparc/auxio.h b/include/asm-sparc/auxio.h index e552b8d68450..24c6f3c0f577 100644 --- a/include/asm-sparc/auxio.h +++ b/include/asm-sparc/auxio.h | |||
@@ -1,89 +1,8 @@ | |||
1 | /* | 1 | #ifndef ___ASM_SPARC_AUXIO_H |
2 | * auxio.h: Definitions and code for the Auxiliary I/O register. | 2 | #define ___ASM_SPARC_AUXIO_H |
3 | * | 3 | #if defined(__sparc__) && defined(__arch64__) |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | #include <asm-sparc/auxio_64.h> |
5 | */ | 5 | #else |
6 | #ifndef _SPARC_AUXIO_H | 6 | #include <asm-sparc/auxio_32.h> |
7 | #define _SPARC_AUXIO_H | 7 | #endif |
8 | 8 | #endif | |
9 | #include <asm/system.h> | ||
10 | #include <asm/vaddrs.h> | ||
11 | |||
12 | /* This register is an unsigned char in IO space. It does two things. | ||
13 | * First, it is used to control the front panel LED light on machines | ||
14 | * that have it (good for testing entry points to trap handlers and irq's) | ||
15 | * Secondly, it controls various floppy drive parameters. | ||
16 | */ | ||
17 | #define AUXIO_ORMEIN 0xf0 /* All writes must set these bits. */ | ||
18 | #define AUXIO_ORMEIN4M 0xc0 /* sun4m - All writes must set these bits. */ | ||
19 | #define AUXIO_FLPY_DENS 0x20 /* Floppy density, high if set. Read only. */ | ||
20 | #define AUXIO_FLPY_DCHG 0x10 /* A disk change occurred. Read only. */ | ||
21 | #define AUXIO_EDGE_ON 0x10 /* sun4m - On means Jumper block is in. */ | ||
22 | #define AUXIO_FLPY_DSEL 0x08 /* Drive select/start-motor. Write only. */ | ||
23 | #define AUXIO_LINK_TEST 0x08 /* sun4m - On means TPE Carrier detect. */ | ||
24 | |||
25 | /* Set the following to one, then zero, after doing a pseudo DMA transfer. */ | ||
26 | #define AUXIO_FLPY_TCNT 0x04 /* Floppy terminal count. Write only. */ | ||
27 | |||
28 | /* Set the following to zero to eject the floppy. */ | ||
29 | #define AUXIO_FLPY_EJCT 0x02 /* Eject floppy disk. Write only. */ | ||
30 | #define AUXIO_LED 0x01 /* On if set, off if unset. Read/Write */ | ||
31 | |||
32 | #ifndef __ASSEMBLY__ | ||
33 | |||
34 | /* | ||
35 | * NOTE: these routines are implementation dependent-- | ||
36 | * understand the hardware you are querying! | ||
37 | */ | ||
38 | extern void set_auxio(unsigned char bits_on, unsigned char bits_off); | ||
39 | extern unsigned char get_auxio(void); /* .../asm-sparc/floppy.h */ | ||
40 | |||
41 | /* | ||
42 | * The following routines are provided for driver-compatibility | ||
43 | * with sparc64 (primarily sunlance.c) | ||
44 | */ | ||
45 | |||
46 | #define AUXIO_LTE_ON 1 | ||
47 | #define AUXIO_LTE_OFF 0 | ||
48 | |||
49 | /* auxio_set_lte - Set Link Test Enable (TPE Link Detect) | ||
50 | * | ||
51 | * on - AUXIO_LTE_ON or AUXIO_LTE_OFF | ||
52 | */ | ||
53 | #define auxio_set_lte(on) \ | ||
54 | do { \ | ||
55 | if(on) { \ | ||
56 | set_auxio(AUXIO_LINK_TEST, 0); \ | ||
57 | } else { \ | ||
58 | set_auxio(0, AUXIO_LINK_TEST); \ | ||
59 | } \ | ||
60 | } while (0) | ||
61 | |||
62 | #define AUXIO_LED_ON 1 | ||
63 | #define AUXIO_LED_OFF 0 | ||
64 | |||
65 | /* auxio_set_led - Set system front panel LED | ||
66 | * | ||
67 | * on - AUXIO_LED_ON or AUXIO_LED_OFF | ||
68 | */ | ||
69 | #define auxio_set_led(on) \ | ||
70 | do { \ | ||
71 | if(on) { \ | ||
72 | set_auxio(AUXIO_LED, 0); \ | ||
73 | } else { \ | ||
74 | set_auxio(0, AUXIO_LED); \ | ||
75 | } \ | ||
76 | } while (0) | ||
77 | |||
78 | #endif /* !(__ASSEMBLY__) */ | ||
79 | |||
80 | |||
81 | /* AUXIO2 (Power Off Control) */ | ||
82 | extern __volatile__ unsigned char * auxio_power_register; | ||
83 | |||
84 | #define AUXIO_POWER_DETECT_FAILURE 32 | ||
85 | #define AUXIO_POWER_CLEAR_FAILURE 2 | ||
86 | #define AUXIO_POWER_OFF 1 | ||
87 | |||
88 | |||
89 | #endif /* !(_SPARC_AUXIO_H) */ | ||