Path: blob/master/arch/mips/netlogic/xlr/xlr_console.c
10821 views
/*1* Copyright 2003-2011 NetLogic Microsystems, Inc. (NetLogic). All rights2* reserved.3*4* This software is available to you under a choice of one of two5* licenses. You may choose to be licensed under the terms of the GNU6* General Public License (GPL) Version 2, available from the file7* COPYING in the main directory of this source tree, or the NetLogic8* license below:9*10* Redistribution and use in source and binary forms, with or without11* modification, are permitted provided that the following conditions12* are met:13*14* 1. Redistributions of source code must retain the above copyright15* notice, this list of conditions and the following disclaimer.16* 2. Redistributions in binary form must reproduce the above copyright17* notice, this list of conditions and the following disclaimer in18* the documentation and/or other materials provided with the19* distribution.20*21* THIS SOFTWARE IS PROVIDED BY NETLOGIC ``AS IS'' AND ANY EXPRESS OR22* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED23* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24* ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE LIABLE25* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR26* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF27* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR28* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,29* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE30* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN31* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.32*/3334#include <linux/types.h>35#include <asm/netlogic/xlr/iomap.h>3637void prom_putchar(char c)38{39nlm_reg_t *mmio;4041mmio = netlogic_io_mmio(NETLOGIC_IO_UART_0_OFFSET);42while (netlogic_read_reg(mmio, 0x5) == 0)43;44netlogic_write_reg(mmio, 0x0, c);45}464748