diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-22 14:37:16 -0700 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-07-14 11:53:23 -0700 |
commit | 34f748f543d257a1c9c9e47859f1676317241f2e (patch) | |
tree | e08fb74da76798d3ee06726432555505df3f70b0 /arch/arm/mach-omap2/gpio.c | |
parent | d5033b38ab02efabee030626c04e676a883d7ee5 (diff) | |
download | kernel_samsung_tuna-34f748f543d257a1c9c9e47859f1676317241f2e.zip kernel_samsung_tuna-34f748f543d257a1c9c9e47859f1676317241f2e.tar.gz kernel_samsung_tuna-34f748f543d257a1c9c9e47859f1676317241f2e.tar.bz2 |
GPIO: OMAP: cleanup show revision, remove cpu_is checks, display only once
Remove cpu_is_* checks from gpio_show_revision() by passing in the
revision address offset from platform data. SoCs with no revision
register (15xx, 7xx, and all MPUIOs) use -1 (actually, USHRT_MAX) to
signify no register.
While here, all GPIO banks are assumed to be the same revision, so fix
show_revision() to only show the revision for the first bank it finds.
This removes duplicate GPIO revision prints during boot.
Thanks to Charulatha V <charu@ti.com> for finding/fixing a few -1s
that were missed in the original patch.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpio.c')
-rw-r--r-- | arch/arm/mach-omap2/gpio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 316d930..9a46d77 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c @@ -71,6 +71,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) case 0: case 1: pdata->bank_type = METHOD_GPIO_24XX; + pdata->regs->revision = OMAP24XX_GPIO_REVISION; pdata->regs->direction = OMAP24XX_GPIO_OE; pdata->regs->datain = OMAP24XX_GPIO_DATAIN; pdata->regs->dataout = OMAP24XX_GPIO_DATAOUT; @@ -86,6 +87,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) break; case 2: pdata->bank_type = METHOD_GPIO_44XX; + pdata->regs->revision = OMAP4_GPIO_REVISION; pdata->regs->direction = OMAP4_GPIO_OE; pdata->regs->datain = OMAP4_GPIO_DATAIN; pdata->regs->dataout = OMAP4_GPIO_DATAOUT; |