~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c2410/include/mach/gpio-fns.h

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* arch/arm/mach-s3c2410/include/mach/gpio-fns.h
2
 
 *
3
 
 * Copyright (c) 2003-2009 Simtec Electronics
4
 
 *      Ben Dooks <ben@simtec.co.uk>
5
 
 *
6
 
 * S3C2410 - hardware
7
 
 *
8
 
 * This program is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License version 2 as
10
 
 * published by the Free Software Foundation.
11
 
*/
12
 
 
13
 
#ifndef __MACH_GPIO_FNS_H
14
 
#define __MACH_GPIO_FNS_H __FILE__
15
 
 
16
 
/* These functions are in the to-be-removed category and it is strongly
17
 
 * encouraged not to use these in new code. They will be marked deprecated
18
 
 * very soon.
19
 
 *
20
 
 * Most of the functionality can be either replaced by the gpiocfg calls
21
 
 * for the s3c platform or by the generic GPIOlib API.
22
 
 *
23
 
 * As of 2.6.35-rc, these will be removed, with the few drivers using them
24
 
 * either replaced or given a wrapper until the calls can be removed.
25
 
*/
26
 
 
27
 
#include <plat/gpio-cfg.h>
28
 
 
29
 
static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg)
30
 
{
31
 
        /* 1:1 mapping between cfgpin and setcfg calls at the moment */
32
 
        s3c_gpio_cfgpin(pin, cfg);
33
 
}
34
 
 
35
 
/* external functions for GPIO support
36
 
 *
37
 
 * These allow various different clients to access the same GPIO
38
 
 * registers without conflicting. If your driver only owns the entire
39
 
 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
40
 
*/
41
 
 
42
 
extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
43
 
 
44
 
/* s3c2410_gpio_getirq
45
 
 *
46
 
 * turn the given pin number into the corresponding IRQ number
47
 
 *
48
 
 * returns:
49
 
 *      < 0 = no interrupt for this pin
50
 
 *      >=0 = interrupt number for the pin
51
 
*/
52
 
 
53
 
extern int s3c2410_gpio_getirq(unsigned int pin);
54
 
 
55
 
#ifdef CONFIG_CPU_S3C2400
56
 
 
57
 
extern int s3c2400_gpio_getirq(unsigned int pin);
58
 
 
59
 
#endif /* CONFIG_CPU_S3C2400 */
60
 
 
61
 
/* s3c2410_gpio_irqfilter
62
 
 *
63
 
 * set the irq filtering on the given pin
64
 
 *
65
 
 * on = 0 => disable filtering
66
 
 *      1 => enable filtering
67
 
 *
68
 
 * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
69
 
 *          width of filter (0 through 63)
70
 
 *
71
 
 *
72
 
*/
73
 
 
74
 
extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
75
 
                                  unsigned int config);
76
 
 
77
 
/* s3c2410_gpio_pullup
78
 
 *
79
 
 * This call should be replaced with s3c_gpio_setpull().
80
 
 *
81
 
 * As a note, there is currently no distinction between pull-up and pull-down
82
 
 * in the s3c24xx series devices with only an on/off configuration.
83
 
 */
84
 
 
85
 
/* s3c2410_gpio_pullup
86
 
 *
87
 
 * configure the pull-up control on the given pin
88
 
 *
89
 
 * to = 1 => disable the pull-up
90
 
 *      0 => enable the pull-up
91
 
 *
92
 
 * eg;
93
 
 *
94
 
 *   s3c2410_gpio_pullup(S3C2410_GPB(0), 0);
95
 
 *   s3c2410_gpio_pullup(S3C2410_GPE(8), 0);
96
 
*/
97
 
 
98
 
extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
99
 
 
100
 
extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
101
 
 
102
 
extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
103
 
 
104
 
#endif /* __MACH_GPIO_FNS_H */
 
1
#include <plat/gpio-fns.h>