Path: blob/master/arch/mips/mti-malta/malta-console.c
10818 views
/*1* Carsten Langgaard, [email protected]2* Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.3*4* This program is free software; you can distribute it and/or modify it5* under the terms of the GNU General Public License (Version 2) as6* published by the Free Software Foundation.7*8* This program is distributed in the hope it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* for more details.12*13* You should have received a copy of the GNU General Public License along14* with this program; if not, write to the Free Software Foundation, Inc.,15* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.16*17* Putting things on the screen/serial line using YAMONs facilities.18*/19#include <linux/console.h>20#include <linux/init.h>21#include <linux/serial_reg.h>22#include <asm/io.h>232425#define PORT(offset) (0x3f8 + (offset))262728static inline unsigned int serial_in(int offset)29{30return inb(PORT(offset));31}3233static inline void serial_out(int offset, int value)34{35outb(value, PORT(offset));36}3738int prom_putchar(char c)39{40while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)41;4243serial_out(UART_TX, c);4445return 1;46}474849