Thread (19 messages) 19 messages, 3 authors, 2012-11-16

Re: 8250_early for big-endian

From: Alan Cox <hidden>
Date: 2012-10-25 11:13:13

On Thu, 25 Oct 2012 09:08:53 +0200
Noam Camus [off-list ref] wrote:
quoted hunk ↗ jump to hunk
________________________________________
From: Alan Cox [alan@lxorguk.ukuu.org.uk]
Sent: Sunday, October 14, 2012 2:32 PM
quoted
For 8250_early it may well be the right thing is to support similar
serial_in/serial_out methods.

Hello Alan,
Below is my proposed patch could you apply it?
quoted
From e819fbbf9690b72620c54a62fa34545c7b035f91 Mon Sep 17 00:00:00 2001
From: Noam Camus <redacted>
Date: Wed, 3 Oct 2012 09:40:36 +0200
Subject: [PATCH] tty/8250_early: Make serial_in/serial_out be over-ridden

Now one can replace default methods with similar fit to its needs.
e.g. choose other regshift, register offset...

Signed-off-by: Noam Camus <redacted>
CC: Alan Cox <redacted>
---
 drivers/tty/serial/8250/8250_early.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index eaafb98..ac31b0c 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -48,7 +48,7 @@ struct early_serial8250_device {
 
 static struct early_serial8250_device early_device;
 
-static unsigned int __init serial_in(struct uart_port *port, int offset)
+unsigned int __weak __init serial_in(struct uart_port *port, int offset)
If you make the symbols global then they need a prefix to avoid clashes -
just rename them something like serial8250_early_in/serial8250_early_out

and of course they ought to be in the header files somewhere...

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help