All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number
@ 2011-03-17  7:06 Daniel Hellstrom
  2011-03-30  9:26 ` [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata David Miller
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Daniel Hellstrom @ 2011-03-17  7:06 UTC (permalink / raw)
  To: sparclinux

See Commit id 1636f8ac2b08410df4766449f7c86b912443cd99 (sparc/of:
Move of_device fields into struct pdev_archdata), this patch
is similar to 19e4875fb21a69fbf620e84769a74d189c69c58d (of/sparc:
fix build regression from of_device changes)

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/tty/serial/apbuart.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index 095a5d5..de286d9 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -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;
-- 
1.5.4


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

* Re: [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata
  2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
@ 2011-03-30  9:26 ` David Miller
  2011-03-30  9:46 ` Daniel Hellstrom
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-30  9:26 UTC (permalink / raw)
  To: sparclinux


Please make it explicit and clear in the future when you are posting
patches against Sam's genirq work.

Otherwise I spend a lot of time trying to figure out why your patches
don't apply to me tree.

Thanks.

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

* Re: [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata
  2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
  2011-03-30  9:26 ` [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata David Miller
@ 2011-03-30  9:46 ` Daniel Hellstrom
  2011-03-30  9:53 ` David Miller
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel Hellstrom @ 2011-03-30  9:46 UTC (permalink / raw)
  To: sparclinux


David Miller wrote:

>Please make it explicit and clear in the future when you are posting
>patches against Sam's genirq work.
>
>Otherwise I spend a lot of time trying to figure out why your patches
>don't apply to me tree.
>  
>
Ok, sorry.

The APBUART patches can be applied independent of Sam's patches.

They are neccessary after Sam's patches in order to boot Linux on LEON. 
But are also valid before Sam's patches.

Thanks,
Daniel


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

* Re: [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata
  2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
  2011-03-30  9:26 ` [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata David Miller
  2011-03-30  9:46 ` Daniel Hellstrom
@ 2011-03-30  9:53 ` David Miller
  2011-03-30 10:08 ` Daniel Hellstrom
  2011-03-30 10:34 ` Daniel Hellstrom
  4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-30  9:53 UTC (permalink / raw)
  To: sparclinux

From: Daniel Hellstrom <daniel@gaisler.com>
Date: Wed, 30 Mar 2011 11:46:02 +0200

> The APBUART patches can be applied independent of Sam's patches.

They do not apply to the sparc-2.6 tree at all.

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

* Re: [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata
  2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
                   ` (2 preceding siblings ...)
  2011-03-30  9:53 ` David Miller
@ 2011-03-30 10:08 ` Daniel Hellstrom
  2011-03-30 10:34 ` Daniel Hellstrom
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel Hellstrom @ 2011-03-30 10:08 UTC (permalink / raw)
  To: sparclinux

David Miller wrote:

>From: Daniel Hellstrom <daniel@gaisler.com>
>Date: Wed, 30 Mar 2011 11:46:02 +0200
>
>  
>
>>The APBUART patches can be applied independent of Sam's patches.
>>    
>>
>
>They do not apply to the sparc-2.6 tree at all.
>  
>
Sorry, then I have to investigate why. I will repost.

Daniel

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

* Re: [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata
  2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
                   ` (3 preceding siblings ...)
  2011-03-30 10:08 ` Daniel Hellstrom
@ 2011-03-30 10:34 ` Daniel Hellstrom
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel Hellstrom @ 2011-03-30 10:34 UTC (permalink / raw)
  To: sparclinux

Daniel Hellstrom wrote:

> David Miller wrote:
>
>> From: Daniel Hellstrom <daniel@gaisler.com>
>> Date: Wed, 30 Mar 2011 11:46:02 +0200
>>
>>  
>>
>>> The APBUART patches can be applied independent of Sam's patches.
>>>   
>>
>>
>> They do not apply to the sparc-2.6 tree at all.
>>  
>>
> Sorry, then I have to investigate why. I will repost.

I worked against sparc-next-2.6, perhaps that was the cause. I have 
resent the patches against the sparc-2.6 tree, hopefully these work better.

Thanks,
Daniel


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

end of thread, other threads:[~2011-03-30 10:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17  7:06 [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata to get IRQ number Daniel Hellstrom
2011-03-30  9:26 ` [PATCH 1/2 v2] sparc32,leon: APBUART driver must use archdata David Miller
2011-03-30  9:46 ` Daniel Hellstrom
2011-03-30  9:53 ` David Miller
2011-03-30 10:08 ` Daniel Hellstrom
2011-03-30 10:34 ` Daniel Hellstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.