diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-19 14:37:22 -0400 |
| commit | 1d3c6ff44ad4b5f113602e153026a338f0f9b3ff (patch) | |
| tree | 1e1f2932634fc6d0e4acfe68496c1c727b83a13e /arch/arm/mach-pxa/generic.c | |
| parent | 7c7cbaf5b82c418cd3b1dcf718f71d0e6057e639 (diff) | |
| parent | 717e7c2672e37253a4d3aa70e4716b5b0a658761 (diff) | |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (224 commits)
ARM: remove 'select GENERIC_TIME'
ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
ARM: 6074/1: oprofile: convert from sysdev to platform device
ARM: 6073/1: oprofile: remove old files and update KConfig
ARM: 6072/1: oprofile: use perf-events framework as backend
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
ARM: 6070/1: perf-events: add support for xscale PMUs
ARM: 6069/1: perf-events: use numeric ID to identify PMU
ARM: 6064/1: pmu: register IRQs at runtime
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
ARM: 6134/1: Handle instruction cache maintenance fault properly
ARM: nwfpe: allow debugging output to be configured at runtime
ARM: rename mach_cpu_disable() to platform_cpu_disable()
ARM: 6132/1: PL330: Add common core driver
ARM: 6094/1: Extend cache-l2x0 to support the 16-way PL310
ARM: Move memory mapping into mmu.c
ARM: Ensure meminfo is sorted prior to sanity_check_meminfo
ARM: Remove useless linux/bootmem.h includes
ARM: convert /proc/cpu/aligment to seq_file
arm: use asm-generic/scatterlist.h
...
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
| -rw-r--r-- | arch/arm/mach-pxa/generic.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 3126a35aa002..baabb3ce088e 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | #include <mach/reset.h> | 29 | #include <mach/reset.h> |
| 30 | #include <mach/gpio.h> | 30 | #include <mach/gpio.h> |
| 31 | #include <mach/pxa2xx-gpio.h> | ||
| 32 | 31 | ||
| 33 | #include "generic.h" | 32 | #include "generic.h" |
| 34 | 33 | ||
| @@ -128,33 +127,3 @@ void __init pxa_map_io(void) | |||
| 128 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | 127 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); |
| 129 | get_clk_frequency_khz(1); | 128 | get_clk_frequency_khz(1); |
| 130 | } | 129 | } |
| 131 | |||
| 132 | /* | ||
| 133 | * Configure pins for GPIO or other functions | ||
| 134 | */ | ||
| 135 | int pxa_gpio_mode(int gpio_mode) | ||
| 136 | { | ||
| 137 | unsigned long flags; | ||
| 138 | int gpio = gpio_mode & GPIO_MD_MASK_NR; | ||
| 139 | int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; | ||
| 140 | int gafr; | ||
| 141 | |||
| 142 | if (gpio > pxa_last_gpio) | ||
| 143 | return -EINVAL; | ||
| 144 | |||
| 145 | local_irq_save(flags); | ||
| 146 | if (gpio_mode & GPIO_DFLT_LOW) | ||
| 147 | GPCR(gpio) = GPIO_bit(gpio); | ||
| 148 | else if (gpio_mode & GPIO_DFLT_HIGH) | ||
| 149 | GPSR(gpio) = GPIO_bit(gpio); | ||
| 150 | if (gpio_mode & GPIO_MD_MASK_DIR) | ||
| 151 | GPDR(gpio) |= GPIO_bit(gpio); | ||
| 152 | else | ||
| 153 | GPDR(gpio) &= ~GPIO_bit(gpio); | ||
| 154 | gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); | ||
| 155 | GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); | ||
| 156 | local_irq_restore(flags); | ||
| 157 | |||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | EXPORT_SYMBOL(pxa_gpio_mode); | ||
