diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-03-28 11:24:09 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 10:59:42 +0200 |
commit | 7ad8c791b913fa602dcfeb597d566daa71dff7f9 (patch) | |
tree | a606e550e7e51028d0a50408537064b082cc2877 /arch/arm/include | |
parent | d406ed2f763ea85223c38b33a0de4376b999b100 (diff) |
ARM: Translate delay.S into (mostly) C
We want to allow machines to override the __delay() implementation
at runtime so they can use a timer based __delay() routine. It's
easier to do this using C, so let's write udelay and friends in C.
We lose the #if 0 code, which according to Russell is used "to
make the delay loop more stable and predictable on older CPUs"
(see http://article.gmane.org/gmane.linux.kernel/888867 for more
info). We shouldn't be too worried though, since we'll soon add
functionality allowing a machine to set the __delay() loop
themselves, thus allowing machines to resurrect the commented out
code should they need it.
Nico expressed concern that fixed lpj cmdlines will break due to
compiler optimizations. That doesn't seem to be the case since
before and after this patch I get the same lpj value when running
my CPU at 19.2 MHz. That should be sufficiently slow enough to
cover any machine running Linux.
Reviewed-by: Saravana Kannan <skannan@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Change-Id: I84311dc3955250960ffa8dc56d45a4833b3ad0f2
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13562
Tested-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Conflicts:
arch/arm/lib/delay.S
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/delay.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h index b2deda18154..ccc5ed573fa 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h @@ -8,7 +8,7 @@ #include <asm/param.h> /* HZ */ -extern void __delay(int loops); +extern void __delay(unsigned long loops); /* * This function intentionally does not exist; if you see references to |