Skip to contentSkip to conversation

at91: 3.7 fixes patch series

PATCH In review Nicolas Ferre 3 participants 14 messages Oct 24, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover at91: 3.7 fixes patch series

Hi all,
I am posting this patch series just before sending a pull-request to Arnd and Olof.
There are 2 new patches that I have just cooked today about external IRQ
handling: please review.
I would like you to double check that I have not made any mistake while collecting the other patches...

Thanks, best regards,

Bo Shen (2):
ARM: at91/i2c: change id to let i2c-gpio work
ARM: at91/i2c: change id to let i2c-at91 work

Ivan Shugov (1):
ARM: at91: at91sam9g10: fix SOC type detection

Jean-Christophe PLAGNIOL-VILLARD (1):
ARM: at91: drop duplicated config SOC_AT91SAM9 entry

Josh Wu (1):
ARM: at91/tc: fix typo in the DT document

Marek Belisko (1):
ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.

Nicolas Ferre (2):
ARM: at91: fix external interrupts in non-DT case
ARM: at91: fix external interrupt specification in board code

 Documentation/devicetree/bindings/arm/atmel-at91.txt |  2 +-
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi          |  4 ++--
 arch/arm/mach-at91/Kconfig                           | 10 ++--------
 arch/arm/mach-at91/at91rm9200.c                      |  2 +-
 arch/arm/mach-at91/at91rm9200_devices.c              |  4 ++--
 arch/arm/mach-at91/at91sam9260.c                     |  4 ++--
 arch/arm/mach-at91/at91sam9260_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9261.c                     |  4 ++--
 arch/arm/mach-at91/at91sam9261_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9263.c                     |  2 +-
 arch/arm/mach-at91/at91sam9263_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9rl_devices.c              |  4 ++--
 arch/arm/mach-at91/board-neocore926.c                |  2 +-
 arch/arm/mach-at91/board-sam9261ek.c                 |  2 +-
 arch/arm/mach-at91/board-sam9263ek.c                 |  2 +-
 arch/arm/mach-at91/generic.h                         |  3 ++-
 arch/arm/mach-at91/irq.c                             |  9 +++++++--
 arch/arm/mach-at91/setup.c                           |  4 ++--
 18 files changed, 35 insertions(+), 35 deletions(-)
Signature · 1 line
1.7.11.3
#1 lore raw

PATCH 1/8 ARM: at91/tc: fix typo in the DT document

From: Josh Wu <[email protected]>

---
 Documentation/devicetree/bindings/arm/atmel-at91.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/atmel-at91.txt +1 -1
index ecc81e3..d187e9f 100644
@@ -8,7 +8,7 @@ PIT Timer required properties:
   shared across all System Controller members.
 
 TC/TCLIB Timer required properties:
-- compatible: Should be "atmel,<chip>-pit".
+- compatible: Should be "atmel,<chip>-tcb".
   <chip> can be "at91rm9200" or "at91sam9x5"
 - reg: Should contain registers location and length
 - interrupts: Should contain all interrupts for the TC block
Signature · 1 line
1.7.11.3
#2 lore raw

PATCH 2/8 ARM: at91: at91sam9g10: fix SOC type detection

In reply to Nicolas Ferre

From: Ivan Shugov <[email protected]>

Newer at91sam9g10 SoC revision can't be detected, so the kernel can't boot with this kind of kernel panic:
"AT91: Impossible to detect the SOC type"

CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9G10-EK
Ignoring tag cmdline (using the default kernel command line) bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback

Kernel panic - not syncing: AT91: Impossible to detect the SOC type
[<c00133d4>] (unwind_backtrace+0x0/0xe0) from [<c02366dc>] (panic+0x78/0x1cc)
[<c02366dc>] (panic+0x78/0x1cc) from [<c02fa35c>] (at91_map_io+0x90/0xc8)
[<c02fa35c>] (at91_map_io+0x90/0xc8) from [<c02f9860>] (paging_init+0x564/0x6d0)
[<c02f9860>] (paging_init+0x564/0x6d0) from [<c02f7914>] (setup_arch+0x464/0x704)
[<c02f7914>] (setup_arch+0x464/0x704) from [<c02f44f8>] (start_kernel+0x6c/0x2d4)
[<c02f44f8>] (start_kernel+0x6c/0x2d4) from [<20008040>] (0x20008040)

