All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot
@ 2012-10-30 11:24 ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: Tony Lindgren, Benoit Cousson, Paul Walmsley; +Cc: linux-omap, linux-arm-kernel

Hello,

Changes since v1:
- If the device does not have DMA resource do not try to recreate the resources

Intro mail from v1:

This series resolves the issue we currently have with the resource handling when
booting with DT.
In short: at the moment the omap_device_alloc() decides if it needs to update the
OF filled resources based on the number of resources on the device and in the
hwmod database.
This prevents us from removing hwmod data for platforms (OMAP5) which does not
support non DT boot anymore.

With this series we can make sure that the DT provided resources are used and we
only append the DMA resources to the device from hwmod.
I have added extra check to prepare us when the DMA resource can be filled via
OF. In this case we do not update the resources at all.

Tony, Benoit, Paul: Not sure if this qualify for 3.7 inclusion, but for sure
going to help us to clean up the OMAP5 hwmod database.

Regards,
Peter
---
Peter Ujfalusi (2):
  ARM: OMAP: hwmod: Add possibility to count hwmod resources based on
    type
  ARM: OMAP: omap_device: Correct resource handling for DT boot

 arch/arm/mach-omap2/omap_hwmod.c             | 27 +++++----
 arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
 arch/arm/plat-omap/omap_device.c             | 87 ++++++++++++++++++----------
 3 files changed, 72 insertions(+), 44 deletions(-)

-- 
1.7.12.4


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

