/* apc - Driver definitions for power management functions1* of Aurora Personality Chip (APC) on SPARCstation-4/5 and2* derivatives3*4* Copyright (c) 2001 Eric Brower ([email protected])5*6*/78#ifndef _SPARC_APC_H9#define _SPARC_APC_H1011#include <linux/ioctl.h>1213#define APC_IOC 'A'1415#define APCIOCGFANCTL _IOR(APC_IOC, 0x00, int) /* Get fan speed */16#define APCIOCSFANCTL _IOW(APC_IOC, 0x01, int) /* Set fan speed */1718#define APCIOCGCPWR _IOR(APC_IOC, 0x02, int) /* Get CPOWER state */19#define APCIOCSCPWR _IOW(APC_IOC, 0x03, int) /* Set CPOWER state */2021#define APCIOCGBPORT _IOR(APC_IOC, 0x04, int) /* Get BPORT state */22#define APCIOCSBPORT _IOW(APC_IOC, 0x05, int) /* Set BPORT state */2324/*25* Register offsets26*/27#define APC_IDLE_REG 0x0028#define APC_FANCTL_REG 0x2029#define APC_CPOWER_REG 0x2430#define APC_BPORT_REG 0x303132#define APC_REGMASK 0x0133#define APC_BPMASK 0x033435/*36* IDLE - CPU standby values (set to initiate standby)37*/38#define APC_IDLE_ON 0x013940/*41* FANCTL - Fan speed control state values42*/43#define APC_FANCTL_HI 0x00 /* Fan speed high */44#define APC_FANCTL_LO 0x01 /* Fan speed low */4546/*47* CPWR - Convenience power outlet state values48*/49#define APC_CPOWER_ON 0x00 /* Conv power on */50#define APC_CPOWER_OFF 0x01 /* Conv power off */5152/*53* BPA/BPB - Read-Write "Bit Ports" state values (reset to 0 at power-on)54*55* WARNING: Internal usage of bit ports is platform dependent--56* don't modify BPORT settings unless you know what you are doing.57*58* On SS5 BPA seems to toggle onboard ethernet loopback... -E59*/60#define APC_BPORT_A 0x01 /* Bit Port A */61#define APC_BPORT_B 0x02 /* Bit Port B */6263#endif /* !(_SPARC_APC_H) */646566