diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-09-08 09:51:05 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-09-08 09:51:05 +0000 |
commit | 6771d63284ee86924f5705a53953a50c4c43135a (patch) | |
tree | 94ce21298e99ba002240950105fc2d258dd77dd6 /target/linux/mcs814x/files-3.3/drivers/gpio | |
parent | 95f1b6d4157b93249cd6dd2a92b4116fabcff1f7 (diff) | |
download | mtk-20170518-6771d63284ee86924f5705a53953a50c4c43135a.zip mtk-20170518-6771d63284ee86924f5705a53953a50c4c43135a.tar.gz mtk-20170518-6771d63284ee86924f5705a53953a50c4c43135a.tar.bz2 |
use the recommended ARM I/O accessors
use {read,write}l_relaxed instead of the plain __raw_{read,write}l variants.
SVN-Revision: 33330
Diffstat (limited to 'target/linux/mcs814x/files-3.3/drivers/gpio')
-rw-r--r-- | target/linux/mcs814x/files-3.3/drivers/gpio/gpio-mcs814x.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/mcs814x/files-3.3/drivers/gpio/gpio-mcs814x.c b/target/linux/mcs814x/files-3.3/drivers/gpio/gpio-mcs814x.c index ea53c19..f138229 100644 --- a/target/linux/mcs814x/files-3.3/drivers/gpio/gpio-mcs814x.c +++ b/target/linux/mcs814x/files-3.3/drivers/gpio/gpio-mcs814x.c @@ -30,7 +30,7 @@ static int mcs814x_gpio_get(struct gpio_chip *chip, unsigned offset) { struct mcs814x_gpio_chip *mcs814x = to_mcs814x_gpio_chip(chip); - return __raw_readl(mcs814x->regs + GPIO_PIN) & (1 << offset); + return readl_relaxed(mcs814x->regs + GPIO_PIN) & (1 << offset); } static void mcs814x_gpio_set(struct gpio_chip *chip, @@ -39,12 +39,12 @@ static void mcs814x_gpio_set(struct gpio_chip *chip, struct mcs814x_gpio_chip *mcs814x = to_mcs814x_gpio_chip(chip); u32 mask; - mask = __raw_readl(mcs814x->regs + GPIO_PIN); + mask = readl_relaxed(mcs814x->regs + GPIO_PIN); if (value) mask |= (1 << offset); else mask &= ~(1 << offset); - __raw_writel(mask, mcs814x->regs + GPIO_PIN); + writel_relaxed(mask, mcs814x->regs + GPIO_PIN); } static int mcs814x_gpio_direction_output(struct gpio_chip *chip, @@ -53,9 +53,9 @@ static int mcs814x_gpio_direction_output(struct gpio_chip *chip, struct mcs814x_gpio_chip *mcs814x = to_mcs814x_gpio_chip(chip); u32 mask; - mask = __raw_readl(mcs814x->regs + GPIO_DIR); + mask = readl_relaxed(mcs814x->regs + GPIO_DIR); mask &= ~(1 << offset); - __raw_writel(mask, mcs814x->regs + GPIO_DIR); + writel_relaxed(mask, mcs814x->regs + GPIO_DIR); return 0; } @@ -66,9 +66,9 @@ static int mcs814x_gpio_direction_input(struct gpio_chip *chip, struct mcs814x_gpio_chip *mcs814x = to_mcs814x_gpio_chip(chip); u32 mask; - mask = __raw_readl(mcs814x->regs + GPIO_DIR); + mask = readl_relaxed(mcs814x->regs + GPIO_DIR); mask |= (1 << offset); - __raw_writel(mask, mcs814x->regs + GPIO_DIR); + writel_relaxed(mask, mcs814x->regs + GPIO_DIR); return 0; } |