* [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support
@ 2016-05-25 0:13 Marek Vasut
2016-05-25 3:29 ` Simon Glass
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marek Vasut @ 2016-05-25 0:13 UTC (permalink / raw)
To: u-boot
The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
---
drivers/serial/ns16550.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index a1a26a2..30ba0aa 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -128,27 +128,13 @@ static int ns16550_readb(NS16550_t port, int offset)
(unsigned char *)addr - (unsigned char *)com_port)
#endif
-static inline int calc_divisor(NS16550_t port, int clock, int baudrate)
+int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate)
{
const unsigned int mode_x_div = 16;
return DIV_ROUND_CLOSEST(clock, mode_x_div * baudrate);
}
-int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate)
-{
-#ifdef CONFIG_OMAP1510
- /* If can't cleanly clock 115200 set div to 1 */
- if ((clock == 12000000) && (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
-
- return calc_divisor(port, clock, baudrate);
-}
-
static void NS16550_setbrg(NS16550_t com_port, int baud_divisor)
{
serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
@@ -271,8 +257,8 @@ static inline void _debug_uart_init(void)
* feasible. The better fix is to move all users of this driver to
* driver model.
*/
- baud_divisor = calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
- CONFIG_BAUDRATE);
+ baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
+ CONFIG_BAUDRATE);
serial_dout(&com_port->ier, CONFIG_SYS_NS16550_IER);
serial_dout(&com_port->mcr, UART_MCRVAL);
serial_dout(&com_port->fcr, UART_FCRVAL);
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support
2016-05-25 0:13 [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support Marek Vasut
@ 2016-05-25 3:29 ` Simon Glass
2016-05-26 15:40 ` Nishanth Menon
2016-06-03 13:58 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2016-05-25 3:29 UTC (permalink / raw)
To: u-boot
On 24 May 2016 at 18:13, Marek Vasut <marex@denx.de> wrote:
> The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> drivers/serial/ns16550.c | 20 +++-----------------
> 1 file changed, 3 insertions(+), 17 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support
2016-05-25 0:13 [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support Marek Vasut
2016-05-25 3:29 ` Simon Glass
@ 2016-05-26 15:40 ` Nishanth Menon
2016-06-03 13:58 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2016-05-26 15:40 UTC (permalink / raw)
To: u-boot
On 05/24/2016 07:13 PM, Marek Vasut wrote:
> The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
Acked-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] serial: 16550: Drop OMAP1510 support
2016-05-25 0:13 [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support Marek Vasut
2016-05-25 3:29 ` Simon Glass
2016-05-26 15:40 ` Nishanth Menon
@ 2016-06-03 13:58 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-06-03 13:58 UTC (permalink / raw)
To: u-boot
On Wed, May 25, 2016 at 02:13:16AM +0200, Marek Vasut wrote:
> The CONFIG_OMAP1510 is no longer defined, so remove this dead code.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Acked-by: Nishanth Menon <nm@ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160603/ff3f44ae/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-03 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 0:13 [U-Boot] [PATCH] serial: 16550: Drop OMAP1510 support Marek Vasut
2016-05-25 3:29 ` Simon Glass
2016-05-26 15:40 ` Nishanth Menon
2016-06-03 13:58 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox