ppc4xx: Fix 460EX errata with CPU lockup upon high AHB traffic
[oweals/u-boot.git] / cpu / ppc4xx / gpio.c
index 37d3fa8ef74652e7477be0600cde41e4d12a6257..df99f5314b5772d39e1fe71747ac712a15fb3053 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007
+ * (C) Copyright 2007-2008
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -52,7 +52,7 @@ void gpio_config(int pin, int in_out, int gpio_alt, int out_val)
        }
 
        mask = 0x80000000 >> pin;
-       mask2 = 0xc0000000 >> (pin2 << 1);
+       mask2 = 0xc0000000 >> pin2;
 
        /* first set TCR to 0 */
        out_be32((void *)GPIO0_TCR + offs, in_be32((void *)GPIO0_TCR + offs) & ~mask);