From e7705f2df1247112572f96f606b111b94d04fa2c Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sun, 10 Feb 2019 23:03:17 +0100 Subject: superio/nsc: Introduce common early_serial Change-Id: I0860e95258b87f059a3a9c31e382d758403d0428 Signed-off-by: Peter Lemenkov Reviewed-on: https://review.coreboot.org/c/31332 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Felix Held --- src/superio/nsc/common/early_serial.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/superio/nsc/common/early_serial.c (limited to 'src/superio/nsc/common/early_serial.c') diff --git a/src/superio/nsc/common/early_serial.c b/src/superio/nsc/common/early_serial.c new file mode 100644 index 0000000000..2cd9f050cf --- /dev/null +++ b/src/superio/nsc/common/early_serial.c @@ -0,0 +1,31 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2000 AG Electronics Ltd. + * Copyright (C) 2003-2004 Linux Networx + * Copyright (C) 2004 Tyan + * Copyright (C) 2007 Uwe Hermann + * + * 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. + */ + +#include +#include +#include +#include "nsc.h" + +void nsc_enable_serial(pnp_devfn_t dev, u16 iobase) +{ + pnp_set_logical_device(dev); + pnp_set_enable(dev, 0); + pnp_set_iobase(dev, PNP_IDX_IO0, iobase); + pnp_set_enable(dev, 1); +} -- cgit v1.2.3