5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
11 * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
12 * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
13 * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
14 * XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
15 * FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
16 * ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
17 * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
18 * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
19 * WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
20 * CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE.
24 * Xilinx hardware products are not intended for use in life support
25 * appliances, devices, or systems. Use in such applications is
26 * expressly prohibited.
29 * (c) Copyright 2002-2004 Xilinx Inc.
30 * All rights reserved.
33 * You should have received a copy of the GNU General Public License along
34 * with this program; if not, write to the Free Software Foundation, Inc.,
35 * 675 Mass Ave, Cambridge, MA 02139, USA.
40 #include <asm/u-boot.h>
41 #include <asm/processor.h>
45 DECLARE_GLOBAL_DATA_PTR;
48 ((defined XPAR_UARTNS550_0_BASEADDR) && (defined CONFIG_SYS_INIT_CHAN1))
50 ((defined XPAR_UARTNS550_1_BASEADDR) && (defined CONFIG_SYS_INIT_CHAN2))
57 const NS16550_t COM_PORTS[] = { (NS16550_t) (XPAR_UARTNS550_0_BASEADDR + 3)
59 , (NS16550_t) (XPAR_UARTNS550_1_BASEADDR + 3)
70 clock_divisor = XPAR_UARTNS550_0_CLOCK_FREQ_HZ / 16 / gd->baudrate;
71 (void) NS16550_init(COM_PORTS[0], clock_divisor);
73 clock_divisor = XPAR_UARTNS550_1_CLOCK_FREQ_HZ / 16 / gd->baudrate;
74 (void) NS16550_init(COM_PORTS[1], clock_divisor);
82 serial_putc(const char c)
85 NS16550_putc(COM_PORTS[CONFIG_SYS_DUART_CHAN], '\r');
87 NS16550_putc(COM_PORTS[CONFIG_SYS_DUART_CHAN], c);
93 return NS16550_getc(COM_PORTS[CONFIG_SYS_DUART_CHAN]);
99 return NS16550_tstc(COM_PORTS[CONFIG_SYS_DUART_CHAN]);
108 clock_divisor = XPAR_UARTNS550_0_CLOCK_FREQ_HZ / 16 / gd->baudrate;
109 NS16550_reinit(COM_PORTS[0], clock_divisor);
111 clock_divisor = XPAR_UARTNS550_1_CLOCK_FREQ_HZ / 16 / gd->baudrate;
112 NS16550_reinit(COM_PORTS[1], clock_divisor);
118 serial_puts(const char *s)
125 #if defined(CONFIG_CMD_KGDB)
127 kgdb_serial_init(void)
138 putDebugStr(const char *str)
146 return serial_getc();
150 kgdb_interruptible(int yes)