1*54579826SDavid Howells /* apc - Driver definitions for power management functions 2*54579826SDavid Howells * of Aurora Personality Chip (APC) on SPARCstation-4/5 and 3*54579826SDavid Howells * derivatives 4*54579826SDavid Howells * 5*54579826SDavid Howells * Copyright (c) 2001 Eric Brower (ebrower@usa.net) 6*54579826SDavid Howells * 7*54579826SDavid Howells */ 8*54579826SDavid Howells 9*54579826SDavid Howells #ifndef _SPARC_APC_H 10*54579826SDavid Howells #define _SPARC_APC_H 11*54579826SDavid Howells 12*54579826SDavid Howells #include <linux/ioctl.h> 13*54579826SDavid Howells 14*54579826SDavid Howells #define APC_IOC 'A' 15*54579826SDavid Howells 16*54579826SDavid Howells #define APCIOCGFANCTL _IOR(APC_IOC, 0x00, int) /* Get fan speed */ 17*54579826SDavid Howells #define APCIOCSFANCTL _IOW(APC_IOC, 0x01, int) /* Set fan speed */ 18*54579826SDavid Howells 19*54579826SDavid Howells #define APCIOCGCPWR _IOR(APC_IOC, 0x02, int) /* Get CPOWER state */ 20*54579826SDavid Howells #define APCIOCSCPWR _IOW(APC_IOC, 0x03, int) /* Set CPOWER state */ 21*54579826SDavid Howells 22*54579826SDavid Howells #define APCIOCGBPORT _IOR(APC_IOC, 0x04, int) /* Get BPORT state */ 23*54579826SDavid Howells #define APCIOCSBPORT _IOW(APC_IOC, 0x05, int) /* Set BPORT state */ 24*54579826SDavid Howells 25*54579826SDavid Howells /* 26*54579826SDavid Howells * Register offsets 27*54579826SDavid Howells */ 28*54579826SDavid Howells #define APC_IDLE_REG 0x00 29*54579826SDavid Howells #define APC_FANCTL_REG 0x20 30*54579826SDavid Howells #define APC_CPOWER_REG 0x24 31*54579826SDavid Howells #define APC_BPORT_REG 0x30 32*54579826SDavid Howells 33*54579826SDavid Howells #define APC_REGMASK 0x01 34*54579826SDavid Howells #define APC_BPMASK 0x03 35*54579826SDavid Howells 36*54579826SDavid Howells /* 37*54579826SDavid Howells * IDLE - CPU standby values (set to initiate standby) 38*54579826SDavid Howells */ 39*54579826SDavid Howells #define APC_IDLE_ON 0x01 40*54579826SDavid Howells 41*54579826SDavid Howells /* 42*54579826SDavid Howells * FANCTL - Fan speed control state values 43*54579826SDavid Howells */ 44*54579826SDavid Howells #define APC_FANCTL_HI 0x00 /* Fan speed high */ 45*54579826SDavid Howells #define APC_FANCTL_LO 0x01 /* Fan speed low */ 46*54579826SDavid Howells 47*54579826SDavid Howells /* 48*54579826SDavid Howells * CPWR - Convenience power outlet state values 49*54579826SDavid Howells */ 50*54579826SDavid Howells #define APC_CPOWER_ON 0x00 /* Conv power on */ 51*54579826SDavid Howells #define APC_CPOWER_OFF 0x01 /* Conv power off */ 52*54579826SDavid Howells 53*54579826SDavid Howells /* 54*54579826SDavid Howells * BPA/BPB - Read-Write "Bit Ports" state values (reset to 0 at power-on) 55*54579826SDavid Howells * 56*54579826SDavid Howells * WARNING: Internal usage of bit ports is platform dependent-- 57*54579826SDavid Howells * don't modify BPORT settings unless you know what you are doing. 58*54579826SDavid Howells * 59*54579826SDavid Howells * On SS5 BPA seems to toggle onboard ethernet loopback... -E 60*54579826SDavid Howells */ 61*54579826SDavid Howells #define APC_BPORT_A 0x01 /* Bit Port A */ 62*54579826SDavid Howells #define APC_BPORT_B 0x02 /* Bit Port B */ 63*54579826SDavid Howells 64*54579826SDavid Howells #endif /* !(_SPARC_APC_H) */ 65