All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup
@ 2011-01-25 14:40 Tobias Klauser
  2011-01-25 14:57 ` [PATCH 2/2] tty: serial: altera_uart: add devicetree support Tobias Klauser
  2011-01-25 16:27 ` [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Anton Vorontsov
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Klauser @ 2011-01-25 14:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: linux-kernel, Anton Vorontsov

The function has no users inside the tree and the nios2 architecture
doesn't use it (anymore) either.

Cc: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/tty/serial/altera_uart.c |   23 -----------------------
 include/linux/altera_uart.h      |    4 ----
 2 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index bde59d1..5ef414c 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -406,29 +406,6 @@ static struct altera_uart altera_uart_ports[CONFIG_SERIAL_ALTERA_UART_MAXPORTS];
 
 #if defined(CONFIG_SERIAL_ALTERA_UART_CONSOLE)
 
-int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp)
-{
-	struct uart_port *port;
-	int i;
-
-	for (i = 0; i < CONFIG_SERIAL_ALTERA_UART_MAXPORTS && platp[i].mapbase; i++) {
-		port = &altera_uart_ports[i].port;
-
-		port->line = i;
-		port->type = PORT_ALTERA_UART;
-		port->mapbase = platp[i].mapbase;
-		port->membase = ioremap(port->mapbase, ALTERA_UART_SIZE);
-		port->iotype = SERIAL_IO_MEM;
-		port->irq = platp[i].irq;
-		port->uartclk = platp[i].uartclk;
-		port->flags = UPF_BOOT_AUTOCONF;
-		port->ops = &altera_uart_ops;
-		port->private_data = platp;
-	}
-
-	return 0;
-}
-
 static void altera_uart_console_putc(struct uart_port *port, const char c)
 {
 	while (!(altera_uart_readl(port, ALTERA_UART_STATUS_REG) &
diff --git a/include/linux/altera_uart.h b/include/linux/altera_uart.h
index a10a907..c022c82 100644
--- a/include/linux/altera_uart.h
+++ b/include/linux/altera_uart.h
@@ -5,8 +5,6 @@
 #ifndef	__ALTUART_H
 #define	__ALTUART_H
 
-#include <linux/init.h>
-
 struct altera_uart_platform_uart {
 	unsigned long mapbase;	/* Physical address base */
 	unsigned int irq;	/* Interrupt vector */
@@ -14,6 +12,4 @@ struct altera_uart_platform_uart {
 	unsigned int bus_shift;	/* Bus shift (address stride) */
 };
 
-int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp);
-
 #endif /* __ALTUART_H */
-- 
1.7.0.4


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

* [PATCH 2/2] tty: serial: altera_uart: add devicetree support
  2011-01-25 14:40 [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Tobias Klauser
@ 2011-01-25 14:57 ` Tobias Klauser
  2011-01-26 18:18   ` Tobias Klauser
  2011-01-25 16:27 ` [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Anton Vorontsov
  1 sibling, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2011-01-25 14:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: linux-kernel

Allow to retreive resources from a device tree (currently used in the
out-of-tree nios2 architecture port only).

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

diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 7212162..bde59d1 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -567,13 +567,23 @@ static int __devexit altera_uart_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static struct of_device_id altera_uart_match[] = {
+	{ .compatible = "altr,uart-1.0", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, altera_uart_match);
+#endif /* CONFIG_OF */
+
 static struct platform_driver altera_uart_platform_driver = {
 	.probe	= altera_uart_probe,
 	.remove	= __devexit_p(altera_uart_remove),
 	.driver	= {
-		.name	= DRV_NAME,
-		.owner	= THIS_MODULE,
-		.pm	= NULL,
+		.name		= DRV_NAME,
+		.owner		= THIS_MODULE,
+#ifdef CONFIG_OF
+		.of_match_table	= altera_uart_match,
+#endif
 	},
 };
 
-- 
1.7.0.4


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

* Re: [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup
  2011-01-25 14:40 [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Tobias Klauser
  2011-01-25 14:57 ` [PATCH 2/2] tty: serial: altera_uart: add devicetree support Tobias Klauser
@ 2011-01-25 16:27 ` Anton Vorontsov
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Vorontsov @ 2011-01-25 16:27 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: Greg Kroah-Hartman, linux-serial, linux-kernel

On Tue, Jan 25, 2011 at 03:40:17PM +0100, Tobias Klauser wrote:
> The function has no users inside the tree and the nios2 architecture
> doesn't use it (anymore) either.
> 
> Cc: Anton Vorontsov <cbouatmailru@gmail.com>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---

We don't use it either, at least so far. If/whenever we need it,
we can always revert this commit. So,

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

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

* Re: [PATCH 2/2] tty: serial: altera_uart: add devicetree support
  2011-01-25 14:57 ` [PATCH 2/2] tty: serial: altera_uart: add devicetree support Tobias Klauser
@ 2011-01-26 18:18   ` Tobias Klauser
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Klauser @ 2011-01-26 18:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: linux-kernel

On 2011-01-25 at 15:57:37 +0100, Tobias Klauser <tklauser@distanz.ch> wrote:
> Allow to retreive resources from a device tree (currently used in the
> out-of-tree nios2 architecture port only).
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  drivers/tty/serial/altera_uart.c |   16 +++++++++++++---
>  1 files changed, 13 insertions(+), 3 deletions(-)

Please disregard this patch. The driver will need more changes to
properly support retreiving everything it needs from device tree.

Sorry for the noise.

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

end of thread, other threads:[~2011-01-26 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 14:40 [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Tobias Klauser
2011-01-25 14:57 ` [PATCH 2/2] tty: serial: altera_uart: add devicetree support Tobias Klauser
2011-01-26 18:18   ` Tobias Klauser
2011-01-25 16:27 ` [PATCH 1/2] tty: serial: altera_uart: remove early_altera_uart_setup Anton Vorontsov

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.