Re: [PATCH] Support for GRLIB APBUART serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kristoffer Glembo <kristoffer@xxxxxxxxxxx>
Date: Wed,  4 Nov 2009 17:32:48 +0100

> This patch adds support for the APBUART serial port from Aeroflex
> Gaisler's IP library GRLIB. It is currently used in all LEON3 designs
> (SPARC V8) but can be used on other platforms as well (which support OF).
> 
> 
> Signed-off-by: Kristoffer Glembo <kristoffer@xxxxxxxxxxx>

Applied, but I had to make two fixes:

> +config SERIAL_GRLIB_GAISLER_APBUART_CONSOLE
> +	bool "Console on GRLIB APBUART serial port"
> +	depends on SERIAL_GRLIB_GAISLER_APBUART
> +	select SERIAL_CORE_CONSOLE
> +	help
> +	Support for running a console on the GRLIB APBUART

You must make this depend on "SERIAL_GRLIB_GAISLER_APBUART=y"
not just plain "SERIAL_GRLIB_GAISLER_APBUART".

Because when modular, things like console_initcall() are not
available.

> +	printk(KERN_INFO "grlib-apbuart at 0x%x, irq %d\n",
> +	       port->mapbase, port->irq);

This will warn on some platforms, port->mapbase is of type
resource_size_t and that can be anything.  I fixed it like
so:

apbuart: Fix build warning.

drivers/serial/apbuart.c: In function ‘apbuart_probe’:
drivers/serial/apbuart.c:574: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘resource_size_t’

Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
---
 drivers/serial/apbuart.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index 8a34304..c7883a3 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -570,8 +570,8 @@ static int __devinit apbuart_probe(struct of_device *op,
 
 	apbuart_flush_fifo((struct uart_port *) port);
 
-	printk(KERN_INFO "grlib-apbuart at 0x%x, irq %d\n",
-	       port->mapbase, port->irq);
+	printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n",
+	       (unsigned long long) port->mapbase, port->irq);
 	return 0;
 
 }
-- 
1.6.5.2

��.n��������+%������w��{.n������ܖ)�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux