linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support
@ 2015-04-15 12:52 Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 01/35] clk: composite: add support for disable_unused clk operation Tero Kristo
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

Hi,

This RFC provides support for moving hwmod data into separate modules
which can be registered later during boot. Only system critical parts
of the hwmod data remain in omap_hwmod_*_early_data.c file, rest are
moved into omap_hwmod_*_late_data.c. The late data can alternatively
be built into a module, or built-in to kernel image, in which case
the system behaves pretty much the same way as it does currently. Use
kconfig option OMAP_HWMOD_DATA_MODULES to control the behavior. If
this approach is something that is seen feasible to follow, rest of
the SoCs can be converted in similar manner, and eventually all the
hwmod code should be moved under some driver (drivers/bus/ maybe?)

This RFC set only provides support for omap3 hwmod data split. Please
note that you probably must use ramdisk rootfs to load the hwmod data
module itself from, as most of the system devices are not initialized
in the early boot.

Testing done on omap3-beagle:
- boot, insmod, suspend-resume (ret/off), cpuidle (ret/off)

Boot log for omap3 here: http://pastebin.ubuntu.com/10826443/
- some spam generated by USB here, it seems to defer probe until i2c/twl
  is ready
- some additional debug prints enabled for testing purposes

Trial branch pushed here:
- tree: https://github.com/t-kristo/linux-pm.git
- branch: 4.0-hwmod-split-rfc

-Tero


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [RFC PATCH 01/35] clk: composite: add support for disable_unused clk operation
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 02/35] clk: ti: gate/interface: add support for clk_ops->disable_unused Tero Kristo
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

Certain gate clocks require this for the init time clk_disable_unused
functionality to work properly, thus add support for it. If the gate
clock does not provide disable_unused ops, just call gate_ops->disable,
just like the core clock code would do.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/clk/clk-composite.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index 956b7e5..5cb1496 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -187,6 +187,20 @@ static void clk_composite_disable(struct clk_hw *hw)
 	gate_ops->disable(gate_hw);
 }
 
+static void clk_composite_disable_unused(struct clk_hw *hw)
+{
+	struct clk_composite *composite = to_clk_composite(hw);
+	const struct clk_ops *gate_ops = composite->gate_ops;
+	struct clk_hw *gate_hw = composite->gate_hw;
+
+	__clk_hw_set_clk(gate_hw, hw);
+
+	if (gate_ops->disable_unused)
+		gate_ops->disable_unused(gate_hw);
+	else
+		gate_ops->disable(gate_hw);
+}
+
 struct clk *clk_register_composite(struct device *dev, const char *name,
 			const char **parent_names, int num_parents,
 			struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
@@ -267,6 +281,8 @@ struct clk *clk_register_composite(struct device *dev, const char *name,
 		clk_composite_ops->is_enabled = clk_composite_is_enabled;
 		clk_composite_ops->enable = clk_composite_enable;
 		clk_composite_ops->disable = clk_composite_disable;
+		clk_composite_ops->disable_unused =
+			clk_composite_disable_unused;
 	}
 
 	init.ops = clk_composite_ops;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 02/35] clk: ti: gate/interface: add support for clk_ops->disable_unused
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 01/35] clk: composite: add support for disable_unused clk operation Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 03/35] ARM: OMAP2: n8x0: remove __initdata declarations from code Tero Kristo
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

While executing clk_disable_unused during boot, the dflt clk operations
to disable the clocks include usecounting mechanism for clockdomains,
which is indexed badly in case a direct clock disable call is made. This
can potentially cause the underlying clockdomain to be disabled in
certain cases. Fixed by adding a separate disable_unused clk_ops, which
does not access the clockdomain functionality at all, and won't mess up
the usecounting.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/clock.c |   27 +++++++++++++++++++++------
 drivers/clk/ti/composite.c  |    1 +
 drivers/clk/ti/gate.c       |    2 ++
 drivers/clk/ti/interface.c  |    1 +
 include/linux/clk/ti.h      |    1 +
 5 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 6124db5..2b096c7 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -345,15 +345,12 @@ err:
 }
 
 /**
- * omap2_dflt_clk_disable - disable a clock in the hardware
+ * omap2_dflt_clk_disable_ll - low level disable a clock in the hardware
  * @hw: struct clk_hw * of the clock to disable
  *
- * Disable the clock @hw in the hardware, and call into the OMAP
- * clockdomain code to "disable" the corresponding clockdomain if all
- * clocks/hwmods in that clockdomain are now disabled.  No return
- * value.
+ * Disable the clock @hw in the hardware. No return value.
  */
-void omap2_dflt_clk_disable(struct clk_hw *hw)
+void omap2_dflt_clk_disable_ll(struct clk_hw *hw)
 {
 	struct clk_hw_omap *clk;
 	u32 v;
@@ -376,6 +373,24 @@ void omap2_dflt_clk_disable(struct clk_hw *hw)
 		v &= ~(1 << clk->enable_bit);
 	omap2_clk_writel(v, clk, clk->enable_reg);
 	/* No OCP barrier needed here since it is a disable operation */
+}
+
+/**
+ * omap2_dflt_clk_disable - disable a clock in the hardware
+ * @hw: struct clk_hw * of the clock to disable
+ *
+ * Disable the clock @hw in the hardware, and call into the OMAP
+ * clockdomain code to "disable" the corresponding clockdomain if all
+ * clocks/hwmods in that clockdomain are now disabled.  No return
+ * value.
+ */
+void omap2_dflt_clk_disable(struct clk_hw *hw)
+{
+	struct clk_hw_omap *clk;
+
+	clk = to_clk_hw_omap(hw);
+
+	omap2_dflt_clk_disable_ll(hw);
 
 	if (clkdm_control && clk->clkdm)
 		clkdm_clk_disable(clk->clkdm, hw->clk);
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index 3654f61..9e10191 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -57,6 +57,7 @@ static const struct clk_ops ti_composite_divider_ops = {
 static const struct clk_ops ti_composite_gate_ops = {
 	.enable		= &omap2_dflt_clk_enable,
 	.disable	= &omap2_dflt_clk_disable,
+	.disable_unused	= &omap2_dflt_clk_disable_ll,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
 };
 
diff --git a/drivers/clk/ti/gate.c b/drivers/clk/ti/gate.c
index d493307..e2d4d1e 100644
--- a/drivers/clk/ti/gate.c
+++ b/drivers/clk/ti/gate.c
@@ -41,6 +41,7 @@ static const struct clk_ops omap_gate_clk_ops = {
 	.init		= &omap2_init_clk_clkdm,
 	.enable		= &omap2_dflt_clk_enable,
 	.disable	= &omap2_dflt_clk_disable,
+	.disable_unused	= &omap2_dflt_clk_disable_ll,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
 };
 
@@ -48,6 +49,7 @@ static const struct clk_ops omap_gate_clk_hsdiv_restore_ops = {
 	.init		= &omap2_init_clk_clkdm,
 	.enable		= &omap36xx_gate_clk_enable_with_hsdiv_restore,
 	.disable	= &omap2_dflt_clk_disable,
+	.disable_unused	= &omap2_dflt_clk_disable_ll,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
 };
 
diff --git a/drivers/clk/ti/interface.c b/drivers/clk/ti/interface.c
index 265d91f..c037259 100644
--- a/drivers/clk/ti/interface.c
+++ b/drivers/clk/ti/interface.c
@@ -29,6 +29,7 @@ static const struct clk_ops ti_interface_clk_ops = {
 	.init		= &omap2_init_clk_clkdm,
 	.enable		= &omap2_dflt_clk_enable,
 	.disable	= &omap2_dflt_clk_disable,
+	.disable_unused	= &omap2_dflt_clk_disable_ll,
 	.is_enabled	= &omap2_dflt_clk_is_enabled,
 };
 
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index 6784400..c8c0543 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -306,6 +306,7 @@ int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate,
 int omap3_dpll4_set_rate_and_parent(struct clk_hw *hw, unsigned long rate,
 				    unsigned long parent_rate, u8 index);
 int omap2_dflt_clk_enable(struct clk_hw *hw);
+void omap2_dflt_clk_disable_ll(struct clk_hw *hw);
 void omap2_dflt_clk_disable(struct clk_hw *hw);
 int omap2_dflt_clk_is_enabled(struct clk_hw *hw);
 void omap3_clk_lock_dpll5(void);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 03/35] ARM: OMAP2: n8x0: remove __initdata declarations from code
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 01/35] clk: composite: add support for disable_unused clk operation Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 02/35] clk: ti: gate/interface: add support for clk_ops->disable_unused Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 04/35] ARM: OMAP2+: hwmod: add support for specifying memalloc functionality Tero Kristo
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

Parts of the n8x0 board support code is needed during pdata registration,
which will be moved later in the boot. Thus, it can't reside under __initdata
section anymore and must be moved out of it.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/board-n8x0.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index b6443a4..d03a333 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -153,7 +153,7 @@ static struct omap2_mcspi_device_config p54spi_mcspi_config = {
 	.turbo_mode	= 0,
 };
 
