/*1* Copyright (C) 2010, Lars-Peter Clausen <[email protected]>2* JZ4740 serial support3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License as published by the6* Free Software Foundation; either version 2 of the License, or (at your7* option) any later version.8*9* You should have received a copy of the GNU General Public License along10* with this program; if not, write to the Free Software Foundation, Inc.,11* 675 Mass Ave, Cambridge, MA 02139, USA.12*13*/1415#include <linux/io.h>16#include <linux/serial_core.h>17#include <linux/serial_reg.h>1819void jz4740_serial_out(struct uart_port *p, int offset, int value)20{21switch (offset) {22case UART_FCR:23value |= 0x10; /* Enable uart module */24break;25case UART_IER:26value |= (value & 0x4) << 2;27break;28default:29break;30}31writeb(value, p->membase + (offset << p->regshift));32}333435