diff options
author | Heiko Schocher <hs@denx.de> | 2017-06-27 16:49:14 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-03 17:35:28 -0400 |
commit | 98f705c9cefdfdba62c069821bbba10273a0a8ed (patch) | |
tree | 48a56e8496a9b6f5bcf523916ace5445489d79c7 /post/cpu/ppc4xx/uart.c | |
parent | d4db3b86a5e090e21db710bedbbe3e50d4c56428 (diff) | |
download | u-boot-98f705c9cefdfdba62c069821bbba10273a0a8ed.tar.gz |
powerpc: remove 4xx support
There was for long time no activity in the 4xx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in 4xx,
so remove it.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'post/cpu/ppc4xx/uart.c')
-rw-r--r-- | post/cpu/ppc4xx/uart.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/post/cpu/ppc4xx/uart.c b/post/cpu/ppc4xx/uart.c deleted file mode 100644 index 545b054c2b..0000000000 --- a/post/cpu/ppc4xx/uart.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * (C) Copyright 2007 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * Author: Igor Lisitsin <igor@emcraft.com> - * - * Copyright 2010, Stefan Roese, DENX Software Engineering, sr@denx.de - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <common.h> -#include <asm/ppc4xx.h> -#include <ns16550.h> -#include <asm/io.h> -#include <serial.h> - -/* - * UART test - * - * The controllers are configured to loopback mode and several - * characters are transmitted. - */ - -#include <post.h> - -#if CONFIG_POST & CONFIG_SYS_POST_UART - -/* - * This table defines the UART's that should be tested and can - * be overridden in the board config file - */ -#ifndef CONFIG_SYS_POST_UART_TABLE -#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1, \ - CONFIG_SYS_NS16550_COM2, CONFIG_SYS_NS16550_COM3, \ - CONFIG_SYS_NS16550_COM4 } -#endif - -DECLARE_GLOBAL_DATA_PTR; - -static int test_ctlr (struct NS16550 *com_port, int index) -{ - int res = -1; - char test_str[] = "*** UART Test String ***\r\n"; - int i; - int divisor; - - divisor = (get_serial_clock() + (gd->baudrate * (16 / 2))) / - (16 * gd->baudrate); - NS16550_init(com_port, divisor); - - /* - * Set internal loopback mode in UART - */ - out_8(&com_port->mcr, in_8(&com_port->mcr) | UART_MCR_LOOP); - - /* Reset FIFOs */ - out_8(&com_port->fcr, UART_FCR_RXSR | UART_FCR_TXSR); - udelay(100); - - /* Flush RX-FIFO */ - while (NS16550_tstc(com_port)) - NS16550_getc(com_port); - - for (i = 0; i < sizeof (test_str) - 1; i++) { - NS16550_putc(com_port, test_str[i]); - if (NS16550_getc(com_port) != test_str[i]) - goto done; - } - res = 0; -done: - if (res) - post_log ("uart%d test failed\n", index); - - return res; -} - -int uart_post_test (int flags) -{ - int i, res = 0; - static unsigned long base[] = CONFIG_SYS_POST_UART_TABLE; - - for (i = 0; i < ARRAY_SIZE(base); i++) { - if (test_ctlr((struct NS16550 *)base[i], i)) - res = -1; - } - serial_reinit_all (); - - return res; -} - -#endif /* CONFIG_POST & CONFIG_SYS_POST_UART */ |