-static struct spi_board_info n800_spi_board_info[] __initdata = {
+static struct spi_board_info n800_spi_board_info[] = {
 	{
 		.modalias	= "p54spi",
 		.bus_num	= 2,
@@ -569,11 +569,11 @@ static int n8x0_menelaus_late_init(struct device *dev)
 }
 #endif
 
-struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = {
+struct menelaus_platform_data n8x0_menelaus_platform_data = {
 	.late_init = n8x0_menelaus_late_init,
 };
 
-struct aic3x_pdata n810_aic33_data __initdata = {
+struct aic3x_pdata n810_aic33_data = {
 	.gpio_reset = 118,
 };
 
@@ -593,7 +593,7 @@ omap_late_initcall(n8x0_late_initcall);
  * Legacy init pdata init for n8x0. Note that we want to follow the
  * I2C bus numbering starting at 0 for device tree like other omaps.
  */
-void * __init n8x0_legacy_init(void)
+void *n8x0_legacy_init(void)
 {
 	board_check_revision();
 	spi_register_board_info(n800_spi_board_info,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 04/35] ARM: OMAP2+: hwmod: add support for specifying memalloc functionality
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (2 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 03/35] ARM: OMAP2: n8x0: remove __initdata declarations from code Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 05/35] ARM: OMAP2+: hwmod: add support for rerouting hwmod links Tero Kristo
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

hwmod currently uses memblock alloc, which only works very early in boot.
Change this by adding a runtime setup support for specifying memory alloc
functionality, this will allow hwmod init to be executed also later during
boot, when memblock allocation is no longer available.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 355b089..939161e 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -193,6 +193,7 @@ struct omap_hwmod_soc_ops {
 	int (*init_clkdm)(struct omap_hwmod *oh);
 	void (*update_context_lost)(struct omap_hwmod *oh);
 	int (*get_context_lost)(struct omap_hwmod *oh);
+	void * (*memalloc)(int size);
 };
 
 /* soc_ops: adapts the omap_hwmod code to the currently-booted SoC */
@@ -2738,7 +2739,8 @@ static int __init _alloc_links(struct omap_hwmod_link **ml,
 	sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF;
 
 	*sl = NULL;
-	*ml = memblock_virt_alloc(sz, 0);
+
+	*ml = soc_ops.memalloc(sz);
 
 	*sl = (void *)(*ml) + sizeof(struct omap_hwmod_link);
 
@@ -2855,7 +2857,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois)
 	pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n",
 		 __func__, sz, max_ls);
 
-	linkspace = memblock_virt_alloc(sz, 0);
+	linkspace = soc_ops.memalloc(sz);
 
 	return 0;
 }
@@ -3208,6 +3210,11 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 	return ret;
 }
 
+static void __init *memblock_alloc(int size)
+{
+	return memblock_virt_alloc(size, 0);
+}
+
 /**
  * omap_hwmod_register_links - register an array of hwmod links
  * @ois: pointer to an array of omap_hwmod_ocp_if to register
@@ -3928,6 +3935,8 @@ void __init omap_hwmod_init(void)
 		WARN(1, "omap_hwmod: unknown SoC type\n");
 	}
 
+	soc_ops.memalloc = memblock_alloc;
+
 	inited = true;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 05/35] ARM: OMAP2+: hwmod: add support for rerouting hwmod links
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (3 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 04/35] ARM: OMAP2+: hwmod: add support for specifying memalloc functionality Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 06/35] of/platform: export a couple of platform device init APIs Tero Kristo
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

If a hwmod with same name is already registered, reroute the links to
use the existing one rather than fail. This is needed when hwmod data
is made into a separate module, and for example, l3 bus is already
registered under different hwmod. The late module init will use
an l3 dummy hwmod instead, which will be rerouted to use the real
l3 hwmod.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |   26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 939161e..4fc42c9 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2797,6 +2797,8 @@ static int __init _add_link(struct omap_hwmod_ocp_if *oi)
  */
 static int __init _register_link(struct omap_hwmod_ocp_if *oi)
 {
+	struct omap_hwmod *oh;
+
 	if (!oi || !oi->master || !oi->slave || !oi->user)
 		return -EINVAL;
 
@@ -2810,11 +2812,27 @@ static int __init _register_link(struct omap_hwmod_ocp_if *oi)
 	 * Register the connected hwmods, if they haven't been
 	 * registered already
 	 */
-	if (oi->master->_state != _HWMOD_STATE_REGISTERED)
-		_register(oi->master);
+	if (oi->master->_state != _HWMOD_STATE_REGISTERED) {
+		oh = _lookup(oi->master->name);
+		if (oh) {
+			pr_debug("%s: remapping %s to %08x\n", __func__,
+				 oh->name, (u32)oh);
+			oi->master = oh;
+		} else {
+			_register(oi->master);
+		}
+	}
 
-	if (oi->slave->_state != _HWMOD_STATE_REGISTERED)
-		_register(oi->slave);
+	if (oi->slave->_state != _HWMOD_STATE_REGISTERED) {
+		oh = _lookup(oi->slave->name);
+		if (oh) {
+			pr_debug("%s: remapping %s to %08x\n", __func__,
+				 oh->name, (u32)oh);
+			oi->slave = oh;
+		} else {
+			_register(oi->slave);
+		}
+	}
 
 	_add_link(oi);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 06/35] of/platform: export a couple of platform device init APIs
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (4 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 05/35] ARM: OMAP2+: hwmod: add support for rerouting hwmod links Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 07/35] wl12xx: remove __init declaration from platform data setup API Tero Kristo
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

Some custom platform bus registration code needs access to couple of
of/platform APIs, thus make these available outside of/platform.
The APIs exported in this patch are required by OMAP hwmod data module
support, which basically splits the platform bus registration to be done
in two phases; an early init containing only a small subset of the bus,
and a late init which adds everything else.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/of/platform.c       |    6 +++---
 include/linux/of_platform.h |    9 +++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index b189733..e933cf7 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -218,7 +218,7 @@ static void of_dma_deconfigure(struct device *dev)
  * Returns pointer to created platform device, or NULL if a device was not
  * registered.  Unavailable devices will not get registered.
  */
-static struct platform_device *of_platform_device_create_pdata(
+struct platform_device *of_platform_device_create_pdata(
 					struct device_node *np,
 					const char *bus_id,
 					void *platform_data,
@@ -345,8 +345,8 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
 /**
  * of_devname_lookup() - Given a device node, lookup the preferred Linux name
  */
-static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *lookup,
-				 struct device_node *np)
+const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *lookup,
+					   struct device_node *np)
 {
 	struct resource res;
 
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 611a691..8af1e42 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -63,10 +63,19 @@ extern struct platform_device *of_find_device_by_node(struct device_node *np);
 extern struct platform_device *of_platform_device_create(struct device_node *np,
 						   const char *bus_id,
 						   struct device *parent);
+extern struct platform_device *of_platform_device_create_pdata(
+						struct device_node *np,
+						const char *bus_id,
+						void *platform_data,
+						struct device *parent);
 
 extern int of_platform_bus_probe(struct device_node *root,
 				 const struct of_device_id *matches,
 				 struct device *parent);
+
+extern const struct of_dev_auxdata *of_dev_lookup(
+					const struct of_dev_auxdata *lookup,
+					struct device_node *np);
 #ifdef CONFIG_OF_ADDRESS
 extern int of_platform_populate(struct device_node *root,
 				const struct of_device_id *matches,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 07/35] wl12xx: remove __init declaration from platform data setup API
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (5 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 06/35] of/platform: export a couple of platform device init APIs Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 08/35] ARM: OMAP2+: hwmod: move APIs out of __init section Tero Kristo
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

With most of the OMAP hwmod data being moved to a module, this API
needs to be accessed later in the boot and can't reside under
__init section anymore.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/net/wireless/ti/wilink_platform_data.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wilink_platform_data.c b/drivers/net/wireless/ti/wilink_platform_data.c
index a92bd3e..55bba5a 100644
--- a/drivers/net/wireless/ti/wilink_platform_data.c
+++ b/drivers/net/wireless/ti/wilink_platform_data.c
@@ -25,7 +25,7 @@
 
 static struct wl12xx_platform_data *wl12xx_platform_data;
 
-int __init wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
 {
 	if (wl12xx_platform_data)
 		return -EBUSY;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 08/35] ARM: OMAP2+: hwmod: move APIs out of __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (6 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 07/35] wl12xx: remove __init declaration from platform data setup API Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 09/35] ARM: OMAP2+: hwmod: move omap_hwmod_init_postsetup to hwmod driver Tero Kristo
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

With hwmod init being split into an early and a late module init parts,
certain hwmod APIs can't reside under __init section anymore. Thus,
remove the __init declaration from the required APIs to make them
accessible at the module probe phase also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |   37 +++++++++++++++++++------------------
 arch/arm/mach-omap2/omap_hwmod.h |    2 +-
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4fc42c9..6e7b541 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1232,7 +1232,7 @@ static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name,
  * Intended to be called during hwmod registration only. No return
  * value.
  */