* [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot
@ 2012-10-30 11:24 ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

Changes since v1:
- If the device does not have DMA resource do not try to recreate the resources

Intro mail from v1:

This series resolves the issue we currently have with the resource handling when
booting with DT.
In short: at the moment the omap_device_alloc() decides if it needs to update the
OF filled resources based on the number of resources on the device and in the
hwmod database.
This prevents us from removing hwmod data for platforms (OMAP5) which does not
support non DT boot anymore.

With this series we can make sure that the DT provided resources are used and we
only append the DMA resources to the device from hwmod.
I have added extra check to prepare us when the DMA resource can be filled via
OF. In this case we do not update the resources at all.

Tony, Benoit, Paul: Not sure if this qualify for 3.7 inclusion, but for sure
going to help us to clean up the OMAP5 hwmod database.

Regards,
Peter
---
Peter Ujfalusi (2):
  ARM: OMAP: hwmod: Add possibility to count hwmod resources based on
    type
  ARM: OMAP: omap_device: Correct resource handling for DT boot

 arch/arm/mach-omap2/omap_hwmod.c             | 27 +++++----
 arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
 arch/arm/plat-omap/omap_device.c             | 87 ++++++++++++++++++----------
 3 files changed, 72 insertions(+), 44 deletions(-)

-- 
1.7.12.4

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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
  2012-10-30 11:24 ` Peter Ujfalusi
@ 2012-10-30 11:24   ` Peter Ujfalusi
  -1 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: Tony Lindgren, Benoit Cousson, Paul Walmsley; +Cc: linux-omap, linux-arm-kernel

Add flags parameter for omap_hwmod_count_resources() so users can tell which
type of resources they are interested when counting them in hwmod database.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
 arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
 arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index b969ab1..a79c941 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
 /**
  * omap_hwmod_count_resources - count number of struct resources needed by hwmod
  * @oh: struct omap_hwmod *
- * @res: pointer to the first element of an array of struct resource to fill
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource array elements necessary to
  * contain omap_hwmod @oh resources.  Intended to be called by code
@@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
  * resource IDs.
  *
  */
-int omap_hwmod_count_resources(struct omap_hwmod *oh)
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
 {
-	struct omap_hwmod_ocp_if *os;
-	struct list_head *p;
-	int ret;
-	int i = 0;
+	int ret = 0;
 
-	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
+	if (flags & IORESOURCE_IRQ)
+		ret += _count_mpu_irqs(oh);
 
-	p = oh->slave_ports.next;
+	if (flags & IORESOURCE_DMA)
+		ret += _count_sdma_reqs(oh);
 
-	while (i < oh->slaves_cnt) {
-		os = _fetch_next_ocp_if(&p, &i);
-		ret += _count_ocp_if_addr_spaces(os);
+	if (flags & IORESOURCE_MEM) {
+		int i = 0;
+		struct omap_hwmod_ocp_if *os;
+		struct list_head *p = oh->slave_ports.next;
+
+		while (i < oh->slaves_cnt) {
+			os = _fetch_next_ocp_if(&p, &i);
+			ret += _count_ocp_if_addr_spaces(os);
+		}
 	}
 
 	return ret;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index b3349f7..48a6f5d 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
 int omap_hwmod_softreset(struct omap_hwmod *oh);
 
-int omap_hwmod_count_resources(struct omap_hwmod *oh);
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 7a7d1f2..915cf68 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
 /**
  * omap_device_count_resources - count number of struct resource entries needed
  * @od: struct omap_device *
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource entries needed for this
  * omap_device @od.  Used by omap_device_build_ss() to determine how
  * much memory to allocate before calling
  * omap_device_fill_resources().  Returns the count.
  */
-static int omap_device_count_resources(struct omap_device *od)
+static int omap_device_count_resources(struct omap_device *od,
+				       unsigned long flags)
 {
 	int c = 0;
 	int i;
 
 	for (i = 0; i < od->hwmods_cnt; i++)
-		c += omap_hwmod_count_resources(od->hwmods[i]);
+		c += omap_hwmod_count_resources(od->hwmods[i], flags);
 
 	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
 		 od->pdev->name, c, od->hwmods_cnt);
@@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	res_count = omap_device_count_resources(od);
+	/* Count all resources for the device */
+	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+						    IORESOURCE_DMA |
+						    IORESOURCE_MEM);
 	/*
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
-- 
1.7.12.4


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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
@ 2012-10-30 11:24   ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

Add flags parameter for omap_hwmod_count_resources() so users can tell which
type of resources they are interested when counting them in hwmod database.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
 arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
 arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index b969ab1..a79c941 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
 /**
  * omap_hwmod_count_resources - count number of struct resources needed by hwmod
  * @oh: struct omap_hwmod *
- * @res: pointer to the first element of an array of struct resource to fill
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource array elements necessary to
  * contain omap_hwmod @oh resources.  Intended to be called by code
@@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
  * resource IDs.
  *
  */
-int omap_hwmod_count_resources(struct omap_hwmod *oh)
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
 {
-	struct omap_hwmod_ocp_if *os;
-	struct list_head *p;
-	int ret;
-	int i = 0;
+	int ret = 0;
 
-	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
+	if (flags & IORESOURCE_IRQ)
+		ret += _count_mpu_irqs(oh);
 
-	p = oh->slave_ports.next;
+	if (flags & IORESOURCE_DMA)
+		ret += _count_sdma_reqs(oh);
 
-	while (i < oh->slaves_cnt) {
-		os = _fetch_next_ocp_if(&p, &i);
-		ret += _count_ocp_if_addr_spaces(os);
+	if (flags & IORESOURCE_MEM) {
+		int i = 0;
+		struct omap_hwmod_ocp_if *os;
+		struct list_head *p = oh->slave_ports.next;
+
+		while (i < oh->slaves_cnt) {
+			os = _fetch_next_ocp_if(&p, &i);
+			ret += _count_ocp_if_addr_spaces(os);
+		}
 	}
 
 	return ret;
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index b3349f7..48a6f5d 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
 int omap_hwmod_softreset(struct omap_hwmod *oh);
 
-int omap_hwmod_count_resources(struct omap_hwmod *oh);
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 7a7d1f2..915cf68 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
 /**
  * omap_device_count_resources - count number of struct resource entries needed
  * @od: struct omap_device *
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource entries needed for this
  * omap_device @od.  Used by omap_device_build_ss() to determine how
  * much memory to allocate before calling
  * omap_device_fill_resources().  Returns the count.
  */
-static int omap_device_count_resources(struct omap_device *od)
+static int omap_device_count_resources(struct omap_device *od,
+				       unsigned long flags)
 {
 	int c = 0;
 	int i;
 
 	for (i = 0; i < od->hwmods_cnt; i++)
-		c += omap_hwmod_count_resources(od->hwmods[i]);
+		c += omap_hwmod_count_resources(od->hwmods[i], flags);
 
 	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
 		 od->pdev->name, c, od->hwmods_cnt);
@@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	res_count = omap_device_count_resources(od);
+	/* Count all resources for the device */
+	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+						    IORESOURCE_DMA |
+						    IORESOURCE_MEM);
 	/*
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
-- 
1.7.12.4

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

* [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
  2012-10-30 11:24 ` Peter Ujfalusi
@ 2012-10-30 11:24   ` Peter Ujfalusi
  -1 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: Tony Lindgren, Benoit Cousson, Paul Walmsley; +Cc: linux-omap, linux-arm-kernel

When booting with DT the OF core can fill up the resources provided within
the DT blob.
The current way of handling the DT boot prevents us from removing hwmod data
for platforms only suppose to boot with DT (OMAP5 for example) since we need
to keep the whole hwmod database intact in order to have more resources in
hwmod than in DT (to be able to append the DMA resource from hwmod).

To fix this issue we just examine the OF provided resources:
If we do not have resources we use hwmod to fill them.
If we have resources we check if we already able to recive DMA resource, if
no we only append the DMA resurce from hwmod to the OF provided ones.

In this way we can start removing hwmod data for devices which have their
resources correctly configured in DT without regressions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/plat-omap/omap_device.c | 84 ++++++++++++++++++++++++----------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 915cf68..d35b468 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -560,55 +560,73 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	/* Count all resources for the device */
-	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
-						    IORESOURCE_DMA |
-						    IORESOURCE_MEM);
 	/*
+	 * Non-DT Boot:
+	 *   Here, pdev->num_resources = 0, and we should get all the
+	 *   resources from hwmod.
+	 *
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
 	 *   does for MEM & IRQ resource) and we should respect/use these
 	 *   resources, killing hwmod dependency.
 	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
 	 *   have been allocated by OF layer already (through DTB).
-	 *
-	 * Non-DT Boot:
-	 *   Here, pdev->num_resources = 0, and we should get all the
-	 *   resources from hwmod.
+	 *   As preparation for the future we examine the OF provided resources
+	 *   to see if we have DMA resources provided already. In this case
+	 *   there is no need to update the resources for the device, we use the
+	 *   OF provided ones.
 	 *
 	 * TODO: Once DMA resource is available from OF layer, we should
 	 *   kill filling any resources from hwmod.
 	 */
-	if (res_count > pdev->num_resources) {
-		/* Allocate resources memory to account for new resources */
-		res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
-		if (!res)
-			goto oda_exit3;
-
-		/*
-		 * If pdev->num_resources > 0, then assume that,
-		 * MEM and IRQ resources will only come from DT and only
-		 * fill DMA resource from hwmod layer.
-		 */
-		if (pdev->num_resources && pdev->resource) {
-			dev_dbg(&pdev->dev, "%s(): resources already allocated %d\n",
-				__func__, res_count);
-			memcpy(res, pdev->resource,
-			       sizeof(struct resource) * pdev->num_resources);
-			_od_fill_dma_resources(od, &res[pdev->num_resources]);
-		} else {
-			dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
-				__func__, res_count);
-			omap_device_fill_resources(od, res);
+	if (!pdev->num_resources) {
+		/* Count all resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+							    IORESOURCE_DMA |
+							    IORESOURCE_MEM);
+	} else {
+		/* Take a look if we already have DMA resource via DT */
+		for (i = 0; i < pdev->num_resources; i++) {
+			struct resource *r = &pdev->resource[i];
+
+			/* We have it, no need to touch the resources */
+			if (r->flags == IORESOURCE_DMA)
+				goto have_everything;
 		}
+		/* Count only DMA resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_DMA);
+		/* The device has no DMA resource, no need for update */
+		if (!res_count)
+			goto have_everything;
+	
+		res_count += pdev->num_resources;
+	}
 
-		ret = platform_device_add_resources(pdev, res, res_count);
-		kfree(res);
+	/* Allocate resources memory to account for new resources */
+	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
+	if (!res)
+		goto oda_exit3;
 
-		if (ret)
-			goto oda_exit3;
+	if (!pdev->num_resources) {
+		dev_dbg(&pdev->dev, "%s: using %d resources from hwmod\n",
+			__func__, res_count);
+		omap_device_fill_resources(od, res);
+	} else {
+		dev_dbg(&pdev->dev,
+			"%s: appending %d DMA resources from hwmod\n",
+			__func__, res_count - pdev->num_resources);
+		memcpy(res, pdev->resource,
+		       sizeof(struct resource) * pdev->num_resources);
+		_od_fill_dma_resources(od, &res[pdev->num_resources]);
 	}
 
+	ret = platform_device_add_resources(pdev, res, res_count);
+	kfree(res);
+
+	if (ret)
+		goto oda_exit3;
+
+have_everything:
 	if (!pm_lats) {
 		pm_lats = omap_default_latency;
 		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
-- 
1.7.12.4


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

* [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
@ 2012-10-30 11:24   ` Peter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Ujfalusi @ 2012-10-30 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

When booting with DT the OF core can fill up the resources provided within
the DT blob.
The current way of handling the DT boot prevents us from removing hwmod data
for platforms only suppose to boot with DT (OMAP5 for example) since we need
to keep the whole hwmod database intact in order to have more resources in
hwmod than in DT (to be able to append the DMA resource from hwmod).

To fix this issue we just examine the OF provided resources:
If we do not have resources we use hwmod to fill them.
If we have resources we check if we already able to recive DMA resource, if
no we only append the DMA resurce from hwmod to the OF provided ones.

In this way we can start removing hwmod data for devices which have their
resources correctly configured in DT without regressions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/plat-omap/omap_device.c | 84 ++++++++++++++++++++++++----------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 915cf68..d35b468 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -560,55 +560,73 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	/* Count all resources for the device */
-	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
-						    IORESOURCE_DMA |
-						    IORESOURCE_MEM);
 	/*
+	 * Non-DT Boot:
+	 *   Here, pdev->num_resources = 0, and we should get all the
+	 *   resources from hwmod.
+	 *
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
 	 *   does for MEM & IRQ resource) and we should respect/use these
 	 *   resources, killing hwmod dependency.
 	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
 	 *   have been allocated by OF layer already (through DTB).
-	 *
-	 * Non-DT Boot:
-	 *   Here, pdev->num_resources = 0, and we should get all the
-	 *   resources from hwmod.
+	 *   As preparation for the future we examine the OF provided resources
+	 *   to see if we have DMA resources provided already. In this case
+	 *   there is no need to update the resources for the device, we use the
+	 *   OF provided ones.
 	 *
 	 * TODO: Once DMA resource is available from OF layer, we should
 	 *   kill filling any resources from hwmod.
 	 */
-	if (res_count > pdev->num_resources) {
-		/* Allocate resources memory to account for new resources */
-		res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
-		if (!res)
-			goto oda_exit3;
-
-		/*
-		 * If pdev->num_resources > 0, then assume that,
-		 * MEM and IRQ resources will only come from DT and only
-		 * fill DMA resource from hwmod layer.
-		 */
-		if (pdev->num_resources && pdev->resource) {
-			dev_dbg(&pdev->dev, "%s(): resources already allocated %d\n",
-				__func__, res_count);
-			memcpy(res, pdev->resource,
-			       sizeof(struct resource) * pdev->num_resources);
-			_od_fill_dma_resources(od, &res[pdev->num_resources]);
-		} else {
-			dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
-				__func__, res_count);
-			omap_device_fill_resources(od, res);
+	if (!pdev->num_resources) {
+		/* Count all resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+							    IORESOURCE_DMA |
+							    IORESOURCE_MEM);
+	} else {
+		/* Take a look if we already have DMA resource via DT */
+		for (i = 0; i < pdev->num_resources; i++) {
+			struct resource *r = &pdev->resource[i];
+
+			/* We have it, no need to touch the resources */
+			if (r->flags == IORESOURCE_DMA)
+				goto have_everything;
 		}
+		/* Count only DMA resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_DMA);
+		/* The device has no DMA resource, no need for update */
+		if (!res_count)
+			goto have_everything;
+	
+		res_count += pdev->num_resources;
+	}
 
-		ret = platform_device_add_resources(pdev, res, res_count);
-		kfree(res);
+	/* Allocate resources memory to account for new resources */
+	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
+	if (!res)
+		goto oda_exit3;
 
-		if (ret)
-			goto oda_exit3;
+	if (!pdev->num_resources) {
+		dev_dbg(&pdev->dev, "%s: using %d resources from hwmod\n",
+			__func__, res_count);
+		omap_device_fill_resources(od, res);
+	} else {
+		dev_dbg(&pdev->dev,
+			"%s: appending %d DMA resources from hwmod\n",
+			__func__, res_count - pdev->num_resources);
+		memcpy(res, pdev->resource,
+		       sizeof(struct resource) * pdev->num_resources);
+		_od_fill_dma_resources(od, &res[pdev->num_resources]);
 	}
 
+	ret = platform_device_add_resources(pdev, res, res_count);
+	kfree(res);
+
+	if (ret)
+		goto oda_exit3;
+
+have_everything:
 	if (!pm_lats) {
 		pm_lats = omap_default_latency;
 		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
-- 
1.7.12.4

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

* Re: [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot
  2012-10-30 11:24 ` Peter Ujfalusi
@ 2012-10-30 17:26   ` Sebastien Guiriec
  -1 siblings, 0 replies; 22+ messages in thread
From: Sebastien Guiriec @ 2012-10-30 17:26 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Tony Lindgren, Benoit Cousson, Paul Walmsley, linux-omap,
	linux-arm-kernel

Hi Peter,

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> Hello,
>
> Changes since v1:
> - If the device does not have DMA resource do not try to recreate the resources
>
> Intro mail from v1:
>
> This series resolves the issue we currently have with the resource handling when
> booting with DT.
> In short: at the moment the omap_device_alloc() decides if it needs to update the
> OF filled resources based on the number of resources on the device and in the
> hwmod database.
> This prevents us from removing hwmod data for platforms (OMAP5) which does not
> support non DT boot anymore.

At list removing 160 lines for out of tree data for OMAP5 audio part. So 
going in the good direction. But should much more after cleaning up all 
IP. Now we need to add DMA binding to remove the data.

>
> With this series we can make sure that the DT provided resources are used and we
> only append the DMA resources to the device from hwmod.
> I have added extra check to prepare us when the DMA resource can be filled via
> OF. In this case we do not update the resources at all.
>
> Tony, Benoit, Paul: Not sure if this qualify for 3.7 inclusion, but for sure
> going to help us to clean up the OMAP5 hwmod database.
>
> Regards,
> Peter
> ---
> Peter Ujfalusi (2):
>    ARM: OMAP: hwmod: Add possibility to count hwmod resources based on
>      type
>    ARM: OMAP: omap_device: Correct resource handling for DT boot
>
>   arch/arm/mach-omap2/omap_hwmod.c             | 27 +++++----
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>   arch/arm/plat-omap/omap_device.c             | 87 ++++++++++++++++++----------
>   3 files changed, 72 insertions(+), 44 deletions(-)
>
Tested-by: Sebastien Guiriec <s-guiriec@ti.com>

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

* [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot
@ 2012-10-30 17:26   ` Sebastien Guiriec
  0 siblings, 0 replies; 22+ messages in thread
From: Sebastien Guiriec @ 2012-10-30 17:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> Hello,
>
> Changes since v1:
> - If the device does not have DMA resource do not try to recreate the resources
>
> Intro mail from v1:
>
> This series resolves the issue we currently have with the resource handling when
> booting with DT.
> In short: at the moment the omap_device_alloc() decides if it needs to update the
> OF filled resources based on the number of resources on the device and in the
> hwmod database.
> This prevents us from removing hwmod data for platforms (OMAP5) which does not
> support non DT boot anymore.

At list removing 160 lines for out of tree data for OMAP5 audio part. So 
going in the good direction. But should much more after cleaning up all 
IP. Now we need to add DMA binding to remove the data.

>
> With this series we can make sure that the DT provided resources are used and we
> only append the DMA resources to the device from hwmod.
> I have added extra check to prepare us when the DMA resource can be filled via
> OF. In this case we do not update the resources at all.
>
> Tony, Benoit, Paul: Not sure if this qualify for 3.7 inclusion, but for sure
> going to help us to clean up the OMAP5 hwmod database.
>
> Regards,
> Peter
> ---
> Peter Ujfalusi (2):
>    ARM: OMAP: hwmod: Add possibility to count hwmod resources based on
>      type
>    ARM: OMAP: omap_device: Correct resource handling for DT boot
>
>   arch/arm/mach-omap2/omap_hwmod.c             | 27 +++++----
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>   arch/arm/plat-omap/omap_device.c             | 87 ++++++++++++++++++----------
>   3 files changed, 72 insertions(+), 44 deletions(-)
>
Tested-by: Sebastien Guiriec <s-guiriec@ti.com>

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

* Re: [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
  2012-10-30 11:24   ` Peter Ujfalusi
@ 2012-10-31 11:09     ` Cousson, Benoit
  -1 siblings, 0 replies; 22+ messages in thread
From: Cousson, Benoit @ 2012-10-31 11:09 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Tony Lindgren, Paul Walmsley, linux-omap, linux-arm-kernel

Hi Peter,

That's great you've have done that fix.

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> Add flags parameter for omap_hwmod_count_resources() so users can tell which
> type of resources they are interested when counting them in hwmod database.

Mmm, does it worth doing that for every resources considering that this 
is a temporary situation and than only the DMA resources are an issue so 
far?

Otherwise that looks fine to me and will allow a much smoother 
transition to full DT.

Thanks,
Benoit

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>   arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>   arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
>   3 files changed, 25 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index b969ab1..a79c941 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>   /**
>    * omap_hwmod_count_resources - count number of struct resources needed by hwmod
>    * @oh: struct omap_hwmod *
> - * @res: pointer to the first element of an array of struct resource to fill
> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>    *
>    * Count the number of struct resource array elements necessary to
>    * contain omap_hwmod @oh resources.  Intended to be called by code
> @@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>    * resource IDs.
>    *
>    */
> -int omap_hwmod_count_resources(struct omap_hwmod *oh)
> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
>   {
> -	struct omap_hwmod_ocp_if *os;
> -	struct list_head *p;
> -	int ret;
> -	int i = 0;
> +	int ret = 0;
>
> -	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
> +	if (flags & IORESOURCE_IRQ)
> +		ret += _count_mpu_irqs(oh);
>
> -	p = oh->slave_ports.next;
> +	if (flags & IORESOURCE_DMA)
> +		ret += _count_sdma_reqs(oh);
>
> -	while (i < oh->slaves_cnt) {
> -		os = _fetch_next_ocp_if(&p, &i);
> -		ret += _count_ocp_if_addr_spaces(os);
> +	if (flags & IORESOURCE_MEM) {
> +		int i = 0;
> +		struct omap_hwmod_ocp_if *os;
> +		struct list_head *p = oh->slave_ports.next;
> +
> +		while (i < oh->slaves_cnt) {
> +			os = _fetch_next_ocp_if(&p, &i);
> +			ret += _count_ocp_if_addr_spaces(os);
> +		}
>   	}
>
>   	return ret;
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index b3349f7..48a6f5d 100644
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
>   u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
>   int omap_hwmod_softreset(struct omap_hwmod *oh);
>
> -int omap_hwmod_count_resources(struct omap_hwmod *oh);
> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
>   int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
>   int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
>   int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
> diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
> index 7a7d1f2..915cf68 100644
> --- a/arch/arm/plat-omap/omap_device.c
> +++ b/arch/arm/plat-omap/omap_device.c
> @@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
>   /**
>    * omap_device_count_resources - count number of struct resource entries needed
>    * @od: struct omap_device *
> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>    *
>    * Count the number of struct resource entries needed for this
>    * omap_device @od.  Used by omap_device_build_ss() to determine how
>    * much memory to allocate before calling
>    * omap_device_fill_resources().  Returns the count.
>    */
> -static int omap_device_count_resources(struct omap_device *od)
> +static int omap_device_count_resources(struct omap_device *od,
> +				       unsigned long flags)
>   {
>   	int c = 0;
>   	int i;
>
>   	for (i = 0; i < od->hwmods_cnt; i++)
> -		c += omap_hwmod_count_resources(od->hwmods[i]);
> +		c += omap_hwmod_count_resources(od->hwmods[i], flags);
>
>   	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
>   		 od->pdev->name, c, od->hwmods_cnt);
> @@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
>   	od->hwmods = hwmods;
>   	od->pdev = pdev;
>
> -	res_count = omap_device_count_resources(od);
> +	/* Count all resources for the device */
> +	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
> +						    IORESOURCE_DMA |
> +						    IORESOURCE_MEM);
>   	/*
>   	 * DT Boot:
>   	 *   OF framework will construct the resource structure (currently
>


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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
@ 2012-10-31 11:09     ` Cousson, Benoit
  0 siblings, 0 replies; 22+ messages in thread
From: Cousson, Benoit @ 2012-10-31 11:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

That's great you've have done that fix.

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> Add flags parameter for omap_hwmod_count_resources() so users can tell which
> type of resources they are interested when counting them in hwmod database.

Mmm, does it worth doing that for every resources considering that this 
is a temporary situation and than only the DMA resources are an issue so 
far?

Otherwise that looks fine to me and will allow a much smoother 
transition to full DT.

Thanks,
Benoit

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>   arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>   arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
>   3 files changed, 25 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index b969ab1..a79c941 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>   /**
>    * omap_hwmod_count_resources - count number of struct resources needed by hwmod
>    * @oh: struct omap_hwmod *
> - * @res: pointer to the first element of an array of struct resource to fill
> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>    *
>    * Count the number of struct resource array elements necessary to
>    * contain omap_hwmod @oh resources.  Intended to be called by code
> @@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>    * resource IDs.
>    *
>    */
> -int omap_hwmod_count_resources(struct omap_hwmod *oh)
> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
>   {
> -	struct omap_hwmod_ocp_if *os;
> -	struct list_head *p;
> -	int ret;
> -	int i = 0;
> +	int ret = 0;
>
> -	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
> +	if (flags & IORESOURCE_IRQ)
> +		ret += _count_mpu_irqs(oh);
>
> -	p = oh->slave_ports.next;
> +	if (flags & IORESOURCE_DMA)
> +		ret += _count_sdma_reqs(oh);
>
> -	while (i < oh->slaves_cnt) {
> -		os = _fetch_next_ocp_if(&p, &i);
> -		ret += _count_ocp_if_addr_spaces(os);
> +	if (flags & IORESOURCE_MEM) {
> +		int i = 0;
> +		struct omap_hwmod_ocp_if *os;
> +		struct list_head *p = oh->slave_ports.next;
> +
> +		while (i < oh->slaves_cnt) {
> +			os = _fetch_next_ocp_if(&p, &i);
> +			ret += _count_ocp_if_addr_spaces(os);
> +		}
>   	}
>
>   	return ret;
> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> index b3349f7..48a6f5d 100644
> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
> @@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
>   u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
>   int omap_hwmod_softreset(struct omap_hwmod *oh);
>
> -int omap_hwmod_count_resources(struct omap_hwmod *oh);
> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
>   int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
>   int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
>   int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
> diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
> index 7a7d1f2..915cf68 100644
> --- a/arch/arm/plat-omap/omap_device.c
> +++ b/arch/arm/plat-omap/omap_device.c
> @@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
>   /**
>    * omap_device_count_resources - count number of struct resource entries needed
>    * @od: struct omap_device *
> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>    *
>    * Count the number of struct resource entries needed for this
>    * omap_device @od.  Used by omap_device_build_ss() to determine how
>    * much memory to allocate before calling
>    * omap_device_fill_resources().  Returns the count.
>    */
> -static int omap_device_count_resources(struct omap_device *od)
> +static int omap_device_count_resources(struct omap_device *od,
> +				       unsigned long flags)
>   {
>   	int c = 0;
>   	int i;
>
>   	for (i = 0; i < od->hwmods_cnt; i++)
> -		c += omap_hwmod_count_resources(od->hwmods[i]);
> +		c += omap_hwmod_count_resources(od->hwmods[i], flags);
>
>   	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
>   		 od->pdev->name, c, od->hwmods_cnt);
> @@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
>   	od->hwmods = hwmods;
>   	od->pdev = pdev;
>
> -	res_count = omap_device_count_resources(od);
> +	/* Count all resources for the device */
> +	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
> +						    IORESOURCE_DMA |
> +						    IORESOURCE_MEM);
>   	/*
>   	 * DT Boot:
>   	 *   OF framework will construct the resource structure (currently
>

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

* Re: [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
  2012-10-31 11:09     ` Cousson, Benoit
@ 2012-11-02  7:22       ` Péter Ujfalusi
  -1 siblings, 0 replies; 22+ messages in thread
From: Péter Ujfalusi @ 2012-11-02  7:22 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: Tony Lindgren, Paul Walmsley, linux-omap, linux-arm-kernel

Hi Benoit,

On 10/31/2012 12:09 PM, Cousson, Benoit wrote:
> Hi Peter,
> 
> That's great you've have done that fix.
> 
> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>> Add flags parameter for omap_hwmod_count_resources() so users can tell which
>> type of resources they are interested when counting them in hwmod database.
> 
> Mmm, does it worth doing that for every resources considering that this is a
> temporary situation and than only the DMA resources are an issue so far?

I think it is better to have nice API - even for a short term - than introduce
a new wrapper just to count the DMA resources.
Yes we only use this to either count all resources or to count the DMA
resources only, but the other options does not look better either:
1. omap_hwmod_count_dma_resources(struct omap_hwmod *oh)
2. omap_hwmod_count_resources(struct omap_hwmod *oh, bool dma_only)

-- 
Péter

> 
> Otherwise that looks fine to me and will allow a much smoother transition to
> full DT.
> 
> Thanks,
> Benoit
> 
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>   arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
>>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>>   arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
>>   3 files changed, 25 insertions(+), 15 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c
>> b/arch/arm/mach-omap2/omap_hwmod.c
>> index b969ab1..a79c941 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>>   /**
>>    * omap_hwmod_count_resources - count number of struct resources needed by
>> hwmod
>>    * @oh: struct omap_hwmod *
>> - * @res: pointer to the first element of an array of struct resource to fill
>> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>>    *
>>    * Count the number of struct resource array elements necessary to
>>    * contain omap_hwmod @oh resources.  Intended to be called by code
>> @@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>>    * resource IDs.
>>    *
>>    */
>> -int omap_hwmod_count_resources(struct omap_hwmod *oh)
>> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
>>   {
>> -    struct omap_hwmod_ocp_if *os;
>> -    struct list_head *p;
>> -    int ret;
>> -    int i = 0;
>> +    int ret = 0;
>>
>> -    ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
>> +    if (flags & IORESOURCE_IRQ)
>> +        ret += _count_mpu_irqs(oh);
>>
>> -    p = oh->slave_ports.next;
>> +    if (flags & IORESOURCE_DMA)
>> +        ret += _count_sdma_reqs(oh);
>>
>> -    while (i < oh->slaves_cnt) {
>> -        os = _fetch_next_ocp_if(&p, &i);
>> -        ret += _count_ocp_if_addr_spaces(os);
>> +    if (flags & IORESOURCE_MEM) {
>> +        int i = 0;
>> +        struct omap_hwmod_ocp_if *os;
>> +        struct list_head *p = oh->slave_ports.next;
>> +
>> +        while (i < oh->slaves_cnt) {
>> +            os = _fetch_next_ocp_if(&p, &i);
>> +            ret += _count_ocp_if_addr_spaces(os);
>> +        }
>>       }
>>
>>       return ret;
>> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> b/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> index b3349f7..48a6f5d 100644
>> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> @@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16
>> reg_offs);
>>   u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
>>   int omap_hwmod_softreset(struct omap_hwmod *oh);
>>
>> -int omap_hwmod_count_resources(struct omap_hwmod *oh);
>> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
>>   int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
>>   int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource
>> *res);
>>   int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
>> diff --git a/arch/arm/plat-omap/omap_device.c
>> b/arch/arm/plat-omap/omap_device.c
>> index 7a7d1f2..915cf68 100644
>> --- a/arch/arm/plat-omap/omap_device.c
>> +++ b/arch/arm/plat-omap/omap_device.c
>> @@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct
>> platform_device *pdev)
>>   /**
>>    * omap_device_count_resources - count number of struct resource entries
>> needed
>>    * @od: struct omap_device *
>> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>>    *
>>    * Count the number of struct resource entries needed for this
>>    * omap_device @od.  Used by omap_device_build_ss() to determine how
>>    * much memory to allocate before calling
>>    * omap_device_fill_resources().  Returns the count.
>>    */
>> -static int omap_device_count_resources(struct omap_device *od)
>> +static int omap_device_count_resources(struct omap_device *od,
>> +                       unsigned long flags)
>>   {
>>       int c = 0;
>>       int i;
>>
>>       for (i = 0; i < od->hwmods_cnt; i++)
>> -        c += omap_hwmod_count_resources(od->hwmods[i]);
>> +        c += omap_hwmod_count_resources(od->hwmods[i], flags);
>>
>>       pr_debug("omap_device: %s: counted %d total resources across %d
>> hwmods\n",
>>            od->pdev->name, c, od->hwmods_cnt);
>> @@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct
>> platform_device *pdev,
>>       od->hwmods = hwmods;
>>       od->pdev = pdev;
>>
>> -    res_count = omap_device_count_resources(od);
>> +    /* Count all resources for the device */
>> +    res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
>> +                            IORESOURCE_DMA |
>> +                            IORESOURCE_MEM);
>>       /*
>>        * DT Boot:
>>        *   OF framework will construct the resource structure (currently
>>
> 


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

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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
@ 2012-11-02  7:22       ` Péter Ujfalusi
  0 siblings, 0 replies; 22+ messages in thread
From: Péter Ujfalusi @ 2012-11-02  7:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Benoit,

On 10/31/2012 12:09 PM, Cousson, Benoit wrote:
> Hi Peter,
> 
> That's great you've have done that fix.
> 
> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>> Add flags parameter for omap_hwmod_count_resources() so users can tell which
>> type of resources they are interested when counting them in hwmod database.
> 
> Mmm, does it worth doing that for every resources considering that this is a
> temporary situation and than only the DMA resources are an issue so far?

I think it is better to have nice API - even for a short term - than introduce
a new wrapper just to count the DMA resources.
Yes we only use this to either count all resources or to count the DMA
resources only, but the other options does not look better either:
1. omap_hwmod_count_dma_resources(struct omap_hwmod *oh)
2. omap_hwmod_count_resources(struct omap_hwmod *oh, bool dma_only)

-- 
P?ter

> 
> Otherwise that looks fine to me and will allow a much smoother transition to
> full DT.
> 
> Thanks,
> Benoit
> 
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>   arch/arm/mach-omap2/omap_hwmod.c             | 27 ++++++++++++++++-----------
>>   arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
>>   arch/arm/plat-omap/omap_device.c             | 11 ++++++++---
>>   3 files changed, 25 insertions(+), 15 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c
>> b/arch/arm/mach-omap2/omap_hwmod.c
>> index b969ab1..a79c941 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -3337,7 +3337,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>>   /**
>>    * omap_hwmod_count_resources - count number of struct resources needed by
>> hwmod
>>    * @oh: struct omap_hwmod *
>> - * @res: pointer to the first element of an array of struct resource to fill
>> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>>    *
>>    * Count the number of struct resource array elements necessary to
>>    * contain omap_hwmod @oh resources.  Intended to be called by code
>> @@ -3350,20 +3350,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
>>    * resource IDs.
>>    *
>>    */
>> -int omap_hwmod_count_resources(struct omap_hwmod *oh)
>> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
>>   {
>> -    struct omap_hwmod_ocp_if *os;
>> -    struct list_head *p;
>> -    int ret;
>> -    int i = 0;
>> +    int ret = 0;
>>
>> -    ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
>> +    if (flags & IORESOURCE_IRQ)
>> +        ret += _count_mpu_irqs(oh);
>>
>> -    p = oh->slave_ports.next;
>> +    if (flags & IORESOURCE_DMA)
>> +        ret += _count_sdma_reqs(oh);
>>
>> -    while (i < oh->slaves_cnt) {
>> -        os = _fetch_next_ocp_if(&p, &i);
>> -        ret += _count_ocp_if_addr_spaces(os);
>> +    if (flags & IORESOURCE_MEM) {
>> +        int i = 0;
>> +        struct omap_hwmod_ocp_if *os;
>> +        struct list_head *p = oh->slave_ports.next;
>> +
>> +        while (i < oh->slaves_cnt) {
>> +            os = _fetch_next_ocp_if(&p, &i);
>> +            ret += _count_ocp_if_addr_spaces(os);
>> +        }
>>       }
>>
>>       return ret;
>> diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> b/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> index b3349f7..48a6f5d 100644
>> --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
>> @@ -628,7 +628,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16
>> reg_offs);
>>   u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
>>   int omap_hwmod_softreset(struct omap_hwmod *oh);
>>
>> -int omap_hwmod_count_resources(struct omap_hwmod *oh);
>> +int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
>>   int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
>>   int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource
>> *res);
>>   int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
>> diff --git a/arch/arm/plat-omap/omap_device.c
>> b/arch/arm/plat-omap/omap_device.c
>> index 7a7d1f2..915cf68 100644
>> --- a/arch/arm/plat-omap/omap_device.c
>> +++ b/arch/arm/plat-omap/omap_device.c
>> @@ -442,19 +442,21 @@ int omap_device_get_context_loss_count(struct
>> platform_device *pdev)
>>   /**
>>    * omap_device_count_resources - count number of struct resource entries
>> needed
>>    * @od: struct omap_device *
>> + * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
>>    *
>>    * Count the number of struct resource entries needed for this
>>    * omap_device @od.  Used by omap_device_build_ss() to determine how
>>    * much memory to allocate before calling
>>    * omap_device_fill_resources().  Returns the count.
>>    */
>> -static int omap_device_count_resources(struct omap_device *od)
>> +static int omap_device_count_resources(struct omap_device *od,
>> +                       unsigned long flags)
>>   {
>>       int c = 0;
>>       int i;
>>
>>       for (i = 0; i < od->hwmods_cnt; i++)
>> -        c += omap_hwmod_count_resources(od->hwmods[i]);
>> +        c += omap_hwmod_count_resources(od->hwmods[i], flags);
>>
>>       pr_debug("omap_device: %s: counted %d total resources across %d
>> hwmods\n",
>>            od->pdev->name, c, od->hwmods_cnt);
>> @@ -558,7 +560,10 @@ struct omap_device *omap_device_alloc(struct
>> platform_device *pdev,
>>       od->hwmods = hwmods;
>>       od->pdev = pdev;
>>
>> -    res_count = omap_device_count_resources(od);
>> +    /* Count all resources for the device */
>> +    res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
>> +                            IORESOURCE_DMA |
>> +                            IORESOURCE_MEM);
>>       /*
>>        * DT Boot:
>>        *   OF framework will construct the resource structure (currently
>>
> 

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

* Re: [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
  2012-11-02  7:22       ` Péter Ujfalusi
@ 2012-11-02  8:50         ` Cousson, Benoit
  -1 siblings, 0 replies; 22+ messages in thread
From: Cousson, Benoit @ 2012-11-02  8:50 UTC (permalink / raw)
  To: Péter Ujfalusi
  Cc: Tony Lindgren, Paul Walmsley, linux-omap, linux-arm-kernel

Salut Péter,

On 11/2/2012 8:22 AM, Péter Ujfalusi wrote:
> Hi Benoit,
>
> On 10/31/2012 12:09 PM, Cousson, Benoit wrote:
>> Hi Peter,
>>
>> That's great you've have done that fix.
>>
>> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>>> Add flags parameter for omap_hwmod_count_resources() so users can tell which
>>> type of resources they are interested when counting them in hwmod database.
>>
>> Mmm, does it worth doing that for every resources considering that this is a
>> temporary situation and than only the DMA resources are an issue so far?
>
> I think it is better to have nice API - even for a short term - than introduce
> a new wrapper just to count the DMA resources.
> Yes we only use this to either count all resources or to count the DMA
> resources only, but the other options does not look better either:
> 1. omap_hwmod_count_dma_resources(struct omap_hwmod *oh)
> 2. omap_hwmod_count_resources(struct omap_hwmod *oh, bool dma_only)

Fair enough. I'm OK with that. I'll take theses patches, except if Paul 
already have a 3.8 branch for hwmod.

Regards,
Benoit

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

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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
@ 2012-11-02  8:50         ` Cousson, Benoit
  0 siblings, 0 replies; 22+ messages in thread
From: Cousson, Benoit @ 2012-11-02  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Salut P?ter,

On 11/2/2012 8:22 AM, P?ter Ujfalusi wrote:
> Hi Benoit,
>
> On 10/31/2012 12:09 PM, Cousson, Benoit wrote:
>> Hi Peter,
>>
>> That's great you've have done that fix.
>>
>> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>>> Add flags parameter for omap_hwmod_count_resources() so users can tell which
>>> type of resources they are interested when counting them in hwmod database.
>>
>> Mmm, does it worth doing that for every resources considering that this is a
>> temporary situation and than only the DMA resources are an issue so far?
>
> I think it is better to have nice API - even for a short term - than introduce
> a new wrapper just to count the DMA resources.
> Yes we only use this to either count all resources or to count the DMA
> resources only, but the other options does not look better either:
> 1. omap_hwmod_count_dma_resources(struct omap_hwmod *oh)
> 2. omap_hwmod_count_resources(struct omap_hwmod *oh, bool dma_only)

Fair enough. I'm OK with that. I'll take theses patches, except if Paul 
already have a 3.8 branch for hwmod.

Regards,
Benoit

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

* Re: [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
  2012-10-30 11:24   ` Peter Ujfalusi
@ 2012-11-03  8:31     ` Kevin Hilman
  -1 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2012-11-03  8:31 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Tony Lindgren, Benoit Cousson, Paul Walmsley, linux-omap,
	linux-arm-kernel

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> When booting with DT the OF core can fill up the resources provided within
> the DT blob.
> The current way of handling the DT boot prevents us from removing hwmod data
> for platforms only suppose to boot with DT (OMAP5 for example) since we need
> to keep the whole hwmod database intact in order to have more resources in
> hwmod than in DT (to be able to append the DMA resource from hwmod).
>
> To fix this issue we just examine the OF provided resources:
> If we do not have resources we use hwmod to fill them.
> If we have resources we check if we already able to recive DMA resource, if
> no we only append the DMA resurce from hwmod to the OF provided ones.
>
> In this way we can start removing hwmod data for devices which have their
> resources correctly configured in DT without regressions.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>ke

Acked-by: Kevin Hilman <khilman@ti.com>

Benoit, feel free to take this one as well.

Kevin


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

* [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
@ 2012-11-03  8:31     ` Kevin Hilman
  0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2012-11-03  8:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
> When booting with DT the OF core can fill up the resources provided within
> the DT blob.
> The current way of handling the DT boot prevents us from removing hwmod data
> for platforms only suppose to boot with DT (OMAP5 for example) since we need
> to keep the whole hwmod database intact in order to have more resources in
> hwmod than in DT (to be able to append the DMA resource from hwmod).
>
> To fix this issue we just examine the OF provided resources:
> If we do not have resources we use hwmod to fill them.
> If we have resources we check if we already able to recive DMA resource, if
> no we only append the DMA resurce from hwmod to the OF provided ones.
>
> In this way we can start removing hwmod data for devices which have their
> resources correctly configured in DT without regressions.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>ke

Acked-by: Kevin Hilman <khilman@ti.com>

Benoit, feel free to take this one as well.

Kevin

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

* Re: [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
  2012-11-03  8:31     ` Kevin Hilman
@ 2012-11-05 11:25       ` Benoit Cousson
  -1 siblings, 0 replies; 22+ messages in thread
From: Benoit Cousson @ 2012-11-05 11:25 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Peter Ujfalusi, Tony Lindgren, Paul Walmsley, linux-omap,
	linux-arm-kernel

Hi Kevin,

On 11/03/2012 09:31 AM, Kevin Hilman wrote:
> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>> When booting with DT the OF core can fill up the resources provided
>> within
>> the DT blob.
>> The current way of handling the DT boot prevents us from removing
>> hwmod data
>> for platforms only suppose to boot with DT (OMAP5 for example) since
>> we need
>> to keep the whole hwmod database intact in order to have more
>> resources in
>> hwmod than in DT (to be able to append the DMA resource from hwmod).
>>
>> To fix this issue we just examine the OF provided resources:
>> If we do not have resources we use hwmod to fill them.
>> If we have resources we check if we already able to recive DMA
>> resource, if
>> no we only append the DMA resurce from hwmod to the OF provided ones.
>>
>> In this way we can start removing hwmod data for devices which have their
>> resources correctly configured in DT without regressions.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>ke
> 
> Acked-by: Kevin Hilman <khilman@ti.com>
> 
> Benoit, feel free to take this one as well.

Thanks, I'll do.

Regards,
Benoit


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

* [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
@ 2012-11-05 11:25       ` Benoit Cousson
  0 siblings, 0 replies; 22+ messages in thread
From: Benoit Cousson @ 2012-11-05 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kevin,

On 11/03/2012 09:31 AM, Kevin Hilman wrote:
> On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:
>> When booting with DT the OF core can fill up the resources provided
>> within
>> the DT blob.
>> The current way of handling the DT boot prevents us from removing
>> hwmod data
>> for platforms only suppose to boot with DT (OMAP5 for example) since
>> we need
>> to keep the whole hwmod database intact in order to have more
>> resources in
>> hwmod than in DT (to be able to append the DMA resource from hwmod).
>>
>> To fix this issue we just examine the OF provided resources:
>> If we do not have resources we use hwmod to fill them.
>> If we have resources we check if we already able to recive DMA
>> resource, if
>> no we only append the DMA resurce from hwmod to the OF provided ones.
>>
>> In this way we can start removing hwmod data for devices which have their
>> resources correctly configured in DT without regressions.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>ke
> 
> Acked-by: Kevin Hilman <khilman@ti.com>
> 
> Benoit, feel free to take this one as well.

Thanks, I'll do.

Regards,
Benoit

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

* Re: [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
  2012-10-30 11:24   ` Peter Ujfalusi
@ 2012-11-21 23:07     ` Paul Walmsley
  -1 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2012-11-21 23:07 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Tony Lindgren, linux-omap, Benoit Cousson, linux-arm-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 5226 bytes --]

On Tue, 30 Oct 2012, Peter Ujfalusi wrote:

> Add flags parameter for omap_hwmod_count_resources() so users can tell which
> type of resources they are interested when counting them in hwmod database.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Here's this one, updated to apply after the various cleanups.


- Paul

From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Wed, 21 Nov 2012 11:50:12 -0700
Subject: [PATCH 1/2] ARM: OMAP2+: hwmod: Add possibility to count hwmod
 resources based on type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add flags parameter for omap_hwmod_count_resources() so users can tell which
type of resources they are interested when counting them in hwmod database.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Benoît Cousson <b-cousson@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_device.c |   11 ++++++++---
 arch/arm/mach-omap2/omap_hwmod.c  |   27 ++++++++++++++++-----------
 arch/arm/mach-omap2/omap_hwmod.h  |    2 +-
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 0ef934f..8917a08 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -441,19 +441,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
 /**
  * omap_device_count_resources - count number of struct resource entries needed
  * @od: struct omap_device *
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource entries needed for this
  * omap_device @od.  Used by omap_device_build_ss() to determine how
  * much memory to allocate before calling
  * omap_device_fill_resources().  Returns the count.
  */
-static int omap_device_count_resources(struct omap_device *od)
+static int omap_device_count_resources(struct omap_device *od,
+				       unsigned long flags)
 {
 	int c = 0;
 	int i;
 
 	for (i = 0; i < od->hwmods_cnt; i++)
-		c += omap_hwmod_count_resources(od->hwmods[i]);
+		c += omap_hwmod_count_resources(od->hwmods[i], flags);
 
 	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
 		 od->pdev->name, c, od->hwmods_cnt);
@@ -557,7 +559,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	res_count = omap_device_count_resources(od);
+	/* Count all resources for the device */
+	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+						    IORESOURCE_DMA |
+						    IORESOURCE_MEM);
 	/*
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 083adbe..a809090 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3427,7 +3427,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
 /**
  * omap_hwmod_count_resources - count number of struct resources needed by hwmod
  * @oh: struct omap_hwmod *
- * @res: pointer to the first element of an array of struct resource to fill
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource array elements necessary to
  * contain omap_hwmod @oh resources.  Intended to be called by code
@@ -3440,20 +3440,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
  * resource IDs.
  *
  */
-int omap_hwmod_count_resources(struct omap_hwmod *oh)
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
 {
-	struct omap_hwmod_ocp_if *os;
-	struct list_head *p;
-	int ret;
-	int i = 0;
+	int ret = 0;
 
-	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
+	if (flags & IORESOURCE_IRQ)
+		ret += _count_mpu_irqs(oh);
 
-	p = oh->slave_ports.next;
+	if (flags & IORESOURCE_DMA)
+		ret += _count_sdma_reqs(oh);
 
-	while (i < oh->slaves_cnt) {
-		os = _fetch_next_ocp_if(&p, &i);
-		ret += _count_ocp_if_addr_spaces(os);
+	if (flags & IORESOURCE_MEM) {
+		int i = 0;
+		struct omap_hwmod_ocp_if *os;
+		struct list_head *p = oh->slave_ports.next;
+
+		while (i < oh->slaves_cnt) {
+			os = _fetch_next_ocp_if(&p, &i);
+			ret += _count_ocp_if_addr_spaces(os);
+		}
 	}
 
 	return ret;
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 421ff65..86b7414 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -631,7 +631,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
 int omap_hwmod_softreset(struct omap_hwmod *oh);
 
-int omap_hwmod_count_resources(struct omap_hwmod *oh);
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
-- 
1.7.10.4

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type
@ 2012-11-21 23:07     ` Paul Walmsley
  0 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2012-11-21 23:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 30 Oct 2012, Peter Ujfalusi wrote:

> Add flags parameter for omap_hwmod_count_resources() so users can tell which
> type of resources they are interested when counting them in hwmod database.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Here's this one, updated to apply after the various cleanups.


- Paul

From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Wed, 21 Nov 2012 11:50:12 -0700
Subject: [PATCH 1/2] ARM: OMAP2+: hwmod: Add possibility to count hwmod
 resources based on type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add flags parameter for omap_hwmod_count_resources() so users can tell which
type of resources they are interested when counting them in hwmod database.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Beno?t Cousson <b-cousson@ti.com>
[paul at pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_device.c |   11 ++++++++---
 arch/arm/mach-omap2/omap_hwmod.c  |   27 ++++++++++++++++-----------
 arch/arm/mach-omap2/omap_hwmod.h  |    2 +-
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 0ef934f..8917a08 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -441,19 +441,21 @@ int omap_device_get_context_loss_count(struct platform_device *pdev)
 /**
  * omap_device_count_resources - count number of struct resource entries needed
  * @od: struct omap_device *
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource entries needed for this
  * omap_device @od.  Used by omap_device_build_ss() to determine how
  * much memory to allocate before calling
  * omap_device_fill_resources().  Returns the count.
  */
-static int omap_device_count_resources(struct omap_device *od)
+static int omap_device_count_resources(struct omap_device *od,
+				       unsigned long flags)
 {
 	int c = 0;
 	int i;
 
 	for (i = 0; i < od->hwmods_cnt; i++)
-		c += omap_hwmod_count_resources(od->hwmods[i]);
+		c += omap_hwmod_count_resources(od->hwmods[i], flags);
 
 	pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
 		 od->pdev->name, c, od->hwmods_cnt);
@@ -557,7 +559,10 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	res_count = omap_device_count_resources(od);
+	/* Count all resources for the device */
+	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+						    IORESOURCE_DMA |
+						    IORESOURCE_MEM);
 	/*
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 083adbe..a809090 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3427,7 +3427,7 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
 /**
  * omap_hwmod_count_resources - count number of struct resources needed by hwmod
  * @oh: struct omap_hwmod *
- * @res: pointer to the first element of an array of struct resource to fill
+ * @flags: Type of resources to include when counting (IRQ/DMA/MEM)
  *
  * Count the number of struct resource array elements necessary to
  * contain omap_hwmod @oh resources.  Intended to be called by code
@@ -3440,20 +3440,25 @@ int omap_hwmod_reset(struct omap_hwmod *oh)
  * resource IDs.
  *
  */
-int omap_hwmod_count_resources(struct omap_hwmod *oh)
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags)
 {
-	struct omap_hwmod_ocp_if *os;
-	struct list_head *p;
-	int ret;
-	int i = 0;
+	int ret = 0;
 
-	ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
+	if (flags & IORESOURCE_IRQ)
+		ret += _count_mpu_irqs(oh);
 
-	p = oh->slave_ports.next;
+	if (flags & IORESOURCE_DMA)
+		ret += _count_sdma_reqs(oh);
 
-	while (i < oh->slaves_cnt) {
-		os = _fetch_next_ocp_if(&p, &i);
-		ret += _count_ocp_if_addr_spaces(os);
+	if (flags & IORESOURCE_MEM) {
+		int i = 0;
+		struct omap_hwmod_ocp_if *os;
+		struct list_head *p = oh->slave_ports.next;
+
+		while (i < oh->slaves_cnt) {
+			os = _fetch_next_ocp_if(&p, &i);
+			ret += _count_ocp_if_addr_spaces(os);
+		}
 	}
 
 	return ret;
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 421ff65..86b7414 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -631,7 +631,7 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs);
 u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs);
 int omap_hwmod_softreset(struct omap_hwmod *oh);
 
-int omap_hwmod_count_resources(struct omap_hwmod *oh);
+int omap_hwmod_count_resources(struct omap_hwmod *oh, unsigned long flags);
 int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
 int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
-- 
1.7.10.4

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

* Re: [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
  2012-10-30 11:24   ` Peter Ujfalusi
@ 2012-11-21 23:07     ` Paul Walmsley
  -1 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2012-11-21 23:07 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Tony Lindgren, linux-omap, Benoit Cousson, linux-arm-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 6542 bytes --]

On Tue, 30 Oct 2012, Peter Ujfalusi wrote:

> When booting with DT the OF core can fill up the resources provided within
> the DT blob.
> The current way of handling the DT boot prevents us from removing hwmod data
> for platforms only suppose to boot with DT (OMAP5 for example) since we need
> to keep the whole hwmod database intact in order to have more resources in
> hwmod than in DT (to be able to append the DMA resource from hwmod).
> 
> To fix this issue we just examine the OF provided resources:
> If we do not have resources we use hwmod to fill them.
> If we have resources we check if we already able to recive DMA resource, if
> no we only append the DMA resurce from hwmod to the OF provided ones.
> 
> In this way we can start removing hwmod data for devices which have their
> resources correctly configured in DT without regressions.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Here's this one, updated to apply after the v3.8 cleanups.


- Paul

From 65e57fff87781b60e9406888e0ae803cb0df41cc Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Wed, 21 Nov 2012 11:50:46 -0700
Subject: [PATCH 2/2] ARM: OMAP2+: omap_device: Correct resource handling for
 DT boot
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When booting with DT the OF core can fill up the resources provided within
the DT blob.
The current way of handling the DT boot prevents us from removing hwmod data
for platforms only suppose to boot with DT (OMAP5 for example) since we need
to keep the whole hwmod database intact in order to have more resources in
hwmod than in DT (to be able to append the DMA resource from hwmod).

To fix this issue we just examine the OF provided resources:
If we do not have resources we use hwmod to fill them.
If we have resources we check if we already able to recive DMA resource, if
no we only append the DMA resurce from hwmod to the OF provided ones.

In this way we can start removing hwmod data for devices which have their
resources correctly configured in DT without regressions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Benoît Cousson <b-cousson@ti.com>
[paul@pwsan.com: fixed checkpatch problem; updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_device.c |   84 ++++++++++++++++++++++---------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 8917a08..e065daa 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -559,55 +559,73 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	/* Count all resources for the device */
-	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
-						    IORESOURCE_DMA |
-						    IORESOURCE_MEM);
 	/*
+	 * Non-DT Boot:
+	 *   Here, pdev->num_resources = 0, and we should get all the
+	 *   resources from hwmod.
+	 *
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
 	 *   does for MEM & IRQ resource) and we should respect/use these
 	 *   resources, killing hwmod dependency.
 	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
 	 *   have been allocated by OF layer already (through DTB).
-	 *
-	 * Non-DT Boot:
-	 *   Here, pdev->num_resources = 0, and we should get all the
-	 *   resources from hwmod.
+	 *   As preparation for the future we examine the OF provided resources
+	 *   to see if we have DMA resources provided already. In this case
+	 *   there is no need to update the resources for the device, we use the
+	 *   OF provided ones.
 	 *
 	 * TODO: Once DMA resource is available from OF layer, we should
 	 *   kill filling any resources from hwmod.
 	 */
-	if (res_count > pdev->num_resources) {
-		/* Allocate resources memory to account for new resources */
-		res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
-		if (!res)
-			goto oda_exit3;
-
-		/*
-		 * If pdev->num_resources > 0, then assume that,
-		 * MEM and IRQ resources will only come from DT and only
-		 * fill DMA resource from hwmod layer.
-		 */
-		if (pdev->num_resources && pdev->resource) {
-			dev_dbg(&pdev->dev, "%s(): resources already allocated %d\n",
-				__func__, res_count);
-			memcpy(res, pdev->resource,
-			       sizeof(struct resource) * pdev->num_resources);
-			_od_fill_dma_resources(od, &res[pdev->num_resources]);
-		} else {
-			dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
-				__func__, res_count);
-			omap_device_fill_resources(od, res);
+	if (!pdev->num_resources) {
+		/* Count all resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+							    IORESOURCE_DMA |
+							    IORESOURCE_MEM);
+	} else {
+		/* Take a look if we already have DMA resource via DT */
+		for (i = 0; i < pdev->num_resources; i++) {
+			struct resource *r = &pdev->resource[i];
+
+			/* We have it, no need to touch the resources */
+			if (r->flags == IORESOURCE_DMA)
+				goto have_everything;
 		}
+		/* Count only DMA resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_DMA);
+		/* The device has no DMA resource, no need for update */
+		if (!res_count)
+			goto have_everything;
 
-		ret = platform_device_add_resources(pdev, res, res_count);
-		kfree(res);
+		res_count += pdev->num_resources;
+	}
 
-		if (ret)
-			goto oda_exit3;
+	/* Allocate resources memory to account for new resources */
+	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
+	if (!res)
+		goto oda_exit3;
+
+	if (!pdev->num_resources) {
+		dev_dbg(&pdev->dev, "%s: using %d resources from hwmod\n",
+			__func__, res_count);
+		omap_device_fill_resources(od, res);
+	} else {
+		dev_dbg(&pdev->dev,
+			"%s: appending %d DMA resources from hwmod\n",
+			__func__, res_count - pdev->num_resources);
+		memcpy(res, pdev->resource,
+		       sizeof(struct resource) * pdev->num_resources);
+		_od_fill_dma_resources(od, &res[pdev->num_resources]);
 	}
 
+	ret = platform_device_add_resources(pdev, res, res_count);
+	kfree(res);
+
+	if (ret)
+		goto oda_exit3;
+
+have_everything:
 	if (!pm_lats) {
 		pm_lats = omap_default_latency;
 		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
-- 
1.7.10.4

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot
@ 2012-11-21 23:07     ` Paul Walmsley
  0 siblings, 0 replies; 22+ messages in thread
From: Paul Walmsley @ 2012-11-21 23:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 30 Oct 2012, Peter Ujfalusi wrote:

> When booting with DT the OF core can fill up the resources provided within
> the DT blob.
> The current way of handling the DT boot prevents us from removing hwmod data
> for platforms only suppose to boot with DT (OMAP5 for example) since we need
> to keep the whole hwmod database intact in order to have more resources in
> hwmod than in DT (to be able to append the DMA resource from hwmod).
> 
> To fix this issue we just examine the OF provided resources:
> If we do not have resources we use hwmod to fill them.
> If we have resources we check if we already able to recive DMA resource, if
> no we only append the DMA resurce from hwmod to the OF provided ones.
> 
> In this way we can start removing hwmod data for devices which have their
> resources correctly configured in DT without regressions.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Here's this one, updated to apply after the v3.8 cleanups.


- Paul

>From 65e57fff87781b60e9406888e0ae803cb0df41cc Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Wed, 21 Nov 2012 11:50:46 -0700
Subject: [PATCH 2/2] ARM: OMAP2+: omap_device: Correct resource handling for
 DT boot
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When booting with DT the OF core can fill up the resources provided within
the DT blob.
The current way of handling the DT boot prevents us from removing hwmod data
for platforms only suppose to boot with DT (OMAP5 for example) since we need
to keep the whole hwmod database intact in order to have more resources in
hwmod than in DT (to be able to append the DMA resource from hwmod).

To fix this issue we just examine the OF provided resources:
If we do not have resources we use hwmod to fill them.
If we have resources we check if we already able to recive DMA resource, if
no we only append the DMA resurce from hwmod to the OF provided ones.

In this way we can start removing hwmod data for devices which have their
resources correctly configured in DT without regressions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Beno?t Cousson <b-cousson@ti.com>
[paul at pwsan.com: fixed checkpatch problem; updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_device.c |   84 ++++++++++++++++++++++---------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 8917a08..e065daa 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -559,55 +559,73 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev,
 	od->hwmods = hwmods;
 	od->pdev = pdev;
 
-	/* Count all resources for the device */
-	res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
-						    IORESOURCE_DMA |
-						    IORESOURCE_MEM);
 	/*
+	 * Non-DT Boot:
+	 *   Here, pdev->num_resources = 0, and we should get all the
+	 *   resources from hwmod.
+	 *
 	 * DT Boot:
 	 *   OF framework will construct the resource structure (currently
 	 *   does for MEM & IRQ resource) and we should respect/use these
 	 *   resources, killing hwmod dependency.
 	 *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
 	 *   have been allocated by OF layer already (through DTB).
-	 *
-	 * Non-DT Boot:
-	 *   Here, pdev->num_resources = 0, and we should get all the
-	 *   resources from hwmod.
+	 *   As preparation for the future we examine the OF provided resources
+	 *   to see if we have DMA resources provided already. In this case
+	 *   there is no need to update the resources for the device, we use the
+	 *   OF provided ones.
 	 *
 	 * TODO: Once DMA resource is available from OF layer, we should
 	 *   kill filling any resources from hwmod.
 	 */
-	if (res_count > pdev->num_resources) {
-		/* Allocate resources memory to account for new resources */
-		res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
-		if (!res)
-			goto oda_exit3;
-
-		/*
-		 * If pdev->num_resources > 0, then assume that,
-		 * MEM and IRQ resources will only come from DT and only
-		 * fill DMA resource from hwmod layer.
-		 */
-		if (pdev->num_resources && pdev->resource) {
-			dev_dbg(&pdev->dev, "%s(): resources already allocated %d\n",
-				__func__, res_count);
-			memcpy(res, pdev->resource,
-			       sizeof(struct resource) * pdev->num_resources);
-			_od_fill_dma_resources(od, &res[pdev->num_resources]);
-		} else {
-			dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
-				__func__, res_count);
-			omap_device_fill_resources(od, res);
+	if (!pdev->num_resources) {
+		/* Count all resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_IRQ |
+							    IORESOURCE_DMA |
+							    IORESOURCE_MEM);
+	} else {
+		/* Take a look if we already have DMA resource via DT */
+		for (i = 0; i < pdev->num_resources; i++) {
+			struct resource *r = &pdev->resource[i];
+
+			/* We have it, no need to touch the resources */
+			if (r->flags == IORESOURCE_DMA)
+				goto have_everything;
 		}
+		/* Count only DMA resources for the device */
+		res_count = omap_device_count_resources(od, IORESOURCE_DMA);
+		/* The device has no DMA resource, no need for update */
+		if (!res_count)
+			goto have_everything;
 
-		ret = platform_device_add_resources(pdev, res, res_count);
-		kfree(res);
+		res_count += pdev->num_resources;
+	}
 
-		if (ret)
-			goto oda_exit3;
+	/* Allocate resources memory to account for new resources */
+	res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
+	if (!res)
+		goto oda_exit3;
+
+	if (!pdev->num_resources) {
+		dev_dbg(&pdev->dev, "%s: using %d resources from hwmod\n",
+			__func__, res_count);
+		omap_device_fill_resources(od, res);
+	} else {
+		dev_dbg(&pdev->dev,
+			"%s: appending %d DMA resources from hwmod\n",
+			__func__, res_count - pdev->num_resources);
+		memcpy(res, pdev->resource,
+		       sizeof(struct resource) * pdev->num_resources);
+		_od_fill_dma_resources(od, &res[pdev->num_resources]);
 	}
 
+	ret = platform_device_add_resources(pdev, res, res_count);
+	kfree(res);
+
+	if (ret)
+		goto oda_exit3;
+
+have_everything:
 	if (!pm_lats) {
 		pm_lats = omap_default_latency;
 		pm_lats_cnt = ARRAY_SIZE(omap_default_latency);
-- 
1.7.10.4

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

end of thread, other threads:[~2012-11-21 23:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30 11:24 [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot Peter Ujfalusi
2012-10-30 11:24 ` Peter Ujfalusi
2012-10-30 11:24 ` [PATCH v2 1/2] ARM: OMAP: hwmod: Add possibility to count hwmod resources based on type Peter Ujfalusi
2012-10-30 11:24   ` Peter Ujfalusi
2012-10-31 11:09   ` Cousson, Benoit
2012-10-31 11:09     ` Cousson, Benoit
2012-11-02  7:22     ` Péter Ujfalusi
2012-11-02  7:22       ` Péter Ujfalusi
2012-11-02  8:50       ` Cousson, Benoit
2012-11-02  8:50         ` Cousson, Benoit
2012-11-21 23:07   ` Paul Walmsley
2012-11-21 23:07     ` Paul Walmsley
2012-10-30 11:24 ` [PATCH v2 2/2] ARM: OMAP: omap_device: Correct resource handling for DT boot Peter Ujfalusi
2012-10-30 11:24   ` Peter Ujfalusi
2012-11-03  8:31   ` Kevin Hilman
2012-11-03  8:31     ` Kevin Hilman
2012-11-05 11:25     ` Benoit Cousson
2012-11-05 11:25       ` Benoit Cousson
2012-11-21 23:07   ` Paul Walmsley
2012-11-21 23:07     ` Paul Walmsley
2012-10-30 17:26 ` [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in " Sebastien Guiriec
2012-10-30 17:26   ` Sebastien Guiriec

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.