drm/rockchip: vop2: Fix the windows switch between different layers
[drm/drm-misc.git] / arch / sparc / include / uapi / asm / apc.h
blobaeb369b87fcd76a5e8b79da1942e851182052905
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /* apc - Driver definitions for power management functions
3 * of Aurora Personality Chip (APC) on SPARCstation-4/5 and
4 * derivatives
6 * Copyright (c) 2001 Eric Brower (ebrower@usa.net)
8 */
10 #ifndef _SPARC_APC_H
11 #define _SPARC_APC_H
13 #include <linux/ioctl.h>
15 #define APC_IOC 'A'
17 #define APCIOCGFANCTL _IOR(APC_IOC, 0x00, int) /* Get fan speed */
18 #define APCIOCSFANCTL _IOW(APC_IOC, 0x01, int) /* Set fan speed */
20 #define APCIOCGCPWR _IOR(APC_IOC, 0x02, int) /* Get CPOWER state */
21 #define APCIOCSCPWR _IOW(APC_IOC, 0x03, int) /* Set CPOWER state */
23 #define APCIOCGBPORT _IOR(APC_IOC, 0x04, int) /* Get BPORT state */
24 #define APCIOCSBPORT _IOW(APC_IOC, 0x05, int) /* Set BPORT state */
27 * Register offsets
29 #define APC_IDLE_REG 0x00
30 #define APC_FANCTL_REG 0x20
31 #define APC_CPOWER_REG 0x24
32 #define APC_BPORT_REG 0x30
34 #define APC_REGMASK 0x01
35 #define APC_BPMASK 0x03
38 * IDLE - CPU standby values (set to initiate standby)
40 #define APC_IDLE_ON 0x01
43 * FANCTL - Fan speed control state values
45 #define APC_FANCTL_HI 0x00 /* Fan speed high */
46 #define APC_FANCTL_LO 0x01 /* Fan speed low */
49 * CPWR - Convenience power outlet state values
51 #define APC_CPOWER_ON 0x00 /* Conv power on */
52 #define APC_CPOWER_OFF 0x01 /* Conv power off */
55 * BPA/BPB - Read-Write "Bit Ports" state values (reset to 0 at power-on)
57 * WARNING: Internal usage of bit ports is platform dependent--
58 * don't modify BPORT settings unless you know what you are doing.
60 * On SS5 BPA seems to toggle onboard ethernet loopback... -E
62 #define APC_BPORT_A 0x01 /* Bit Port A */
63 #define APC_BPORT_B 0x02 /* Bit Port B */
65 #endif /* !(_SPARC_APC_H) */