nios2: link to CONFIG_SYS_MONITOR_BASE and remove text_base hook
[oweals/u-boot.git] / drivers / serial / serial_ns16550.c
index 49e2c1f14f69c17e953a2ca14d65303ef31f0b9c..dafeed742df49e7d56bf2774314ea535c228be22 100644 (file)
@@ -120,19 +120,10 @@ static NS16550_t serial_ports[6] = {
 
 static int calc_divisor (NS16550_t port)
 {
-#ifdef CONFIG_OMAP1510
-       /* If can't cleanly clock 115200 set div to 1 */
-       if ((CONFIG_SYS_NS16550_CLK == 12000000) && (gd->baudrate == 115200)) {
-               port->osc_12m_sel = OSC_12M_SEL;        /* enable 6.5 * divisor */
-               return (1);                             /* return 1 for base divisor */
-       }
-       port->osc_12m_sel = 0;                  /* clear if previsouly set */
-#endif
-
-#define MODE_X_DIV 16
+       const unsigned int mode_x_div = 16;
 
        return DIV_ROUND_CLOSEST(CONFIG_SYS_NS16550_CLK,
-                                               MODE_X_DIV * gd->baudrate);
+                                               mode_x_div * gd->baudrate);
 }
 
 void