Skip to contentSkip to conversation

ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

PATCH New Tony Lindgren 3 participants 5 messages Jan 20, 2017 – Jan 23, 2017

Subsystems (4)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/1 ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

We have the same defined already in common.h.

---
 arch/arm/mach-omap2/cm2xxx.c                |  1 +
 arch/arm/mach-omap2/cm33xx.c                |  1 +
 arch/arm/mach-omap2/cm3xxx.c                |  1 +
 arch/arm/mach-omap2/cminst44xx.c            |  1 +
 arch/arm/mach-omap2/powerdomains3xxx_data.c |  1 +
 arch/arm/mach-omap2/prcm-common.h           | 22 ----------------------
 arch/arm/mach-omap2/prm2xxx_3xxx.c          |  1 +
 arch/arm/mach-omap2/prm33xx.c               |  1 +
 8 files changed, 7 insertions(+), 22 deletions(-)
arch/arm/mach-omap2/cm2xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx.h"
 #include "cm.h"
 #include "cm2xxx.h"
arch/arm/mach-omap2/cm33xx.c +1 -0
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm33xx.h"
arch/arm/mach-omap2/cm3xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx_3xxx.h"
 #include "cm.h"
 #include "cm3xxx.h"
arch/arm/mach-omap2/cminst44xx.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm1_44xx.h"
arch/arm/mach-omap2/powerdomains3xxx_data.c +1 -0
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include "soc.h"
 #include "powerdomain.h"
arch/arm/mach-omap2/prcm-common.h +0 -22
@@ -434,28 +434,6 @@
 #define MAX_IOPAD_LATCH_TIME			100
 # ifndef __ASSEMBLER__
 
