summaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ippp
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-05-01 20:46:31 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-05-01 20:46:31 +0000
commitde983ef109defa7c26081510f1a33bfae1d0b62d (patch)
tree2ba3ab23f1fb5042c67a811be2404c81818129cc /sysconfig/network-scripts/ifup-ippp
parent3d01c480921dbb89499f7f4353d9ce776b7ebd9a (diff)
Add support for diskdump to swap (#182272, patch by Keiichiro Tokunaga
<ktokunag@redhat.com>)
Diffstat (limited to 'sysconfig/network-scripts/ifup-ippp')
0 files changed, 0 insertions, 0 deletions
a> 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
/*
 * (C) Copyright 2004-2007 Freescale Semiconductor, Inc.
 * TsiChung Liew, Tsi-Chung.Liew@freescale.com.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 *
 */

/*
 * Minimal serial functions needed to use one of the uart ports
 * as serial console interface.
 */

#include <common.h>

#include <asm/immap.h>
#include <asm/uart.h>

DECLARE_GLOBAL_DATA_PTR;

extern void uart_port_conf(int port);

int serial_init(void)
{
	volatile uart_t *uart;
	u32 counter;

	uart = (volatile uart_t *)(CONFIG_SYS_UART_BASE);

	uart_port_conf(CONFIG_SYS_UART_PORT);

	/* write to SICR: SIM2 = uart mode,dcd does not affect rx */
	uart->ucr = UART_UCR_RESET_RX;
	uart->ucr = UART_UCR_RESET_TX;
	uart->ucr = UART_UCR_RESET_ERROR;
	uart->ucr = UART_UCR_RESET_MR;
	__asm__("nop");

	uart->uimr = 0;

	/* write to CSR: RX/TX baud rate from timers */
	uart->ucsr = (UART_UCSR_RCS_SYS_CLK | UART_UCSR_TCS_SYS_CLK);

	uart->umr = (UART_UMR_BC_8 | UART_UMR_PM_NONE);
	uart->umr = UART_UMR_SB_STOP_BITS_1;

	/* Setting up BaudRate */
	counter = (u32) ((gd->bus_clk / 32) + (gd->baudrate / 2));