All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
@ 2011-02-17 20:28 Tobias Klauser
  2011-02-17 20:28 ` [PATCH 1/5] tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer Tobias Klauser
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: nios2-dev

This patchset adds updates taken from the Nios2 Linux port (currently
out-of-tree) repository to the altera_jtaguart driver.

And this time with the correct cover letter right away :-)

Tobias Klauser (5):
  tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
  tty: serial: altera_jtaguart: Remove unused function
    early_altera_jtaguart_setup
  tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
    resources
  tty: serial: altera_jtaguart: Fixup type usage of port flags
  tty: serial: altera_jtaguart: Add device tree support

 .../devicetree/bindings/altera_jtaguart.txt        |    4 +
 drivers/tty/serial/altera_jtaguart.c               |  100 +++++++++++---------
 2 files changed, 60 insertions(+), 44 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/altera_jtaguart.txt


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

* [PATCH 1/5] tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
@ 2011-02-17 20:28 ` Tobias Klauser
  2011-02-17 20:29 ` [PATCH 2/5] tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup Tobias Klauser
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: nios2-dev

This fixes a sparse warning.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index f9b49b5..0c0a8b6 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -384,7 +384,7 @@ static int __init altera_jtaguart_console_setup(struct console *co,
 	if (co->index < 0 || co->index >= ALTERA_JTAGUART_MAXPORTS)
 		return -EINVAL;
 	port = &altera_jtaguart_ports[co->index].port;
-	if (port->membase == 0)
+	if (port->membase == NULL)
 		return -ENODEV;
 	return 0;
 }
-- 
1.7.0.4


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

* [PATCH 2/5] tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
  2011-02-17 20:28 ` [PATCH 1/5] tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer Tobias Klauser
@ 2011-02-17 20:29 ` Tobias Klauser
  2011-02-17 20:29 ` [PATCH 3/5] tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources Tobias Klauser
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: nios2-dev

This is not even used in nios2 arch code anymore.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 0c0a8b6..94ccf47 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -305,28 +305,6 @@ static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS];
 
 #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE)
 
-int __init early_altera_jtaguart_setup(struct altera_jtaguart_platform_uart
-				       *platp)
-{
-	struct uart_port *port;
-	int i;
-
-	for (i = 0; i < ALTERA_JTAGUART_MAXPORTS && platp[i].mapbase; i++) {
-		port = &altera_jtaguart_ports[i].port;
-
-		port->line = i;
-		port->type = PORT_ALTERA_JTAGUART;
-		port->mapbase = platp[i].mapbase;
-		port->membase = ioremap(port->mapbase, ALTERA_JTAGUART_SIZE);
-		port->iotype = SERIAL_IO_MEM;
-		port->irq = platp[i].irq;
-		port->flags = ASYNC_BOOT_AUTOCONF;
-		port->ops = &altera_jtaguart_ops;
-	}
-
-	return 0;
-}
-
 #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS)
 static void altera_jtaguart_console_putc(struct console *co, const char c)
 {
-- 
1.7.0.4


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

* [PATCH 3/5] tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
  2011-02-17 20:28 ` [PATCH 1/5] tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer Tobias Klauser
  2011-02-17 20:29 ` [PATCH 2/5] tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup Tobias Klauser
@ 2011-02-17 20:29 ` Tobias Klauser
  2011-02-17 20:29 ` [PATCH 4/5] tty: serial: altera_jtaguart: Fixup type usage of port flags Tobias Klauser
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: nios2-dev

This will make it easier to get the driver to support device tree. The
old platform data method is still supported though.

Also change the driver to use only one platform device per port.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c |   61 +++++++++++++++++++++++----------
 1 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 94ccf47..aa2a4ca 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -409,22 +409,45 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev)
 {
 	struct altera_jtaguart_platform_uart *platp = pdev->dev.platform_data;
 	struct uart_port *port;
-	int i;
+	struct resource *res_irq, *res_mem;
+	int i = pdev->id;
 
-	for (i = 0; i < ALTERA_JTAGUART_MAXPORTS && platp[i].mapbase; i++) {
-		port = &altera_jtaguart_ports[i].port;
+	/* -1 emphasizes that the platform must have one port, no .N suffix */
+	if (i == -1)
+		i = 0;
 
-		port->line = i;
-		port->type = PORT_ALTERA_JTAGUART;
-		port->mapbase = platp[i].mapbase;
-		port->membase = ioremap(port->mapbase, ALTERA_JTAGUART_SIZE);
-		port->iotype = SERIAL_IO_MEM;
-		port->irq = platp[i].irq;
-		port->ops = &altera_jtaguart_ops;
-		port->flags = ASYNC_BOOT_AUTOCONF;
+	if (i >= ALTERA_JTAGUART_MAXPORTS)
+		return -EINVAL;
 
-		uart_add_one_port(&altera_jtaguart_driver, port);
-	}
+	port = &altera_jtaguart_ports[i].port;
+
+	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (res_mem)
+		port->mapbase = res_mem->start;
+	else if (platp)
+		port->mapbase = platp->mapbase;
+	else
+		return -ENODEV;
+
+	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (res_irq)
+		port->irq = res_irq->start;
+	else if (platp)
+		port->irq = platp->irq;
+	else
+		return -ENODEV;
+
+	port->membase = ioremap(port->mapbase, ALTERA_JTAGUART_SIZE);
+	if (!port->membase)
+		return -ENOMEM;
+
+	port->line = i;
+	port->type = PORT_ALTERA_JTAGUART;
+	port->iotype = SERIAL_IO_MEM;
+	port->ops = &altera_jtaguart_ops;
+	port->flags = ASYNC_BOOT_AUTOCONF;
+
+	uart_add_one_port(&altera_jtaguart_driver, port);
 
 	return 0;
 }