The reason for this is that the Debug Unit Chip ID Register has changed between Engineering Sample and definitive revision of the SoC. Changing the check of cidr to socid will address the problem. We do not integrate this check to the list just above because we also have to make sure that the extended id is disregarded.

[nicolas.ferre at atmel.com: change commit message]
Cc stable <[email protected]> [v3.1] # since commit 8c3583b6
---
 arch/arm/mach-at91/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/setup.c +1 -1
index da9881b..6a3d4bb 100644
@@ -151,7 +151,7 @@ static void __init soc_detect(u32 dbgu_base)
 	}
 
 	/* at91sam9g10 */
-	if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
+	if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
 		at91_soc_initdata.type = AT91_SOC_SAM9G10;
 		at91_boot_soc = at91sam9261_soc;
 	}
Signature · 1 line
1.7.11.3
#3 lore raw

PATCH 3/8 ARM: at91: fix external interrupts in non-DT case

In reply to Nicolas Ferre

Management of external interrupts has changed but the non-DT code has not integrated these changes. Add a mask to pass external irq specification from SoC specific code to the at91_aic_init() function.

---
 arch/arm/mach-at91/generic.h | 3 ++-
 arch/arm/mach-at91/irq.c     | 9 +++++++--
 arch/arm/mach-at91/setup.c   | 2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)
arch/arm/mach-at91/generic.h +2 -1
index f496506..b62f560e 100644
@@ -26,7 +26,8 @@ extern void __init at91_dt_initialize(void);
 extern void __init at91_init_irq_default(void);
 extern void __init at91_init_interrupts(unsigned int priority[]);
 extern void __init at91x40_init_interrupts(unsigned int priority[]);
-extern void __init at91_aic_init(unsigned int priority[]);
+extern void __init at91_aic_init(unsigned int priority[],
+				 unsigned int ext_irq_mask);
 extern int  __init at91_aic_of_init(struct device_node *node,
 				    struct device_node *parent);
 extern int  __init at91_aic5_of_init(struct device_node *node,
arch/arm/mach-at91/irq.c +7 -2
index 1e02c0e..febc2ee 100644
@@ -502,14 +502,19 @@ int __init at91_aic5_of_init(struct device_node *node,
 /*
  * Initialize the AIC interrupt controller.
  */
-void __init at91_aic_init(unsigned int *priority)
+void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask)
 {
 	unsigned int i;
 	int irq_base;
 
-	if (at91_aic_pm_init())
+	at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs)
+				  * sizeof(*at91_extern_irq), GFP_KERNEL);
+
+	if (at91_aic_pm_init() || at91_extern_irq == NULL)
 		panic("Unable to allocate bit maps\n");
 
+	*at91_extern_irq = ext_irq_mask;
+
 	at91_aic_base = ioremap(AT91_AIC, 512);
 	if (!at91_aic_base)
 		panic("Unable to ioremap AIC registers\n");
