Commit fad96ea8 authored by Charulatha V's avatar Charulatha V Committed by Tarun Kanti DebBarma

gpio/omap: use pinctrl offset instead of macro

Use regs->pinctrl field instead of using the macro OMAP1510_GPIO_PIN_CONTROL
Signed-off-by: default avatarCharulatha V <charu@ti.com>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent ab985f0f
...@@ -85,6 +85,7 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = { ...@@ -85,6 +85,7 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
.irqenable = OMAP1510_GPIO_INT_MASK, .irqenable = OMAP1510_GPIO_INT_MASK,
.irqenable_inv = true, .irqenable_inv = true,
.irqctrl = OMAP1510_GPIO_INT_CONTROL, .irqctrl = OMAP1510_GPIO_INT_CONTROL,
.pinctrl = OMAP1510_GPIO_PIN_CONTROL,
}; };
static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = {
......
...@@ -198,6 +198,7 @@ struct omap_gpio_reg_offs { ...@@ -198,6 +198,7 @@ struct omap_gpio_reg_offs {
u16 irqctrl; u16 irqctrl;
u16 edgectrl1; u16 edgectrl1;
u16 edgectrl2; u16 edgectrl2;
u16 pinctrl;
bool irqenable_inv; bool irqenable_inv;
}; };
......
...@@ -490,15 +490,13 @@ static int omap_gpio_request(struct gpio_chip *chip, unsigned offset) ...@@ -490,15 +490,13 @@ static int omap_gpio_request(struct gpio_chip *chip, unsigned offset)
*/ */
_set_gpio_triggering(bank, offset, IRQ_TYPE_NONE); _set_gpio_triggering(bank, offset, IRQ_TYPE_NONE);
#ifdef CONFIG_ARCH_OMAP15XX if (bank->regs->pinctrl) {
if (bank->method == METHOD_GPIO_1510) { void __iomem *reg = bank->base + bank->regs->pinctrl;
void __iomem *reg;
/* Claim the pin for MPU */ /* Claim the pin for MPU */
reg = bank->base + OMAP1510_GPIO_PIN_CONTROL;
__raw_writel(__raw_readl(reg) | (1 << offset), reg); __raw_writel(__raw_readl(reg) | (1 << offset), reg);
} }
#endif
if (bank->regs->ctrl && !bank->mod_usage) { if (bank->regs->ctrl && !bank->mod_usage) {
void __iomem *reg = bank->base + bank->regs->ctrl; void __iomem *reg = bank->base + bank->regs->ctrl;
u32 ctrl; u32 ctrl;
......
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