Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191875
b: refs/heads/master
c: b1d9bf1
h: refs/heads/master
i:
  191873: f07d16c
  191871: e8a77f4
v: v3
  • Loading branch information
Eric Miao committed May 11, 2010
1 parent 865cb9a commit 467c3da
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 408 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25646d70a0d386ab923a189f9790aeae3eb4f1b5
refs/heads/master: b1d9bf1d9836dcee235f49bb4eb5ba4450a3a678
31 changes: 0 additions & 31 deletions trunk/arch/arm/mach-pxa/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <mach/reset.h>
#include <mach/gpio.h>
#include <mach/pxa2xx-gpio.h>

#include "generic.h"

Expand Down Expand Up @@ -128,33 +127,3 @@ void __init pxa_map_io(void)
iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
get_clk_frequency_khz(1);
}

/*
* Configure pins for GPIO or other functions
*/
int pxa_gpio_mode(int gpio_mode)
{
unsigned long flags;
int gpio = gpio_mode & GPIO_MD_MASK_NR;
int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
int gafr;

if (gpio > pxa_last_gpio)
return -EINVAL;

local_irq_save(flags);
if (gpio_mode & GPIO_DFLT_LOW)
GPCR(gpio) = GPIO_bit(gpio);
else if (gpio_mode & GPIO_DFLT_HIGH)
GPSR(gpio) = GPIO_bit(gpio);
if (gpio_mode & GPIO_MD_MASK_DIR)
GPDR(gpio) |= GPIO_bit(gpio);
else
GPDR(gpio) &= ~GPIO_bit(gpio);
gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
local_irq_restore(flags);

return 0;
}
EXPORT_SYMBOL(pxa_gpio_mode);
Loading

0 comments on commit 467c3da

Please sign in to comment.