-static void __init _save_mpu_port_index(struct omap_hwmod *oh)
+static void _save_mpu_port_index(struct omap_hwmod *oh)
 {
 	struct omap_hwmod_ocp_if *os = NULL;
 	struct list_head *p;
@@ -1285,7 +1285,8 @@ static struct omap_hwmod_ocp_if *_find_mpu_rt_port(struct omap_hwmod *oh)
  * Returns a pointer to the struct omap_hwmod_addr_space record representing
  * the register target MPU address space; or returns NULL upon error.
  */
-static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap_hwmod *oh)
+static struct omap_hwmod_addr_space
+*_find_mpu_rt_addr_space(struct omap_hwmod *oh)
 {
 	struct omap_hwmod_ocp_if *os;
 	struct omap_hwmod_addr_space *mem;
@@ -2371,8 +2372,8 @@ static int of_dev_hwmod_lookup(struct device_node *np,
  * Returns 0 on success, -EINVAL if an invalid hwmod is passed, and
  * -ENXIO on absent or invalid register target address space.
  */
-static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
-				    int index, struct device_node *np)
+static int _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
+			     int index, struct device_node *np)
 {
 	struct omap_hwmod_addr_space *mem;
 	void __iomem *va_start = NULL;
@@ -2428,7 +2429,7 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
  * upon success or if the hwmod isn't registered or if the hwmod's
  * address space is not defined, or -EINVAL upon failure.
  */
-static int __init _init(struct omap_hwmod *oh, void *data)
+static int _init(struct omap_hwmod *oh, void *data)
 {
 	int r, index;
 	struct device_node *np = NULL;
@@ -2486,7 +2487,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
  * a stub; implementing this properly requires iclk autoidle usecounting in
  * the clock code.   No return value.
  */
-static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
+static void _setup_iclk_autoidle(struct omap_hwmod *oh)
 {
 	struct omap_hwmod_ocp_if *os;
 	struct list_head *p;
@@ -2521,7 +2522,7 @@ static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
  * reset.  Returns 0 upon success or a negative error code upon
  * failure.
  */
-static int __init _setup_reset(struct omap_hwmod *oh)
+static int _setup_reset(struct omap_hwmod *oh)
 {
 	int r;
 
@@ -2582,7 +2583,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
  *
  * No return value.
  */
-static void __init _setup_postsetup(struct omap_hwmod *oh)
+static void _setup_postsetup(struct omap_hwmod *oh)
 {
 	u8 postsetup_state;
 
@@ -2630,7 +2631,7 @@ static void __init _setup_postsetup(struct omap_hwmod *oh)
  * affects the IP block hardware, or system integration hardware
  * associated with the IP block.  Returns 0.
  */
-static int __init _setup(struct omap_hwmod *oh, void *data)
+static int _setup(struct omap_hwmod *oh, void *data)
 {
 	if (oh->_state != _HWMOD_STATE_INITIALIZED)
 		return 0;
@@ -2682,7 +2683,7 @@ static int __init _setup(struct omap_hwmod *oh, void *data)
  * that the copy process would be relatively complex due to the large number
  * of substructures.
  */
-static int __init _register(struct omap_hwmod *oh)
+static int _register(struct omap_hwmod *oh)
 {
 	if (!oh || !oh->name || !oh->class || !oh->class->name ||
 	    (oh->_state != _HWMOD_STATE_UNKNOWN))
@@ -2725,8 +2726,8 @@ static int __init _register(struct omap_hwmod *oh)
  * 'supplemental' allocations will be logged when debugging is
  * enabled.  Returns 0.
  */
-static int __init _alloc_links(struct omap_hwmod_link **ml,
-			       struct omap_hwmod_link **sl)
+static int _alloc_links(struct omap_hwmod_link **ml,
+			struct omap_hwmod_link **sl)
 {
 	unsigned int sz;
 
@@ -2762,7 +2763,7 @@ static int __init _alloc_links(struct omap_hwmod_link **ml,
  * locking in this code.  Changes to this assumption will require
  * additional locking.  Returns 0.
  */
-static int __init _add_link(struct omap_hwmod_ocp_if *oi)
+static int _add_link(struct omap_hwmod_ocp_if *oi)
 {
 	struct omap_hwmod_link *ml, *sl;
 
@@ -2795,7 +2796,7 @@ static int __init _add_link(struct omap_hwmod_ocp_if *oi)
  * should be marked __initdata and freed after init.  This would allow
  * unneeded omap_hwmods to be freed on multi-OMAP configurations.
  */
-static int __init _register_link(struct omap_hwmod_ocp_if *oi)
+static int _register_link(struct omap_hwmod_ocp_if *oi)
 {
 	struct omap_hwmod *oh;
 
@@ -3244,7 +3245,7 @@ static void __init *memblock_alloc(int size)
  * -ENOMEM if the link memory area can't be allocated, or 0 upon
  * success.
  */
-int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
+int omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
 {
 	int r, i;
 
@@ -3285,7 +3286,7 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
  * to the MPU.  Intended to be called only by omap_hwmod_setup*().  No
  * return value.
  */
-static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
+static void _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
 {
 	if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN)
 		pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n",
@@ -3305,7 +3306,7 @@ static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
  * registered omap_hwmod.  Also calls _setup() on each hwmod.  Returns
  * -EINVAL upon error or 0 upon success.
  */
-int __init omap_hwmod_setup_one(const char *oh_name)
+int omap_hwmod_setup_one(const char *oh_name)
 {
 	struct omap_hwmod *oh;
 
@@ -3333,7 +3334,7 @@ int __init omap_hwmod_setup_one(const char *oh_name)
  * names to struct clk pointers for each registered omap_hwmod.  Also
  * calls _setup() on each hwmod.  Returns 0 upon success.
  */
-static int __init omap_hwmod_setup_all(void)
+int omap_hwmod_setup_all(void)
 {
 	_ensure_mpu_hwmod_is_setup(NULL);
 
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 9611c91..fe75d38 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -696,7 +696,7 @@ struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
 
-int __init omap_hwmod_setup_one(const char *name);
+int omap_hwmod_setup_one(const char *name);
 
 int omap_hwmod_enable(struct omap_hwmod *oh);
 int omap_hwmod_idle(struct omap_hwmod *oh);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 09/35] ARM: OMAP2+: hwmod: move omap_hwmod_init_postsetup to hwmod driver
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (7 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 08/35] ARM: OMAP2+: hwmod: move APIs out of __init section Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 10/35] ARM: OMAP2+: hwmod: export hwmod APIs for driver use Tero Kristo
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

Previously this function was incorrectly implemented under low level
IO init. However, this API will be needed for late hwmod data module
init also, so move it to the generic hwmod codebase, and export the
function also for module use.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/io.c         |   20 --------------------
 arch/arm/mach-omap2/omap_hwmod.c |   38 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod.h |    2 ++
 3 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index c4871c5..c2b80b8 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -351,26 +351,6 @@ static int __init _omap2_init_reprogram_sdrc(void)
 	return v;
 }
 
-static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
-{
-	return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
-}
-
-static void __init omap_hwmod_init_postsetup(void)
-{
-	u8 postsetup_state;
-
-	/* Set the default postsetup state for all hwmods */
-#ifdef CONFIG_PM
-	postsetup_state = _HWMOD_STATE_IDLE;
-#else
-	postsetup_state = _HWMOD_STATE_ENABLED;
-#endif
-	omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
-
-	omap_pm_if_early_init();
-}
-
 static void __init __maybe_unused omap_common_late_init(void)
 {
 	omap_mux_late_init();
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6e7b541..d20179a 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3879,6 +3879,44 @@ ohsps_unlock:
 }
 
 /**
+ * _set_hwmod_postsetup_state - set postsetup state for a single hwmod
+ * @oh: hwmod to set postsetup state for
+ * @data: postsetup state
+ *
+ * Wrapper function for setting the postsetup state for a single hwmod.
+ * Forces return value to zero, so that we don't bail out with an error
+ * value returned from omap_hwmod_set_postsetup_state(); with hwmod data
+ * split to module + early init portions, the postsetup init will be
+ * called twice for some hwmods, but we still want to setup the state for
+ * all and not abort with the first hwmod complaining about its postsetup
+ * state being set already. Returns 0 always.
+ */
+static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
+{
+	omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
+	return 0;
+}
+
+/**
+ * omap_hwmod_init_postsetup - initialize postsetup state for all hwmods
+ *
+ * Sets the hwmod postsetup state for all hwmods based on PM configuration.
+ */
+void omap_hwmod_init_postsetup(void)
+{
+	u8 postsetup_state;
+
+	/* Set the default postsetup state for all hwmods */
+#ifdef CONFIG_PM
+	postsetup_state = _HWMOD_STATE_IDLE;
+#else
+	postsetup_state = _HWMOD_STATE_ENABLED;
+#endif
+	omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
+}
+EXPORT_SYMBOL(omap_hwmod_init_postsetup);
+
+/**
  * omap_hwmod_get_context_loss_count - get lost context count
  * @oh: struct omap_hwmod *
  *
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index fe75d38..6da0524 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -729,6 +729,8 @@ int omap_hwmod_for_each_by_class(const char *classname,
 int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state);
 int omap_hwmod_get_context_loss_count(struct omap_hwmod *oh);
 
+void omap_hwmod_init_postsetup(void);
+
 extern void __init omap_hwmod_init(void);
 
 const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 10/35] ARM: OMAP2+: hwmod: export hwmod APIs for driver use
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (8 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 09/35] ARM: OMAP2+: hwmod: move omap_hwmod_init_postsetup to hwmod driver Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 11/35] ARM: OMAP2+: pdata-quirks: move data out of __initdata section Tero Kristo
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

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

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 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


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 11/35] ARM: OMAP2+: pdata-quirks: move data out of __initdata section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (9 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 10/35] ARM: OMAP2+: hwmod: export hwmod APIs for driver use Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:52 ` [RFC PATCH 12/35] ARM: OMAP2+: dma: change DMA iomap to use hwmod pointers instead of pdata Tero Kristo
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

These need to move later in the boot with hwmod data being moved into a
module, thus remove the __init declarations to make them accessible at
module probe phase also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/pdata-quirks.c |   58 ++++++++++++++++++------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index e642b07..6d5948a 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -37,11 +37,11 @@ static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
 #if IS_ENABLED(CONFIG_WL12XX)
 
-static struct wl12xx_platform_data wl12xx __initdata;
+static struct wl12xx_platform_data wl12xx;
 
-static void __init __used legacy_init_wl12xx(unsigned ref_clock,
-					     unsigned tcxo_clock,
-					     int gpio)
+static void __used legacy_init_wl12xx(unsigned ref_clock,
+				      unsigned tcxo_clock,
+				      int gpio)
 {
 	int res;
 
@@ -64,7 +64,7 @@ static inline void legacy_init_wl12xx(unsigned ref_clock,
 #endif
 
 #ifdef CONFIG_MACH_NOKIA_N8X0
-static void __init omap2420_n8x0_legacy_init(void)
+static void omap2420_n8x0_legacy_init(void)
 {
 	omap_auxdata_lookup[0].platform_data = n8x0_legacy_init();
 }
@@ -73,7 +73,7 @@ static void __init omap2420_n8x0_legacy_init(void)
 #endif
 
 #ifdef CONFIG_ARCH_OMAP3
-static void __init hsmmc2_internal_input_clk(void)
+static void hsmmc2_internal_input_clk(void)
 {
 	u32 reg;
 
@@ -104,7 +104,7 @@ static int omap3_sbc_t3730_twl_callback(struct device *dev,
 	return 0;
 }
 
-static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
+static void omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
 {
 	int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
 
@@ -121,18 +121,18 @@ static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
 	msleep(1);
 }
 
-static void __init omap3_sbc_t3730_twl_init(void)
+static void omap3_sbc_t3730_twl_init(void)
 {
 	twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
 }
 
-static void __init omap3_sbc_t3730_legacy_init(void)
+static void omap3_sbc_t3730_legacy_init(void)
 {
 	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136);
 }
 
-static void __init omap3_sbc_t3530_legacy_init(void)
+static void omap3_sbc_t3530_legacy_init(void)
 {
 	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
 }
@@ -157,27 +157,27 @@ static struct platform_device btwilink_device = {
 	.id	= -1,
 };
 
-static void __init omap3_igep0020_rev_f_legacy_init(void)
+static void omap3_igep0020_rev_f_legacy_init(void)
 {
 	legacy_init_wl12xx(0, 0, 177);
 	platform_device_register(&wl18xx_device);
 	platform_device_register(&btwilink_device);
 }
 
-static void __init omap3_igep0030_rev_g_legacy_init(void)
+static void omap3_igep0030_rev_g_legacy_init(void)
 {
 	legacy_init_wl12xx(0, 0, 136);
 	platform_device_register(&wl18xx_device);
 	platform_device_register(&btwilink_device);
 }
 
-static void __init omap3_evm_legacy_init(void)
+static void omap3_evm_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149);
 }
 
-static void __init omap3_zoom_legacy_init(void)
+static void omap3_zoom_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162);
 }
@@ -208,7 +208,7 @@ static struct emac_platform_data am35xx_emac_pdata = {
 	.interrupt_disable	= am35xx_disable_emac_int,
 };
 
-static void __init am35xx_emac_reset(void)
+static void am35xx_emac_reset(void)
 {
 	u32 v;
 
@@ -218,12 +218,12 @@ static void __init am35xx_emac_reset(void)
 	omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
 }
 
-static struct gpio cm_t3517_wlan_gpios[] __initdata = {
+static struct gpio cm_t3517_wlan_gpios[] = {
 	{ 56,	GPIOF_OUT_INIT_HIGH,	"wlan pwr" },
 	{ 4,	GPIOF_OUT_INIT_HIGH,	"xcvr noe" },
 };
 
-static void __init omap3_sbc_t3517_wifi_init(void)
+static void omap3_sbc_t3517_wifi_init(void)
 {
 	int err = gpio_request_array(cm_t3517_wlan_gpios,
 				ARRAY_SIZE(cm_t3517_wlan_gpios));
@@ -239,7 +239,7 @@ static void __init omap3_sbc_t3517_wifi_init(void)
 	gpio_set_value(cm_t3517_wlan_gpios[1].gpio, 0);
 }
 
-static void __init omap3_sbc_t3517_legacy_init(void)
+static void omap3_sbc_t3517_legacy_init(void)
 {
 	omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
 	omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
@@ -249,7 +249,7 @@ static void __init omap3_sbc_t3517_legacy_init(void)
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 145);
 }
 
-static void __init am3517_evm_legacy_init(void)
+static void am3517_evm_legacy_init(void)
 {
 	am35xx_emac_reset();
 }
@@ -262,7 +262,7 @@ static struct platform_device omap3_rom_rng_device = {
 	},
 };
 
-static void __init nokia_n900_legacy_init(void)
+static void nokia_n900_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
 
@@ -282,25 +282,25 @@ static void __init nokia_n900_legacy_init(void)
 	}
 }
 
-static void __init omap3_tao3530_legacy_init(void)
+static void omap3_tao3530_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 
 #ifdef CONFIG_ARCH_OMAP4
-static void __init omap4_sdp_legacy_init(void)
+static void omap4_sdp_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_26,
 			   WL12XX_TCXOCLOCK_26, 53);
 }
 
-static void __init omap4_panda_legacy_init(void)
+static void omap4_panda_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
 
-static void __init var_som_om44_legacy_init(void)
+static void var_som_om44_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41);
 }
@@ -315,14 +315,14 @@ static struct iommu_platform_data omap4_iommu_pdata = {
 #endif
 
 #ifdef CONFIG_SOC_AM33XX
-static void __init am335x_evmsk_legacy_init(void)
+static void am335x_evmsk_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 31);
 }
 #endif
 
 #ifdef CONFIG_SOC_OMAP5
-static void __init omap5_uevm_legacy_init(void)
+static void omap5_uevm_legacy_init(void)
 {
 }
 #endif
@@ -354,7 +354,7 @@ void omap_auxdata_legacy_init(struct device *dev)
  * Few boards still need auxdata populated before we populate
  * the dev entries in of_platform_populate().
  */
-static struct pdata_init auxdata_quirks[] __initdata = {
+static struct pdata_init auxdata_quirks[] = {
 #ifdef CONFIG_SOC_OMAP2420
 	{ "nokia,n800", omap2420_n8x0_legacy_init, },
 	{ "nokia,n810", omap2420_n8x0_legacy_init, },
@@ -366,7 +366,7 @@ static struct pdata_init auxdata_quirks[] __initdata = {
 	{ /* sentinel */ },
 };
 
-struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
+struct of_dev_auxdata omap_auxdata_lookup[] = {
 #ifdef CONFIG_MACH_NOKIA_N8X0
 	OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
 	OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
@@ -410,7 +410,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
  * Few boards still need to initialize some legacy devices with
  * platform data until the drivers support device tree.
  */
-static struct pdata_init pdata_quirks[] __initdata = {
+static struct pdata_init pdata_quirks[] = {
 #ifdef CONFIG_ARCH_OMAP3
 	{ "compulab,omap3-sbc-t3517", omap3_sbc_t3517_legacy_init, },
 	{ "compulab,omap3-sbc-t3530", omap3_sbc_t3530_legacy_init, },
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 12/35] ARM: OMAP2+: dma: change DMA iomap to use hwmod pointers instead of pdata
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (10 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 11/35] ARM: OMAP2+: pdata-quirks: move data out of __initdata section Tero Kristo
@ 2015-04-15 12:52 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 13/35] ARM: OMAP2+: VP: remove code from __init section Tero Kristo
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:52 UTC (permalink / raw)
  To: tony, paul, linux-omap

This makes it possible to do the iomapping before driver probe. Driver
probe requires access to the DMA IO mapping already, so if it is
allocated after omap_device_build, it is too late and causes a crash.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/dma.c |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index e1a56d8..3ff450b 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -225,13 +225,24 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 	struct platform_device			*pdev;
 	struct omap_system_dma_plat_info	p;
 	struct omap_dma_dev_attr		*d;
-	struct resource				*mem;
+	struct resource				mem;
 	char					*name = "omap_dma_system";
+	int					r;
 
 	p = dma_plat_info;
 	p.dma_attr = (struct omap_dma_dev_attr *)oh->dev_attr;
 	p.errata = configure_dma_errata();
 
+	r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, &mem);
+	if (r)
+		return -ENXIO;
+
+	dma_base = ioremap(mem.start, mem.end - mem.start);
+	if (!dma_base) {
+		pr_err("%s: ioremap fail\n", __func__);
+		return -ENOMEM;
+	}
+
 	pdev = omap_device_build(name, 0, oh, &p, sizeof(p));
 	if (IS_ERR(pdev)) {
 		pr_err("%s: Can't build omap_device for %s:%s.\n",
@@ -242,18 +253,6 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 	omap_dma_dev_info.res = pdev->resource;
 	omap_dma_dev_info.num_res = pdev->num_resources;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem) {
-		dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
-		return -EINVAL;
-	}
-
-	dma_base = ioremap(mem->start, resource_size(mem));
-	if (!dma_base) {
-		dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
-		return -ENOMEM;
-	}
-
 	d = oh->dev_attr;
 
 	if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 13/35] ARM: OMAP2+: VP: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (11 preceding siblings ...)
  2015-04-15 12:52 ` [RFC PATCH 12/35] ARM: OMAP2+: dma: change DMA iomap to use hwmod pointers instead of pdata Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 14/35] ARM: OMAP2+: VC: " Tero Kristo
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed for hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/vp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index a3c3065..f757e94 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -35,7 +35,7 @@ static u32 _vp_set_init_voltage(struct voltagedomain *voltdm, u32 volt)
 }
 
 /* Generic voltage init functions */
-void __init omap_vp_init(struct voltagedomain *voltdm)
+void omap_vp_init(struct voltagedomain *voltdm)
 {
 	struct omap_vp_instance *vp = voltdm->vp;
 	u32 val, sys_clk_rate, timeout, waittime;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 14/35] ARM: OMAP2+: VC: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (12 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 13/35] ARM: OMAP2+: VP: remove code from __init section Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 15/35] ARM: OMAP2+: twl: " Tero Kristo
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/vc.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index be9ef83..c67bdc5 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -413,7 +413,7 @@ static void omap3_set_off_timings(struct voltagedomain *voltdm)
 	voltdm->write(voltoffset, OMAP3_PRM_VOLTOFFSET_OFFSET);
 }
 
-static void __init omap3_vc_init_channel(struct voltagedomain *voltdm)
+static void omap3_vc_init_channel(struct voltagedomain *voltdm)
 {
 	omap3_vc_init_pmic_signaling(voltdm);
 	omap3_set_off_timings(voltdm);
@@ -562,7 +562,7 @@ struct i2c_init_data {
 	u8 hsscll_12;
 };
 
-static const __initdata struct i2c_init_data omap4_i2c_timing_data[] = {
+static const struct i2c_init_data omap4_i2c_timing_data[] = {
 	{
 		.load = 50,
 		.loadbits = 0x3,
@@ -610,7 +610,7 @@ static const __initdata struct i2c_init_data omap4_i2c_timing_data[] = {
  * Pre-calculated values are provided in data tables, as it is not
  * too straightforward to calculate these runtime.
  */
-static void __init omap4_vc_i2c_timing_init(struct voltagedomain *voltdm)
+static void omap4_vc_i2c_timing_init(struct voltagedomain *voltdm)
 {
 	u32 capacitance;
 	u32 val;
@@ -690,7 +690,7 @@ static void __init omap4_vc_i2c_timing_init(struct voltagedomain *voltdm)
  * channel registers.  All other VC channels will use the
  * same configuration.
  */
-static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)
+static void omap_vc_i2c_init(struct voltagedomain *voltdm)
 {
 	struct omap_vc_channel *vc = voltdm->vc;
 	static bool initialized;
@@ -761,7 +761,7 @@ void __init omap_pm_setup_sr_i2c_pcb_length(u32 mm)
 }
 #endif
 
-void __init omap_vc_init_channel(struct voltagedomain *voltdm)
+void omap_vc_init_channel(struct voltagedomain *voltdm)
 {
 	struct omap_vc_channel *vc = voltdm->vc;
 	u8 on_vsel, onlp_vsel, ret_vsel, off_vsel;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 15/35] ARM: OMAP2+: twl: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (13 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 14/35] ARM: OMAP2+: VC: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 16/35] ARM: OMAP2+: voltage: " Tero Kristo
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_twl.c   |    4 ++--
 arch/arm/mach-omap2/twl-common.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 6bf6267..22ddd40 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -218,7 +218,7 @@ static struct omap_voltdm_pmic omap4_core_pmic = {
 	.uv_to_vsel		= twl6030_uv_to_vsel,
 };
 
-int __init omap4_twl_init(void)
+int omap4_twl_init(void)
 {
 	struct voltagedomain *voltdm;
 
@@ -237,7 +237,7 @@ int __init omap4_twl_init(void)
 	return 0;
 }
 
-int __init omap3_twl_init(void)
+int omap3_twl_init(void)
 {
 	struct voltagedomain *voltdm;
 
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 292eca0..2dd3440 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -34,7 +34,7 @@
 #include "voltage.h"
 #include "mux.h"
 
-static struct i2c_board_info __initdata pmic_i2c_board_info = {
+static struct i2c_board_info pmic_i2c_board_info = {
 	.addr		= 0x48,
 	.flags		= I2C_CLIENT_WAKE,
 };
@@ -85,7 +85,7 @@ void __init omap4_pmic_init(const char *pmic_type,
 }
 #endif
 
-void __init omap_pmic_late_init(void)
+void omap_pmic_late_init(void)
 {
 	/* Init the OMAP TWL parameters (if PMIC has been registerd) */
 	if (!pmic_i2c_board_info.irq)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 16/35] ARM: OMAP2+: voltage: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (14 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 15/35] ARM: OMAP2+: twl: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 17/35] ARM: OMAP3: control: " Tero Kristo
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/voltage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index cba8cad..84512e9 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -230,7 +230,7 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm,
  * system boot to init the voltage controller and
  * voltage processors.
  */
-int __init omap_voltage_late_init(void)
+int omap_voltage_late_init(void)
 {
 	struct voltagedomain *voltdm;
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 17/35] ARM: OMAP3: control: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (15 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 16/35] ARM: OMAP2+: voltage: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 18/35] ARM: OMAP3+: cpuidle: " Tero Kristo
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/control.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index da041b4..b0d5e47 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -602,7 +602,7 @@ static void __init omap3_ctrl_setup_d2d_padconf(void)
  * Initializes system control module. This sets up the sysconfig autoidle,
  * and sets up modem and iva2 so that they can be idled properly.
  */
-void __init omap3_ctrl_init(void)
+void omap3_ctrl_init(void)
 {
 	omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 18/35] ARM: OMAP3+: cpuidle: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (16 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 17/35] ARM: OMAP3: control: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 19/35] ARM: OMAP3: PRM: " Tero Kristo
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/cpuidle34xx.c |    2 +-
 arch/arm/mach-omap2/cpuidle44xx.c |    2 +-
 arch/arm/mach-omap2/pm.h          |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index aa7b379..0f149d8 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -323,7 +323,7 @@ static struct cpuidle_driver omap3_idle_driver = {
  * Registers the OMAP3 specific cpuidle driver to the cpuidle
  * framework with the valid set of states.
  */
-int __init omap3_idle_init(void)
+int omap3_idle_init(void)
 {
 	mpu_pd = pwrdm_lookup("mpu_pwrdm");
 	core_pd = pwrdm_lookup("core_pwrdm");
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 01e398a..72e47d7 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -231,7 +231,7 @@ static struct cpuidle_driver omap4_idle_driver = {
  * Registers the OMAP4+ specific cpuidle driver to the cpuidle
  * framework with the valid set of states.
  */
-int __init omap4_idle_init(void)
+int omap4_idle_init(void)
 {
 	mpu_pd = pwrdm_lookup("mpu_pwrdm");
 	cpu_pd[0] = pwrdm_lookup("cpu0_pwrdm");
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 425bfcd..dc02ce8 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -16,8 +16,8 @@
 #include "powerdomain.h"
 
 #ifdef CONFIG_CPU_IDLE
-extern int __init omap3_idle_init(void);
-extern int __init omap4_idle_init(void);
+int omap3_idle_init(void);
+int omap4_idle_init(void);
 #else
 static inline int omap3_idle_init(void)
 {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 19/35] ARM: OMAP3: PRM: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (17 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 18/35] ARM: OMAP3+: cpuidle: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 20/35] ARM: OMAP2+: omap_device: remove omap_device_build " Tero Kristo
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/prm3xxx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 5713bbd..4f16257 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -270,7 +270,7 @@ int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
  * Toggles the reset signal to modem IP block. Required to allow
  * OMAP3430 without stacked modem to idle properly.
  */
-void __init omap3_prm_reset_modem(void)
+void omap3_prm_reset_modem(void)
 {
 	omap2_prm_write_mod_reg(
 		OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
@@ -286,7 +286,7 @@ void __init omap3_prm_reset_modem(void)
  *
  * Initializes PRM registers for PM use. Called from PM init.
  */
-void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
+void omap3_prm_init_pm(bool has_uart4, bool has_iva)
 {
 	u32 en_uart4_mask;
 	u32 grpsel_uart4_mask;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 20/35] ARM: OMAP2+: omap_device: remove omap_device_build from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (18 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 19/35] ARM: OMAP3: PRM: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 21/35] ARM: OMAP2+: SR: remove code " Tero Kristo
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Some devices are built late in boot with the introduction of hwmod
data modules, and the omap_device_build() function is required later
in boot also. Thus, remove it from the __init section.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_device.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index be9541e..52fcaad 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -507,10 +507,10 @@ void omap_device_delete(struct omap_device *od)
  * information.  Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
  * passes along the return value of omap_device_build_ss().
  */
-struct platform_device __init *omap_device_build(const char *pdev_name,
-						 int pdev_id,
-						 struct omap_hwmod *oh,
-						 void *pdata, int pdata_len)
+struct platform_device *omap_device_build(const char *pdev_name,
+					  int pdev_id,
+					  struct omap_hwmod *oh,
+					  void *pdata, int pdata_len)
 {
 	struct omap_hwmod *ohs[] = { oh };
 
@@ -535,11 +535,11 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
  * platform_device record.  Returns an ERR_PTR() on error, or passes
  * along the return value of omap_device_register().
  */
-struct platform_device __init *omap_device_build_ss(const char *pdev_name,
-						    int pdev_id,
-						    struct omap_hwmod **ohs,
-						    int oh_cnt, void *pdata,
-						    int pdata_len)
+struct platform_device *omap_device_build_ss(const char *pdev_name,
+					     int pdev_id,
+					     struct omap_hwmod **ohs,
+					     int oh_cnt, void *pdata,
+					     int pdata_len)
 {
 	int ret = -ENOMEM;
 	struct platform_device *pdev;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 21/35] ARM: OMAP2+: SR: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (19 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 20/35] ARM: OMAP2+: omap_device: remove omap_device_build " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 22/35] ARM: OMAP2+: PM: " Tero Kristo
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/sr_device.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index d7cff26..c453fe4 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -32,8 +32,8 @@
 static bool sr_enable_on_init;
 
 /* Read EFUSE values from control registers for OMAP3430 */
-static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
-				struct omap_sr_data *sr_data)
+static void sr_set_nvalues(struct omap_volt_data *volt_data,
+			   struct omap_sr_data *sr_data)
 {
 	struct omap_sr_nvalue_table *nvalue_table;
 	int i, j, count = 0;
@@ -93,7 +93,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
 	sr_data->nvalue_count = j;
 }
 
-static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
+static int sr_dev_init(struct omap_hwmod *oh, void *user)
 {
 	struct omap_sr_data *sr_data;
 	struct platform_device *pdev;
@@ -171,7 +171,7 @@ void __init omap_enable_smartreflex_on_init(void)
 	sr_enable_on_init = true;
 }
 
-int __init omap_devinit_smartreflex(void)
+int omap_devinit_smartreflex(void)
 {
 	return omap_hwmod_for_each_by_class("smartreflex", sr_dev_init, NULL);
 }
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 22/35] ARM: OMAP2+: PM: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (20 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 21/35] ARM: OMAP2+: SR: remove code " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 23/35] ARM: OMAP3: " Tero Kristo
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/pm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 58920bc..4891559 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -108,7 +108,7 @@ static void __init omap2_init_processor_devices(void)
 	}
 }
 
-int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused)
+int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused)
 {
 	/* XXX The usecount test is racy */
 	if ((clkdm->flags & CLKDM_CAN_ENABLE_AUTO) &&
@@ -128,8 +128,8 @@ int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused)
  * opp entry and sets the voltage domain to the voltage specified
  * in the opp entry
  */
-static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
-					 const char *oh_name)
+static int omap2_set_init_voltage(char *vdd_name, char *clk_name,
+				  const char *oh_name)
 {
 	struct voltagedomain *voltdm;
 	struct clk *clk;
@@ -296,7 +296,7 @@ static int __init omap2_common_pm_init(void)
 }
 omap_postcore_initcall(omap2_common_pm_init);
 
-int __init omap2_common_pm_late_init(void)
+int omap2_common_pm_late_init(void)
 {
 	if (of_have_populated_dt()) {
 		omap3_twl_init();
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 23/35] ARM: OMAP3: PM: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (21 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 22/35] ARM: OMAP2+: PM: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 24/35] ARM: OMAP2+: display: " Tero Kristo
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/pm34xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 88721df..de614e7 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -408,7 +408,7 @@ int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state)
 	return -EINVAL;
 }
 
-static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
+static int pwrdms_setup(struct powerdomain *pwrdm, void *unused)
 {
 	struct power_state *pwrst;
 
@@ -458,7 +458,7 @@ static void __init pm_errata_configure(void)
 	}
 }
 
-int __init omap3_pm_init(void)
+int omap3_pm_init(void)
 {
 	struct power_state *pwrst, *tmp;
 	struct clockdomain *neon_clkdm, *mpu_clkdm, *per_clkdm, *wkup_clkdm;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 24/35] ARM: OMAP2+: display: remove code from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (22 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 23/35] ARM: OMAP3: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 25/35] ARM: OMAP2+: DMA: remove omap2_system_dma_init " Tero Kristo
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Needed by hwmod module boot.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/common.h  |    4 ++--
 arch/arm/mach-omap2/devices.c |    4 ++--
 arch/arm/mach-omap2/display.c |    8 ++++----
 arch/arm/mach-omap2/display.h |    2 +-
 arch/arm/mach-omap2/drm.c     |    4 ++--
 arch/arm/mach-omap2/fb.c      |    8 ++++----
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 46e2458..54cf6ca 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -321,8 +321,8 @@ extern int omap_dss_reset(struct omap_hwmod *);
 /* SoC specific clock initializer */
 int omap_clk_init(void);
 
-int __init omapdss_init_of(void);
-void __init omapdss_early_init_of(void);
+int omapdss_init_of(void);
+void omapdss_early_init_of(void);
 
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 1afb50d..b7f717a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -346,12 +346,12 @@ static struct platform_device omap_vout_device = {
 	.id		= -1,
 };
 
-int __init omap_init_vout(void)
+int omap_init_vout(void)
 {
 	return platform_device_register(&omap_vout_device);
 }
 #else
-int __init omap_init_vout(void) { return 0; }
+int omap_init_vout(void) { return 0; }
 #endif
 
 /*-------------------------------------------------------------------------*/
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 7a050f9..6a2d4aa 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -254,7 +254,7 @@ err:
 	return ERR_PTR(r);
 }
 
-static enum omapdss_version __init omap_display_get_version(void)
+static enum omapdss_version omap_display_get_version(void)
 {
 	if (cpu_is_omap24xx())
 		return OMAPDSS_VER_OMAP24xx;
@@ -557,12 +557,12 @@ int omap_dss_reset(struct omap_hwmod *oh)
 	return r;
 }
 
-void __init omapdss_early_init_of(void)
+void omapdss_early_init_of(void)
 {
 
 }
 
-struct device_node * __init omapdss_find_dss_of_node(void)
+struct device_node *omapdss_find_dss_of_node(void)
 {
 	struct device_node *node;
 
@@ -585,7 +585,7 @@ struct device_node * __init omapdss_find_dss_of_node(void)
 	return NULL;
 }
 
-int __init omapdss_init_of(void)
+int omapdss_init_of(void)
 {
 	int r;
 	enum omapdss_version ver;
diff --git a/arch/arm/mach-omap2/display.h b/arch/arm/mach-omap2/display.h
index 7375854..4fcc326 100644
--- a/arch/arm/mach-omap2/display.h
+++ b/arch/arm/mach-omap2/display.h
@@ -31,6 +31,6 @@ int omap_init_vrfb(void);
 int omap_init_fb(void);
 int omap_init_vout(void);
 
-struct device_node * __init omapdss_find_dss_of_node(void);
+struct device_node *omapdss_find_dss_of_node(void);
 
 #endif
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index facd740..c1ea886 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -41,7 +41,7 @@ static struct platform_device omap_drm_device = {
 	.id = 0,
 };
 
-int __init omap_init_drm(void)
+int omap_init_drm(void)
 {
 	platform_data.omaprev = GET_OMAP_TYPE;
 
@@ -49,5 +49,5 @@ int __init omap_init_drm(void)
 
 }
 #else
-int __init omap_init_drm(void) { return 0; }
+int omap_init_drm(void) { return 0; }
 #endif
diff --git a/arch/arm/mach-omap2/fb.c b/arch/arm/mach-omap2/fb.c
index 26e28e9..028976a 100644
--- a/arch/arm/mach-omap2/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -65,7 +65,7 @@ static const struct resource omap3_vrfb_resources[] = {
 	DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
 };
 
-int __init omap_init_vrfb(void)
+int omap_init_vrfb(void)
 {
 	struct platform_device *pdev;
 	const struct resource *res;
@@ -87,7 +87,7 @@ int __init omap_init_vrfb(void)
 	return PTR_RET(pdev);
 }
 #else
-int __init omap_init_vrfb(void) { return 0; }
+int omap_init_vrfb(void) { return 0; }
 #endif
 
 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -106,10 +106,10 @@ static struct platform_device omap_fb_device = {
 	.num_resources = 0,
 };
 
-int __init omap_init_fb(void)
+int omap_init_fb(void)
 {
 	return platform_device_register(&omap_fb_device);
 }
 #else
-int __init omap_init_fb(void) { return 0; }
+int omap_init_fb(void) { return 0; }
 #endif
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 25/35] ARM: OMAP2+: DMA: remove omap2_system_dma_init from __init section
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (23 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 24/35] ARM: OMAP2+: display: " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 26/35] ARM: OMAP2+: build: add support for hwmod data modules Tero Kristo
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

With the introduction of the hwmod data modules, the DMA init also needs
to happen later in boot. Thus, remove it from the __init section, and
also make the API publicly available.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/common.h |    2 ++
 arch/arm/mach-omap2/dma.c    |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 54cf6ca..172b902 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -324,5 +324,7 @@ int omap_clk_init(void);
 int omapdss_init_of(void);
 void omapdss_early_init_of(void);
 
+void omap2_system_dma_init(void);
+
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index 3ff450b..946f355 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -204,7 +204,7 @@ static unsigned configure_dma_errata(void)
 	return errata;
 }
 
-static struct omap_system_dma_plat_info dma_plat_info __initdata = {
+static struct omap_system_dma_plat_info dma_plat_info = {
 	.reg_map	= reg_map,
 	.channel_stride	= 0x60,
 	.show_dma_caps	= omap2_show_dma_caps,
@@ -220,7 +220,7 @@ static struct platform_device_info omap_dma_dev_info = {
 };
 
 /* One time initializations */
-static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
+static int omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 {
 	struct platform_device			*pdev;
 	struct omap_system_dma_plat_info	p;
@@ -270,7 +270,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 	return 0;
 }
 
-static int __init omap2_system_dma_init(void)
+int omap2_system_dma_init(void)
 {
 	struct platform_device *pdev;
 	int res;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 26/35] ARM: OMAP2+: build: add support for hwmod data modules
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (24 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 25/35] ARM: OMAP2+: DMA: remove omap2_system_dma_init " Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 27/35] ARM: OMAP2+: pdata-quirks: add support for early and late pdata_quirks init Tero Kristo
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

New Kconfig option added, OMAP_HWMOD_DATA_MODULES, which builds hwmod
data as modules if enabled. By default, the data is built-in to kernel
image for ease of use. Makefile is also changed to support building of
the new hwmod data modules.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/Kconfig |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 2b8e477..a543dfe 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -299,6 +299,15 @@ config OMAP4_ERRATA_I688
 	  In MPU case, L3 T2ASYNC FIFO and DDR T2ASYNC FIFO needs to be drained.
 	  IO barrier ensure that there is no synchronisation loss on initiators
 	  operating on both interconnect port simultaneously.
+
+config OMAP_HWMOD_DATA_MODULES
+	bool "OMAP hardware module data built to modules"
+	default n
+	help
+	  Select whether hwmod data shall be built as modules, or built
+	  in to kernel. By default, this option is n, which means all the
+	  hwmod data will be built-in to kernel image.
+
 endmenu
 
 endif
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 27/35] ARM: OMAP2+: pdata-quirks: add support for early and late pdata_quirks init
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (25 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 26/35] ARM: OMAP2+: build: add support for hwmod data modules Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 28/35] ARM: OMAP2+: board-generic: add support for generic hwmod modular init Tero Kristo
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

This splits up the platform bus registration to early boot and module
time probe versions, which register different portions of the bus based
on hwmod data availability. The common version is retained still for
supporting the different SoCs during transition time.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/common.h       |    2 +
 arch/arm/mach-omap2/pdata-quirks.c |  115 ++++++++++++++++++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 172b902..95b80a1 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -305,6 +305,8 @@ static inline void omap4_cpu_resume(void)
 
 #endif
 
+void omap_pdata_quirks_late_init(const struct of_device_id *);
+void omap_pdata_quirks_early_init(const struct of_device_id *);
 void pdata_quirks_init(const struct of_device_id *);
 void omap_auxdata_legacy_init(struct device *dev);
 void omap_pcs_legacy_init(int irq, void (*rearm)(void));
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 6d5948a..ffdccd3 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -26,6 +26,7 @@
 #include "omap_device.h"
 #include "omap-secure.h"
 #include "soc.h"
+#include "clock.h"
 
 struct pdata_init {
 	const char *compatible;
@@ -452,6 +453,120 @@ static void pdata_quirks_check(struct pdata_init *quirks)
 	}
 }
 
+struct bus_entry {
+	struct platform_device *dev;
+	struct device_node *bus;
+	struct list_head link;
+};
+
+static LIST_HEAD(bus_list);
+
+static struct platform_device
+*omap_pdata_bus_create(struct device_node *bus,
+		       const struct of_device_id *bus_match,
+		       struct device *parent)
+{
+	const struct of_dev_auxdata *auxdata;
+	struct device_node *child;
+	struct platform_device *dev;
+	const char *oh_name;
+	const char *bus_id = NULL;
+	void *platform_data = NULL;
+	int i;
+	int count;
+
+	if (!of_get_property(bus, "compatible", NULL))
+		return NULL;
+
+	auxdata = of_dev_lookup(omap_auxdata_lookup, bus);
+	if (auxdata) {
+		bus_id = auxdata->name;
+		platform_data = auxdata->platform_data;
+	}
+
+	/* check hwmod availability */
+	count = of_property_count_strings(bus, "ti,hwmods");
+	for (i = 0; i < count; i++) {
+		of_property_read_string_index(bus, "ti,hwmods", i, &oh_name);
+		if (!omap_hwmod_lookup(oh_name)) {
+			pr_info("%s: hwmod %s not ready yet, skipping.\n",
+				__func__, oh_name);
+			return NULL;
+		}
+	}
+
+	dev = of_platform_device_create_pdata(bus, bus_id, platform_data,
+					      parent);
+
+	if (!dev || !of_match_node(bus_match, bus))
+		return NULL;
+
+	for_each_child_of_node(bus, child) {
+		omap_pdata_bus_create(child, bus_match, &dev->dev);
+	}
+
+	of_node_set_flag(bus, OF_POPULATED_BUS);
+
+	return dev;
+}
+
+void omap_pdata_quirks_late_init(const struct of_device_id *omap_dt_match_table)
+{
+	struct bus_entry *entry;
+	struct bus_entry *tmp;
+	struct device_node *child;
+
+	omapdss_early_init_of();
+
+	omap2_system_dma_init();
+
+	pdata_quirks_check(auxdata_quirks);
+
+	list_for_each_entry_safe(entry, tmp, &bus_list, link) {
+		for_each_child_of_node(entry->bus, child) {
+			omap_pdata_bus_create(child, omap_dt_match_table,
+					      &entry->dev->dev);
+		}
+
+		list_del(&entry->link);
+		kfree(entry);
+	}
+
+	pdata_quirks_check(pdata_quirks);
+
+	omapdss_init_of();
+
+#ifdef CONFIG_OMAP_HWMOD_DATA_MODULES
+	omap2_common_pm_late_init();
+
+	if (cpu_is_omap34xx())
+		omap3_pm_init();
+
+	omap2_clk_enable_autoidle_all();
+#endif
+}
+EXPORT_SYMBOL(omap_pdata_quirks_late_init);
+
+void __init omap_pdata_quirks_early_init(const struct of_device_id *bus_match)
+{
+	struct device_node *bus;
+	struct bus_entry *entry;
+	struct platform_device *dev;
+
+	omap_sdrc_init(NULL, NULL);
+
+	for_each_matching_node(bus, bus_match) {
+		dev = omap_pdata_bus_create(bus, bus_match, NULL);
+		entry = kzalloc(sizeof(*entry), GFP_KERNEL);
+		entry->bus = bus;
+		entry->dev = dev;
+		list_add(&entry->link, &bus_list);
+	}
+
+	/* Populate any devices outside ocp bus */
+	of_platform_populate(NULL, bus_match, omap_auxdata_lookup, NULL);
+}
+
 void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
 {
 	omap_sdrc_init(NULL, NULL);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 28/35] ARM: OMAP2+: board-generic: add support for generic hwmod modular init
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (26 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 27/35] ARM: OMAP2+: pdata-quirks: add support for early and late pdata_quirks init Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 29/35] ARM: OMAP2+: io: remove common_pm_late_init if using hwmod data modules Tero Kristo
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

When hwmod data is built into modules, a slightly different init is
required at the board level. Add this new init support function, and
change the boards that support hwmod data module in subsequent patches.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 34ff14b..c58cf5a 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -42,6 +42,11 @@ static void __init omap_generic_init(void)
 	omapdss_init_of();
 }
 
+static void __init __maybe_unused omap_generic_modular_init(void)
+{
+	omap_pdata_quirks_early_init(omap_dt_match_table);
+}
+
 #ifdef CONFIG_SOC_OMAP2420
 static const char *const omap242x_boards_compat[] __initconst = {
 	"ti,omap2420",
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 29/35] ARM: OMAP2+: io: remove common_pm_late_init if using hwmod data modules
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (27 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 28/35] ARM: OMAP2+: board-generic: add support for generic hwmod modular init Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 30/35] ARM: OMAP3: io: remove early PM init when hwmod data is built as module Tero Kristo
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

If hwmod data is built as a module, PM init will be done after the module
has been loaded. PM code has dependencies towards certain hwmods, which
are not going to be available during early init.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/io.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index c2b80b8..258e5ac 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -354,7 +354,9 @@ static int __init _omap2_init_reprogram_sdrc(void)
 static void __init __maybe_unused omap_common_late_init(void)
 {
 	omap_mux_late_init();
+#ifndef CONFIG_OMAP_HWMOD_DATA_MODULES
 	omap2_common_pm_late_init();
+#endif
 	omap_soc_device_init();
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 30/35] ARM: OMAP3: io: remove early PM init when hwmod data is built as module
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (28 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 29/35] ARM: OMAP2+: io: remove common_pm_late_init if using hwmod data modules Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 31/35] ARM: dts: omap3: split l3-smx node out of ocp bus node Tero Kristo
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

If hwmod data is built as a module, PM init will be done after the module
has been loaded. PM code has dependencies towards certain hwmods, which
are not going to be available during early init.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/io.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 258e5ac..6cb1e40 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -487,8 +487,10 @@ void __init am35xx_init_early(void)
 void __init omap3_init_late(void)
 {
 	omap_common_late_init();
+#ifndef CONFIG_OMAP_HWMOD_DATA_MODULES
 	omap3_pm_init();
 	omap2_clk_enable_autoidle_all();
+#endif
 }
 
 void __init omap3430_init_late(void)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 31/35] ARM: dts: omap3: split l3-smx node out of ocp bus node
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (29 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 30/35] ARM: OMAP3: io: remove early PM init when hwmod data is built as module Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 32/35] ARM: OMAP3: hwmod_data: add support for hwmod early data Tero Kristo
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

ocp bus node will be needed for hwmod data module init, so it can't be
reserved by l3-smx driver. Thus, split l3-smx as its own separate node
under the ocp bus, and add a new compatible string for the l3-bus.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 3fdc84f..4ff8685 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -79,13 +79,17 @@
 	 * hierarchy.
 	 */
 	ocp {
-		compatible = "ti,omap3-l3-smx", "simple-bus";
-		reg = <0x68000000 0x10000>;
-		interrupts = <9 10>;
+		compatible = "simple-bus", "ti,omap3-l3";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		ti,hwmods = "l3_main";
+
+		l3_smx: l3_smx@68000000 {
+			compatible = "ti,omap3-l3-smx";
+			reg = <0x68000000 0x10000>;
+			interrupts = <9 10>;
+			ti,hwmods = "l3_main";
+		};
 
 		aes: aes@480c5000 {
 			compatible = "ti,omap3-aes";
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 32/35] ARM: OMAP3: hwmod_data: add support for hwmod early data
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (30 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 31/35] ARM: dts: omap3: split l3-smx node out of ocp bus node Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 33/35] ARM: OMAP3: pdata-quirks: add hwmod module platform data Tero Kristo
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

This data will be registered during early boot, rest of the hwmod
data will be provided through a module during probe time.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.h                 |    1 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_early_data.c |  549 ++++++++++++++++++++++
 2 files changed, 550 insertions(+)
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_3xxx_early_data.c

diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 9612add..3ff9133 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -747,6 +747,7 @@ extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh);
  */
 extern int omap2420_hwmod_init(void);
 extern int omap2430_hwmod_init(void);
+int omap3xxx_hwmod_early_init(void);
 extern int omap3xxx_hwmod_init(void);
 extern int omap44xx_hwmod_init(void);
 extern int omap54xx_hwmod_init(void);
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_early_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_early_data.c
new file mode 100644
index 0000000..c4af146
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_early_data.c
@@ -0,0 +1,549 @@
+/*
+ * omap_hwmod_3xxx_early_data.c - hardware modules present on the OMAP3xxx chips
+ *
+ * Copyright (C) 2009-2011 Nokia Corporation
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ * Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * The data in this file should be completely autogeneratable from
+ * the TI hardware database or other technical documentation.
+ *
+ * XXX these should be marked initdata for multi-OMAP kernels
+ */
+
+#include <linux/i2c-omap.h>
+#include <linux/power/smartreflex.h>
+#include <linux/platform_data/gpio-omap.h>
+#include <linux/platform_data/hsmmc-omap.h>
+
+#include <linux/omap-dma.h>
+#include "l3_3xxx.h"
+#include "l4_3xxx.h"
+#include <linux/platform_data/asoc-ti-mcbsp.h>
+#include <linux/platform_data/spi-omap2-mcspi.h>
+#include <linux/platform_data/iommu-omap.h>
+#include <linux/platform_data/mailbox-omap.h>
+#include <plat/dmtimer.h>
+
+#include "soc.h"
+#include "omap_hwmod.h"
+#include "omap_hwmod_common_data.h"
+#include "prm-regbits-34xx.h"
+#include "cm-regbits-34xx.h"
+
+#include "i2c.h"
+#include "wd_timer.h"
+#include "serial.h"
+
+/* L3 */
+static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
+	{ .irq = 9 + OMAP_INTC_START, },
+	{ .irq = 10 + OMAP_INTC_START, },
+	{ .irq = -1 },
+};
+
+static struct omap_hwmod omap3xxx_l3_main_hwmod = {
+	.name		= "l3_main",
+	.class		= &l3_hwmod_class,
+	.mpu_irqs	= omap3xxx_l3_main_irqs,
+	.flags		= HWMOD_NO_IDLEST,
+};
+
+/* L4 CORE */
+static struct omap_hwmod omap3xxx_l4_core_hwmod = {
+	.name		= "l4_core",
+	.class		= &l4_hwmod_class,
+	.flags		= HWMOD_NO_IDLEST,
+};
+
+/* L4 PER */
+static struct omap_hwmod omap3xxx_l4_per_hwmod = {
+	.name		= "l4_per",
+	.class		= &l4_hwmod_class,
+	.flags		= HWMOD_NO_IDLEST,
+};
+
+/* L4 WKUP */
+static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
+	.name		= "l4_wkup",
+	.class		= &l4_hwmod_class,
+	.flags		= HWMOD_NO_IDLEST,
+};
+
+/* L4 SEC */
+static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
+	.name		= "l4_sec",
+	.class		= &l4_hwmod_class,
+	.flags		= HWMOD_NO_IDLEST,
+};
+
+/* MPU */
+static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
+	{ .name = "pmu", .irq = 3 + OMAP_INTC_START },
+	{ .irq = -1 }
+};
+
+static struct omap_hwmod omap3xxx_mpu_hwmod = {
+	.name		= "mpu",
+	.mpu_irqs	= omap3xxx_mpu_irqs,
+	.class		= &mpu_hwmod_class,
+	.main_clk	= "arm_fck",
+};
+
+/* timer class */
+static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
+			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
+			   SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
+			   SYSS_HAS_RESET_STATUS),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+	.clockact	= CLOCKACT_TEST_ICLK,
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
+	.name = "timer",
+	.sysc = &omap3xxx_timer_sysc,
+};
+
+/* secure timers dev attribute */
+static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
+	.timer_capability	= OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
+};
+
+/* always-on timers dev attribute */
+static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
+	.timer_capability	= OMAP_TIMER_ALWON,
+};
+
+/* timer1 */
+static struct omap_hwmod omap3xxx_timer1_hwmod = {
+	.name		= "timer1",
+	.mpu_irqs	= omap2_timer1_mpu_irqs,
+	.main_clk	= "gpt1_fck",
+	.prcm		= {
+		.omap2 = {
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_GPT1_SHIFT,
+			.module_offs = WKUP_MOD,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
+		},
+	},
+	.dev_attr	= &capability_alwon_dev_attr,
+	.class		= &omap3xxx_timer_hwmod_class,
+	.flags		= HWMOD_SET_DEFAULT_CLOCKACT,
+};
+
+/* timer12 */
+static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
+	{ .irq = 95 + OMAP_INTC_START, },
+	{ .irq = -1 },
+};
+
+static struct omap_hwmod omap3xxx_timer12_hwmod = {
+	.name		= "timer12",
+	.mpu_irqs	= omap3xxx_timer12_mpu_irqs,
+	.main_clk	= "gpt12_fck",
+	.prcm		= {
+		.omap2 = {
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_GPT12_SHIFT,
+			.module_offs = WKUP_MOD,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
+		},
+	},
+	.dev_attr	= &capability_secure_dev_attr,
+	.class		= &omap3xxx_timer_hwmod_class,
+	.flags		= HWMOD_SET_DEFAULT_CLOCKACT,
+};
+
+/*
+ * '32K sync counter' class
+ * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
+ */
+static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0004,
+	.sysc_flags	= SYSC_HAS_SIDLEMODE,
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
+	.name	= "counter",
+	.sysc	= &omap3xxx_counter_sysc,
+};
+
+static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
+	.name		= "counter_32k",
+	.class		= &omap3xxx_counter_hwmod_class,
+	.clkdm_name	= "wkup_clkdm",
+	.flags		= HWMOD_SWSUP_SIDLE,
+	.main_clk	= "wkup_32k_fck",
+	.prcm		= {
+		.omap2	= {
+			.module_offs = WKUP_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_ST_32KSYNC_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
+		},
+	},
+};
+
+/* UART1 */
+static struct omap_hwmod omap3xxx_uart1_hwmod = {
+	.name		= "uart1",
+	.mpu_irqs	= omap2_uart1_mpu_irqs,
+	.sdma_reqs	= omap2_uart1_sdma_reqs,
+	.main_clk	= "uart1_fck",
+	.flags		= DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE,
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_UART1_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
+		},
+	},
+	.class		= &omap2_uart_class,
+};
+
+/* UART2 */
+static struct omap_hwmod omap3xxx_uart2_hwmod = {
+	.name		= "uart2",
+	.mpu_irqs	= omap2_uart2_mpu_irqs,
+	.sdma_reqs	= omap2_uart2_sdma_reqs,
+	.main_clk	= "uart2_fck",
+	.flags		= DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE,
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_UART2_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
+		},
+	},
+	.class		= &omap2_uart_class,
+};
+
+/* UART3 */
+static struct omap_hwmod omap3xxx_uart3_hwmod = {
+	.name		= "uart3",
+	.mpu_irqs	= omap2_uart3_mpu_irqs,
+	.sdma_reqs	= omap2_uart3_sdma_reqs,
+	.main_clk	= "uart3_fck",
+	.flags		= DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
+				HWMOD_SWSUP_SIDLE,
+	.prcm		= {
+		.omap2 = {
+			.module_offs = OMAP3430_PER_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3430_EN_UART3_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
+		},
+	},
+	.class		= &omap2_uart_class,
+};
+
+/* UART4 */
+static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
+	{ .irq = 80 + OMAP_INTC_START, },
+	{ .irq = -1 },
+};
+
+static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
+	{ .name = "rx", .dma_req = 82, },
+	{ .name = "tx", .dma_req = 81, },
+	{ .dma_req = -1 }
+};
+
+static struct omap_hwmod omap36xx_uart4_hwmod = {
+	.name		= "uart4",
+	.mpu_irqs	= uart4_mpu_irqs,
+	.sdma_reqs	= uart4_sdma_reqs,
+	.main_clk	= "uart4_fck",
+	.flags		= DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE,
+	.prcm		= {
+		.omap2 = {
+			.module_offs = OMAP3430_PER_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3630_EN_UART4_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
+		},
+	},
+	.class		= &omap2_uart_class,
+};
+
+static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
+	{ .irq = 84 + OMAP_INTC_START, },
+	{ .irq = -1 },
+};
+
+static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
+	{ .name = "rx", .dma_req = 55, },
+	{ .name = "tx", .dma_req = 54, },
+	{ .dma_req = -1 }
+};
+
+/*
+ * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
+ * uart2_fck being enabled.  So we add uart1_fck as an optional clock,
+ * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET.  This really
+ * should not be needed.  The functional clock structure of the AM35xx
+ * UART4 is extremely unclear and opaque; it is unclear what the role
+ * of uart1/2_fck is for the UART4.  Any clarification from either
+ * empirical testing or the AM3505/3517 hardware designers would be
+ * most welcome.
+ */
+static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
+	{ .role = "softreset_uart1_fck", .clk = "uart1_fck" },
+};
+
+static struct omap_hwmod am35xx_uart4_hwmod = {
+	.name		= "uart4",
+	.mpu_irqs	= am35xx_uart4_mpu_irqs,
+	.sdma_reqs	= am35xx_uart4_sdma_reqs,
+	.main_clk	= "uart4_fck",
+	.prcm		= {
+		.omap2 = {
+			.module_offs = CORE_MOD,
+			.prcm_reg_id = 1,
+			.module_bit = AM35XX_EN_UART4_SHIFT,
+			.idlest_reg_id = 1,
+			.idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
+		},
+	},
+	.opt_clks	= am35xx_uart4_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(am35xx_uart4_opt_clks),
+	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
+	.class		= &omap2_uart_class,
+};
+
+static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
+	{
+		.pa_start	= 0x68000000,
+		.pa_end		= 0x6800ffff,
+		.flags		= ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+/* MPU -> L3 interface */
+static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
+	.master		= &omap3xxx_mpu_hwmod,
+	.slave		= &omap3xxx_l3_main_hwmod,
+	.addr		= omap3xxx_l3_main_addrs,
+	.user		= OCP_USER_MPU,
+};
+
+/* L4 CORE -> UART1 interface */
+static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART1_BASE,
+		.pa_end		= OMAP3_UART1_BASE + SZ_8K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &omap3xxx_uart1_hwmod,
+	.clk		= "uart1_ick",
+	.addr		= omap3xxx_uart1_addr_space,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* L4 CORE -> UART2 interface */
+static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART2_BASE,
+		.pa_end		= OMAP3_UART2_BASE + SZ_1K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &omap3xxx_uart2_hwmod,
+	.clk		= "uart2_ick",
+	.addr		= omap3xxx_uart2_addr_space,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* L4 PER -> UART3 interface */
+static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART3_BASE,
+		.pa_end		= OMAP3_UART3_BASE + SZ_1K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
+	.master		= &omap3xxx_l4_per_hwmod,
+	.slave		= &omap3xxx_uart3_hwmod,
+	.clk		= "uart3_ick",
+	.addr		= omap3xxx_uart3_addr_space,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* L4 PER -> UART4 interface */
+static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART4_BASE,
+		.pa_end		= OMAP3_UART4_BASE + SZ_1K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
+	.master		= &omap3xxx_l4_per_hwmod,
+	.slave		= &omap36xx_uart4_hwmod,
+	.clk		= "uart4_ick",
+	.addr		= omap36xx_uart4_addr_space,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* AM35xx: L4 CORE -> UART4 interface */
+static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART4_AM35XX_BASE,
+		.pa_end		= OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
+	.master		= &omap3xxx_l4_core_hwmod,
+	.slave		= &am35xx_uart4_hwmod,
+	.clk		= "uart4_ick",
+	.addr		= am35xx_uart4_addr_space,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
+	{
+		.pa_start	= 0x48318000,
+		.pa_end		= 0x48318000 + SZ_1K - 1,
+		.flags		= ADDR_TYPE_RT
+	},
+	{ }
+};
+
+/* l4_wkup -> timer1 */
+static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
+	.master		= &omap3xxx_l4_wkup_hwmod,
+	.slave		= &omap3xxx_timer1_hwmod,
+	.clk		= "gpt1_ick",
+	.addr		= omap3xxx_timer1_addrs,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
+	{
+		.pa_start	= 0x48304000,
+		.pa_end		= 0x48304000 + SZ_1K - 1,
+		.flags		= ADDR_TYPE_RT
+	},
+	{ }
+};
+
+/* l4_core -> timer12 */
+static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
+	.master		= &omap3xxx_l4_sec_hwmod,
+	.slave		= &omap3xxx_timer12_hwmod,
+	.clk		= "gpt12_ick",
+	.addr		= omap3xxx_timer12_addrs,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l4_wkup -> 32ksync_counter */
+static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
+	{
+		.pa_start	= 0x48320000,
+		.pa_end		= 0x4832001f,
+		.flags		= ADDR_TYPE_RT
+	},
+	{ }
+};
+
+static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
+	.master		= &omap3xxx_l4_wkup_hwmod,
+	.slave		= &omap3xxx_counter_32k_hwmod,
+	.clk		= "omap_32ksync_ick",
+	.addr		= omap3xxx_counter_32k_addrs,
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if *omap3_early_hwmod_ocp_ifs[] __initdata = {
+	&omap3xxx_mpu__l3_main,
+	&omap3xxx_l4_wkup__timer1,
+	&omap3xxx_l4_wkup__counter_32k,
+	&omap3_l4_core__uart1,
+	&omap3_l4_core__uart2,
+	&omap3_l4_per__uart3,
+	NULL,
+};
+
+static struct omap_hwmod_ocp_if *omap3_gp_early_hwmod_ocp_ifs[] __initdata = {
+	&omap3xxx_l4_sec__timer12,
+	NULL,
+};
+
+static struct omap_hwmod_ocp_if *omap36xx_early_hwmod_ocp_ifs[] __initdata = {
+	&omap36xx_l4_per__uart4,
+	NULL,
+};
+
+static struct omap_hwmod_ocp_if *am35xx_early_hwmod_ocp_ifs[] __initdata = {
+	&am35xx_l4_core__uart4,
+	NULL,
+};
+
+int __init omap3xxx_hwmod_early_init(void)
+{
+	int r;
+	unsigned int rev;
+
+	omap_hwmod_init();
+
+	rev = omap_rev();
+
+	r = omap_hwmod_register_links(omap3_early_hwmod_ocp_ifs);
+	if (r < 0)
+		return r;
+
+	if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
+		r = omap_hwmod_register_links(omap3_gp_early_hwmod_ocp_ifs);
+
+		if (r < 0)
+			return r;
+	}
+
+	if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1)
+		r = omap_hwmod_register_links(am35xx_early_hwmod_ocp_ifs);
+	else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
+		 rev == OMAP3630_REV_ES1_2)
+		r = omap_hwmod_register_links(omap36xx_early_hwmod_ocp_ifs);
+
+	return r;
+}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 33/35] ARM: OMAP3: pdata-quirks: add hwmod module platform data
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (31 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 32/35] ARM: OMAP3: hwmod_data: add support for hwmod early data Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-04-15 12:53 ` [RFC PATCH 35/35] HACK: remove omap3 hwmod external dependencies Tero Kristo
  2015-05-05 15:59 ` [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tony Lindgren
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.h   |    8 ++++++++
 arch/arm/mach-omap2/pdata-quirks.c |   11 +++++++++++
 2 files changed, 19 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 3ff9133..0c7eaf8 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -692,6 +692,14 @@ struct omap_hwmod {
 	struct omap_hwmod		*parent_hwmod;
 };
 
+enum {
+	OMAP_HWMOD_PTR_DSS_RESET = 0,
+	OMAP_HWMOD_PTR_HDQ1W_RESET,
+	OMAP_HWMOD_PTR_I2C_RESET,
+	OMAP_HWMOD_PTR_WD_TIMER_DIS,
+	OMAP_HWMOD_PTR_WD_TIMER_RESET,
+};
+
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index ffdccd3..c2c414e 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -27,6 +27,8 @@
 #include "omap-secure.h"
 #include "soc.h"
 #include "clock.h"
+#include "hdq1w.h"
+#include "wd_timer.h"
 
 struct pdata_init {
 	const char *compatible;
@@ -336,6 +338,14 @@ void omap_pcs_legacy_init(int irq, void (*rearm)(void))
 	pcs_pdata.rearm = rearm;
 }
 
+static void *omap_hwmod_pointers[] = {
+	[OMAP_HWMOD_PTR_DSS_RESET] = omap_dss_reset,
+	[OMAP_HWMOD_PTR_HDQ1W_RESET] = omap_hdq1w_reset,
+	[OMAP_HWMOD_PTR_I2C_RESET] = omap_i2c_reset,
+	[OMAP_HWMOD_PTR_WD_TIMER_DIS] = omap2_wd_timer_disable,
+	[OMAP_HWMOD_PTR_WD_TIMER_RESET] = omap2_wd_timer_reset,
+};
+
 /*
  * GPIOs for TWL are initialized by the I2C bus and need custom
  * handing until DSS has device tree bindings.
@@ -379,6 +389,7 @@ struct of_dev_auxdata omap_auxdata_lookup[] = {
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
 	OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
 		       &omap3_iommu_pdata),
+	OF_DEV_AUXDATA("ti,omap3-l3", 0x0, "ocp", &omap_hwmod_pointers),
 	/* Only on am3517 */
 	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
 	OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [RFC PATCH 35/35] HACK: remove omap3 hwmod external dependencies
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (32 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 33/35] ARM: OMAP3: pdata-quirks: add hwmod module platform data Tero Kristo
@ 2015-04-15 12:53 ` Tero Kristo
  2015-05-05 15:59 ` [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tony Lindgren
  34 siblings, 0 replies; 36+ messages in thread
From: Tero Kristo @ 2015-04-15 12:53 UTC (permalink / raw)
  To: tony, paul, linux-omap

This is a hack in a sense that this is a temporary trial patch to verify
the module functionality for omap3. The external dependencies should
be removed all at once for all platforms when the support is added for all.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |    2 +-
 .../mach-omap2/omap_hwmod_common_ipblock_data.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index c6c6384..7ba20ee 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -275,7 +275,7 @@ struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = {
 struct omap_hwmod_class omap2_hdq1w_class = {
 	.name	= "hdq1w",
 	.sysc	= &omap2_hdq1w_sysc,
-	.reset	= &omap_hdq1w_reset,
+	//.reset	= &omap_hdq1w_reset,
 };
 
 struct omap_hwmod_irq_info omap2_hdq1w_mpu_irqs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c
index f21664d..cd1c4a7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c
@@ -30,7 +30,7 @@ static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
 struct omap_hwmod_class omap2_dss_hwmod_class = {
 	.name	= "dss",
 	.sysc	= &omap2_dss_sysc,
-	.reset	= omap_dss_reset,
+	//.reset	= omap_dss_reset,
 };
 
 /*
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support
  2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
                   ` (33 preceding siblings ...)
  2015-04-15 12:53 ` [RFC PATCH 35/35] HACK: remove omap3 hwmod external dependencies Tero Kristo
@ 2015-05-05 15:59 ` Tony Lindgren
  34 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2015-05-05 15:59 UTC (permalink / raw)
  To: Tero Kristo; +Cc: paul, linux-omap

* Tero Kristo <t-kristo@ti.com> [150415 05:53]:
> Hi,
> 
> This RFC provides support for moving hwmod data into separate modules
> which can be registered later during boot. Only system critical parts
> of the hwmod data remain in omap_hwmod_*_early_data.c file, rest are
> moved into omap_hwmod_*_late_data.c. The late data can alternatively
> be built into a module, or built-in to kernel image, in which case
> the system behaves pretty much the same way as it does currently. Use
> kconfig option OMAP_HWMOD_DATA_MODULES to control the behavior. If
> this approach is something that is seen feasible to follow, rest of
> the SoCs can be converted in similar manner, and eventually all the
> hwmod code should be moved under some driver (drivers/bus/ maybe?)

Interesting to see what it would take to move some of this into
loadable modules or /lib/firmware. I think we should queue the fixes
and anything that makes it easier to initialized hwmods in stages.
Then we should wait on the __init changes until there's a clear use
case.

Meanwhile, to me it seems we can make 81xx/am33x/am437x at least
device tree only for the hwmod with the following two changes:

1. Add parsing for the sysc syss properties along the lines of
   the RFC patches posted by Felipe few months back.

2. Set up the .clkctrl register as a gate clock that gets parsed
   from the dts files.

And then we can also start moving to generic power domains and
simple-pm-bus.

> This RFC set only provides support for omap3 hwmod data split. Please
> note that you probably must use ramdisk rootfs to load the hwmod data
> module itself from, as most of the system devices are not initialized
> in the early boot.

The problem with this is and firmware related approaches is
not having the complete set of boot devices like we all know :)

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2015-05-05 15:59 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15 12:52 [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 01/35] clk: composite: add support for disable_unused clk operation Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 02/35] clk: ti: gate/interface: add support for clk_ops->disable_unused Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 03/35] ARM: OMAP2: n8x0: remove __initdata declarations from code Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 04/35] ARM: OMAP2+: hwmod: add support for specifying memalloc functionality Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 05/35] ARM: OMAP2+: hwmod: add support for rerouting hwmod links Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 06/35] of/platform: export a couple of platform device init APIs Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 07/35] wl12xx: remove __init declaration from platform data setup API Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 08/35] ARM: OMAP2+: hwmod: move APIs out of __init section Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 09/35] ARM: OMAP2+: hwmod: move omap_hwmod_init_postsetup to hwmod driver Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 10/35] ARM: OMAP2+: hwmod: export hwmod APIs for driver use Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 11/35] ARM: OMAP2+: pdata-quirks: move data out of __initdata section Tero Kristo
2015-04-15 12:52 ` [RFC PATCH 12/35] ARM: OMAP2+: dma: change DMA iomap to use hwmod pointers instead of pdata Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 13/35] ARM: OMAP2+: VP: remove code from __init section Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 14/35] ARM: OMAP2+: VC: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 15/35] ARM: OMAP2+: twl: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 16/35] ARM: OMAP2+: voltage: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 17/35] ARM: OMAP3: control: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 18/35] ARM: OMAP3+: cpuidle: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 19/35] ARM: OMAP3: PRM: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 20/35] ARM: OMAP2+: omap_device: remove omap_device_build " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 21/35] ARM: OMAP2+: SR: remove code " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 22/35] ARM: OMAP2+: PM: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 23/35] ARM: OMAP3: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 24/35] ARM: OMAP2+: display: " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 25/35] ARM: OMAP2+: DMA: remove omap2_system_dma_init " Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 26/35] ARM: OMAP2+: build: add support for hwmod data modules Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 27/35] ARM: OMAP2+: pdata-quirks: add support for early and late pdata_quirks init Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 28/35] ARM: OMAP2+: board-generic: add support for generic hwmod modular init Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 29/35] ARM: OMAP2+: io: remove common_pm_late_init if using hwmod data modules Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 30/35] ARM: OMAP3: io: remove early PM init when hwmod data is built as module Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 31/35] ARM: dts: omap3: split l3-smx node out of ocp bus node Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 32/35] ARM: OMAP3: hwmod_data: add support for hwmod early data Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 33/35] ARM: OMAP3: pdata-quirks: add hwmod module platform data Tero Kristo
2015-04-15 12:53 ` [RFC PATCH 35/35] HACK: remove omap3 hwmod external dependencies Tero Kristo
2015-05-05 15:59 ` [RFC PATCH 00/35] ARM: OMAP2+: hwmod data module support Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).