[Top] [All Lists]

Re: [PATCH 1/4] serial: 8250 driver replaceable i/o functions.

To: "H. Peter Anvin" <>
Subject: Re: [PATCH 1/4] serial: 8250 driver replaceable i/o functions.
From: David Daney <>
Date: Tue, 07 Oct 2008 17:29:25 -0700
Cc:,,, "Paoletti, Tomaso" <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
User-agent: Thunderbird (X11/20080723)
H. Peter Anvin wrote:
David Daney wrote:
/* sane hardware needs no mapping */
-static inline int map_8250_in_reg(struct uart_8250_port *up, int offset)
+static inline int map_8250_in_reg(struct uart_port *p, int offset)
-    if (up->port.iotype != UPIO_AU)
+    if (p->iotype != UPIO_AU)
        return offset;
    return au_io_in_map[offset];

With your changes, these functions cannot be called with p->iotype != UPIO_AU anymore, correct? So there is no need for this test...

I think you are probably correct. However, with the patch it is possible to move all this target specific code out of the driver. So if the patch is accepted, a better follow up would be to get rid of the UPIO_AU things altogether.

I gave an example of how that could be done with UPIO_TSI here:

David Daney

<Prev in Thread] Current Thread [Next in Thread>