aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm365.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/dm365.c')
-rw-r--r--arch/arm/mach-davinci/dm365.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index c29e324eb0bb..1511a0680f9a 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -19,6 +19,9 @@
19#include <linux/dma-mapping.h> 19#include <linux/dma-mapping.h>
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21#include <linux/platform_data/edma.h> 21#include <linux/platform_data/edma.h>
22#include <linux/platform_data/gpio-davinci.h>
23#include <linux/platform_data/keyscan-davinci.h>
24#include <linux/platform_data/spi-davinci.h>
22 25
23#include <asm/mach/map.h> 26#include <asm/mach/map.h>
24 27
@@ -29,9 +32,6 @@
29#include <mach/time.h> 32#include <mach/time.h>
30#include <mach/serial.h> 33#include <mach/serial.h>
31#include <mach/common.h> 34#include <mach/common.h>
32#include <linux/platform_data/keyscan-davinci.h>
33#include <linux/platform_data/spi-davinci.h>
34#include <mach/gpio-davinci.h>
35 35
36#include "davinci.h" 36#include "davinci.h"
37#include "clock.h" 37#include "clock.h"
@@ -698,6 +698,32 @@ void __init dm365_init_spi0(unsigned chipselect_mask,
698 platform_device_register(&dm365_spi0_device); 698 platform_device_register(&dm365_spi0_device);
699} 699}
700 700
701static struct resource dm365_gpio_resources[] = {
702 { /* registers */
703 .start = DAVINCI_GPIO_BASE,
704 .end = DAVINCI_GPIO_BASE + SZ_4K - 1,
705 .flags = IORESOURCE_MEM,
706 },
707 { /* interrupt */
708 .start = IRQ_DM365_GPIO0,
709 .end = IRQ_DM365_GPIO7,
710 .flags = IORESOURCE_IRQ,
711 },
712};
713
714static struct davinci_gpio_platform_data dm365_gpio_platform_data = {
715 .ngpio = 104,
716 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
717 .gpio_unbanked = 8,
718};
719
720int __init dm365_gpio_register(void)
721{
722 return davinci_gpio_register(dm365_gpio_resources,
723 sizeof(dm365_gpio_resources),
724 &dm365_gpio_platform_data);
725}
726
701static struct emac_platform_data dm365_emac_pdata = { 727static struct emac_platform_data dm365_emac_pdata = {
702 .ctrl_reg_offset = DM365_EMAC_CNTRL_OFFSET, 728 .ctrl_reg_offset = DM365_EMAC_CNTRL_OFFSET,
703 .ctrl_mod_reg_offset = DM365_EMAC_CNTRL_MOD_OFFSET, 729 .ctrl_mod_reg_offset = DM365_EMAC_CNTRL_MOD_OFFSET,
@@ -1105,11 +1131,6 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
1105 .intc_irq_prios = dm365_default_priorities, 1131 .intc_irq_prios = dm365_default_priorities,
1106 .intc_irq_num = DAVINCI_N_AINTC_IRQ, 1132 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
1107 .timer_info = &dm365_timer_info, 1133 .timer_info = &dm365_timer_info,
1108 .gpio_type = GPIO_TYPE_DAVINCI,
1109 .gpio_base = DAVINCI_GPIO_BASE,
1110 .gpio_num = 104,
1111 .gpio_irq = IRQ_DM365_GPIO0,
1112 .gpio_unbanked = 8, /* really 16 ... skip muxed GPIOs */
1113 .emac_pdata = &dm365_emac_pdata, 1134 .emac_pdata = &dm365_emac_pdata,
1114 .sram_dma = 0x00010000, 1135 .sram_dma = 0x00010000,
1115 .sram_len = SZ_32K, 1136 .sram_len = SZ_32K,