Commit 84543901 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Kukjin Kim

ARM: S5PV210: Add more GPIO banks to gpiolib

This patch adds support for MP04 and MP05 gpio banks.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
[kgene.kim@samsung.com: minor title fix]
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 9fe6206f
...@@ -206,6 +206,20 @@ static struct s3c_gpio_chip s5pv210_gpio_4bit[] = { ...@@ -206,6 +206,20 @@ static struct s3c_gpio_chip s5pv210_gpio_4bit[] = {
.ngpio = S5PV210_GPIO_MP03_NR, .ngpio = S5PV210_GPIO_MP03_NR,
.label = "MP03", .label = "MP03",
}, },
}, {
.config = &gpio_cfg_noint,
.chip = {
.base = S5PV210_MP04(0),
.ngpio = S5PV210_GPIO_MP04_NR,
.label = "MP04",
},
}, {
.config = &gpio_cfg_noint,
.chip = {
.base = S5PV210_MP05(0),
.ngpio = S5PV210_GPIO_MP05_NR,
.label = "MP05",
},
}, { }, {
.base = (S5P_VA_GPIO + 0xC00), .base = (S5P_VA_GPIO + 0xC00),
.config = &gpio_cfg_noint, .config = &gpio_cfg_noint,
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#define S5PV210_GPIO_MP01_NR (8) #define S5PV210_GPIO_MP01_NR (8)
#define S5PV210_GPIO_MP02_NR (4) #define S5PV210_GPIO_MP02_NR (4)
#define S5PV210_GPIO_MP03_NR (8) #define S5PV210_GPIO_MP03_NR (8)
#define S5PV210_GPIO_MP04_NR (8)
#define S5PV210_GPIO_MP05_NR (8)
/* GPIO bank numbers */ /* GPIO bank numbers */
...@@ -94,6 +96,8 @@ enum s5p_gpio_number { ...@@ -94,6 +96,8 @@ enum s5p_gpio_number {
S5PV210_GPIO_MP01_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J4), S5PV210_GPIO_MP01_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J4),
S5PV210_GPIO_MP02_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP01), S5PV210_GPIO_MP02_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP01),
S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02), S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02),
S5PV210_GPIO_MP04_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP03),
S5PV210_GPIO_MP05_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP04),
}; };
/* S5PV210 GPIO number definitions */ /* S5PV210 GPIO number definitions */
...@@ -127,13 +131,15 @@ enum s5p_gpio_number { ...@@ -127,13 +131,15 @@ enum s5p_gpio_number {
#define S5PV210_MP01(_nr) (S5PV210_GPIO_MP01_START + (_nr)) #define S5PV210_MP01(_nr) (S5PV210_GPIO_MP01_START + (_nr))
#define S5PV210_MP02(_nr) (S5PV210_GPIO_MP02_START + (_nr)) #define S5PV210_MP02(_nr) (S5PV210_GPIO_MP02_START + (_nr))
#define S5PV210_MP03(_nr) (S5PV210_GPIO_MP03_START + (_nr)) #define S5PV210_MP03(_nr) (S5PV210_GPIO_MP03_START + (_nr))
#define S5PV210_MP04(_nr) (S5PV210_GPIO_MP04_START + (_nr))
#define S5PV210_MP05(_nr) (S5PV210_GPIO_MP05_START + (_nr))
/* the end of the S5PV210 specific gpios */ /* the end of the S5PV210 specific gpios */
#define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1) #define S5PV210_GPIO_END (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + 1)
#define S3C_GPIO_END S5PV210_GPIO_END #define S3C_GPIO_END S5PV210_GPIO_END
/* define the number of gpios we need to the one after the MP03() range */ /* define the number of gpios we need to the one after the MP05() range */
#define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + \ #define ARCH_NR_GPIOS (S5PV210_MP05(S5PV210_GPIO_MP05_NR) + \
CONFIG_SAMSUNG_GPIO_EXTRA + 1) CONFIG_SAMSUNG_GPIO_EXTRA + 1)
#include <asm-generic/gpio.h> #include <asm-generic/gpio.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment