| 
					
				 | 
			
			
				@@ -606,3 +606,93 @@ static void __init at91_add_device_tc(void) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* -------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  Touchscreen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * -------------------------------------------------------------------- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static u64 tsadcc_dmamask = DMA_BIT_MASK(32); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct at91_tsadcc_data tsadcc_data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource tsadcc_resources[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	[0] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start	= AT91SAM9RL_BASE_TSC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end	= AT91SAM9RL_BASE_TSC + SZ_16K - 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags	= IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	[1] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start	= NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end	= NR_IRQS_LEGACY + AT91SAM9RL_ID_TSC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags	= IORESOURCE_IRQ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device at91sam9rl_tsadcc_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name		= "atmel_tsadcc", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id		= -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev		= { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				.dma_mask		= &tsadcc_dmamask, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				.coherent_dma_mask	= DMA_BIT_MASK(32), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				.platform_data		= &tsadcc_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource	= tsadcc_resources, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources	= ARRAY_SIZE(tsadcc_resources), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (!data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	at91_set_A_periph(AT91_PIN_PA17, 0);	/* AD0_XR */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	at91_set_A_periph(AT91_PIN_PA18, 0);	/* AD1_XL */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	at91_set_A_periph(AT91_PIN_PA19, 0);	/* AD2_YT */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	at91_set_A_periph(AT91_PIN_PA20, 0);	/* AD3_TB */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	tsadcc_data = *data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	platform_device_register(&at91sam9rl_tsadcc_device); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* -------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  RTC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * -------------------------------------------------------------------- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_RTC_DRV_AT91RM9200) || defined(CONFIG_RTC_DRV_AT91RM9200_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device at91sam9rl_rtc_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name		= "at91_rtc", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id		= -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources	= 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static void __init at91_add_device_rtc(void) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	platform_device_register(&at91sam9rl_rtc_device); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static void __init at91_add_device_rtc(void) {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* -------------------------------------------------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  RTT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * -------------------------------------------------------------------- */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource rtt_resources[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start	= AT91SAM9RL_BASE_RTT, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end	= AT91SAM9RL_BASE_RTT + SZ_16 - 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags	= IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags	= IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags  = IORESOURCE_IRQ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device at91sam9rl_rtt_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name		= "at91_rtt", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id		= 0, 
			 |