@@ -432,13 +455,13 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev)
 static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
 {
 	struct uart_port *port;
-	int i;
+	int i = pdev->id;
 
-	for (i = 0; i < ALTERA_JTAGUART_MAXPORTS; i++) {
-		port = &altera_jtaguart_ports[i].port;
-		if (port)
-			uart_remove_one_port(&altera_jtaguart_driver, port);
-	}
+	if (i == -1)
+		i = 0;
+
+	port = &altera_jtaguart_ports[i].port;
+	uart_remove_one_port(&altera_jtaguart_driver, port);
 
 	return 0;
 }
-- 
1.7.0.4


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

* [PATCH 4/5] tty: serial: altera_jtaguart: Fixup type usage of port flags
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
                   ` (2 preceding siblings ...)
  2011-02-17 20:29 ` [PATCH 3/5] tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources Tobias Klauser
@ 2011-02-17 20:29 ` Tobias Klauser
  2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
  2011-02-17 22:15 ` [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Greg KH
  5 siblings, 0 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: nios2-dev

port->flags is of type upf_t, which corresponds to UPF_* flags.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index aa2a4ca..8f014bb 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -445,7 +445,7 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev)
 	port->type = PORT_ALTERA_JTAGUART;
 	port->iotype = SERIAL_IO_MEM;
 	port->ops = &altera_jtaguart_ops;
-	port->flags = ASYNC_BOOT_AUTOCONF;
+	port->flags = UPF_BOOT_AUTOCONF;
 
 	uart_add_one_port(&altera_jtaguart_driver, port);
 
-- 
1.7.0.4


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

