From: Mike Frysinger Date: Wed, 2 Jun 2010 10:19:19 +0000 (-0400) Subject: Blackfin: blackstamp: convert eth/flash swap logic to gpio framework X-Git-Tag: v2010.09-rc1~82^2~3^2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7d44f5ec9e3a71f54048a1d8c9831e1f9f4ad8ef;p=u-boot 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 --- diff --git a/board/blackstamp/blackstamp.c b/board/blackstamp/blackstamp.c index 6355c10959..06d004a39e 100644 --- a/board/blackstamp/blackstamp.c +++ b/board/blackstamp/blackstamp.c @@ -13,7 +13,7 @@ #include #include -#include +#include 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