arch/arm/mach-at91/setup.c +1 -1
index 6a3d4bb..0b32c81 100644
@@ -47,7 +47,7 @@ void __init at91_init_irq_default(void)
 void __init at91_init_interrupts(unsigned int *priority)
 {
 	/* Initialize the AIC interrupt controller */
-	at91_aic_init(priority);
+	at91_aic_init(priority, at91_extern_irq);
 
 	/* Enable GPIO interrupts */
 	at91_gpio_irq_setup();
Signature · 1 line
1.7.11.3
#4 lore raw

PATCH 3/8 ARM: at91: fix external interrupts in non-DT case

Le 10/24/2012 05:33 PM, Nicolas Ferre a ?crit :

Quoted 6 lines

Management of external interrupts has changed but the non-DT code has not integrated these changes. Add a mask to pass external irq specification from SoC specific code to the at91_aic_init() function.

Quoted 61 lines
Cc stable <[email protected]> [v3.6]
---
  arch/arm/mach-at91/generic.h | 3 ++-
  arch/arm/mach-at91/irq.c     | 9 +++++++--
  arch/arm/mach-at91/setup.c   | 2 +-
  3 files changed, 10 insertions(+), 4 deletions(-)
arch/arm/mach-at91/generic.h +2 -1
index f496506..b62f560e 100644
@@ -26,7 +26,8 @@ extern void __init at91_dt_initialize(void);
  extern void __init at91_init_irq_default(void);
  extern void __init at91_init_interrupts(unsigned int priority[]);
  extern void __init at91x40_init_interrupts(unsigned int priority[]);
-extern void __init at91_aic_init(unsigned int priority[]);
+extern void __init at91_aic_init(unsigned int priority[],
+				 unsigned int ext_irq_mask);
  extern int  __init at91_aic_of_init(struct device_node *node,
  				    struct device_node *parent);
  extern int  __init at91_aic5_of_init(struct device_node *node,
arch/arm/mach-at91/irq.c +7 -2
index 1e02c0e..febc2ee 100644
@@ -502,14 +502,19 @@ int __init at91_aic5_of_init(struct device_node *node,
  /*
   * Initialize the AIC interrupt controller.
   */
-void __init at91_aic_init(unsigned int *priority)
+void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask)
  {
  	unsigned int i;
  	int irq_base;
 
-	if (at91_aic_pm_init())
+	at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs)
+				  * sizeof(*at91_extern_irq), GFP_KERNEL);
+
+	if (at91_aic_pm_init() || at91_extern_irq == NULL)
  		panic("Unable to allocate bit maps\n");
 
+	*at91_extern_irq = ext_irq_mask;
+
  	at91_aic_base = ioremap(AT91_AIC, 512);
  	if (!at91_aic_base)
  		panic("Unable to ioremap AIC registers\n");
arch/arm/mach-at91/setup.c +1 -1
index 6a3d4bb..0b32c81 100644
@@ -47,7 +47,7 @@ void __init at91_init_irq_default(void)
  void __init at91_init_interrupts(unsigned int *priority)
  {
  	/* Initialize the AIC interrupt controller */
-	at91_aic_init(priority);
+	at91_aic_init(priority, at91_extern_irq);
 
  	/* Enable GPIO interrupts */
  	at91_gpio_irq_setup();
#5 lore raw

PATCH 4/8 ARM: at91: fix external interrupt specification in board code

In reply to Nicolas Ferre

Since the switch to sparse irq, we have to add the NR_IRQS_LEGACY offset to static irq numbers. It has been forgotten on these SPI irq definitions in board code.

---
 arch/arm/mach-at91/board-neocore926.c | 2 +-
 arch/arm/mach-at91/board-sam9261ek.c  | 2 +-
 arch/arm/mach-at91/board-sam9263ek.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-at91/board-neocore926.c +1 -1
index 9cda3fd..6960778 100644
@@ -129,7 +129,7 @@ static struct spi_board_info neocore926_spi_devices[] = {
 		.max_speed_hz	= 125000 * 16,
 		.bus_num	= 0,
 		.platform_data	= &ads_info,
-		.irq		= AT91SAM9263_ID_IRQ1,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
 	},
 #endif
 };
arch/arm/mach-at91/board-sam9261ek.c +1 -1
index 27b3af1..a9167dd 100644
@@ -309,7 +309,7 @@ static struct spi_board_info ek_spi_devices[] = {
 		.max_speed_hz	= 125000 * 26,	/* (max sample rate @ 3V) * (cmd + data + overhead) */
 		.bus_num	= 0,
 		.platform_data	= &ads_info,
-		.irq		= AT91SAM9261_ID_IRQ0,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0,
 		.controller_data = (void *) AT91_PIN_PA28,	/* CS pin */
 	},
 #endif
arch/arm/mach-at91/board-sam9263ek.c +1 -1
index 073e174..b87dbe2 100644
@@ -132,7 +132,7 @@ static struct spi_board_info ek_spi_devices[] = {
 		.max_speed_hz	= 125000 * 26,	/* (max sample rate @ 3V) * (cmd + data + overhead) */
 		.bus_num	= 0,
 		.platform_data	= &ads_info,
-		.irq		= AT91SAM9263_ID_IRQ1,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
 	},
 #endif
 };
