Tarun Kanti DebBarma <[email protected]> writes:
> From: Charulatha V <[email protected]>
>
> Getting rid of ifdefs within the function by adding register offset intctrl
> and associating OMAPXXXX_GPIO_INT_CONTROL in respective SoC specific files.
>
> Signed-off-by: Charulatha V <[email protected]>
> Signed-off-by: Tarun Kanti DebBarma <[email protected]>
[...]
> diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
> index 0a8f637..3c96855 100644
> --- a/arch/arm/mach-omap2/gpio.c
> +++ b/arch/arm/mach-omap2/gpio.c
> @@ -83,6 +83,10 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void
> *unused)
> return -ENOMEM;
> }
>
> + pdata->regs->irqctrl = USHRT_MAX;
> + pdata->regs->edgectrl1 = USHRT_MAX;
> + pdata->regs->edgectrl2 = USHRT_MAX;
As with all the other undefined values, please use zero.
The driver check is checking for non-zero values which would be true
with USHRT_MAX. You don't happen to see this because of the OMAP1 #ifdef.
[...]
> if (likely(!(bank->non_wakeup_gpios & gpio_bit))) {
> if (cpu_is_omap44xx()) {
> - MOD_REG_BIT(OMAP4_GPIO_IRQWAKEN0, gpio_bit,
> + MOD_REG_BIT(bank->regs->wkup_status, gpio_bit,
> trigger != 0);
> } else {
> /*
> @@ -233,10 +222,10 @@ static inline void set_24xx_gpio_triggering(struct
> gpio_bank *bank, int gpio,
> */
> if (trigger & IRQ_TYPE_EDGE_BOTH)
> __raw_writel(1 << gpio, bank->base
> - + OMAP24XX_GPIO_SETWKUENA);
> + + bank->regs->wkup_set);
> else
> __raw_writel(1 << gpio, bank->base
> - + OMAP24XX_GPIO_CLEARWKUENA);
> + + bank->regs->wkup_clear);
> }
Probably should be done in an additional patch, but the cpu_is_44xx()
above could be removed too.
The 44xx TRM recommends using the wkup_status only (not using set/clear
registers) and the same could be done for the other SoCs.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html