From: Kevin Hilman <khilman@deeprootsystems.com>
To: charu@ti.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] [OMAP] GPIO Module is reset during initialization
Date: Mon, 26 Oct 2009 13:29:03 -0700 [thread overview]
Message-ID: <87hbtlc31s.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1256313329-24996-1-git-send-email-charu@ti.com> (charu@ti.com's message of "Fri\, 23 Oct 2009 21\:25\:29 +0530")
charu@ti.com writes:
> From: Charulatha V <charu@ti.com>
>
> During initialization, GPIO module is reset using soft reset bit
> of SYSCONFIG register
>
> Signed-off-by: Charulatha V <charu@ti.com>
> ---
> arch/arm/plat-omap/gpio.c | 12 +++++++++++-
> 1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 2304a5d..4579650 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -21,6 +21,7 @@
> #include <linux/err.h>
> #include <linux/clk.h>
> #include <linux/io.h>
> +#include <linux/delay.h>
>
> #include <mach/hardware.h>
> #include <asm/irq.h>
> @@ -1670,7 +1671,7 @@ static int __init _omap_gpio_init(void)
> }
> #endif
> for (i = 0; i < gpio_bank_count; i++) {
> - int j, gpio_count = 16;
> + int j, gpio_count = 16, attempt = 0;
>
> bank = &gpio_bank[i];
> spin_lock_init(&bank->lock);
> @@ -1698,6 +1699,15 @@ static int __init _omap_gpio_init(void)
> static const u32 non_wakeup_gpios[] = {
> 0xe203ffc0, 0x08700040
> };
> +
> + /* Software Reset of GPIO module */
> + __raw_writel(0x0002, bank->base + OMAP24XX_GPIO_SYSCONFIG);
> + while (((__raw_readl(bank->base + OMAP24XX_GPIO_SYSSTATUS)
> + & 0x1) == 0) && attempt < 5) {
> + udelay(1);
> + attempt++;
> + }
> +
NAK. Would rather see an omap_hwmod added for GPIO, in which case we
get the reset for free.
Kevin
prev parent reply other threads:[~2009-10-26 20:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 15:55 [PATCH] [OMAP] GPIO Module is reset during initialization charu
2009-10-23 22:56 ` Felipe Balbi
2009-10-24 0:37 ` Nishanth Menon
2009-10-26 9:26 ` Varadarajan, Charu Latha
2009-10-26 10:22 ` Menon, Nishanth
2009-10-26 10:52 ` Varadarajan, Charu Latha
2009-10-26 11:04 ` Menon, Nishanth
2009-10-26 11:07 ` Varadarajan, Charu Latha
2009-10-26 20:29 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbtlc31s.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=charu@ti.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.