diff mbox

of_serial: Add UPF_FIXED_TYPE flag

Message ID 1244590787-13716-1-git-send-email-dmitchell@amcc.com (mailing list archive)
State Accepted, archived
Commit eedacbf02df462d6c915d8d642b23fb450d485c7
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Dave Mitchell June 9, 2009, 11:39 p.m. UTC
This patch adds the UPF_FIXED_TYPE flag which will bypass the
8250's autoconfig probe for uart type. The uart type identified
by the of_serial's parse of the flat device tree will be utilized
as defined.

Signed-off-by: Dave Mitchell <dmitchell@amcc.com>
---
 drivers/serial/of_serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Michael Ellerman June 19, 2009, 8:24 a.m. UTC | #1
On Tue, 2009-06-09 at 18:39 -0500, Dave Mitchell wrote:
> This patch adds the UPF_FIXED_TYPE flag which will bypass the
> 8250's autoconfig probe for uart type. The uart type identified
> by the of_serial's parse of the flat device tree will be utilized
> as defined.
> 
> Signed-off-by: Dave Mitchell <dmitchell@amcc.com>
> ---
>  drivers/serial/of_serial.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
> index 14f8fa9..3f2027c 100644
> --- a/drivers/serial/of_serial.c
> +++ b/drivers/serial/of_serial.c
> @@ -67,7 +67,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
>  	port->type = type;
>  	port->uartclk = *clk;
>  	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
> -		| UPF_FIXED_PORT;
> +		| UPF_FIXED_PORT | UPF_FIXED_TYPE;

I think we /probably/ want a similar change in legacy_serial.c, for soc
ports at least.

Or do people have things that are compatible "ns16550" but aren't?

cheers
Benjamin Herrenschmidt June 19, 2009, 10:59 p.m. UTC | #2
On Fri, 2009-06-19 at 18:24 +1000, Michael Ellerman wrote:
> I think we /probably/ want a similar change in legacy_serial.c, for
> soc
> ports at least.
> 
> Or do people have things that are compatible "ns16550" but aren't?
> 
Do we really want to keep of_serial.c ?

I fail to see the point in keeping -both- the of_serial (of_device
variant) and the legacy serial stuff which shims the device-tree into
platform devices.

They tend to clash with each other too, which is annoying.

Cheers,
Ben
diff mbox

Patch

diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 14f8fa9..3f2027c 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -67,7 +67,7 @@  static int __devinit of_platform_serial_setup(struct of_device *ofdev,
 	port->type = type;
 	port->uartclk = *clk;
 	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
-		| UPF_FIXED_PORT;
+		| UPF_FIXED_PORT | UPF_FIXED_TYPE;
 	port->dev = &ofdev->dev;
 	/* If current-speed was set, then try not to change it. */
 	if (spd)