diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260_devices.c')
| -rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 29 | 
1 files changed, 8 insertions, 21 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index eda8d1679d4..ef88e0fe4e8 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -24,11 +24,11 @@  #include <mach/at91sam9260_matrix.h>  #include <mach/at91_matrix.h>  #include <mach/at91sam9_smc.h> -#include <mach/at91_adc.h> +#include <mach/hardware.h>  #include "board.h"  #include "generic.h" - +#include "gpio.h"  /* --------------------------------------------------------------------   *  USB Host @@ -1255,12 +1255,8 @@ void __init at91_add_device_cf(struct at91_cf_data *data)  	at91_set_A_periph(AT91_PIN_PC10, 0);    /* CFRNW */  	at91_set_A_periph(AT91_PIN_PC15, 1);    /* NWAIT */ -	if (data->flags & AT91_CF_TRUE_IDE) -#if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) +	if (IS_ENABLED(CONFIG_PATA_AT91) && (data->flags & AT91_CF_TRUE_IDE))  		pdev->name = "pata_at91"; -#else -#warning "board requires AT91_CF_TRUE_IDE: enable pata_at91" -#endif  	else  		pdev->name = "at91_cf"; @@ -1292,7 +1288,7 @@ static struct resource adc_resources[] = {  };  static struct platform_device at91_adc_device = { -	.name		= "at91_adc", +	.name		= "at91sam9260-adc",  	.id		= -1,  	.dev		= {  				.platform_data		= &adc_data, @@ -1304,30 +1300,23 @@ static struct platform_device at91_adc_device = {  static struct at91_adc_trigger at91_adc_triggers[] = {  	[0] = {  		.name = "timer-counter-0", -		.value = AT91_ADC_TRGSEL_TC0 | AT91_ADC_TRGEN, +		.value = 0x1,  	},  	[1] = {  		.name = "timer-counter-1", -		.value = AT91_ADC_TRGSEL_TC1 | AT91_ADC_TRGEN, +		.value = 0x3,  	},  	[2] = {  		.name = "timer-counter-2", -		.value = AT91_ADC_TRGSEL_TC2 | AT91_ADC_TRGEN, +		.value = 0x5,  	},  	[3] = {  		.name = "external", -		.value = AT91_ADC_TRGSEL_EXTERNAL | AT91_ADC_TRGEN, +		.value = 0xd,  		.is_external = true,  	},  }; -static struct at91_adc_reg_desc at91_adc_register_g20 = { -	.channel_base = AT91_ADC_CHR(0), -	.drdy_mask = AT91_ADC_DRDY, -	.status_register = AT91_ADC_SR, -	.trigger_register = AT91_ADC_MR, -}; -  void __init at91_add_device_adc(struct at91_adc_data *data)  {  	if (!data) @@ -1345,9 +1334,7 @@ void __init at91_add_device_adc(struct at91_adc_data *data)  	if (data->use_external_triggers)  		at91_set_A_periph(AT91_PIN_PA22, 0); -	data->num_channels = 4;  	data->startup_time = 10; -	data->registers = &at91_adc_register_g20;  	data->trigger_number = 4;  	data->trigger_list = at91_adc_triggers;  | 
