Re: [RFC/RFT PATCH 6/7] gpio: omap: clean up omap_gpio_irq_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

* Grygorii Strashko <grygorii.strashko@xxxxxxxxxx> [150522 07:37]:
> The omap_gpio_irq_type() can do only configuration of GPIO IRQ
> triggering type, because now OMAP GPIO driver has implemented
> .irq_startup()/.irq_shutdown() which are responsible for
> GPIO bank enabling and pin direction configuration.
> 
> Hence, remove redundant code and omap_gpio_init_irq() which is
> not used any more.
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxxxxxx>
> ---
>  drivers/gpio/gpio-omap.c | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 1c226f1..f02b3fa 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -472,15 +472,6 @@ static int omap_gpio_is_input(struct gpio_bank *bank, unsigned offset)
>  	return readl_relaxed(reg) & BIT(offset);
>  }
>  
> -static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned offset)
> -{
> -	if (!LINE_USED(bank->mod_usage, offset)) {
> -		omap_enable_gpio_module(bank, offset);
> -		omap_set_gpio_direction(bank, offset, 1);
> -	}
> -	bank->irq_usage |= BIT(offset);
> -}
> -
>  static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
>  {
>  	struct gpio_bank *bank = omap_irq_data_get_bank(d);
> @@ -502,12 +493,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
>  	retval = omap_set_gpio_triggering(bank, offset, type);
>  	if (retval)
>  		goto error;
> -	omap_gpio_init_irq(bank, offset);
> -	if (!omap_gpio_is_input(bank, offset)) {
> -		spin_unlock_irqrestore(&bank->lock, flags);
> -		retval = -EINVAL;
> -		goto error;
> -	}
>  	spin_unlock_irqrestore(&bank->lock, flags);
>  
>  	if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))

This one seems to break smsc911x GPIO interrupt somehow and
nfsroot becomes very slow and system becomes unresponsive.
The Ethernet conroller probably runs mostly in polling mode
or something with this patch.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux