-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 123935 b: refs/heads/master c: 4c21343 h: refs/heads/master i: 123933: d0179ef 123931: 5100c7b 123927: f5cbcc0 123919: 44c2ded 123903: 85b7539 v: v3
- Loading branch information
Lennert Buytenhek
authored and
Nicolas Pitre
committed
Dec 20, 2008
1 parent
188b9d7
commit 46fd902
Showing
6 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 07332318f33da6acd88abb762a8b6febdfc560a3 | ||
refs/heads/master: 4c21343005b6b0d6ef24ab6e6a8f3883ff0cb569 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* arch/asm-arm/mach-kirkwood/include/mach/gpio.h | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#ifndef __ASM_ARCH_GPIO_H | ||
#define __ASM_ARCH_GPIO_H | ||
|
||
#include <mach/irqs.h> | ||
#include <plat/gpio.h> | ||
#include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
|
||
#define GPIO_MAX 50 | ||
#define GPIO_OFF(pin) (((pin) >> 5) ? 0x0140 : 0x0100) | ||
#define GPIO_OUT(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x00) | ||
#define GPIO_IO_CONF(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x04) | ||
#define GPIO_BLINK_EN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x08) | ||
#define GPIO_IN_POL(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x0c) | ||
#define GPIO_DATA_IN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x10) | ||
#define GPIO_EDGE_CAUSE(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x14) | ||
#define GPIO_EDGE_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x18) | ||
#define GPIO_LEVEL_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x1c) | ||
|
||
static inline int gpio_to_irq(int pin) | ||
{ | ||
return pin + IRQ_KIRKWOOD_GPIO_START; | ||
} | ||
|
||
static inline int irq_to_gpio(int irq) | ||
{ | ||
return irq - IRQ_KIRKWOOD_GPIO_START; | ||
} | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,4 @@ | |
#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) | ||
|
||
|
||
#define GPIO_MAX 50 | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters