[RFC PATCH 10/35] ARM: OMAP2+: hwmod: export hwmod APIs for driver use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These are required for providing hwmod data in late boot through a module.

Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
---
 arch/arm/mach-omap2/omap_hwmod.c |   14 ++++++++++++++
 arch/arm/mach-omap2/omap_hwmod.h |    5 ++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index d20179a..1f2b659 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3234,6 +3234,11 @@ static void __init *memblock_alloc(int size)
 	return memblock_virt_alloc(size, 0);
 }
 
+static void *kzalloc_alloc(int size)
+{
+	return kzalloc(size, GFP_KERNEL);
+}
+
 /**
  * omap_hwmod_register_links - register an array of hwmod links
  * @ois: pointer to an array of omap_hwmod_ocp_if to register
@@ -3276,6 +3281,14 @@ int omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
 	return 0;
 }
 
+int omap_hwmod_register_links_late(struct omap_hwmod_ocp_if **ois)
+{
+	soc_ops.memalloc = kzalloc_alloc;
+
+	return omap_hwmod_register_links(ois);
+}
+EXPORT_SYMBOL(omap_hwmod_register_links_late);
+
 /**
  * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up
  * @oh: pointer to the hwmod currently being set up (usually not the MPU)
@@ -3344,6 +3357,7 @@ int omap_hwmod_setup_all(void)
 	return 0;
 }
 omap_core_initcall(omap_hwmod_setup_all);
+EXPORT_SYMBOL(omap_hwmod_setup_all);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 6da0524..9612add 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -755,6 +755,9 @@ extern int ti81xx_hwmod_init(void);
 extern int dra7xx_hwmod_init(void);
 int am43xx_hwmod_init(void);
 
-extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
+int omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
+int omap_hwmod_register_links_late(struct omap_hwmod_ocp_if **ios);
+
+int omap_hwmod_setup_all(void);
 
 #endif
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux