From: jasper Date: Sat, 12 Jul 2014 23:34:54 +0000 (+0000) Subject: unify cnspeed() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fe5f6213d1a6530613015dee516e327d42500e32;p=openbsd unify cnspeed() --- diff --git a/sys/arch/hppa/stand/libsa/Makefile b/sys/arch/hppa/stand/libsa/Makefile index 7747c256ca8..0c9cdccdf2b 100644 --- a/sys/arch/hppa/stand/libsa/Makefile +++ b/sys/arch/hppa/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2014/07/12 21:54:58 jasper Exp $ +# $OpenBSD: Makefile,v 1.18 2014/07/12 23:34:54 jasper Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -41,3 +41,4 @@ install: CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS} -DNO_NET CPPFLAGS+=-I${S}/stand/boot CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS -fno-pie +CFLAGS+=-DCONSPEED=9600 diff --git a/sys/arch/hppa/stand/libsa/itecons.c b/sys/arch/hppa/stand/libsa/itecons.c index 4d11532d79a..408355b0fac 100644 --- a/sys/arch/hppa/stand/libsa/itecons.c +++ b/sys/arch/hppa/stand/libsa/itecons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: itecons.c,v 1.10 2008/01/23 16:37:56 jsing Exp $ */ +/* $OpenBSD: itecons.c,v 1.11 2014/07/12 23:34:54 jasper Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -69,11 +69,9 @@ char cnbuf[IODC_MINIOSIZ] __attribute__ ((aligned (IODC_MINIOSIZ))); int kycode[IODC_MAXSIZE/sizeof(int)]; int -cnspeed(dev, sp) - dev_t dev; - int sp; +cnspeed(dev_t dev, int sp) { - return 9600; + return CONSPEED; } void diff --git a/sys/arch/hppa64/stand/libsa/Makefile b/sys/arch/hppa64/stand/libsa/Makefile index a0594b69a5c..ab2be284b69 100644 --- a/sys/arch/hppa64/stand/libsa/Makefile +++ b/sys/arch/hppa64/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2014/07/12 21:54:58 jasper Exp $ +# $OpenBSD: Makefile,v 1.4 2014/07/12 23:34:54 jasper Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -41,4 +41,4 @@ install: CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} ${DEBUGFLAGS} -DNO_NET CPPFLAGS+=-I${S}/stand/boot -CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS +CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS -DCONSPEED=9600 diff --git a/sys/arch/hppa64/stand/libsa/itecons.c b/sys/arch/hppa64/stand/libsa/itecons.c index fd478c06268..58c641197ab 100644 --- a/sys/arch/hppa64/stand/libsa/itecons.c +++ b/sys/arch/hppa64/stand/libsa/itecons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: itecons.c,v 1.2 2008/01/23 16:37:56 jsing Exp $ */ +/* $OpenBSD: itecons.c,v 1.3 2014/07/12 23:34:54 jasper Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -60,11 +60,9 @@ char cnbuf[IODC_MINIOSIZ] __attribute__ ((aligned (IODC_MINIOSIZ))); int kycode[IODC_MAXSIZE/sizeof(int)]; int -cnspeed(dev, sp) - dev_t dev; - int sp; +cnspeed(dev_t dev, int sp) { - return 9600; + return CONSPEED; } void diff --git a/sys/arch/loongson/stand/boot/Makefile.inc b/sys/arch/loongson/stand/boot/Makefile.inc index 5119b6dcdd0..98bf17e40f0 100644 --- a/sys/arch/loongson/stand/boot/Makefile.inc +++ b/sys/arch/loongson/stand/boot/Makefile.inc @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile.inc,v 1.3 2012/11/04 16:30:44 matthieu Exp $ +# $OpenBSD: Makefile.inc,v 1.4 2014/07/12 23:34:54 jasper Exp $ NOMAN= S= ${.CURDIR}/../../../.. BOOTDIR= ${S}/arch/loongson/stand/boot -CPPFLAGS+= ${SAABI} -mno-abicalls -D_NO_ABICALLS \ +CPPFLAGS+= ${SAABI} -mno-abicalls -D_NO_ABICALLS -DCONSPEED=9600 \ -nostdinc -D__loongson__ \ -I${S} -I${S}/lib/libsa \ -I${.OBJDIR} -I${BOOTDIR} diff --git a/sys/arch/loongson/stand/boot/machdep.c b/sys/arch/loongson/stand/boot/machdep.c index d1ac2b714ca..d28c220d9f7 100644 --- a/sys/arch/loongson/stand/boot/machdep.c +++ b/sys/arch/loongson/stand/boot/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.6 2014/07/12 21:54:58 jasper Exp $ */ +/* $OpenBSD: machdep.c,v 1.7 2014/07/12 23:34:54 jasper Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -61,7 +61,7 @@ extern int bootprompt; int cnspeed(dev_t dev, int sp) { - return 9600; + return CONSPEED; } int pch_pos; diff --git a/sys/arch/octeon/stand/boot/machdep.c b/sys/arch/octeon/stand/boot/machdep.c index 6675c7aa83e..95bc07afacf 100644 --- a/sys/arch/octeon/stand/boot/machdep.c +++ b/sys/arch/octeon/stand/boot/machdep.c @@ -1,8 +1,8 @@ -/* $OpenBSD: machdep.c,v 1.4 2014/07/12 21:54:58 jasper Exp $ */ +/* $OpenBSD: machdep.c,v 1.5 2014/07/12 23:34:54 jasper Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. - * Copyright (c) 2013,2014 Jasper Lievisse Adriaanse + * Copyright (c) 2013, 2014 Jasper Lievisse Adriaanse * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -76,7 +76,7 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, int cnspeed(dev_t dev, int s) { - return (CONSPEED); + return CONSPEED; } int pch_pos;