Skip to contentSkip to conversation

sparc32,leon: APBUART driver must use archdata to get IRQ number

PATCH Superseded Daniel Hellstrom 2 participants 3 messages Mar 16, 2011 – Mar 17, 2011 TTY layer and serial drivers

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sparc32,leon: APBUART driver must use archdata to get IRQ number

See Commit id 1636f8ac2b08410df4766449f7c86b912443cd99, this patch is similar to 19e4875fb21a69fbf620e84769a74d189c69c58d.

---
 drivers/tty/serial/apbuart.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
drivers/tty/serial/apbuart.c +5 -7
index 095a5d5..de286d9 100644
@@ -556,10 +556,9 @@ static struct uart_driver grlib_apbuart_driver = {
 static int __devinit apbuart_probe(struct platform_device *op,
 				   const struct of_device_id *match)
 {
-	int i = -1;
+	int i;
 	struct uart_port *port = NULL;
 
-	i = 0;
 	for (i = 0; i < grlib_apbuart_port_nr; i++) {
 		if (op->dev.of_node = grlib_apbuart_nodes[i])
 			break;
@@ -567,6 +566,7 @@ static int __devinit apbuart_probe(struct platform_device *op,
 
 	port = &grlib_apbuart_ports[i];
 	port->dev = &op->dev;
+	port->irq = op->archdata.irqs[0];
 
 	uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
 
@@ -616,7 +616,7 @@ static int grlib_apbuart_configure(void)
 	freq_khz = *prop;
 
 	for_each_matching_node(np, apbuart_match) {
-		const int *irqs, *ampopts;
+		const int *ampopts;
 		const struct amba_prom_registers *regs;
 		struct uart_port *port;
 		unsigned long addr;
@@ -624,11 +624,9 @@ static int grlib_apbuart_configure(void)
 		ampopts = of_get_property(np, "ampopts", NULL);
 		if (ampopts && (*ampopts = 0))
 			continue; /* Ignore if used by another OS instance */
-
-		irqs = of_get_property(np, "interrupts", NULL);
 		regs = of_get_property(np, "reg", NULL);
 
-		if (!irqs || !regs)
+		if (!regs)
 			continue;
 
 		grlib_apbuart_nodes[line] = np;
@@ -639,7 +637,7 @@ static int grlib_apbuart_configure(void)
 
 		port->mapbase = addr;
 		port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
-		port->irq = *irqs;
+		port->irq = 0;
 		port->iotype = UPIO_MEM;
 		port->ops = &grlib_apbuart_ops;
 		port->flags = UPF_BOOT_AUTOCONF;
Signature · 1 line
1.5.4
Acked-by on v1 1/2
#1 lore raw

Re: [PATCH 1/2] sparc32,leon: APBUART driver must use archdata to

Quoted 4 lines · Daniel Hellstrom

See Commit id 1636f8ac2b08410df4766449f7c86b912443cd99, this patch is similar to 19e4875fb21a69fbf620e84769a74d189c69c58d.

Patch looks good.
For commit reference always include the title of the patch:
"of/sparc: fix build regression from of_device changes"

Please fix up and add:

Sam

#2 lore raw

Re: [PATCH 1/2] sparc32,leon: APBUART driver must use archdata to

In reply to Daniel Hellstrom
Quoted 10 lines · Sam Ravnborg
Quoted 6 lines · Daniel Hellstrom

See Commit id 1636f8ac2b08410df4766449f7c86b912443cd99, this patch is similar to 19e4875fb21a69fbf620e84769a74d189c69c58d.

Quoted 10 lines

Patch looks good.
For commit reference always include the title of the patch:
"of/sparc: fix build regression from of_device changes"

Please fix up and add:

Sam

Thanks, I have updated and resubmitted the patch.

Daniel