summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-06-02 06:19:19 -0400
committerMike Frysinger <vapier@gentoo.org>2010-07-13 17:50:50 -0400
commit7d44f5ec9e3a71f54048a1d8c9831e1f9f4ad8ef (patch)
tree855262b51439a444f15de612cde99e18adf04116
parent6cfcf5840b2fe00ed0088f0e1fa75590c3cd0dbc (diff)
downloadu-boot-imx-7d44f5ec9e3a71f54048a1d8c9831e1f9f4ad8ef.zip
u-boot-imx-7d44f5ec9e3a71f54048a1d8c9831e1f9f4ad8ef.tar.gz
u-boot-imx-7d44f5ec9e3a71f54048a1d8c9831e1f9f4ad8ef.tar.bz2
Blackfin: blackstamp: convert eth/flash swap logic to gpio framework
Rather than bang MMRs directly, use the new portmux framework to handle the details. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--board/blackstamp/blackstamp.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/board/blackstamp/blackstamp.c b/board/blackstamp/blackstamp.c
index 6355c10..06d004a 100644
--- a/board/blackstamp/blackstamp.c
+++ b/board/blackstamp/blackstamp.c
@@ -13,7 +13,7 @@
#include <common.h>
#include <netdev.h>
-#include <asm/io.h>
+#include <asm/gpio.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -27,14 +27,8 @@ int checkboard(void)
#ifdef SHARED_RESOURCES
void swap_to(int device_id)
{
- bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
- SSYNC();
- if (device_id == ETHERNET)
- bfin_write_FIO_FLAG_S(PF0);
- else if (device_id == FLASH)
- bfin_write_FIO_FLAG_C(PF0);
- else
- printf("Unknown device to switch\n");
+ gpio_request(GPIO_PF0, "eth_flash_swap");
+ gpio_direction_output(GPIO_PF0, device_id == ETHERNET);
SSYNC();
}
#endif