aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:11:07 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:11:07 +0000
commitf8b02bf658c479e5999511eb1f309dd232708347 (patch)
tree9b7eeb9a3544fb867401c5371e6c97c56d43b775 /arch
parent55c9ab6ba2f85c34fa64e06107762b1d65553208 (diff)
fix-fiq-child-attach-callback.patch
As part of the device tree stuff, some things are basically children of FIQ. Allow a callback in the machine-specific code to attach the children when the FIQ device has been instantiated Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2440/fiq_c_isr.c8
-rw-r--r--arch/arm/mach-s3c2440/fiq_c_isr.h11
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/fiq_c_isr.c b/arch/arm/mach-s3c2440/fiq_c_isr.c
index 924f1f926cf..148850582b7 100644
--- a/arch/arm/mach-s3c2440/fiq_c_isr.c
+++ b/arch/arm/mach-s3c2440/fiq_c_isr.c
@@ -230,6 +230,14 @@ static int __init sc32440_fiq_probe(struct platform_device *pdev)
if (ret)
return ret;
+ /*
+ * if wanted, users can defer registration of devices
+ * that depend on FIQ until after we register, and can use our
+ * device as parent so suspend-resume ordering is correct
+ */
+ if (pdata->attach_child_devices)
+ (pdata->attach_child_devices)(&pdev->dev);
+
fiq_ready = 1;
return 0;
diff --git a/arch/arm/mach-s3c2440/fiq_c_isr.h b/arch/arm/mach-s3c2440/fiq_c_isr.h
index a3a2622b81d..e92b103cdfb 100644
--- a/arch/arm/mach-s3c2440/fiq_c_isr.h
+++ b/arch/arm/mach-s3c2440/fiq_c_isr.h
@@ -2,12 +2,23 @@
#define _LINUX_FIQ_C_ISR_H
#include <mach/regs-irq.h>
+#include <linux/platform_device.h>
extern unsigned long _fiq_count_fiqs;
extern u32 _fiq_ack_mask;
extern int _fiq_timer_index;
extern u16 _fiq_timer_divisor;
+/* platform data */
+
+struct sc32440_fiq_platform_data {
+ /*
+ * give an opportunity to use us as parent for
+ * devices that depend on us
+ */
+ void (*attach_child_devices)(struct device *parent_device);
+};
+
/* This CANNOT be implemented in a module -- it has to be used in code
* included in the monolithic kernel
*/