mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] serial_ns16550: remove legacy code copied from U-Boot v1
@ 2011-07-16 13:04 Antony Pavlov
  2011-07-17 15:42 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2011-07-16 13:04 UTC (permalink / raw)
  To: barebox

---
 drivers/serial/serial_ns16550.c |   19 -------------------
 drivers/serial/serial_ns16550.h |    4 ----
 2 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index ab172e7..9a4b4dc 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -62,26 +62,7 @@ static unsigned int ns16550_calc_divisor(struct console_device *cdev,
 	struct NS16550_plat *plat = (struct NS16550_plat *)
 	    cdev->dev->platform_data;
 	unsigned int clk = plat->clock;
-#ifdef CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS
-	/* FIXME: Legacy Code copied from U-Boot V1 implementation
-	 */
-#ifdef CONFIG_ARCH_OMAP1510
-	unsigned long base = cdev->dev->map_base;
-	/* If can't cleanly clock 115200 set div to 1 */
-	if ((clk == 12000000) && (baudrate == 115200)) {
-		/* enable 6.5 * divisor */
-		plat->reg_write(OSC_12M_SEL, base, osc_12m_sel);
-		return 1;	/* return 1 for base divisor */
-	}
-	/* clear if previously set */
-	plat->reg_write(0, base, osc_12m_sel);
-#elif defined(CONFIG_ARCH_OMAP1610)
-	/* If can't cleanly clock 115200 set div to 1 */
-	if ((clk == 48000000) && (baudrate == 115200))
-		return 26;	/* return 26 for base divisor */
-#endif
 
-#endif				/* End of OMAP specific handling */
 	return (clk / MODE_X_DIV / baudrate);
 
 }
diff --git a/drivers/serial/serial_ns16550.h b/drivers/serial/serial_ns16550.h
index eb2fd10..db8fe64 100644
--- a/drivers/serial/serial_ns16550.h
+++ b/drivers/serial/serial_ns16550.h
@@ -81,10 +81,6 @@
 #define LSR_TEMT	0x40	/* Xmitter empty */
 #define LSR_ERR		0x80	/* Error */
 
-#ifdef CONFIG_ARCH_OMAP1510
-#define OSC_12M_SEL	0x01	/* selects 6.5 * current clk div */
-#endif
-
 /* useful defaults for LCR */
 #define LCR_8N1		0x03
 
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] serial_ns16550: remove legacy code copied from U-Boot v1
  2011-07-16 13:04 [PATCH] serial_ns16550: remove legacy code copied from U-Boot v1 Antony Pavlov
@ 2011-07-17 15:42 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2011-07-17 15:42 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Sat, Jul 16, 2011 at 05:04:31PM +0400, Antony Pavlov wrote:
> ---
>  drivers/serial/serial_ns16550.c |   19 -------------------
>  drivers/serial/serial_ns16550.h |    4 ----
>  2 files changed, 0 insertions(+), 23 deletions(-)

Applied to master.

Sascha

> 
> diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
> index ab172e7..9a4b4dc 100644
> --- a/drivers/serial/serial_ns16550.c
> +++ b/drivers/serial/serial_ns16550.c
> @@ -62,26 +62,7 @@ static unsigned int ns16550_calc_divisor(struct console_device *cdev,
>  	struct NS16550_plat *plat = (struct NS16550_plat *)
>  	    cdev->dev->platform_data;
>  	unsigned int clk = plat->clock;
> -#ifdef CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS
> -	/* FIXME: Legacy Code copied from U-Boot V1 implementation
> -	 */
> -#ifdef CONFIG_ARCH_OMAP1510
> -	unsigned long base = cdev->dev->map_base;
> -	/* If can't cleanly clock 115200 set div to 1 */
> -	if ((clk == 12000000) && (baudrate == 115200)) {
> -		/* enable 6.5 * divisor */
> -		plat->reg_write(OSC_12M_SEL, base, osc_12m_sel);
> -		return 1;	/* return 1 for base divisor */
> -	}
> -	/* clear if previously set */
> -	plat->reg_write(0, base, osc_12m_sel);
> -#elif defined(CONFIG_ARCH_OMAP1610)
> -	/* If can't cleanly clock 115200 set div to 1 */
> -	if ((clk == 48000000) && (baudrate == 115200))
> -		return 26;	/* return 26 for base divisor */
> -#endif
>  
> -#endif				/* End of OMAP specific handling */
>  	return (clk / MODE_X_DIV / baudrate);
>  
>  }
> diff --git a/drivers/serial/serial_ns16550.h b/drivers/serial/serial_ns16550.h
> index eb2fd10..db8fe64 100644
> --- a/drivers/serial/serial_ns16550.h
> +++ b/drivers/serial/serial_ns16550.h
> @@ -81,10 +81,6 @@
>  #define LSR_TEMT	0x40	/* Xmitter empty */
>  #define LSR_ERR		0x80	/* Error */
>  
> -#ifdef CONFIG_ARCH_OMAP1510
> -#define OSC_12M_SEL	0x01	/* selects 6.5 * current clk div */
> -#endif
> -
>  /* useful defaults for LCR */
>  #define LCR_8N1		0x03
>  
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-07-17 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-16 13:04 [PATCH] serial_ns16550: remove legacy code copied from U-Boot v1 Antony Pavlov
2011-07-17 15:42 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox