diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-11-16 14:03:33 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 20:39:30 +1100 |
commit | 3e00a5aec3d6af687e37f4e7482f5c7ecdcabd0b (patch) | |
tree | d483402b7fff70ac6069f69889903dcfdac924dd /include/asm-powerpc | |
parent | 088df4d256227b3d927bb6ed57e66d138da0565c (diff) | |
download | op-kernel-dev-3e00a5aec3d6af687e37f4e7482f5c7ecdcabd0b.zip op-kernel-dev-3e00a5aec3d6af687e37f4e7482f5c7ecdcabd0b.tar.gz |
[POWERPC] Xserve cpu-meter driver
This is a small driver for the Xserve G5 CPU-meter blue LEDs on the
front-panel. It might work on the Xserve G4 as well though that was
not tested. It's pretty basic and could use some improvements if
somebody cares doing them. :)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/dbdma.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-powerpc/dbdma.h b/include/asm-powerpc/dbdma.h index 8973565..e23f07e 100644 --- a/include/asm-powerpc/dbdma.h +++ b/include/asm-powerpc/dbdma.h @@ -95,7 +95,13 @@ struct dbdma_cmd { #define DBDMA_DO_STOP(regs) do { \ out_le32(&((regs)->control), (RUN|FLUSH)<<16); \ while(in_le32(&((regs)->status)) & (ACTIVE|FLUSH)) \ - ; \ + ; \ +} while(0) + +#define DBDMA_DO_RESET(regs) do { \ + out_le32(&((regs)->control), (ACTIVE|DEAD|WAKE|FLUSH|PAUSE|RUN)<<16);\ + while(in_le32(&((regs)->status)) & (RUN)) \ + ; \ } while(0) #endif /* _ASM_DBDMA_H_ */ |