Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
c32f1a3
Documentation
arch
alpha
arm
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
m68knommu
mips
mn10300
parisc
powerpc
s390
sh
sparc
boot
include/asm
Kbuild
agp.h
apb.h
apc.h
asi.h
asmmacro.h
atomic.h
atomic_32.h
atomic_64.h
auxio.h
auxio_32.h
auxio_64.h
auxvec.h
backoff.h
bbc.h
bitext.h
bitops.h
bitops_32.h
bitops_64.h
bpp.h
btfixup.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cacheflush_32.h
cacheflush_64.h
chafsr.h
checksum.h
checksum_32.h
checksum_64.h
chmctrl.h
clock.h
cmt.h
compat.h
compat_signal.h
contregs.h
cpudata.h
cpudata_32.h
cpudata_64.h
cputime.h
current.h
cypress.h
dcr.h
dcu.h
delay.h
delay_32.h
delay_64.h
device.h
display7seg.h
div64.h
dma-mapping.h
dma-mapping_32.h
dma-mapping_64.h
dma.h
dma_32.h
dma_64.h
ebus.h
ebus_32.h
ebus_64.h
ecc.h
eeprom.h
elf.h
elf_32.h
elf_64.h
emergency-restart.h
envctrl.h
errno.h
estate.h
fb.h
fbio.h
fcntl.h
fhc.h
fixmap.h
floppy.h
floppy_32.h
floppy_64.h
fpumacro.h
ftrace.h
futex.h
futex_32.h
futex_64.h
hardirq.h
hardirq_32.h
hardirq_64.h
head.h
head_32.h
head_64.h
highmem.h
hugetlb.h
hvtramp.h
hw_irq.h
hypervisor.h
ide.h
idprom.h
intr_queue.h
io-unit.h
io.h
io_32.h
io_64.h
ioctl.h
ioctls.h
iommu.h
iommu_32.h
iommu_64.h
ipcbuf.h
ipcbuf_32.h
ipcbuf_64.h
irq.h
irq_32.h
irq_64.h
irq_regs.h
irqflags.h
irqflags_32.h
irqflags_64.h
jsflash.h
kdebug.h
kdebug_32.h
kdebug_64.h
kgdb.h
kmap_types.h
kprobes.h
ldc.h
linkage.h
lmb.h
local.h
lsu.h
machines.h
mbus.h
mc146818rtc.h
mc146818rtc_32.h
mc146818rtc_64.h
mdesc.h
memreg.h
mman.h
mmu.h
mmu_32.h
mmu_64.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmzone.h
module.h
module_32.h
module_64.h
mostek.h
mostek_32.h
mostek_64.h
mpmbox.h
msgbuf.h
msi.h
mutex.h
mxcc.h
ns87303.h
obio.h
of_device.h
of_platform.h
of_platform_32.h
of_platform_64.h
openprom.h
openprom_32.h
openprom_64.h
openpromio.h
oplib.h
oplib_32.h
oplib_64.h
page.h
page_32.h
page_64.h
param.h
parport.h
pbm.h
pci.h
pci_32.h
pci_64.h
pcic.h
percpu.h
percpu_32.h
percpu_64.h
perfctr.h
pgalloc.h
pgalloc_32.h
pgalloc_64.h
pgtable.h
pgtable_32.h
pgtable_64.h
pgtsrmmu.h
pgtsun4.h
pgtsun4c.h
pil.h
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
processor.h
processor_32.h
processor_64.h
prom.h
psr.h
psrcompat.h
pstate.h
ptrace.h
ptrace_32.h
ptrace_64.h
reboot.h
reg.h
reg_32.h
reg_64.h
resource.h
ross.h
rtc.h
rwsem-const.h
rwsem.h
sbi.h
sbus.h
sbus_32.h
sbus_64.h
scatterlist.h
scatterlist_32.h
scatterlist_64.h
scratchpad.h
seccomp.h
sections.h
sections_32.h
sections_64.h
sembuf.h
setup.h
sfafsr.h
sfp-machine.h
sfp-machine_32.h
sfp-machine_64.h
shmbuf.h
shmparam.h
shmparam_32.h
shmparam_64.h
sigcontext.h
sigcontext_32.h
sigcontext_64.h
siginfo.h
siginfo_32.h
siginfo_64.h
signal.h
signal_32.h
signal_64.h
smp.h
smp_32.h
smp_64.h
smpprim.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_32.h
spinlock_64.h
spinlock_types.h
spitfire.h
sstate.h
stacktrace.h
starfire.h
stat.h
stat_32.h
stat_64.h
statfs.h
statfs_32.h
statfs_64.h
string.h
string_32.h
string_64.h
sun4paddr.h
sun4prom.h
sunbpp.h
swift.h
syscall.h
syscalls.h
sysen.h
system.h
system_32.h
system_64.h
termbits.h
termios.h
thread_info.h
thread_info_32.h
thread_info_64.h
timer.h
timer_32.h
timer_64.h
timex.h
timex_32.h
timex_64.h
tlb.h
tlb_32.h
tlb_64.h
tlbflush.h
tlbflush_32.h
tlbflush_64.h
topology.h
topology_32.h
topology_64.h
traps.h
tsb.h
tsunami.h
ttable.h
turbosparc.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
uctx.h
unaligned.h
unistd.h
unistd_32.h
unistd_64.h
upa.h
user.h
utrap.h
vac-ops.h
vaddrs.h
vfc_ioctls.h
vga.h
viking.h
vio.h
visasm.h
watchdog.h
winmacro.h
xor.h
xor_32.h
xor_64.h
kernel
lib
math-emu
mm
oprofile
prom
Kconfig
Kconfig.debug
Makefile
defconfig
sparc64
um
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
envctrl.h
Copy path
Blame
Blame
Latest commit
Sam Ravnborg
sparc, sparc64: use arch/sparc/include
Jul 27, 2008
a439fe5
·
Jul 27, 2008
History
History
103 lines (94 loc) · 3.35 KB
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
envctrl.h
Top
File metadata and controls
Code
Blame
103 lines (94 loc) · 3.35 KB
Raw
/* * * envctrl.h: Definitions for access to the i2c environment * monitoring on Ultrasparc systems. * * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 2000 Vinh Truong (vinh.truong@eng.sun.com) * VT - Add all ioctl commands and environment status definitions * VT - Add application note */ #ifndef _SPARC64_ENVCTRL_H #define _SPARC64_ENVCTRL_H 1 #include <linux/ioctl.h> /* Application note: * * The driver supports 4 operations: open(), close(), ioctl(), read() * The device name is /dev/envctrl. * Below is sample usage: * * fd = open("/dev/envtrl", O_RDONLY); * if (ioctl(fd, ENVCTRL_READ_SHUTDOWN_TEMPERATURE, 0) < 0) * printf("error\n"); * ret = read(fd, buf, 10); * close(fd); * * Notice in the case of cpu voltage and temperature, the default is * cpu0. If we need to know the info of cpu1, cpu2, cpu3, we need to * pass in cpu number in ioctl() last parameter. For example, to * get the voltage of cpu2: * * ioctlbuf[0] = 2; * if (ioctl(fd, ENVCTRL_READ_CPU_VOLTAGE, ioctlbuf) < 0) * printf("error\n"); * ret = read(fd, buf, 10); * * All the return values are in ascii. So check read return value * and do appropriate conversions in your application. */ /* IOCTL commands */ /* Note: these commands reflect possible monitor features. * Some boards choose to support some of the features only. */ #define ENVCTRL_RD_CPU_TEMPERATURE _IOR('p', 0x40, int) #define ENVCTRL_RD_CPU_VOLTAGE _IOR('p', 0x41, int) #define ENVCTRL_RD_FAN_STATUS _IOR('p', 0x42, int) #define ENVCTRL_RD_WARNING_TEMPERATURE _IOR('p', 0x43, int) #define ENVCTRL_RD_SHUTDOWN_TEMPERATURE _IOR('p', 0x44, int) #define ENVCTRL_RD_VOLTAGE_STATUS _IOR('p', 0x45, int) #define ENVCTRL_RD_SCSI_TEMPERATURE _IOR('p', 0x46, int) #define ENVCTRL_RD_ETHERNET_TEMPERATURE _IOR('p', 0x47, int) #define ENVCTRL_RD_MTHRBD_TEMPERATURE _IOR('p', 0x48, int) #define ENVCTRL_RD_GLOBALADDRESS _IOR('p', 0x49, int) /* Read return values for a voltage status request. */ #define ENVCTRL_VOLTAGE_POWERSUPPLY_GOOD 0x01 #define ENVCTRL_VOLTAGE_BAD 0x02 #define ENVCTRL_POWERSUPPLY_BAD 0x03 #define ENVCTRL_VOLTAGE_POWERSUPPLY_BAD 0x04 /* Read return values for a fan status request. * A failure match means either the fan fails or * the fan is not connected. Some boards have optional * connectors to connect extra fans. * * There are maximum 8 monitor fans. Some are cpu fans * some are system fans. The mask below only indicates * fan by order number. * Below is a sample application: * * if (ioctl(fd, ENVCTRL_READ_FAN_STATUS, 0) < 0) { * printf("ioctl fan failed\n"); * } * if (read(fd, rslt, 1) <= 0) { * printf("error or fan not monitored\n"); * } else { * if (rslt[0] == ENVCTRL_ALL_FANS_GOOD) { * printf("all fans good\n"); * } else if (rslt[0] == ENVCTRL_ALL_FANS_BAD) { * printf("all fans bad\n"); * } else { * if (rslt[0] & ENVCTRL_FAN0_FAILURE_MASK) { * printf("fan 0 failed or not connected\n"); * } * ...... */ #define ENVCTRL_ALL_FANS_GOOD 0x00 #define ENVCTRL_FAN0_FAILURE_MASK 0x01 #define ENVCTRL_FAN1_FAILURE_MASK 0x02 #define ENVCTRL_FAN2_FAILURE_MASK 0x04 #define ENVCTRL_FAN3_FAILURE_MASK 0x08 #define ENVCTRL_FAN4_FAILURE_MASK 0x10 #define ENVCTRL_FAN5_FAILURE_MASK 0x20 #define ENVCTRL_FAN6_FAILURE_MASK 0x40 #define ENVCTRL_FAN7_FAILURE_MASK 0x80 #define ENVCTRL_ALL_FANS_BAD 0xFF #endif /* !(_SPARC64_ENVCTRL_H) */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
You can’t perform that action at this time.