Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172518
b: refs/heads/master
c: 91e7d96
h: refs/heads/master
v: v3
  • Loading branch information
Kyungmin Park authored and Ben Dooks committed Dec 1, 2009
1 parent 58638d6 commit f1678b4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 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: ff916f25b2890403a9e6c02c98391daeb71ae92a
refs/heads/master: 91e7d96e1f1781165a7df97e0dee1d007d3918f8
30 changes: 23 additions & 7 deletions trunk/arch/arm/mach-s5pc100/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
#define S5PC1XX_GPIO_K1_NR (6)
#define S5PC1XX_GPIO_K2_NR (8)
#define S5PC1XX_GPIO_K3_NR (8)
#define S5PC1XX_GPIO_L0_NR (8)
#define S5PC1XX_GPIO_L1_NR (8)
#define S5PC1XX_GPIO_L2_NR (8)
#define S5PC1XX_GPIO_L3_NR (8)
#define S5PC1XX_GPIO_L4_NR (8)
#define S5PC1XX_GPIO_MP00_NR (8)
#define S5PC1XX_GPIO_MP01_NR (8)
#define S5PC1XX_GPIO_MP02_NR (8)
Expand All @@ -64,9 +69,9 @@
((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)

enum s3c_gpio_number {
S5PC1XX_GPIO_A0_START = 0,
S5PC1XX_GPIO_A1_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_A0),
S5PC1XX_GPIO_B_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_A1),
S5PC1XX_GPIO_A0_START = 0,
S5PC1XX_GPIO_A1_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_A0),
S5PC1XX_GPIO_B_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_A1),
S5PC1XX_GPIO_C_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_B),
S5PC1XX_GPIO_D_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_C),
S5PC1XX_GPIO_E0_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_D),
Expand All @@ -93,11 +98,17 @@ enum s3c_gpio_number {
S5PC1XX_GPIO_K1_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_K0),
S5PC1XX_GPIO_K2_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_K1),
S5PC1XX_GPIO_K3_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_K2),
S5PC1XX_GPIO_MP00_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_K3),
S5PC1XX_GPIO_L0_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_K3),
S5PC1XX_GPIO_L1_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_L0),
S5PC1XX_GPIO_L2_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_L1),
S5PC1XX_GPIO_L3_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_L2),
S5PC1XX_GPIO_L4_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_L3),
S5PC1XX_GPIO_MP00_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_L4),
S5PC1XX_GPIO_MP01_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP00),
S5PC1XX_GPIO_MP02_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP01),
S5PC1XX_GPIO_MP03_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP02),
S5PC1XX_GPIO_MP04_START = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP03),
S5PC1XX_GPIO_END = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP04),
};

/* S5PC1XX GPIO number definitions. */
Expand Down Expand Up @@ -130,17 +141,22 @@ enum s3c_gpio_number {
#define S5PC1XX_GPK1(_nr) (S5PC1XX_GPIO_K1_START + (_nr))
#define S5PC1XX_GPK2(_nr) (S5PC1XX_GPIO_K2_START + (_nr))
#define S5PC1XX_GPK3(_nr) (S5PC1XX_GPIO_K3_START + (_nr))
#define S5PC1XX_GPL0(_nr) (S5PC1XX_GPIO_L0_START + (_nr))
#define S5PC1XX_GPL1(_nr) (S5PC1XX_GPIO_L1_START + (_nr))
#define S5PC1XX_GPL2(_nr) (S5PC1XX_GPIO_L2_START + (_nr))
#define S5PC1XX_GPL3(_nr) (S5PC1XX_GPIO_L3_START + (_nr))
#define S5PC1XX_GPL4(_nr) (S5PC1XX_GPIO_L4_START + (_nr))
#define S5PC1XX_MP00(_nr) (S5PC1XX_GPIO_MP00_START + (_nr))
#define S5PC1XX_MP01(_nr) (S5PC1XX_GPIO_MP01_START + (_nr))
#define S5PC1XX_MP02(_nr) (S5PC1XX_GPIO_MP02_START + (_nr))
#define S5PC1XX_MP03(_nr) (S5PC1XX_GPIO_MP03_START + (_nr))
#define S5PC1XX_MP04(_nr) (S5PC1XX_GPIO_MP04_START + (_nr))
#define S5PC1XX_MP05(_nr) (S5PC1XX_GPIO_MP05_START + (_nr))

/* the end of the S5PC1XX specific gpios */
#define S5PC1XX_GPIO_END (S5PC1XX_MP04(S5PC1XX_GPIO_MP04_NR) + 1)
/* It used the end of the S5PC1XX gpios */
#define S3C_GPIO_END S5PC1XX_GPIO_END

/* define the number of gpios we need to the one after the MP04() range */
#define ARCH_NR_GPIOS (S5PC1XX_MP04(S5PC1XX_GPIO_MP04_NR) + 1)
#define ARCH_NR_GPIOS (S5PC1XX_GPIO_END + 1)

#include <asm-generic/gpio.h>

0 comments on commit f1678b4

Please sign in to comment.