linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] OMAP: omap_device cleanup before device-tree integration
@ 2011-09-27 17:18 Benoit Cousson
  2011-09-27 17:18 ` [PATCH v3 1/6] OMAP: omap_device: Add omap_device_get_by_hwmod_name Benoit Cousson
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Benoit Cousson @ 2011-09-27 17:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kevin,

Here are a couple of cleanups on top of your for_3.2/omap_device branch.

patches are available here:
git://gitorious.org/omap-pm/linux.git for_3.2/1_omap_device_cleanup

Regards,
Benoit


Changes since v1: http://www.spinics.net/lists/linux-omap/msg55801.html
 - Update the 2 patches from Nishanth based on Kevin's comment and merge
   them into one patch.
 - Fix the omap_device_pm_latency issue reported by Paul.

Changes since v2: http://www.spinics.net/lists/arm-kernel/msg138993.html
 - Change the API name from omap_hwmod_name_get_dev to 
   omap_device_get_by_hwmod_name per Kevin's suggestion.
 

Benoit Cousson (5):
  OMAP3: beagle-board: Use the omap_hwmod_name_get_dev API
  OMAP2+: pm: Use hwmod name instead of dev pointer
  OMAP2+: pm: Remove static devices variable for mpu, dsp, iva and l3 PM
  OMAP: omap_device: Create a default omap_device_pm_latency
  OMAP2+: devices: Remove all omap_device_pm_latency structures

Nishanth Menon (1):
  OMAP: omap_device: Add omap_device_get_by_hwmod_name

 arch/arm/mach-omap2/board-omap3beagle.c       |    4 +-
 arch/arm/mach-omap2/devices.c                 |   46 ++---------------
 arch/arm/mach-omap2/display.c                 |   11 +----
 arch/arm/mach-omap2/dma.c                     |   11 +----
 arch/arm/mach-omap2/gpio.c                    |   12 +----
 arch/arm/mach-omap2/hsmmc.c                   |   18 +------
 arch/arm/mach-omap2/hwspinlock.c              |   12 +----
 arch/arm/mach-omap2/mcbsp.c                   |   11 +----
 arch/arm/mach-omap2/pm.c                      |   69 ++++++++-----------------
 arch/arm/mach-omap2/serial.c                  |   25 +---------
 arch/arm/mach-omap2/sr_device.c               |   11 +----
 arch/arm/mach-omap2/usb-musb.c                |   11 +----
 arch/arm/plat-omap/i2c.c                      |   10 +---
 arch/arm/plat-omap/include/plat/omap_device.h |    1 +
 arch/arm/plat-omap/omap_device.c              |   55 +++++++++++++++++++-
 15 files changed, 93 insertions(+), 214 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH v3 5/6] OMAP: omap_device: Create a default omap_device_pm_latency
@ 2011-08-09 14:54 Benoit Cousson
  0 siblings, 0 replies; 12+ messages in thread
From: Benoit Cousson @ 2011-08-09 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

Most devices are using the same default omap_device_pm_latency structure
during device built. In order to avoid the duplication of the same
structure everywhere, add a default structure that will be used if
the device does not have an explicit one.

Next patches will clean the duplicated structures.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/plat-omap/omap_device.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 7b2cf62..54bbe7b 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -97,6 +97,14 @@
 static int omap_device_register(struct platform_device *pdev);
 static int omap_early_device_register(struct platform_device *pdev);
 
+static struct omap_device_pm_latency omap_default_latency[] = {
+	{
+		.deactivate_func = omap_device_idle_hwmods,
+		.activate_func   = omap_device_enable_hwmods,
+		.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
+	}
+};
+
 /* Private functions */
 
 /**
@@ -510,8 +518,17 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
 	if (ret)
 		goto odbs_exit3;
 
-	od->pm_lats = pm_lats;
+	if (!pm_lats) {
+		pm_lats = omap_default_latency;
+		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
+	}
+
 	od->pm_lats_cnt = pm_lats_cnt;
+	od->pm_lats = kmemdup(pm_lats,
+			sizeof(struct omap_device_pm_latency) * pm_lats_cnt,
+			GFP_KERNEL);
+	if (!od->pm_lats)
+		goto odbs_exit3;
 
 	for (i = 0; i < oh_cnt; i++) {
 		hwmods[i]->od = od;
-- 
1.7.0.4

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

end of thread, other threads:[~2011-09-27 21:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 17:18 [PATCH v3 0/6] OMAP: omap_device cleanup before device-tree integration Benoit Cousson
2011-09-27 17:18 ` [PATCH v3 1/6] OMAP: omap_device: Add omap_device_get_by_hwmod_name Benoit Cousson
2011-09-27 17:18 ` [PATCH v3 2/6] OMAP3: beagle-board: Use the omap_hwmod_name_get_dev API Benoit Cousson
2011-09-27 17:18 ` [PATCH v3 3/6] OMAP2+: pm: Use hwmod name instead of dev pointer Benoit Cousson
2011-09-27 17:18 ` [PATCH v3 4/6] OMAP2+: pm: Remove static devices variable for mpu, dsp, iva and l3 PM Benoit Cousson
2011-09-27 17:18 ` [PATCH v3 5/6] OMAP: omap_device: Create a default omap_device_pm_latency Benoit Cousson
2011-09-27 17:30   ` Tony Lindgren
2011-09-27 18:29     ` Kevin Hilman
2011-09-27 18:37       ` Tony Lindgren
2011-09-27 17:18 ` [PATCH v3 6/6] OMAP2+: devices: Remove all omap_device_pm_latency structures Benoit Cousson
2011-09-27 21:32 ` [PATCH v3 0/6] OMAP: omap_device cleanup before device-tree integration Kevin Hilman
  -- strict thread matches above, loose matches on Subject: below --
2011-08-09 14:54 [PATCH v3 5/6] OMAP: omap_device: Create a default omap_device_pm_latency Benoit Cousson

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).