Skip to content
Snippets Groups Projects
Commit 68409f84 authored by Peter Meerwald's avatar Peter Meerwald Committed by Mike Frysinger
Browse files

Blackfin: support a 3rd gpio cfi pin

parent 17296158
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,12 @@ ...@@ -22,7 +22,12 @@
#else #else
#define GPIO_MASK_2 (1 << 22) #define GPIO_MASK_2 (1 << 22)
#endif #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) void *gpio_cfi_flash_swizzle(void *vaddr)
{ {
...@@ -34,6 +39,10 @@ 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); gpio_set_value(GPIO_PIN_2, addr & GPIO_MASK_2);
#endif #endif
#ifdef GPIO_PIN_3
gpio_set_value(GPIO_PIN_3, addr & GPIO_MASK_3);
#endif
SSYNC(); SSYNC();
udelay(1); udelay(1);
...@@ -65,4 +74,8 @@ void gpio_cfi_flash_init(void) ...@@ -65,4 +74,8 @@ void gpio_cfi_flash_init(void)
gpio_request(GPIO_PIN_2, "gpio_cfi_flash"); gpio_request(GPIO_PIN_2, "gpio_cfi_flash");
gpio_direction_output(GPIO_PIN_2, 0); gpio_direction_output(GPIO_PIN_2, 0);
#endif #endif
#ifdef GPIO_PIN_3
gpio_request(GPIO_PIN_3, "gpio_cfi_flash");
gpio_direction_output(GPIO_PIN_3, 0);
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment