aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/include/mach/common.h
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-05-01 18:37:53 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-06 18:02:08 -0400
commitc12f415a9144a76dc99df34f56ce3022207ad1d0 (patch)
tree6fa81f4b2494ab8d0bf4f6bd7f71b5c0bdae8ecb /arch/arm/mach-davinci/include/mach/common.h
parent99e9e52de635728d7c89a0fdf79b307f3082cf3a (diff)
Davinci: gpio - register layout invariant inlines
This patch renders the inlined gpio accessors in gpio.h independent of the underlying controller's register layout. This is done by including three new fields in davinci_gpio_controller to hold the addresses of the set, clear, and in data registers. Other changes: 1. davinci_gpio_regs structure definition moved to gpio.c. This structure is no longer common across all davinci socs (davinci_gpio_controller is). 2. controller base address calculation code (gpio2controller()) moved to gpio.c as this was no longer necessary for the inline implementation. 3. modified inline range checks to use davinci_soc_info.gpio_num instead of DAVINCI_N_GPIO. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Tested-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/common.h')
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 884dc726e9b..1d72883f593 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -37,6 +37,8 @@ struct davinci_timer_info {
37 unsigned int clocksource_id; 37 unsigned int clocksource_id;
38}; 38};
39 39
40struct davinci_gpio_controller;
41
40/* SoC specific init support */ 42/* SoC specific init support */
41struct davinci_soc_info { 43struct davinci_soc_info {
42 struct map_desc *io_desc; 44 struct map_desc *io_desc;
@@ -61,6 +63,8 @@ struct davinci_soc_info {
61 unsigned gpio_num; 63 unsigned gpio_num;
62 unsigned gpio_irq; 64 unsigned gpio_irq;
63 unsigned gpio_unbanked; 65 unsigned gpio_unbanked;
66 struct davinci_gpio_controller *gpio_ctlrs;
67 int gpio_ctlrs_num;
64 struct platform_device *serial_dev; 68 struct platform_device *serial_dev;
65 struct emac_platform_data *emac_pdata; 69 struct emac_platform_data *emac_pdata;
66 dma_addr_t sram_dma; 70 dma_addr_t sram_dma;