diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-07-27 19:59:19 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-27 19:59:19 +0400 |
commit | 800f65bba8d2030b3fef62850e203f9f176625a8 (patch) | |
tree | 6507c4fe7a0826c253b4afb29375ab306a0fd9c8 /arch/arm/mach-s5p6440/gpio.c | |
parent | 06b3cda0c12986f5bba578b918b188d731c4e191 (diff) | |
parent | b3190df628617c7a4f188a9465aeabe1f5761933 (diff) | |
download | linux-800f65bba8d2030b3fef62850e203f9f176625a8.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-commands.h
Diffstat (limited to 'arch/arm/mach-s5p6440/gpio.c')
-rw-r--r-- | arch/arm/mach-s5p6440/gpio.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-s5p6440/gpio.c b/arch/arm/mach-s5p6440/gpio.c index 262dc75d5bea..92efc05b1ba2 100644 --- a/arch/arm/mach-s5p6440/gpio.c +++ b/arch/arm/mach-s5p6440/gpio.c @@ -46,6 +46,7 @@ static int s5p6440_gpiolib_rbank_4bit2_input(struct gpio_chip *chip, void __iomem *base = ourchip->base; void __iomem *regcon = base; unsigned long con; + unsigned long flags; switch (offset) { case 6: @@ -63,10 +64,14 @@ static int s5p6440_gpiolib_rbank_4bit2_input(struct gpio_chip *chip, break; } + s3c_gpio_lock(ourchip, flags); + con = __raw_readl(regcon); con &= ~(0xf << con_4bit_shift(offset)); __raw_writel(con, regcon); + s3c_gpio_unlock(ourchip, flags); + return 0; } @@ -78,6 +83,7 @@ static int s5p6440_gpiolib_rbank_4bit2_output(struct gpio_chip *chip, void __iomem *regcon = base; unsigned long con; unsigned long dat; + unsigned long flags; unsigned con_offset = offset; switch (con_offset) { @@ -96,6 +102,8 @@ static int s5p6440_gpiolib_rbank_4bit2_output(struct gpio_chip *chip, break; } + s3c_gpio_lock(ourchip, flags); + con = __raw_readl(regcon); con &= ~(0xf << con_4bit_shift(con_offset)); con |= 0x1 << con_4bit_shift(con_offset); @@ -109,6 +117,8 @@ static int s5p6440_gpiolib_rbank_4bit2_output(struct gpio_chip *chip, __raw_writel(con, regcon); __raw_writel(dat, base + GPIODAT_OFF); + s3c_gpio_unlock(ourchip, flags); + return 0; } @@ -117,6 +127,7 @@ int s5p6440_gpio_setcfg_4bit_rbank(struct s3c_gpio_chip *chip, { void __iomem *reg = chip->base; unsigned int shift; + unsigned long flags; u32 con; switch (off) { @@ -142,11 +153,15 @@ int s5p6440_gpio_setcfg_4bit_rbank(struct s3c_gpio_chip *chip, cfg <<= shift; } + s3c_gpio_lock(chip, flags); + con = __raw_readl(reg); con &= ~(0xf << shift); con |= cfg; __raw_writel(con, reg); + s3c_gpio_unlock(chip, flags); + return 0; } |