aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-09-07 09:06:51 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-24 08:09:15 -0400
commit42c2544b2d7d4f287bfa239455af09b6408476e2 (patch)
tree95cecad4ffcaa206434aea36ed746f84e48ec4e6 /arch/x86/include
parent1f5a371c075a7101fe75a75cde5aad928460a42e (diff)
x86, mrst: Some drivers need to known when an SCU is available
Add a notifier so that drivers can hook into SCU availability in order to take actions post initialisation when/if the SCU becomes available. In the ideal world we wouldn't need this and we could avoid any init dependancies of this form, but in practice we can't do it for some cases. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/intel_scu_ipc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/include/asm/intel_scu_ipc.h b/arch/x86/include/asm/intel_scu_ipc.h
index 29f66793cc55..4420993acc47 100644
--- a/arch/x86/include/asm/intel_scu_ipc.h
+++ b/arch/x86/include/asm/intel_scu_ipc.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_X86_INTEL_SCU_IPC_H_ 1#ifndef _ASM_X86_INTEL_SCU_IPC_H_
2#define _ASM_X86_INTEL_SCU_IPC_H_ 2#define _ASM_X86_INTEL_SCU_IPC_H_
3 3
4#include <linux/notifier.h>
5
4#define IPCMSG_VRTC 0xFA /* Set vRTC device */ 6#define IPCMSG_VRTC 0xFA /* Set vRTC device */
5 7
6/* Command id associated with message IPCMSG_VRTC */ 8/* Command id associated with message IPCMSG_VRTC */
@@ -44,4 +46,24 @@ int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data);
44/* Update FW version */ 46/* Update FW version */
45int intel_scu_ipc_fw_update(u8 *buffer, u32 length); 47int intel_scu_ipc_fw_update(u8 *buffer, u32 length);
46 48
49extern struct blocking_notifier_head intel_scu_notifier;
50
51static inline void intel_scu_notifier_add(struct notifier_block *nb)
52{
53 blocking_notifier_chain_register(&intel_scu_notifier, nb);
54}
55
56static inline void intel_scu_notifier_remove(struct notifier_block *nb)
57{
58 blocking_notifier_chain_unregister(&intel_scu_notifier, nb);
59}
60
61static inline int intel_scu_notifier_post(unsigned long v, void *p)
62{
63 return blocking_notifier_call_chain(&intel_scu_notifier, v, p);
64}
65
66#define SCU_AVAILABLE 1
67#define SCU_DOWN 2
68
47#endif 69#endif