diff options
Diffstat (limited to 'arch/arm/mach-davinci/dm355.c')
| -rw-r--r-- | arch/arm/mach-davinci/dm355.c | 59 | 
1 files changed, 35 insertions, 24 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 3eaa5f6b216..2f3ed3a58d5 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -13,8 +13,10 @@  #include <linux/serial_8250.h>  #include <linux/platform_device.h>  #include <linux/dma-mapping.h> -  #include <linux/spi/spi.h> +#include <linux/platform_data/edma.h> +#include <linux/platform_data/gpio-davinci.h> +#include <linux/platform_data/spi-davinci.h>  #include <asm/mach/map.h> @@ -25,9 +27,6 @@  #include <mach/time.h>  #include <mach/serial.h>  #include <mach/common.h> -#include <linux/platform_data/spi-davinci.h> -#include <mach/gpio-davinci.h> -#include <linux/platform_data/edma.h>  #include "davinci.h"  #include "clock.h" @@ -376,7 +375,7 @@ static struct clk_lookup dm355_clks[] = {  	CLK(NULL, "pwm3", &pwm3_clk),  	CLK(NULL, "timer0", &timer0_clk),  	CLK(NULL, "timer1", &timer1_clk), -	CLK("watchdog", NULL, &timer2_clk), +	CLK("davinci-wdt", NULL, &timer2_clk),  	CLK(NULL, "timer3", &timer3_clk),  	CLK(NULL, "rto", &rto_clk),  	CLK(NULL, "usb", &usb_clk), @@ -570,14 +569,6 @@ static u8 dm355_default_priorities[DAVINCI_N_AINTC_IRQ] = {  /*----------------------------------------------------------------------*/  static s8 -queue_tc_mapping[][2] = { -	/* {event queue no, TC no} */ -	{0, 0}, -	{1, 1}, -	{-1, -1}, -}; - -static s8  queue_priority_mapping[][2] = {  	/* {event queue no, Priority} */  	{0, 3}, @@ -586,12 +577,6 @@ queue_priority_mapping[][2] = {  };  static struct edma_soc_info edma_cc0_info = { -	.n_channel		= 64, -	.n_region		= 4, -	.n_slot			= 128, -	.n_tc			= 2, -	.n_cc			= 1, -	.queue_tc_mapping	= queue_tc_mapping,  	.queue_priority_mapping	= queue_priority_mapping,  	.default_queue		= EVENTQ_1,  }; @@ -642,6 +627,7 @@ static struct platform_device dm355_edma_device = {  static struct resource dm355_asp1_resources[] = {  	{ +		.name	= "mpu",  		.start	= DAVINCI_ASP1_BASE,  		.end	= DAVINCI_ASP1_BASE + SZ_8K - 1,  		.flags	= IORESOURCE_MEM, @@ -886,6 +872,29 @@ static struct platform_device dm355_vpbe_dev = {  	},  }; +static struct resource dm355_gpio_resources[] = { +	{	/* registers */ +		.start	= DAVINCI_GPIO_BASE, +		.end	= DAVINCI_GPIO_BASE + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +	}, +	{	/* interrupt */ +		.start	= IRQ_DM355_GPIOBNK0, +		.end	= IRQ_DM355_GPIOBNK6, +		.flags	= IORESOURCE_IRQ, +	}, +}; + +static struct davinci_gpio_platform_data dm355_gpio_platform_data = { +	.ngpio		= 104, +}; + +int __init dm355_gpio_register(void) +{ +	return davinci_gpio_register(dm355_gpio_resources, +				     ARRAY_SIZE(dm355_gpio_resources), +				     &dm355_gpio_platform_data); +}  /*----------------------------------------------------------------------*/  static struct map_desc dm355_io_desc[] = { @@ -1005,10 +1014,6 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {  	.intc_irq_prios		= dm355_default_priorities,  	.intc_irq_num		= DAVINCI_N_AINTC_IRQ,  	.timer_info		= &dm355_timer_info, -	.gpio_type		= GPIO_TYPE_DAVINCI, -	.gpio_base		= DAVINCI_GPIO_BASE, -	.gpio_num		= 104, -	.gpio_irq		= IRQ_DM355_GPIOBNK0,  	.sram_dma		= 0x00010000,  	.sram_len		= SZ_32K,  }; @@ -1057,12 +1062,18 @@ int __init dm355_init_video(struct vpfe_config *vpfe_cfg,  static int __init dm355_init_devices(void)  { +	int ret = 0; +  	if (!cpu_is_davinci_dm355())  		return 0;  	davinci_cfg_reg(DM355_INT_EDMA_CC);  	platform_device_register(&dm355_edma_device); -	return 0; +	ret = davinci_init_wdt(); +	if (ret) +		pr_warn("%s: watchdog init failed: %d\n", __func__, ret); + +	return ret;  }  postcore_initcall(dm355_init_devices);  | 