-#include <linux/delay.h>
-
-/**
- * omap_test_timeout - busy-loop, testing a condition
- * @cond: condition to test until it evaluates to true
- * @timeout: maximum number of microseconds in the timeout
- * @index: loop index (integer)
- *
- * Loop waiting for @cond to become true or until at least @timeout
- * microseconds have passed.  To use, define some integer @index in the
- * calling code.  After running, if @index == @timeout, then the loop has
- * timed out.
- */
-#define omap_test_timeout(cond, timeout, index)			\
-({								\
-	for (index = 0; index < timeout; index++) {		\
-		if (cond)					\
-			break;					\
-		udelay(1);					\
-	}							\
-})
-
 /**
  * struct omap_prcm_irq - describes a PRCM interrupt bit
  * @name: a short name describing the interrupt type, e.g. "wkup" or "io"
arch/arm/mach-omap2/prm2xxx_3xxx.c +1 -0
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "prm-regbits-24xx.h"
arch/arm/mach-omap2/prm33xx.c +1 -0
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm33xx.h"
 #include "prm-regbits-33xx.h"
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

+ Tero,

Quoted 1 line · Tony Lindgren

We have the same defined already in common.h.

This is reverting what has been introduced in this[1] series. Probably Tero can comment more here.

[1] http://www.mail-archive.com/linux-omap at vger.kernel.org/msg102131.html

Thanks and regards,
Lokesh

Quoted 123 lines
---
 arch/arm/mach-omap2/cm2xxx.c                |  1 +
 arch/arm/mach-omap2/cm33xx.c                |  1 +
 arch/arm/mach-omap2/cm3xxx.c                |  1 +
 arch/arm/mach-omap2/cminst44xx.c            |  1 +
 arch/arm/mach-omap2/powerdomains3xxx_data.c |  1 +
 arch/arm/mach-omap2/prcm-common.h           | 22 ----------------------
 arch/arm/mach-omap2/prm2xxx_3xxx.c          |  1 +
 arch/arm/mach-omap2/prm33xx.c               |  1 +
 8 files changed, 7 insertions(+), 22 deletions(-)
arch/arm/mach-omap2/cm2xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx.h"
 #include "cm.h"
 #include "cm2xxx.h"
arch/arm/mach-omap2/cm33xx.c +1 -0
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm33xx.h"
arch/arm/mach-omap2/cm3xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx_3xxx.h"
 #include "cm.h"
 #include "cm3xxx.h"
arch/arm/mach-omap2/cminst44xx.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm1_44xx.h"
arch/arm/mach-omap2/powerdomains3xxx_data.c +1 -0
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include "soc.h"
 #include "powerdomain.h"
arch/arm/mach-omap2/prcm-common.h +0 -22
@@ -434,28 +434,6 @@
 #define MAX_IOPAD_LATCH_TIME			100
 # ifndef __ASSEMBLER__
 
-#include <linux/delay.h>
-
-/**
- * omap_test_timeout - busy-loop, testing a condition
- * @cond: condition to test until it evaluates to true
- * @timeout: maximum number of microseconds in the timeout
- * @index: loop index (integer)
- *
- * Loop waiting for @cond to become true or until at least @timeout
- * microseconds have passed.  To use, define some integer @index in the
- * calling code.  After running, if @index == @timeout, then the loop has
- * timed out.
- */
-#define omap_test_timeout(cond, timeout, index)			\
-({								\
-	for (index = 0; index < timeout; index++) {		\
-		if (cond)					\
-			break;					\
-		udelay(1);					\
-	}							\
-})
-
 /**
  * struct omap_prcm_irq - describes a PRCM interrupt bit
  * @name: a short name describing the interrupt type, e.g. "wkup" or "io"
arch/arm/mach-omap2/prm2xxx_3xxx.c +1 -0
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "prm-regbits-24xx.h"
arch/arm/mach-omap2/prm33xx.c +1 -0
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm33xx.h"
 #include "prm-regbits-33xx.h"
#2 lore raw

PATCH 1/1 ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

Quoted 8 lines · Lokesh Vutla

+ Tero,

Quoted 1 line · Tony Lindgren

We have the same defined already in common.h.

This is reverting what has been introduced in this[1] series. Probably Tero can comment more here.

Yeah, the point of introducing that was to get rid of common.h include from the prcm files. See commit 250e27ee950bf67ceeb812eb4c8f2fea58d3e2b6.

-Tero

Quoted 129 lines

[1] http://www.mail-archive.com/linux-omap at vger.kernel.org/msg102131.html

Thanks and regards,
Lokesh

Quoted 123 lines
---
 arch/arm/mach-omap2/cm2xxx.c                |  1 +
 arch/arm/mach-omap2/cm33xx.c                |  1 +
 arch/arm/mach-omap2/cm3xxx.c                |  1 +
 arch/arm/mach-omap2/cminst44xx.c            |  1 +
 arch/arm/mach-omap2/powerdomains3xxx_data.c |  1 +
 arch/arm/mach-omap2/prcm-common.h           | 22 ----------------------
 arch/arm/mach-omap2/prm2xxx_3xxx.c          |  1 +
 arch/arm/mach-omap2/prm33xx.c               |  1 +
 8 files changed, 7 insertions(+), 22 deletions(-)
arch/arm/mach-omap2/cm2xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx.h"
 #include "cm.h"
 #include "cm2xxx.h"
arch/arm/mach-omap2/cm33xx.c +1 -0
@@ -22,6 +22,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm33xx.h"
arch/arm/mach-omap2/cm3xxx.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "prm2xxx_3xxx.h"
 #include "cm.h"
 #include "cm3xxx.h"
arch/arm/mach-omap2/cminst44xx.c +1 -0
@@ -21,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "clockdomain.h"
 #include "cm.h"
 #include "cm1_44xx.h"
arch/arm/mach-omap2/powerdomains3xxx_data.c +1 -0
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/bug.h>
+#include <linux/delay.h>
 
 #include "soc.h"
 #include "powerdomain.h"
arch/arm/mach-omap2/prcm-common.h +0 -22
@@ -434,28 +434,6 @@
 #define MAX_IOPAD_LATCH_TIME			100
 # ifndef __ASSEMBLER__
 
-#include <linux/delay.h>
-
-/**
- * omap_test_timeout - busy-loop, testing a condition
- * @cond: condition to test until it evaluates to true
- * @timeout: maximum number of microseconds in the timeout
- * @index: loop index (integer)
- *
- * Loop waiting for @cond to become true or until at least @timeout
- * microseconds have passed.  To use, define some integer @index in the
- * calling code.  After running, if @index == @timeout, then the loop has
- * timed out.
- */
-#define omap_test_timeout(cond, timeout, index)			\
-({								\
-	for (index = 0; index < timeout; index++) {		\
-		if (cond)					\
-			break;					\
-		udelay(1);					\
-	}							\
-})
-
 /**
  * struct omap_prcm_irq - describes a PRCM interrupt bit
  * @name: a short name describing the interrupt type, e.g. "wkup" or "io"
arch/arm/mach-omap2/prm2xxx_3xxx.c +1 -0
@@ -16,6 +16,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm2xxx_3xxx.h"
 #include "prm-regbits-24xx.h"
arch/arm/mach-omap2/prm33xx.c +1 -0
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/io.h>
 
+#include "common.h"
 #include "powerdomain.h"
 #include "prm33xx.h"
 #include "prm-regbits-33xx.h"
author maintainer
#3 lore raw

PATCH 1/1 ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

Quoted 4 lines · Tero Kristo
Quoted 3 lines · Lokesh Vutla

+ Tero,

On Saturday 21 January 2017 12:21 AM, Tony Lindgren wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

We have the same defined already in common.h.

This is reverting what has been introduced in this[1] series. Probably Tero can comment more here.

Yeah, the point of introducing that was to get rid of common.h include from the prcm files. See commit 250e27ee950bf67ceeb812eb4c8f2fea58d3e2b6.

OK let's forget it for now then.

Regards,

Tony

#4 lore raw

PATCH 1/1 ARM: OMAP2+: Remove duplicate definition of omap_test_timeout

Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Tero Kristo
Quoted 6 lines · Lokesh Vutla

+ Tero,

Quoted 1 line · Tony Lindgren

We have the same defined already in common.h.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

This is reverting what has been introduced in this[1] series. Probably Tero can comment more here.

Yeah, the point of introducing that was to get rid of common.h include from the prcm files. See commit 250e27ee950bf67ceeb812eb4c8f2fea58d3e2b6.

OK let's forget it for now then.

This work has been delayed by a great deal due to pending hwmod transition though....

Part of this may happen with the introduction of the genpd usage for clkdms/pwrdms actually.

-Tero