aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristian Krafft <parabelboi@bopserverein.de>2007-02-14 08:09:45 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-15 22:00:19 -0500
commit0e8266437c62f4848676ea6e87a1ff10367502a9 (patch)
tree57f3b86ffb2c205f513896bbf52f836c7d0a0302 /include
parentfde5efd0e50e026f3f69629fc5790a4f0533dcaa (diff)
[POWERPC] Add PMI driver for cell blade
This adds driver code for the PMI device found in future IBM products. PMI stands for "Platform Management Interrupt" and is a way to communicate with the BMC (Baseboard Management Controller). It provides bidirectional communication with a low latency. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Heiko J Schick <schickhj@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/pmi.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/asm-powerpc/pmi.h b/include/asm-powerpc/pmi.h
new file mode 100644
index 000000000000..cb0f8aa43088
--- /dev/null
+++ b/include/asm-powerpc/pmi.h
@@ -0,0 +1,67 @@
1#ifndef _POWERPC_PMI_H
2#define _POWERPC_PMI_H
3
4/*
5 * Definitions for talking with PMI device on PowerPC
6 *
7 * PMI (Platform Management Interrupt) is a way to communicate
8 * with the BMC (Baseboard Management Controller) via interrupts.
9 * Unlike IPMI it is bidirectional and has a low latency.
10 *
11 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
12 *
13 * Author: Christian Krafft <krafft@de.ibm.com>
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
18 * any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29
30#ifdef __KERNEL__
31
32#include <asm/of_device.h>
33
34#define PMI_TYPE_FREQ_CHANGE 0x01
35#define PMI_READ_TYPE 0
36#define PMI_READ_DATA0 1
37#define PMI_READ_DATA1 2
38#define PMI_READ_DATA2 3
39#define PMI_WRITE_TYPE 4
40#define PMI_WRITE_DATA0 5
41#define PMI_WRITE_DATA1 6
42#define PMI_WRITE_DATA2 7
43
44#define PMI_ACK 0x80
45
46#define PMI_TIMEOUT 100
47
48typedef struct {
49 u8 type;
50 u8 data0;
51 u8 data1;
52 u8 data2;
53} pmi_message_t;
54
55struct pmi_handler {
56 struct list_head node;
57 u8 type;
58 void (*handle_pmi_message) (struct of_device *, pmi_message_t);
59};
60
61void pmi_register_handler(struct of_device *, struct pmi_handler *);
62void pmi_unregister_handler(struct of_device *, struct pmi_handler *);
63
64void pmi_send_message(struct of_device *, pmi_message_t);
65
66#endif /* __KERNEL__ */
67#endif /* _POWERPC_PMI_H */