]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] iop: fix iop_getttimeoffset
authorDan Williams <dan.j.williams@intel.com>
Wed, 2 May 2007 18:43:14 +0000 (11:43 -0700)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:42 +0000 (14:32 -0700)
Fix a typo which causes a necessary cpwait to be missed on iop3xx, Michael
Brunner <mibru@gmx.de>

Save a register in the assembly routine, rmk

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/arm/plat-iop/time.c

index 16300adfb4de2af53a30ccf0ecf79aa9cbde3260..0cc26da034a12458e515429f8ce75d71eba4bca5 100644 (file)
@@ -32,22 +32,22 @@ static unsigned long next_jiffy_time;
 
 unsigned long iop_gettimeoffset(void)
 {
-       unsigned long offset, temp1, temp2;
+       unsigned long offset, temp;
 
        /* enable cp6, if necessary, to avoid taking the overhead of an
         * undefined instruction trap
         */
        asm volatile (
        "mrc    p15, 0, %0, c15, c1, 0\n\t"
-       "ands   %1, %0, #(1 << 6)\n\t"
+       "tst    %0, #(1 << 6)\n\t"
        "orreq  %0, %0, #(1 << 6)\n\t"
        "mcreq  p15, 0, %0, c15, c1, 0\n\t"
-#ifdef CONFIG_XSCALE
+#ifdef CONFIG_CPU_XSCALE
        "mrceq  p15, 0, %0, c15, c1, 0\n\t"
        "moveq  %0, %0\n\t"
        "subeq  pc, pc, #4\n\t"
 #endif
-       : "=r"(temp1), "=r"(temp2) : : "cc");
+       : "=r"(temp) : : "cc");
 
        offset = next_jiffy_time - read_tcr1();