diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-22 17:37:16 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-06-16 14:14:13 -0400 |
commit | e5ff4440cf5206fbb99d9a354ed9024eb3da047d (patch) | |
tree | 79a085d5f2e99deb9a71d018c12738e247d23846 /arch/arm/mach-omap2/gpio.c | |
parent | 9942da0e4b037a852b230208410141768d473deb (diff) |
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 316d930651f1..9a46d7773a48 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) | |||
71 | case 0: | 71 | case 0: |
72 | case 1: | 72 | case 1: |
73 | pdata->bank_type = METHOD_GPIO_24XX; | 73 | pdata->bank_type = METHOD_GPIO_24XX; |
74 | pdata->regs->revision = OMAP24XX_GPIO_REVISION; | ||
74 | pdata->regs->direction = OMAP24XX_GPIO_OE; | 75 | pdata->regs->direction = OMAP24XX_GPIO_OE; |
75 | pdata->regs->datain = OMAP24XX_GPIO_DATAIN; | 76 | pdata->regs->datain = OMAP24XX_GPIO_DATAIN; |
76 | pdata->regs->dataout = OMAP24XX_GPIO_DATAOUT; | 77 | pdata->regs->dataout = OMAP24XX_GPIO_DATAOUT; |
@@ -86,6 +87,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
86 | break; | 87 | break; |
87 | case 2: | 88 | case 2: |
88 | pdata->bank_type = METHOD_GPIO_44XX; | 89 | pdata->bank_type = METHOD_GPIO_44XX; |
90 | pdata->regs->revision = OMAP4_GPIO_REVISION; | ||
89 | pdata->regs->direction = OMAP4_GPIO_OE; | 91 | pdata->regs->direction = OMAP4_GPIO_OE; |
90 | pdata->regs->datain = OMAP4_GPIO_DATAIN; | 92 | pdata->regs->datain = OMAP4_GPIO_DATAIN; |
91 | pdata->regs->dataout = OMAP4_GPIO_DATAOUT; | 93 | pdata->regs->dataout = OMAP4_GPIO_DATAOUT; |