/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/* apc - Driver definitions for power management functions2* of Aurora Personality Chip (APC) on SPARCstation-4/5 and3* derivatives4*5* Copyright (c) 2001 Eric Brower ([email protected])6*7*/89#ifndef _SPARC_APC_H10#define _SPARC_APC_H1112#include <linux/ioctl.h>1314#define APC_IOC 'A'1516#define APCIOCGFANCTL _IOR(APC_IOC, 0x00, int) /* Get fan speed */17#define APCIOCSFANCTL _IOW(APC_IOC, 0x01, int) /* Set fan speed */1819#define APCIOCGCPWR _IOR(APC_IOC, 0x02, int) /* Get CPOWER state */20#define APCIOCSCPWR _IOW(APC_IOC, 0x03, int) /* Set CPOWER state */2122#define APCIOCGBPORT _IOR(APC_IOC, 0x04, int) /* Get BPORT state */23#define APCIOCSBPORT _IOW(APC_IOC, 0x05, int) /* Set BPORT state */2425/*26* Register offsets27*/28#define APC_IDLE_REG 0x0029#define APC_FANCTL_REG 0x2030#define APC_CPOWER_REG 0x2431#define APC_BPORT_REG 0x303233#define APC_REGMASK 0x0134#define APC_BPMASK 0x033536/*37* IDLE - CPU standby values (set to initiate standby)38*/39#define APC_IDLE_ON 0x014041/*42* FANCTL - Fan speed control state values43*/44#define APC_FANCTL_HI 0x00 /* Fan speed high */45#define APC_FANCTL_LO 0x01 /* Fan speed low */4647/*48* CPWR - Convenience power outlet state values49*/50#define APC_CPOWER_ON 0x00 /* Conv power on */51#define APC_CPOWER_OFF 0x01 /* Conv power off */5253/*54* BPA/BPB - Read-Write "Bit Ports" state values (reset to 0 at power-on)55*56* WARNING: Internal usage of bit ports is platform dependent--57* don't modify BPORT settings unless you know what you are doing.58*59* On SS5 BPA seems to toggle onboard ethernet loopback... -E60*/61#define APC_BPORT_A 0x01 /* Bit Port A */62#define APC_BPORT_B 0x02 /* Bit Port B */6364#endif /* !(_SPARC_APC_H) */656667