X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fcbus%2Fcbus.c;h=de3440944a942fb59504a01726ee9e38ed6ba324;hb=7270f33b7b0139f40fcfbf771dc5ec5a773a71cd;hp=eff38be50880e9c8a3e2ee28aec88ce7c4730cd0;hpb=496acbbfe6344bf7a61b6dd6b9249ec0ca06b568;p=linux-2.6-omap-h63xx.git diff --git a/drivers/cbus/cbus.c b/drivers/cbus/cbus.c index eff38be5088..de3440944a9 100644 --- a/drivers/cbus/cbus.c +++ b/drivers/cbus/cbus.c @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include @@ -102,28 +102,28 @@ static u8 cbus_receive_bit(struct cbus_host *host, u32 base) #else #define cbus_set_gpio_direction(base, gpio, is_input) omap_set_gpio_direction(gpio, is_input) -#define cbus_set_gpio_dataout(base, gpio, enable) omap_set_gpio_dataout(gpio, enable) -#define cbus_get_gpio_datain(base, int, gpio) omap_get_gpio_datain(gpio) +#define cbus_set_gpio_dataout(base, gpio, enable) gpio_set_value(gpio, enable) +#define cbus_get_gpio_datain(base, int, gpio) gpio_get_value(gpio) static void _cbus_send_bit(struct cbus_host *host, int bit, int set_to_input) { - omap_set_gpio_dataout(host->dat_gpio, bit ? 1 : 0); - omap_set_gpio_dataout(host->clk_gpio, 1); + gpio_set_value(host->dat_gpio, bit ? 1 : 0); + gpio_set_value(host->clk_gpio, 1); /* The data bit is read on the rising edge of CLK */ if (set_to_input) omap_set_gpio_direction(host->dat_gpio, 1); - omap_set_gpio_dataout(host->clk_gpio, 0); + gpio_set_value(host->clk_gpio, 0); } static u8 _cbus_receive_bit(struct cbus_host *host) { u8 ret; - omap_set_gpio_dataout(host->clk_gpio, 1); - ret = omap_get_gpio_datain(host->dat_gpio); - omap_set_gpio_dataout(host->clk_gpio, 0); + gpio_set_value(host->clk_gpio, 1); + ret = gpio_get_value(host->dat_gpio); + gpio_set_value(host->clk_gpio, 0); return ret; } @@ -141,7 +141,7 @@ static int cbus_transfer(struct cbus_host *host, int dev, int reg, int data) u32 base; #ifdef CONFIG_ARCH_OMAP1 - base = (u32) io_p2v(OMAP_MPUIO_BASE); + base = OMAP1_IO_ADDRESS(OMAP_MPUIO_BASE); #else base = 0; #endif @@ -260,15 +260,15 @@ int __init cbus_bus_init(void) if ((ret = omap_request_gpio(chost->sel_gpio)) < 0) goto exit3; - omap_set_gpio_dataout(chost->clk_gpio, 0); - omap_set_gpio_dataout(chost->sel_gpio, 1); + gpio_set_value(chost->clk_gpio, 0); + gpio_set_value(chost->sel_gpio, 1); omap_set_gpio_direction(chost->clk_gpio, 0); omap_set_gpio_direction(chost->dat_gpio, 1); omap_set_gpio_direction(chost->sel_gpio, 0); - omap_set_gpio_dataout(chost->clk_gpio, 1); - omap_set_gpio_dataout(chost->clk_gpio, 0); + gpio_set_value(chost->clk_gpio, 1); + gpio_set_value(chost->clk_gpio, 0); cbus_host = chost;