* [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
                   ` (3 preceding siblings ...)
  2011-02-17 20:29 ` [PATCH 4/5] tty: serial: altera_jtaguart: Fixup type usage of port flags Tobias Klauser
@ 2011-02-17 20:30 ` Tobias Klauser
  2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  2011-02-17 22:15 ` [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Greg KH
  5 siblings, 2 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-17 20:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely, linux-serial, devicetree-discuss
  Cc: nios2-dev

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 .../devicetree/bindings/altera_jtaguart.txt        |    4 ++++
 drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/altera_jtaguart.txt

diff --git a/Documentation/devicetree/bindings/altera_jtaguart.txt b/Documentation/devicetree/bindings/altera_jtaguart.txt
new file mode 100644
index 0000000..c152f65
--- /dev/null
+++ b/Documentation/devicetree/bindings/altera_jtaguart.txt
@@ -0,0 +1,4 @@
+Altera JTAG UART
+
+Required properties:
+- compatible : should be "ALTR,juart-1.0"
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 8f014bb..d0f8779 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id altera_jtaguart_match[] = {
+	{ .compatible = "ALTR,juart-1.0", },
+	{},
+}
+MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
+#else
+#define altera_jtaguart_match NULL
+#endif /* CONFIG_OF */
+
 static struct platform_driver altera_jtaguart_platform_driver = {
 	.probe	= altera_jtaguart_probe,
 	.remove	= __devexit_p(altera_jtaguart_remove),
 	.driver	= {
-		.name	= DRV_NAME,
-		.owner	= THIS_MODULE,
+		.name		= DRV_NAME,
+		.owner		= THIS_MODULE,
+		.of_match_table	= altera_jtaguart_match,
 	},
 };
 
-- 
1.7.0.4


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

* Re: [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
                   ` (4 preceding siblings ...)
  2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
@ 2011-02-17 22:15 ` Greg KH
  2011-02-18  7:23   ` Tobias Klauser
  5 siblings, 1 reply; 18+ messages in thread
From: Greg KH @ 2011-02-17 22:15 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: Greg Kroah-Hartman, linux-serial, nios2-dev

On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
> This patchset adds updates taken from the Nios2 Linux port (currently
> out-of-tree) repository to the altera_jtaguart driver.
> 
> And this time with the correct cover letter right away :-)
> 
> Tobias Klauser (5):
>   tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
>   tty: serial: altera_jtaguart: Remove unused function
>     early_altera_jtaguart_setup
>   tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
>     resources
>   tty: serial: altera_jtaguart: Fixup type usage of port flags
>   tty: serial: altera_jtaguart: Add device tree support

After this series, I get the following build error:
	  CC [M]  drivers/tty/serial/altera_jtaguart.o
	  drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ‘of_match_table’ specified in initializer

So I can't take them, sorry.

Care to fix this and resend them after testing them?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-17 22:15 ` [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Greg KH
@ 2011-02-18  7:23   ` Tobias Klauser
  2011-02-18  7:29     ` [Nios2-dev] " Thomas Chou
  0 siblings, 1 reply; 18+ messages in thread
From: Tobias Klauser @ 2011-02-18  7:23 UTC (permalink / raw)
  To: Greg KH; +Cc: Greg Kroah-Hartman, linux-serial, nios2-dev

On 2011-02-17 at 23:15:04 +0100, Greg KH <greg@kroah.com> wrote:
> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
> > This patchset adds updates taken from the Nios2 Linux port (currently
> > out-of-tree) repository to the altera_jtaguart driver.
> > 
> > And this time with the correct cover letter right away :-)
> > 
> > Tobias Klauser (5):
> >   tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
> >   tty: serial: altera_jtaguart: Remove unused function
> >     early_altera_jtaguart_setup
> >   tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
> >     resources
> >   tty: serial: altera_jtaguart: Fixup type usage of port flags
> >   tty: serial: altera_jtaguart: Add device tree support
> 
> After this series, I get the following build error:
> 	  CC [M]  drivers/tty/serial/altera_jtaguart.o
> 	  drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer

Strange, I didn't get that one when compile testing against linux-next
on x86_64. Though it seems I didn't correctly test it on nios2 and I got
a compile error about a missing semicolon in the definition of
altera_jtaguart_match there.

So that might be the culprit for the above message too. I'll resend the
last PATCH of the series to fix that (and of course compile-test it
before).

Thanks a lot and sorry
Tobias

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for  altera_jtaguart driver
  2011-02-18  7:23   ` Tobias Klauser
@ 2011-02-18  7:29     ` Thomas Chou
  2011-02-18  7:45       ` Tobias Klauser
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Chou @ 2011-02-18  7:29 UTC (permalink / raw)
  To: nios2-dev; +Cc: Tobias Klauser, Greg KH, Greg Kroah-Hartman, linux-serial

Hi Tobias,

On 02/18/2011 03:23 PM, Tobias Klauser wrote:
> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
>>> This patchset adds updates taken from the Nios2 Linux port (currently
>>> out-of-tree) repository to the altera_jtaguart driver.
>>>
>>> And this time with the correct cover letter right away :-)
>>>
>>> Tobias Klauser (5):
>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
>>>    tty: serial: altera_jtaguart: Remove unused function
>>>      early_altera_jtaguart_setup
>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
>>>      resources
>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
>>>    tty: serial: altera_jtaguart: Add device tree support
>>
>> After this series, I get the following build error:
>> 	  CC [M]  drivers/tty/serial/altera_jtaguart.o
>> 	  drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
>
> Strange, I didn't get that one when compile testing against linux-next
> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
> a compile error about a missing semicolon in the definition of
> altera_jtaguart_match there.

It might be that the of_match_table patch is available in Grant's branch 
only, which is for v3.6.39. Maybe you can ask Grant to take this patch 5/5.

- Thomas

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-18  7:29     ` [Nios2-dev] " Thomas Chou
@ 2011-02-18  7:45       ` Tobias Klauser
  2011-02-18  8:06         ` Grant Likely
  2011-02-18 15:26         ` Greg KH
  0 siblings, 2 replies; 18+ messages in thread
From: Tobias Klauser @ 2011-02-18  7:45 UTC (permalink / raw)
  To: Thomas Chou
  Cc: Grant Likely, nios2-dev, Greg KH, Greg Kroah-Hartman, linux-serial

On 2011-02-18 at 08:29:58 +0100, Thomas Chou <thomas@wytron.com.tw> wrote:
> On 02/18/2011 03:23 PM, Tobias Klauser wrote:
>> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
>>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
>>>> This patchset adds updates taken from the Nios2 Linux port (currently
>>>> out-of-tree) repository to the altera_jtaguart driver.
>>>>
>>>> And this time with the correct cover letter right away :-)
>>>>
>>>> Tobias Klauser (5):
>>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
>>>>    tty: serial: altera_jtaguart: Remove unused function
>>>>      early_altera_jtaguart_setup
>>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
>>>>      resources
>>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
>>>>    tty: serial: altera_jtaguart: Add device tree support
>>>
>>> After this series, I get the following build error:
>>> 	  CC [M]  drivers/tty/serial/altera_jtaguart.o
>>> 	  drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
>>
>> Strange, I didn't get that one when compile testing against linux-next
>> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
>> a compile error about a missing semicolon in the definition of
>> altera_jtaguart_match there.
>
> It might be that the of_match_table patch is available in Grant's branch  
> only, which is for v3.6.39. Maybe you can ask Grant to take this patch 
> 5/5.

That explains it, thanks Thomas.

Greg, care to take only patches 1/5 to 4/5 for now? I'll resubmit 5/5
for the 2.6.39 merge window, unless Grant already wants to take this to
his tree.

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

* [PATCH 5/5 v2] tty: serial: altera_jtaguart: Add device tree support
  2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
@ 2011-02-18  7:54   ` Tobias Klauser
  2011-02-18  7:59     ` Grant Likely
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
  1 sibling, 1 reply; 18+ messages in thread
From: Tobias Klauser @ 2011-02-18  7:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely, linux-serial, devicetree-discuss
  Cc: nios2-dev

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 .../devicetree/bindings/altera_jtaguart.txt        |    4 ++++
 drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/altera_jtaguart.txt

diff --git a/Documentation/devicetree/bindings/altera_jtaguart.txt b/Documentation/devicetree/bindings/altera_jtaguart.txt
new file mode 100644
index 0000000..c152f65
--- /dev/null
+++ b/Documentation/devicetree/bindings/altera_jtaguart.txt
@@ -0,0 +1,4 @@
+Altera JTAG UART
+
+Required properties:
+- compatible : should be "ALTR,juart-1.0"
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 8f014bb..60e049b 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id altera_jtaguart_match[] = {
+	{ .compatible = "ALTR,juart-1.0", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
+#else
+#define altera_jtaguart_match NULL
+#endif /* CONFIG_OF */
+
 static struct platform_driver altera_jtaguart_platform_driver = {
 	.probe	= altera_jtaguart_probe,
 	.remove	= __devexit_p(altera_jtaguart_remove),
 	.driver	= {
-		.name	= DRV_NAME,
-		.owner	= THIS_MODULE,
+		.name		= DRV_NAME,
+		.owner		= THIS_MODULE,
+		.of_match_table	= altera_jtaguart_match,
 	},
 };
 
-- 
1.7.0.4


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

* Re: [PATCH 5/5 v2] tty: serial: altera_jtaguart: Add device tree support
  2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
@ 2011-02-18  7:59     ` Grant Likely
  0 siblings, 0 replies; 18+ messages in thread
From: Grant Likely @ 2011-02-18  7:59 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Greg Kroah-Hartman, linux-serial, devicetree-discuss, nios2-dev

On Fri, Feb 18, 2011 at 12:54 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> Advertise the possibility to use this driver with device tree if
> CONFIG_OF is set.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  .../devicetree/bindings/altera_jtaguart.txt        |    4 ++++
>  drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
>  2 files changed, 17 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/altera_jtaguart.txt
>
> diff --git a/Documentation/devicetree/bindings/altera_jtaguart.txt b/Documentation/devicetree/bindings/altera_jtaguart.txt
> new file mode 100644
> index 0000000..c152f65
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/altera_jtaguart.txt

This should be in
Documentation/devicetree/bindings/serial/altera_jtaguart.txt, but
otherwise:

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> @@ -0,0 +1,4 @@
> +Altera JTAG UART
> +
> +Required properties:
> +- compatible : should be "ALTR,juart-1.0"
> diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> index 8f014bb..60e049b 100644
> --- a/drivers/tty/serial/altera_jtaguart.c
> +++ b/drivers/tty/serial/altera_jtaguart.c
> @@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
>        return 0;
>  }
>
> +#ifdef CONFIG_OF
> +static struct of_device_id altera_jtaguart_match[] = {
> +       { .compatible = "ALTR,juart-1.0", },
> +       {},
> +};
> +MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
> +#else
> +#define altera_jtaguart_match NULL
> +#endif /* CONFIG_OF */
> +
>  static struct platform_driver altera_jtaguart_platform_driver = {
>        .probe  = altera_jtaguart_probe,
>        .remove = __devexit_p(altera_jtaguart_remove),
>        .driver = {
> -               .name   = DRV_NAME,
> -               .owner  = THIS_MODULE,
> +               .name           = DRV_NAME,
> +               .owner          = THIS_MODULE,
> +               .of_match_table = altera_jtaguart_match,
>        },
>  };
>
> --
> 1.7.0.4
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-18  7:45       ` Tobias Klauser
@ 2011-02-18  8:06         ` Grant Likely
  2011-02-18  8:11           ` Tobias Klauser
  2011-02-18 15:26         ` Greg KH
  1 sibling, 1 reply; 18+ messages in thread
From: Grant Likely @ 2011-02-18  8:06 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Thomas Chou, nios2-dev, Greg KH, Greg Kroah-Hartman, linux-serial

On Fri, Feb 18, 2011 at 12:45 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> On 2011-02-18 at 08:29:58 +0100, Thomas Chou <thomas@wytron.com.tw> wrote:
>> On 02/18/2011 03:23 PM, Tobias Klauser wrote:
>>> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
>>>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
>>>>> This patchset adds updates taken from the Nios2 Linux port (currently
>>>>> out-of-tree) repository to the altera_jtaguart driver.
>>>>>
>>>>> And this time with the correct cover letter right away :-)
>>>>>
>>>>> Tobias Klauser (5):
>>>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
>>>>>    tty: serial: altera_jtaguart: Remove unused function
>>>>>      early_altera_jtaguart_setup
>>>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
>>>>>      resources
>>>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
>>>>>    tty: serial: altera_jtaguart: Add device tree support
>>>>
>>>> After this series, I get the following build error:
>>>>       CC [M]  drivers/tty/serial/altera_jtaguart.o
>>>>       drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
>>>
>>> Strange, I didn't get that one when compile testing against linux-next
>>> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
>>> a compile error about a missing semicolon in the definition of
>>> altera_jtaguart_match there.
>>
>> It might be that the of_match_table patch is available in Grant's branch
>> only, which is for v3.6.39. Maybe you can ask Grant to take this patch
>> 5/5.
>
> That explains it, thanks Thomas.
>
> Greg, care to take only patches 1/5 to 4/5 for now? I'll resubmit 5/5
> for the 2.6.39 merge window, unless Grant already wants to take this to
> his tree.

I'm happy to take this patch if it doesn't depend on the first 4.
Alternately Greg, you could merge commit c9e358dfc "driver-core:
remove conditionals around devicetree pointers" from my
devicetree/test branch on git://git.secretlab.ca/git/linux-2.6.  I
won't be rebasing that commit and it is the first commit on top of
2.6.38-rc1.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* [PATCH 5/5 v3] tty: serial: altera_jtaguart: Add device tree support
       [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
@ 2011-02-18  8:10     ` Tobias Klauser
  2011-02-28  8:26       ` Grant Likely
  0 siblings, 1 reply; 18+ messages in thread
From: Tobias Klauser @ 2011-02-18  8:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Grant Likely,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: nios2-dev-1eJk0qcHJCcaeqlQEoCUNoJY59XmG8rH

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
---
v3:
 - put device tree binding documentation in the correct place (thanks Grant
   Likely)
v2:
 - add missing semicolon after definition of altera_jtaguart_match

 .../devicetree/bindings/serial/altera_jtaguart.txt |    4 ++++
 drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/altera_jtaguart.txt

diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
new file mode 100644
index 0000000..c152f65
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
@@ -0,0 +1,4 @@
+Altera JTAG UART
+
+Required properties:
+- compatible : should be "ALTR,juart-1.0"
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 8f014bb..60e049b 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id altera_jtaguart_match[] = {
+	{ .compatible = "ALTR,juart-1.0", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
+#else
+#define altera_jtaguart_match NULL
+#endif /* CONFIG_OF */
+
 static struct platform_driver altera_jtaguart_platform_driver = {
 	.probe	= altera_jtaguart_probe,
 	.remove	= __devexit_p(altera_jtaguart_remove),
 	.driver	= {
-		.name	= DRV_NAME,
-		.owner	= THIS_MODULE,
+		.name		= DRV_NAME,
+		.owner		= THIS_MODULE,
+		.of_match_table	= altera_jtaguart_match,
 	},
 };
 
-- 
1.7.0.4

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-18  8:06         ` Grant Likely
@ 2011-02-18  8:11           ` Tobias Klauser
  2011-02-18 17:20             ` Grant Likely
  0 siblings, 1 reply; 18+ messages in thread
From: Tobias Klauser @ 2011-02-18  8:11 UTC (permalink / raw)
  To: Grant Likely
  Cc: Thomas Chou, nios2-dev, Greg KH, Greg Kroah-Hartman, linux-serial

On 2011-02-18 at 09:06:15 +0100, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Fri, Feb 18, 2011 at 12:45 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> > On 2011-02-18 at 08:29:58 +0100, Thomas Chou <thomas@wytron.com.tw> wrote:
> >> On 02/18/2011 03:23 PM, Tobias Klauser wrote:
> >>> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
> >>>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
> >>>>> This patchset adds updates taken from the Nios2 Linux port (currently
> >>>>> out-of-tree) repository to the altera_jtaguart driver.
> >>>>>
> >>>>> And this time with the correct cover letter right away :-)
> >>>>>
> >>>>> Tobias Klauser (5):
> >>>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
> >>>>>    tty: serial: altera_jtaguart: Remove unused function
> >>>>>      early_altera_jtaguart_setup
> >>>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
> >>>>>      resources
> >>>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
> >>>>>    tty: serial: altera_jtaguart: Add device tree support
> >>>>
> >>>> After this series, I get the following build error:
> >>>>       CC [M]  drivers/tty/serial/altera_jtaguart.o
> >>>>       drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
> >>>
> >>> Strange, I didn't get that one when compile testing against linux-next
> >>> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
> >>> a compile error about a missing semicolon in the definition of
> >>> altera_jtaguart_match there.
> >>
> >> It might be that the of_match_table patch is available in Grant's branch
> >> only, which is for v3.6.39. Maybe you can ask Grant to take this patch
> >> 5/5.
> >
> > That explains it, thanks Thomas.
> >
> > Greg, care to take only patches 1/5 to 4/5 for now? I'll resubmit 5/5
> > for the 2.6.39 merge window, unless Grant already wants to take this to
> > his tree.
> 
> I'm happy to take this patch if it doesn't depend on the first 4.
> Alternately Greg, you could merge commit c9e358dfc "driver-core:
> remove conditionals around devicetree pointers" from my
> devicetree/test branch on git://git.secretlab.ca/git/linux-2.6.  I
> won't be rebasing that commit and it is the first commit on top of
> 2.6.38-rc1.

The patch doesn't depend on the first 4, so you could take it if Greg
doesn't oppose.

Thanks
Tobias

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-18  7:45       ` Tobias Klauser
  2011-02-18  8:06         ` Grant Likely
@ 2011-02-18 15:26         ` Greg KH
  1 sibling, 0 replies; 18+ messages in thread
From: Greg KH @ 2011-02-18 15:26 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Thomas Chou, Grant Likely, nios2-dev, Greg KH, linux-serial

On Fri, Feb 18, 2011 at 08:45:42AM +0100, Tobias Klauser wrote:
> On 2011-02-18 at 08:29:58 +0100, Thomas Chou <thomas@wytron.com.tw> wrote:
> > On 02/18/2011 03:23 PM, Tobias Klauser wrote:
> >> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
> >>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
> >>>> This patchset adds updates taken from the Nios2 Linux port (currently
> >>>> out-of-tree) repository to the altera_jtaguart driver.
> >>>>
> >>>> And this time with the correct cover letter right away :-)
> >>>>
> >>>> Tobias Klauser (5):
> >>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
> >>>>    tty: serial: altera_jtaguart: Remove unused function
> >>>>      early_altera_jtaguart_setup
> >>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
> >>>>      resources
> >>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
> >>>>    tty: serial: altera_jtaguart: Add device tree support
> >>>
> >>> After this series, I get the following build error:
> >>> 	  CC [M]  drivers/tty/serial/altera_jtaguart.o
> >>> 	  drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
> >>
> >> Strange, I didn't get that one when compile testing against linux-next
> >> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
> >> a compile error about a missing semicolon in the definition of
> >> altera_jtaguart_match there.
> >
> > It might be that the of_match_table patch is available in Grant's branch  
> > only, which is for v3.6.39. Maybe you can ask Grant to take this patch 
> > 5/5.
> 
> That explains it, thanks Thomas.
> 
> Greg, care to take only patches 1/5 to 4/5 for now? I'll resubmit 5/5
> for the 2.6.39 merge window, unless Grant already wants to take this to
> his tree.

Please resend the 1-4 patches to me and I will be glad to apply them.

thanks,

greg k-h

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

* Re: [Nios2-dev] [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver
  2011-02-18  8:11           ` Tobias Klauser
@ 2011-02-18 17:20             ` Grant Likely
  0 siblings, 0 replies; 18+ messages in thread
From: Grant Likely @ 2011-02-18 17:20 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Thomas Chou, nios2-dev, Greg KH, Greg Kroah-Hartman, linux-serial

On Fri, Feb 18, 2011 at 1:11 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> On 2011-02-18 at 09:06:15 +0100, Grant Likely <grant.likely@secretlab.ca> wrote:
>> On Fri, Feb 18, 2011 at 12:45 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
>> > On 2011-02-18 at 08:29:58 +0100, Thomas Chou <thomas@wytron.com.tw> wrote:
>> >> On 02/18/2011 03:23 PM, Tobias Klauser wrote:
>> >>> On 2011-02-17 at 23:15:04 +0100, Greg KH<greg@kroah.com>  wrote:
>> >>>> On Thu, Feb 17, 2011 at 09:28:23PM +0100, Tobias Klauser wrote:
>> >>>>> This patchset adds updates taken from the Nios2 Linux port (currently
>> >>>>> out-of-tree) repository to the altera_jtaguart driver.
>> >>>>>
>> >>>>> And this time with the correct cover letter right away :-)
>> >>>>>
>> >>>>> Tobias Klauser (5):
>> >>>>>    tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
>> >>>>>    tty: serial: altera_jtaguart: Remove unused function
>> >>>>>      early_altera_jtaguart_setup
>> >>>>>    tty: serial: altera_jtaguart: Support getting mapbase and IRQ from
>> >>>>>      resources
>> >>>>>    tty: serial: altera_jtaguart: Fixup type usage of port flags
>> >>>>>    tty: serial: altera_jtaguart: Add device tree support
>> >>>>
>> >>>> After this series, I get the following build error:
>> >>>>       CC [M]  drivers/tty/serial/altera_jtaguart.o
>> >>>>       drivers/tty/serial/altera_jtaguart.c:485:3: error: unknown field ???of_match_table??? specified in initializer
>> >>>
>> >>> Strange, I didn't get that one when compile testing against linux-next
>> >>> on x86_64. Though it seems I didn't correctly test it on nios2 and I got
>> >>> a compile error about a missing semicolon in the definition of
>> >>> altera_jtaguart_match there.
>> >>
>> >> It might be that the of_match_table patch is available in Grant's branch
>> >> only, which is for v3.6.39. Maybe you can ask Grant to take this patch
>> >> 5/5.
>> >
>> > That explains it, thanks Thomas.
>> >
>> > Greg, care to take only patches 1/5 to 4/5 for now? I'll resubmit 5/5
>> > for the 2.6.39 merge window, unless Grant already wants to take this to
>> > his tree.
>>
>> I'm happy to take this patch if it doesn't depend on the first 4.
>> Alternately Greg, you could merge commit c9e358dfc "driver-core:
>> remove conditionals around devicetree pointers" from my
>> devicetree/test branch on git://git.secretlab.ca/git/linux-2.6.  I
>> won't be rebasing that commit and it is the first commit on top of
>> 2.6.38-rc1.
>
> The patch doesn't depend on the first 4, so you could take it if Greg
> doesn't oppose.

Okay, I'll merge the ones that depend on my tree and that Greg acks.

g.

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

* Re: [PATCH 5/5 v3] tty: serial: altera_jtaguart: Add device tree support
  2011-02-18  8:10     ` [PATCH 5/5 v3] " Tobias Klauser
@ 2011-02-28  8:26       ` Grant Likely
  0 siblings, 0 replies; 18+ messages in thread
From: Grant Likely @ 2011-02-28  8:26 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Greg Kroah-Hartman, linux-serial, devicetree-discuss, nios2-dev

On Fri, Feb 18, 2011 at 09:10:01AM +0100, Tobias Klauser wrote:
> Advertise the possibility to use this driver with device tree if
> CONFIG_OF is set.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied, thanks.

g.

> ---
> v3:
>  - put device tree binding documentation in the correct place (thanks Grant
>    Likely)
> v2:
>  - add missing semicolon after definition of altera_jtaguart_match
> 
>  .../devicetree/bindings/serial/altera_jtaguart.txt |    4 ++++
>  drivers/tty/serial/altera_jtaguart.c               |   15 +++++++++++++--
>  2 files changed, 17 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/altera_jtaguart.txt b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> new file mode 100644
> index 0000000..c152f65
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/altera_jtaguart.txt
> @@ -0,0 +1,4 @@
> +Altera JTAG UART
> +
> +Required properties:
> +- compatible : should be "ALTR,juart-1.0"
> diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
> index 8f014bb..60e049b 100644
> --- a/drivers/tty/serial/altera_jtaguart.c
> +++ b/drivers/tty/serial/altera_jtaguart.c
> @@ -466,12 +466,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static struct of_device_id altera_jtaguart_match[] = {
> +	{ .compatible = "ALTR,juart-1.0", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
> +#else
> +#define altera_jtaguart_match NULL
> +#endif /* CONFIG_OF */
> +
>  static struct platform_driver altera_jtaguart_platform_driver = {
>  	.probe	= altera_jtaguart_probe,
>  	.remove	= __devexit_p(altera_jtaguart_remove),
>  	.driver	= {
> -		.name	= DRV_NAME,
> -		.owner	= THIS_MODULE,
> +		.name		= DRV_NAME,
> +		.owner		= THIS_MODULE,
> +		.of_match_table	= altera_jtaguart_match,
>  	},
>  };
>  
> -- 
> 1.7.0.4
> 

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

end of thread, other threads:[~2011-02-28  8:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 20:28 [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Tobias Klauser
2011-02-17 20:28 ` [PATCH 1/5] tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer Tobias Klauser
2011-02-17 20:29 ` [PATCH 2/5] tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup Tobias Klauser
2011-02-17 20:29 ` [PATCH 3/5] tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources Tobias Klauser
2011-02-17 20:29 ` [PATCH 4/5] tty: serial: altera_jtaguart: Fixup type usage of port flags Tobias Klauser
2011-02-17 20:30 ` [PATCH 5/5] tty: serial: altera_jtaguart: Add device tree support Tobias Klauser
2011-02-18  7:54   ` [PATCH 5/5 v2] " Tobias Klauser
2011-02-18  7:59     ` Grant Likely
     [not found]   ` <c28550ba11ed228f4137ced1ab34761c08ad38ad.1297974227.git.tklauser-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
2011-02-18  8:10     ` [PATCH 5/5 v3] " Tobias Klauser
2011-02-28  8:26       ` Grant Likely
2011-02-17 22:15 ` [PATCH 0/5] tty: serial: Updates for altera_jtaguart driver Greg KH
2011-02-18  7:23   ` Tobias Klauser
2011-02-18  7:29     ` [Nios2-dev] " Thomas Chou
2011-02-18  7:45       ` Tobias Klauser
2011-02-18  8:06         ` Grant Likely
2011-02-18  8:11           ` Tobias Klauser
2011-02-18 17:20             ` Grant Likely
2011-02-18 15:26         ` Greg KH

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.