Signature · 1 line
1.7.11.3
#6 lore raw

PATCH 4/8 ARM: at91: fix external interrupt specification in board code

Le 10/24/2012 05:33 PM, Nicolas Ferre a ?crit :

Quoted 5 lines

Since the switch to sparse irq, we have to add the NR_IRQS_LEGACY offset to static irq numbers. It has been forgotten on these SPI irq definitions in board code.

Quoted 47 lines
Cc stable <[email protected]> [v3.6]
---
  arch/arm/mach-at91/board-neocore926.c | 2 +-
  arch/arm/mach-at91/board-sam9261ek.c  | 2 +-
  arch/arm/mach-at91/board-sam9263ek.c  | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-at91/board-neocore926.c +1 -1
index 9cda3fd..6960778 100644
@@ -129,7 +129,7 @@ static struct spi_board_info neocore926_spi_devices[] = {
  		.max_speed_hz	= 125000 * 16,
  		.bus_num	= 0,
  		.platform_data	= &ads_info,
-		.irq		= AT91SAM9263_ID_IRQ1,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
  	},
  #endif
  };
arch/arm/mach-at91/board-sam9261ek.c +1 -1
index 27b3af1..a9167dd 100644
@@ -309,7 +309,7 @@ static struct spi_board_info ek_spi_devices[] = {
  		.max_speed_hz	= 125000 * 26,	/* (max sample rate @ 3V) * (cmd + data + overhead) */
  		.bus_num	= 0,
  		.platform_data	= &ads_info,
-		.irq		= AT91SAM9261_ID_IRQ0,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0,
  		.controller_data = (void *) AT91_PIN_PA28,	/* CS pin */
  	},
  #endif
arch/arm/mach-at91/board-sam9263ek.c +1 -1
index 073e174..b87dbe2 100644
@@ -132,7 +132,7 @@ static struct spi_board_info ek_spi_devices[] = {
  		.max_speed_hz	= 125000 * 26,	/* (max sample rate @ 3V) * (cmd + data + overhead) */
  		.bus_num	= 0,
  		.platform_data	= &ads_info,
-		.irq		= AT91SAM9263_ID_IRQ1,
+		.irq		= NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1,
  	},
  #endif
  };
#7 lore raw

PATCH 5/8 ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.

In reply to Nicolas Ferre

From: Marek Belisko <[email protected]>

