summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2010-09-17 13:02:42 -0400
committerMike Frysinger <vapier@gentoo.org>2010-10-02 16:00:39 -0400
commit68409f844fd06dc696d206e7c12d2296cffd7416 (patch)
treec59106e50f47886130fbd406a1c1314a090a4e64
parent1729615875d5d443ef68154f7fff6af065301e59 (diff)
downloadu-boot-imx-68409f844fd06dc696d206e7c12d2296cffd7416.zip
u-boot-imx-68409f844fd06dc696d206e7c12d2296cffd7416.tar.gz
u-boot-imx-68409f844fd06dc696d206e7c12d2296cffd7416.tar.bz2
Blackfin: support a 3rd gpio cfi pin
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--board/cm-bf537e/gpio_cfi_flash.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/board/cm-bf537e/gpio_cfi_flash.c b/board/cm-bf537e/gpio_cfi_flash.c
index ab6af81..1075cc4 100644
--- a/board/cm-bf537e/gpio_cfi_flash.c
+++ b/board/cm-bf537e/gpio_cfi_flash.c
@@ -22,7 +22,12 @@
#else
#define GPIO_MASK_2 (1 << 22)
#endif
-#define GPIO_MASK (GPIO_MASK_1 | GPIO_MASK_2)
+#ifndef GPIO_PIN_3
+#define GPIO_MASK_3 (0)
+#else
+#define GPIO_MASK_3 (1 << 23)
+#endif
+#define GPIO_MASK (GPIO_MASK_1 | GPIO_MASK_2 | GPIO_MASK_3)
void *gpio_cfi_flash_swizzle(void *vaddr)
{
@@ -34,6 +39,10 @@ void *gpio_cfi_flash_swizzle(void *vaddr)
gpio_set_value(GPIO_PIN_2, addr & GPIO_MASK_2);
#endif
+#ifdef GPIO_PIN_3
+ gpio_set_value(GPIO_PIN_3, addr & GPIO_MASK_3);
+#endif
+
SSYNC();
udelay(1);
@@ -65,4 +74,8 @@ void gpio_cfi_flash_init(void)
gpio_request(GPIO_PIN_2, "gpio_cfi_flash");
gpio_direction_output(GPIO_PIN_2, 0);
#endif
+#ifdef GPIO_PIN_3
+ gpio_request(GPIO_PIN_3, "gpio_cfi_flash");
+ gpio_direction_output(GPIO_PIN_3, 0);
+#endif
}