linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] at91: 3.7 fixes patch series
@ 2012-10-24 15:33 Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 1/8] ARM: at91/tc: fix typo in the DT document Nicolas Ferre
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

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(-)

-- 
1.7.11.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] ARM: at91/tc: fix typo in the DT document
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 2/8] ARM: at91: at91sam9g10: fix SOC type detection Nicolas Ferre
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Josh Wu <josh.wu@atmel.com>

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [v3.4]
---
 Documentation/devicetree/bindings/arm/atmel-at91.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
index ecc81e3..d187e9f 100644
--- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
@@ -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
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] ARM: at91: at91sam9g10: fix SOC type detection
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 1/8] ARM: at91/tc: fix typo in the DT document Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 3/8] ARM: at91: fix external interrupts in non-DT case Nicolas Ferre
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Ivan Shugov <ivan.shugov@gmail.com>

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.

Signed-off-by: Ivan Shugov <ivan.shugov@gmail.com>
[nicolas.ferre@atmel.com: change commit message]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [v3.1] # since commit 8c3583b6
---
 arch/arm/mach-at91/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index da9881b..6a3d4bb 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -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;
 	}
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] ARM: at91: fix external interrupts in non-DT case
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 1/8] ARM: at91/tc: fix typo in the DT document Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 2/8] ARM: at91: at91sam9g10: fix SOC type detection Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 4/8] ARM: at91: fix external interrupt specification in board code Nicolas Ferre
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

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.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [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(-)

diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index f496506..b62f560e 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -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,
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index 1e02c0e..febc2ee 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -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");
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 6a3d4bb..0b32c81 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -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();
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] ARM: at91: fix external interrupt specification in board code
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (2 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 3/8] ARM: at91: fix external interrupts in non-DT case Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 5/8] ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels Nicolas Ferre
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

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.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [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(-)

diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 9cda3fd..6960778 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -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
 };
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 27b3af1..a9167dd 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -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
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 073e174..b87dbe2 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -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
 };
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (3 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 4/8] ARM: at91: fix external interrupt specification in board code Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 6/8] ARM: at91/i2c: change id to let i2c-gpio work Nicolas Ferre
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Marek Belisko <marek.belisko@open-nandra.com>

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index b06c0db..e6391a4 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -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;
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] ARM: at91/i2c: change id to let i2c-gpio work
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (4 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 5/8] ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 7/8] ARM: at91/i2c: change id to let i2c-at91 work Nicolas Ferre
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Bo Shen <voice.shen@atmel.com>

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()

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: stable <stable@vger.kernel.org> [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(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index a563189..7cd8053 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -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,
 };
 
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index a76b868..44385a4 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -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,
 };
 
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 9752f17..0256a00 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -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,
 };
 
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 8dde220..23b6384 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -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,
 };
 
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index d6ca054..3d2c81d 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -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,
 };
 
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] ARM: at91/i2c: change id to let i2c-at91 work
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (5 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 6/8] ARM: at91/i2c: change id to let i2c-gpio work Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:33 ` [PATCH 8/8] ARM: at91: drop duplicated config SOC_AT91SAM9 entry Nicolas Ferre
  2012-10-24 15:44 ` [PATCH 0/8] at91: 3.7 fixes patch series Jean-Christophe PLAGNIOL-VILLARD
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Bo Shen <voice.shen@atmel.com>

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()

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 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(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index b4f0565..5269825 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -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),
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 7cd8053..1e122bc 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -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),
 };
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index ad29f93..f820261 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -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),
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 44385a4..aa1e587 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -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),
 };
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 8d999eb..04295c0 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -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),
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 0256a00..b948769 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -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),
 };
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 6a01d03..d6f9c23 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -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),
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 23b6384..cb85da2 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -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),
 };
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 3d2c81d..5047bdc 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -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),
 };
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] ARM: at91: drop duplicated config SOC_AT91SAM9 entry
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (6 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 7/8] ARM: at91/i2c: change id to let i2c-at91 work Nicolas Ferre
@ 2012-10-24 15:33 ` Nicolas Ferre
  2012-10-24 15:44 ` [PATCH 0/8] at91: 3.7 fixes patch series Jean-Christophe PLAGNIOL-VILLARD
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2012-10-24 15:33 UTC (permalink / raw)
  To: plagnioj, ludovic.desroches
  Cc: linux-arm-kernel, linux-kernel, nicolas.ferre, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/Kconfig | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index b142071..0436242 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -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
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/8] at91: 3.7 fixes patch series
  2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
                   ` (7 preceding siblings ...)
  2012-10-24 15:33 ` [PATCH 8/8] ARM: at91: drop duplicated config SOC_AT91SAM9 entry Nicolas Ferre
@ 2012-10-24 15:44 ` Jean-Christophe PLAGNIOL-VILLARD
  8 siblings, 0 replies; 10+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-24 15:44 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: ludovic.desroches, linux-arm-kernel, linux-kernel, voice.shen,
	marek.belisko, ivan.shugov, josh.wu

Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.
On 17:33 Wed 24 Oct     , Nicolas Ferre wrote:
> 
> 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(-)
> 
> -- 
> 1.7.11.3
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-10-24 15:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24 15:33 [PATCH 0/8] at91: 3.7 fixes patch series Nicolas Ferre
2012-10-24 15:33 ` [PATCH 1/8] ARM: at91/tc: fix typo in the DT document Nicolas Ferre
2012-10-24 15:33 ` [PATCH 2/8] ARM: at91: at91sam9g10: fix SOC type detection Nicolas Ferre
2012-10-24 15:33 ` [PATCH 3/8] ARM: at91: fix external interrupts in non-DT case Nicolas Ferre
2012-10-24 15:33 ` [PATCH 4/8] ARM: at91: fix external interrupt specification in board code Nicolas Ferre
2012-10-24 15:33 ` [PATCH 5/8] ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels Nicolas Ferre
2012-10-24 15:33 ` [PATCH 6/8] ARM: at91/i2c: change id to let i2c-gpio work Nicolas Ferre
2012-10-24 15:33 ` [PATCH 7/8] ARM: at91/i2c: change id to let i2c-at91 work Nicolas Ferre
2012-10-24 15:33 ` [PATCH 8/8] ARM: at91: drop duplicated config SOC_AT91SAM9 entry Nicolas Ferre
2012-10-24 15:44 ` [PATCH 0/8] at91: 3.7 fixes patch series Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).