From: Stephen Rothwell Date: Sun, 6 Nov 2011 23:34:13 +0000 (+1100) Subject: Merge remote-tracking branch 'at91/at91-next' X-Git-Tag: next-20111107~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=36b70c11788a5d0e5302ef1da0d696d43735a72a;p=karo-tx-linux.git Merge remote-tracking branch 'at91/at91-next' Conflicts: arch/arm/mach-at91/at91sam9260.c arch/arm/mach-at91/at91sam9g45.c drivers/ata/pata_at91.c --- 36b70c11788a5d0e5302ef1da0d696d43735a72a diff --cc arch/arm/mach-at91/at91sam9260_devices.c index 24b6f8c0440d,f00fed40b2d8..6bfcd484d434 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@@ -327,10 -327,10 +327,10 @@@ void __init at91_add_device_mci(short m if (!data) return; - for (i = 0; i < ATMEL_MCI_MAX_NR_SLOTS; i++) { + for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) { if (data->slot[i].bus_width) { /* input/irq */ - if (data->slot[i].detect_pin) { + if (gpio_is_valid(data->slot[i].detect_pin)) { at91_set_gpio_input(data->slot[i].detect_pin, 1); at91_set_deglitch(data->slot[i].detect_pin, 1); } diff --cc arch/arm/mach-at91/include/mach/gpio.h index 2b9a1f51210f,5213879ff903..e3fd225121c7 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h @@@ -214,9 -212,14 +212,9 @@@ extern void at91_gpio_resume(void) */ #include -#include /* cansleep wrappers */ - -#define gpio_get_value __gpio_get_value -#define gpio_set_value __gpio_set_value -#define gpio_cansleep __gpio_cansleep - #define gpio_to_irq(gpio) (gpio) - #define irq_to_gpio(irq) (irq) + #define gpio_to_irq(gpio) (gpio + NR_AIC_IRQS) + #define irq_to_gpio(irq) (irq - NR_AIC_IRQS) #endif /* __ASSEMBLY__ */ diff --cc drivers/ata/pata_at91.c index a76f24a8e5db,39153531fa28..5970503d6711 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c @@@ -414,13 -414,10 +414,13 @@@ static int __devinit pata_at91_probe(st host->private_data = info; - ret = ata_host_activate(host, irq ? gpio_to_irq(irq) : 0, - irq ? ata_sff_interrupt : NULL, - return ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0, ++ ret = ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0, + gpio_is_valid(irq) ? ata_sff_interrupt : NULL, irq_flags, &pata_at91_sht); + if (!ret) + return 0; + err_put: clk_put(info->mck); return ret;