---
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91sam9g20ek_common.dtsi +2 -2
index b06c0db..e6391a4 100644
@@ -126,14 +126,14 @@
 		#size-cells = <0>;
 
 		btn3 {
-			label = "Buttin 3";
+			label = "Button 3";
 			gpios = <&pioA 30 1>;
 			linux,code = <0x103>;
 			gpio-key,wakeup;
 		};
 
 		btn4 {
-			label = "Buttin 4";
+			label = "Button 4";
 			gpios = <&pioA 31 1>;
 			linux,code = <0x104>;
 			gpio-key,wakeup;
Signature · 1 line
1.7.11.3
#8 lore raw

PATCH 6/8 ARM: at91/i2c: change id to let i2c-gpio work

In reply to Nicolas Ferre

From: Bo Shen <[email protected]>

The i2c core driver will turn the platform device ID to busnum When using platfrom device ID as -1, it means dynamically assigned the busnum. When writing code, we need to make sure the busnum, and call i2c_register_board_info(int busnum, ...) to register device if using -1, we do not know the value of busnum

In order to solve this issue, set the platform device ID as a fix number Here using 0 to match the busnum used in i2c_regsiter_board_info()

---
 arch/arm/mach-at91/at91rm9200_devices.c  | 2 +-
 arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9rl_devices.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-at91/at91rm9200_devices.c +1 -1
index a563189..7cd8053 100644
@@ -479,7 +479,7 @@ static struct i2c_gpio_platform_data pdata = {
 
 static struct platform_device at91rm9200_twi_device = {
 	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
 	.dev.platform_data	= &pdata,
 };
 
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
index a76b868..44385a4 100644
@@ -389,7 +389,7 @@ static struct i2c_gpio_platform_data pdata = {
 
 static struct platform_device at91sam9260_twi_device = {
 	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
 	.dev.platform_data	= &pdata,
 };
 
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
index 9752f17..0256a00 100644
@@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = {
 
 static struct platform_device at91sam9261_twi_device = {
 	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
 	.dev.platform_data	= &pdata,
 };
 
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
index 8dde220..23b6384 100644
@@ -567,7 +567,7 @@ static struct i2c_gpio_platform_data pdata = {
 
 static struct platform_device at91sam9263_twi_device = {
 	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
 	.dev.platform_data	= &pdata,
 };
 
arch/arm/mach-at91/at91sam9rl_devices.c +1 -1
index d6ca054..3d2c81d 100644
@@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = {
 
 static struct platform_device at91sam9rl_twi_device = {
 	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
 	.dev.platform_data	= &pdata,
 };
 
Signature · 1 line
1.7.11.3
#9 lore raw

PATCH 6/8 ARM: at91/i2c: change id to let i2c-gpio work

Le 10/24/2012 05:33 PM, Nicolas Ferre a ?crit :

Quoted 8 lines

From: Bo Shen <[email protected]>

The i2c core driver will turn the platform device ID to busnum When using platfrom device ID as -1, it means dynamically assigned the busnum. When writing code, we need to make sure the busnum, and call i2c_register_board_info(int busnum, ...) to register device if using -1, we do not know the value of busnum

Quoted 6 lines

In order to solve this issue, set the platform device ID as a fix number Here using 0 to match the busnum used in i2c_regsiter_board_info()

Quoted 75 lines
Cc stable <[email protected]> [very long time]
---
  arch/arm/mach-at91/at91rm9200_devices.c  | 2 +-
  arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9rl_devices.c  | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-at91/at91rm9200_devices.c +1 -1
index a563189..7cd8053 100644
@@ -479,7 +479,7 @@ static struct i2c_gpio_platform_data pdata = {
 
  static struct platform_device at91rm9200_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,
  };
 
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
index a76b868..44385a4 100644
@@ -389,7 +389,7 @@ static struct i2c_gpio_platform_data pdata = {
 
  static struct platform_device at91sam9260_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,
  };
 
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
index 9752f17..0256a00 100644
@@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = {
 
  static struct platform_device at91sam9261_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,
  };
 
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
index 8dde220..23b6384 100644
@@ -567,7 +567,7 @@ static struct i2c_gpio_platform_data pdata = {
 
  static struct platform_device at91sam9263_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,
  };
 
arch/arm/mach-at91/at91sam9rl_devices.c +1 -1
index d6ca054..3d2c81d 100644
@@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = {
 
  static struct platform_device at91sam9rl_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,
  };
 
#10 lore raw

PATCH 7/8 ARM: at91/i2c: change id to let i2c-at91 work

In reply to Nicolas Ferre

From: Bo Shen <[email protected]>

The i2c core driver will turn the platform device ID to busnum When using platfrom device ID as -1, it means dynamically assigned the busnum. When writing code, we need to make sure the busnum, and call i2c_register_board_info(int busnum, ...) to register device if using -1, we do not know the value of busnum

In order to solve this issue, set the platform device ID as a fix number Here using 0 to match the busnum used in i2c_regsiter_board_info()

---
 arch/arm/mach-at91/at91rm9200.c          | 2 +-
 arch/arm/mach-at91/at91rm9200_devices.c  | 2 +-
 arch/arm/mach-at91/at91sam9260.c         | 4 ++--
 arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9261.c         | 4 ++--
 arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9263.c         | 2 +-
 arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
 arch/arm/mach-at91/at91sam9rl_devices.c  | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-at91/at91rm9200.c +1 -1
index b4f0565..5269825 100644
@@ -187,7 +187,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
 	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
 	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk),
 	/* fake hclk clock */
 	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
 	CLKDEV_CON_ID("pioA", &pioA_clk),
arch/arm/mach-at91/at91rm9200_devices.c +1 -1
index 7cd8053..1e122bc 100644
@@ -512,7 +512,7 @@ static struct resource twi_resources[] = {
 
 static struct platform_device at91rm9200_twi_device = {
 	.name		= "i2c-at91rm9200",
-	.id		= -1,
+	.id		= 0,
 	.resource	= twi_resources,
 	.num_resources	= ARRAY_SIZE(twi_resources),
 };
arch/arm/mach-at91/at91sam9260.c +2 -2
index ad29f93..f820261 100644
@@ -211,8 +211,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
 	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
 	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk),
 	/* more usart lookup table for DT entries */
 	CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
 	CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
index 44385a4..aa1e587 100644
@@ -421,7 +421,7 @@ static struct resource twi_resources[] = {
 };
 
 static struct platform_device at91sam9260_twi_device = {
-	.id		= -1,
+	.id		= 0,
 	.resource	= twi_resources,
 	.num_resources	= ARRAY_SIZE(twi_resources),
 };
arch/arm/mach-at91/at91sam9261.c +2 -2
index 8d999eb..04295c0 100644
@@ -178,8 +178,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
 	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
 	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk),
 	CLKDEV_CON_ID("pioA", &pioA_clk),
 	CLKDEV_CON_ID("pioB", &pioB_clk),
 	CLKDEV_CON_ID("pioC", &pioC_clk),
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
index 0256a00..b948769 100644
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = {
 };
 
 static struct platform_device at91sam9261_twi_device = {
-	.id		= -1,
+	.id		= 0,
 	.resource	= twi_resources,
 	.num_resources	= ARRAY_SIZE(twi_resources),
 };
arch/arm/mach-at91/at91sam9263.c +1 -1
index 6a01d03..d6f9c23 100644
@@ -193,7 +193,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
 	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
 	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
 	/* fake hclk clock */
 	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
 	CLKDEV_CON_ID("pioA", &pioA_clk),
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
index 23b6384..cb85da2 100644
@@ -600,7 +600,7 @@ static struct resource twi_resources[] = {
 
 static struct platform_device at91sam9263_twi_device = {
 	.name		= "i2c-at91sam9260",
-	.id		= -1,
+	.id		= 0,
 	.resource	= twi_resources,
 	.num_resources	= ARRAY_SIZE(twi_resources),
 };
arch/arm/mach-at91/at91sam9rl_devices.c +1 -1
index 3d2c81d..5047bdc 100644
@@ -347,7 +347,7 @@ static struct resource twi_resources[] = {
 
 static struct platform_device at91sam9rl_twi_device = {
 	.name		= "i2c-at91sam9g20",
-	.id		= -1,
+	.id		= 0,
 	.resource	= twi_resources,
 	.num_resources	= ARRAY_SIZE(twi_resources),
 };
Signature · 1 line
1.7.11.3
#11 lore raw

PATCH 7/8 ARM: at91/i2c: change id to let i2c-at91 work

Le 10/24/2012 05:33 PM, Nicolas Ferre a ?crit :

Quoted 8 lines

From: Bo Shen <[email protected]>

The i2c core driver will turn the platform device ID to busnum When using platfrom device ID as -1, it means dynamically assigned the busnum. When writing code, we need to make sure the busnum, and call i2c_register_board_info(int busnum, ...) to register device if using -1, we do not know the value of busnum

Quoted 5 lines

In order to solve this issue, set the platform device ID as a fix number Here using 0 to match the busnum used in i2c_regsiter_board_info()

Quoted 134 lines
---
  arch/arm/mach-at91/at91rm9200.c          | 2 +-
  arch/arm/mach-at91/at91rm9200_devices.c  | 2 +-
  arch/arm/mach-at91/at91sam9260.c         | 4 ++--
  arch/arm/mach-at91/at91sam9260_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9261.c         | 4 ++--
  arch/arm/mach-at91/at91sam9261_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9263.c         | 2 +-
  arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
  arch/arm/mach-at91/at91sam9rl_devices.c  | 2 +-
  9 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-at91/at91rm9200.c +1 -1
index b4f0565..5269825 100644
@@ -187,7 +187,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
  	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
  	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
  	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk),
  	/* fake hclk clock */
  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
  	CLKDEV_CON_ID("pioA", &pioA_clk),
arch/arm/mach-at91/at91rm9200_devices.c +1 -1
index 7cd8053..1e122bc 100644
@@ -512,7 +512,7 @@ static struct resource twi_resources[] = {
 
  static struct platform_device at91rm9200_twi_device = {
  	.name		= "i2c-at91rm9200",
-	.id		= -1,
+	.id		= 0,
  	.resource	= twi_resources,
  	.num_resources	= ARRAY_SIZE(twi_resources),
  };
arch/arm/mach-at91/at91sam9260.c +2 -2
index ad29f93..f820261 100644
@@ -211,8 +211,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
  	CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk),
  	CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk),
  	CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk),
  	/* more usart lookup table for DT entries */
  	CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
  	CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
arch/arm/mach-at91/at91sam9260_devices.c +1 -1
index 44385a4..aa1e587 100644
@@ -421,7 +421,7 @@ static struct resource twi_resources[] = {
  };
 
  static struct platform_device at91sam9260_twi_device = {
-	.id		= -1,
+	.id		= 0,
  	.resource	= twi_resources,
  	.num_resources	= ARRAY_SIZE(twi_resources),
  };
arch/arm/mach-at91/at91sam9261.c +2 -2
index 8d999eb..04295c0 100644
@@ -178,8 +178,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
  	CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
  	CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk),
  	CLKDEV_CON_ID("pioA", &pioA_clk),
  	CLKDEV_CON_ID("pioB", &pioB_clk),
  	CLKDEV_CON_ID("pioC", &pioC_clk),
arch/arm/mach-at91/at91sam9261_devices.c +1 -1
index 0256a00..b948769 100644
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = {
  };
 
  static struct platform_device at91sam9261_twi_device = {
-	.id		= -1,
+	.id		= 0,
  	.resource	= twi_resources,
  	.num_resources	= ARRAY_SIZE(twi_resources),
  };
arch/arm/mach-at91/at91sam9263.c +1 -1
index 6a01d03..d6f9c23 100644
@@ -193,7 +193,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
  	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
  	CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
  	CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
-	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk),
+	CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
  	/* fake hclk clock */
  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
  	CLKDEV_CON_ID("pioA", &pioA_clk),
arch/arm/mach-at91/at91sam9263_devices.c +1 -1
index 23b6384..cb85da2 100644
@@ -600,7 +600,7 @@ static struct resource twi_resources[] = {
 
  static struct platform_device at91sam9263_twi_device = {
  	.name		= "i2c-at91sam9260",
-	.id		= -1,
+	.id		= 0,
  	.resource	= twi_resources,
  	.num_resources	= ARRAY_SIZE(twi_resources),
  };
arch/arm/mach-at91/at91sam9rl_devices.c +1 -1
index 3d2c81d..5047bdc 100644
@@ -347,7 +347,7 @@ static struct resource twi_resources[] = {
 
  static struct platform_device at91sam9rl_twi_device = {
  	.name		= "i2c-at91sam9g20",
-	.id		= -1,
+	.id		= 0,
  	.resource	= twi_resources,
  	.num_resources	= ARRAY_SIZE(twi_resources),
  };
#12 lore raw

PATCH 8/8 ARM: at91: drop duplicated config SOC_AT91SAM9 entry

In reply to Nicolas Ferre

From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

---
 arch/arm/mach-at91/Kconfig | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
arch/arm/mach-at91/Kconfig +2 -8
index b142071..0436242 100644
@@ -21,19 +21,13 @@ config SOC_AT91SAM9
 	bool
 	select CPU_ARM926T
 	select GENERIC_CLOCKEVENTS
+	select MULTI_IRQ_HANDLER
+	select SPARSE_IRQ
 
 menu "Atmel AT91 System-on-Chip"
 
 comment "Atmel AT91 Processor"
 
-config SOC_AT91SAM9
-	bool
-	select AT91_SAM9_SMC
-	select AT91_SAM9_TIME
-	select CPU_ARM926T
-	select MULTI_IRQ_HANDLER
-	select SPARSE_IRQ
-
 config SOC_AT91RM9200
 	bool "AT91RM9200"
 	select CPU_ARM920T
Signature · 1 line
1.7.11.3
Acked-by on the v1 series
#13 lore raw
In reply to Nicolas Ferre

Best Regards,
J.

Quoted 55 lines · Nicolas Ferre

Hi all,
I am posting this patch series just before sending a pull-request to Arnd and Olof.
There are 2 new patches that I have just cooked today about external IRQ
handling: please review.
I would like you to double check that I have not made any mistake while collecting the other patches...

Thanks, best regards,

Bo Shen (2):
ARM: at91/i2c: change id to let i2c-gpio work
ARM: at91/i2c: change id to let i2c-at91 work

Ivan Shugov (1):
ARM: at91: at91sam9g10: fix SOC type detection

Jean-Christophe PLAGNIOL-VILLARD (1):
ARM: at91: drop duplicated config SOC_AT91SAM9 entry

Josh Wu (1):
ARM: at91/tc: fix typo in the DT document

Marek Belisko (1):
ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.

Nicolas Ferre (2):
ARM: at91: fix external interrupts in non-DT case
ARM: at91: fix external interrupt specification in board code

 Documentation/devicetree/bindings/arm/atmel-at91.txt |  2 +-
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi          |  4 ++--
 arch/arm/mach-at91/Kconfig                           | 10 ++--------
 arch/arm/mach-at91/at91rm9200.c                      |  2 +-
 arch/arm/mach-at91/at91rm9200_devices.c              |  4 ++--
 arch/arm/mach-at91/at91sam9260.c                     |  4 ++--
 arch/arm/mach-at91/at91sam9260_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9261.c                     |  4 ++--
 arch/arm/mach-at91/at91sam9261_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9263.c                     |  2 +-
 arch/arm/mach-at91/at91sam9263_devices.c             |  4 ++--
 arch/arm/mach-at91/at91sam9rl_devices.c              |  4 ++--
 arch/arm/mach-at91/board-neocore926.c                |  2 +-
 arch/arm/mach-at91/board-sam9261ek.c                 |  2 +-
 arch/arm/mach-at91/board-sam9263ek.c                 |  2 +-
 arch/arm/mach-at91/generic.h                         |  3 ++-
 arch/arm/mach-at91/irq.c                             |  9 +++++++--
 arch/arm/mach-at91/setup.c                           |  4 ++--
 18 files changed, 35 insertions(+), 35 deletions(-)
Signature · 1 line
1.7.11.3