aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/platform/mrst
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/platform/mrst
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/platform/mrst')
-rw-r--r--arch/x86/platform/mrst/mrst.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index fe73276e026..51ec016c20d 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -24,6 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/notifier.h>
27 28
28#include <asm/setup.h> 29#include <asm/setup.h>
29#include <asm/mpspec_def.h> 30#include <asm/mpspec_def.h>
@@ -555,6 +556,9 @@ static void __init intel_scu_i2c_device_register(int bus,
555 i2c_devs[i2c_next_dev++] = new_dev; 556 i2c_devs[i2c_next_dev++] = new_dev;
556} 557}
557 558
559BLOCKING_NOTIFIER_HEAD(intel_scu_notifier);
560EXPORT_SYMBOL_GPL(intel_scu_notifier);
561
558/* Called by IPC driver */ 562/* Called by IPC driver */
559void intel_scu_devices_create(void) 563void intel_scu_devices_create(void)
560{ 564{
@@ -579,6 +583,7 @@ void intel_scu_devices_create(void)
579 } else 583 } else
580 i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1); 584 i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1);
581 } 585 }
586 intel_scu_notifier_post(SCU_AVAILABLE, 0L);
582} 587}
583EXPORT_SYMBOL_GPL(intel_scu_devices_create); 588EXPORT_SYMBOL_GPL(intel_scu_devices_create);
584 589
@@ -587,6 +592,8 @@ void intel_scu_devices_destroy(void)
587{ 592{
588 int i; 593 int i;
589 594
595 intel_scu_notifier_post(SCU_DOWN, 0L);
596
590 for (i = 0; i < ipc_next_dev; i++) 597 for (i = 0; i < ipc_next_dev; i++)
591 platform_device_del(ipc_devs[i]); 598 platform_device_del(ipc_devs[i]);
592} 599}