From: Stephen Rothwell Date: Tue, 8 Nov 2011 00:53:45 +0000 (+1100) Subject: Merge remote-tracking branch 'at91/at91-next' X-Git-Tag: next-20111108~57 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b74062bdd47243f62ae09970bea70ab184d7f37e;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 arch/arm/mach-at91/board-afeb-9260v1.c arch/arm/mach-at91/board-neocore926.c arch/arm/mach-at91/board-rm9200dk.c arch/arm/mach-at91/board-sam9g20ek.c arch/arm/mach-at91/board-sam9m10g45ek.c drivers/ata/pata_at91.c --- b74062bdd47243f62ae09970bea70ab184d7f37e 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/board-afeb-9260v1.c index 4282d96dffa8,68a3e9006959..8c755c6fdbe2 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c @@@ -135,9 -142,9 +136,10 @@@ static struct atmel_nand_data __initdat .cle = 22, .rdy_pin = AT91_PIN_PC13, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, .bus_width_16 = 0, + .det_pin = -EINVAL, + .parts = afeb9260_nand_partition, + .num_parts = ARRAY_SIZE(afeb9260_nand_partition), }; diff --cc arch/arm/mach-at91/board-cam60.c index f90cfb32bad2,73f105bf62a6..08a136b039e2 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c @@@ -135,11 -136,16 +136,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata cam60_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not there + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PA9, .enable_pin = AT91_PIN_PA7, - .partition_info = nand_partitions, + .parts = cam60_nand_partition, + .num_parts = ARRAY_SIZE(cam60_nand_partition), }; static struct sam9_smc_config __initdata cam60_nand_smc_config = { diff --cc arch/arm/mach-at91/board-cap9adk.c index 5dffd3be62d2,22b62a4b1c32..3b48829f0c3f --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c @@@ -172,11 -174,16 +174,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata cap9adk_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected - // .rdy_pin = ... not connected + .det_pin = -EINVAL, + .rdy_pin = -EINVAL, .enable_pin = AT91_PIN_PD15, - .partition_info = nand_partitions, + .parts = cap9adk_nand_partitions, + .num_parts = ARRAY_SIZE(cap9adk_nand_partitions), }; static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { diff --cc arch/arm/mach-at91/board-kb9202.c index e61351ffad50,e0c4d988ab45..39933efcd174 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c @@@ -100,11 -103,16 +103,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata kb9202_nand_data = { .ale = 22, .cle = 21, - // .det_pin = ... not there + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC29, .enable_pin = AT91_PIN_PC28, - .partition_info = nand_partitions, + .parts = kb9202_nand_partition, + .num_parts = ARRAY_SIZE(kb9202_nand_partition), }; static void __init kb9202_board_init(void) diff --cc arch/arm/mach-at91/board-neocore926.c index ef816c17dc61,2451b98f5dc6..d80ec7390880 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c @@@ -188,8 -195,8 +189,9 @@@ static struct atmel_nand_data __initdat .rdy_pin = AT91_PIN_PB19, .rdy_pin_active_low = 1, .enable_pin = AT91_PIN_PD15, - .partition_info = nand_partitions, + .det_pin = -EINVAL, + .parts = neocore926_nand_partition, + .num_parts = ARRAY_SIZE(neocore926_nand_partition), }; static struct sam9_smc_config __initdata neocore926_nand_smc_config = { diff --cc arch/arm/mach-at91/board-qil-a9260.c index 07421bdb88ea,429942193c0e..c123c6f9085b --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c @@@ -133,11 -134,16 +134,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC13, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-rm9200dk.c index 80a8c9c6e922,d79168388f3f..fe16c27f7c55 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c @@@ -143,9 -153,8 +147,9 @@@ static struct atmel_nand_data __initdat .cle = 21, .det_pin = AT91_PIN_PB1, .rdy_pin = AT91_PIN_PC2, - // .enable_pin = ... not there + .enable_pin = -EINVAL, - .partition_info = nand_partitions, + .parts = dk_nand_partition, + .num_parts = ARRAY_SIZE(dk_nand_partition), }; #define DK_FLASH_BASE AT91_CHIPSELECT_0 diff --cc arch/arm/mach-at91/board-sam9-l9260.c index 072d53af98d9,00cf07626dff..d8e9cdcbf9f4 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c @@@ -134,11 -135,16 +135,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC13, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9260ek.c index 4f10181a0782,8f899513f9cb..605dc0165ff7 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c @@@ -176,11 -177,16 +177,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC13, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9261ek.c index b005b738e8ff,e778d2ccbaeb..364f762d7077 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c @@@ -182,11 -183,16 +183,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 22, .cle = 21, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC15, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9263ek.c index bccdcf23caa1,814381a9717b..a3dbdae8a989 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c @@@ -183,11 -183,16 +183,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PA22, .enable_pin = AT91_PIN_PD15, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9g20ek.c index 64fc75c9d0ac,a27069cbb584..5206701b5ce9 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c @@@ -163,8 -170,8 +164,9 @@@ static struct atmel_nand_data __initdat .cle = 22, .rdy_pin = AT91_PIN_PC13, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .det_pin = -EINVAL, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9m10g45ek.c index 92de9127923a,8e7d8ad3f5b0..9ba1adbdc57c --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c @@@ -143,8 -150,8 +144,9 @@@ static struct atmel_nand_data __initdat .cle = 22, .rdy_pin = AT91_PIN_PC8, .enable_pin = AT91_PIN_PC14, - .partition_info = nand_partitions, + .det_pin = -EINVAL, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-sam9rlek.c index b2b748239f36,39fc576962f4..0d5ef5c65753 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c @@@ -91,11 -91,16 +91,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PD17, .enable_pin = AT91_PIN_PB6, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata ek_nand_smc_config = { diff --cc arch/arm/mach-at91/board-snapper9260.c index 0df01c6e2d0c,17dae5003c33..95b403113558 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c @@@ -101,9 -111,10 +104,11 @@@ static struct atmel_nand_data __initdat .ale = 21, .cle = 22, .rdy_pin = AT91_PIN_PC13, - .partition_info = snapper9260_nand_partition_info, + .parts = snapper9260_nand_partitions, + .num_parts = ARRAY_SIZE(snapper9260_nand_partitions), .bus_width_16 = 0, + .enable_pin = -EINVAL, + .det_pin = -EINVAL, }; static struct sam9_smc_config __initdata snapper9260_nand_smc_config = { diff --cc arch/arm/mach-at91/board-usb-a926x.c index 0a20bab21f99,e5e78dd8d63c..c9cff9ce1683 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c @@@ -193,11 -194,16 +194,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata ek_nand_data = { .ale = 21, .cle = 22, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PA22, .enable_pin = AT91_PIN_PD15, - .partition_info = nand_partitions, + .parts = ek_nand_partition, + .num_parts = ARRAY_SIZE(ek_nand_partition), }; static struct sam9_smc_config __initdata usb_a9260_nand_smc_config = { diff --cc arch/arm/mach-at91/board-yl-9200.c index 649b052231f5,ecb8378b4af0..1e83a62d7177 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c @@@ -175,11 -177,16 +177,11 @@@ static struct mtd_partition __initdata static struct atmel_nand_data __initdata yl9200_nand_data = { .ale = 6, .cle = 7, - // .det_pin = ... not connected + .det_pin = -EINVAL, .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ - .partition_info = nand_partitions, + .parts = yl9200_nand_partition, + .num_parts = ARRAY_SIZE(yl9200_nand_partition), }; /* 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;