omap: gpio: Adapt board files to use generic API
This patch contains updates the sources in the board files
to use the generic API.
Signed-off-by: Sanjeev Premi <premi@ti.com>
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index e8360df..b17c0fb 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -34,7 +34,7 @@
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
#include <i2c.h>
#include <asm/mach-types.h>
#include "evm.h"
@@ -196,21 +196,21 @@
rst_gpio = OMAP3EVM_GPIO_ETH_RST_GEN2;
}
- ret = omap_request_gpio(rst_gpio);
+ ret = gpio_request(rst_gpio, "");
if (ret < 0) {
printf("Unable to get GPIO %d\n", rst_gpio);
return ;
}
/* Configure as output */
- omap_set_gpio_direction(rst_gpio, 0);
+ gpio_direction_output(rst_gpio, 0);
/* Send a pulse on the GPIO pin */
- omap_set_gpio_dataout(rst_gpio, 1);
+ gpio_set_value(rst_gpio, 1);
udelay(1);
- omap_set_gpio_dataout(rst_gpio, 0);
+ gpio_set_value(rst_gpio, 0);
udelay(1);
- omap_set_gpio_dataout(rst_gpio, 1);
+ gpio_set_value(rst_gpio, 1);
}
int board_eth_init(bd_t *bis)