CVS commit: src/sys/dev/usb

2019-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Mon Nov  4 05:46:39 UTC 2019

Modified Files:
src/sys/dev/usb: uaudio.c

Log Message:
Use kmem_zalloc() instead of kmem_alloc() to initialize structure.
struct audio_format added a member since isaki-audio2.
Fix PR kern/54662 "uaudio sometimes not recognized".


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/dev/usb/uaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/usb

2019-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Mon Nov  4 05:46:39 UTC 2019

Modified Files:
src/sys/dev/usb: uaudio.c

Log Message:
Use kmem_zalloc() instead of kmem_alloc() to initialize structure.
struct audio_format added a member since isaki-audio2.
Fix PR kern/54662 "uaudio sometimes not recognized".


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/dev/usb/uaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.161 src/sys/dev/usb/uaudio.c:1.162
--- src/sys/dev/usb/uaudio.c:1.161	Thu Jun  6 12:59:33 2019
+++ src/sys/dev/usb/uaudio.c	Mon Nov  4 05:46:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.162 2019/11/04 05:46:39 isaki Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.161 2019/06/06 12:59:33 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.162 2019/11/04 05:46:39 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1795,13 +1795,12 @@ uaudio_identify_as(struct uaudio_softc *
 	}
 
 	/* build audio_format array */
-	sc->sc_formats = kmem_alloc(sizeof(struct audio_format) * sc->sc_nalts,
+	sc->sc_formats = kmem_zalloc(sizeof(struct audio_format) * sc->sc_nalts,
 	KM_SLEEP);
 	sc->sc_nformats = sc->sc_nalts;
 	for (i = 0; i < sc->sc_nalts; i++) {
 		auf = >sc_formats[i];
 		t1desc = sc->sc_alts[i].asf1desc;
-		auf->driver_data = NULL;
 		if (UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress) == UE_DIR_OUT)
 			auf->mode = AUMODE_PLAY;
 		else



CVS commit: src/distrib/hppa/ramdisk

2019-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  4 00:59:05 UTC 2019

Modified Files:
src/distrib/hppa/ramdisk: Makefile

Log Message:
bump for gcc8


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/hppa/ramdisk/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hppa/conf

2019-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  4 00:59:31 UTC 2019

Modified Files:
src/sys/arch/hppa/conf: RAMDISK

Log Message:
bump for gcc8


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/conf/RAMDISK

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hppa/conf/RAMDISK
diff -u src/sys/arch/hppa/conf/RAMDISK:1.2 src/sys/arch/hppa/conf/RAMDISK:1.3
--- src/sys/arch/hppa/conf/RAMDISK:1.2	Sun Mar  2 03:20:09 2014
+++ src/sys/arch/hppa/conf/RAMDISK	Sun Nov  3 19:59:31 2019
@@ -1,4 +1,4 @@
-# $NetBSD: RAMDISK,v 1.2 2014/03/02 08:20:09 skrll Exp $
+# $NetBSD: RAMDISK,v 1.3 2019/11/04 00:59:31 christos Exp $
 #
 # RAMDISK machine description file
 #
@@ -9,6 +9,6 @@ include 	"arch/hppa/conf/GENERIC"
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# force root on memory disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=6000	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=6120	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 



CVS commit: src/distrib/hppa/ramdisk

2019-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  4 00:59:05 UTC 2019

Modified Files:
src/distrib/hppa/ramdisk: Makefile

Log Message:
bump for gcc8


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/hppa/ramdisk/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/hppa/ramdisk/Makefile
diff -u src/distrib/hppa/ramdisk/Makefile:1.5 src/distrib/hppa/ramdisk/Makefile:1.6
--- src/distrib/hppa/ramdisk/Makefile:1.5	Tue Jan 24 13:04:03 2017
+++ src/distrib/hppa/ramdisk/Makefile	Sun Nov  3 19:59:05 2019
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2017/01/24 18:04:03 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2019/11/04 00:59:05 christos Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	3000k
+IMAGESIZE=	3060k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1



CVS commit: src/distrib/sets/lists/xdebug

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  4 00:51:33 UTC 2019

Modified Files:
src/distrib/sets/lists/xdebug: md.evbarm md.evbarm.armeb md.ofppc
md.shark md.sparc md.vax

Log Message:
Try to fix build failure due to missing obsolete qualifier.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/xdebug/md.evbarm
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xdebug/md.evbarm.armeb \
src/distrib/sets/lists/xdebug/md.ofppc \
src/distrib/sets/lists/xdebug/md.sparc
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/xdebug/md.shark
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/xdebug/md.vax

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xdebug/md.evbarm
diff -u src/distrib/sets/lists/xdebug/md.evbarm:1.22 src/distrib/sets/lists/xdebug/md.evbarm:1.23
--- src/distrib/sets/lists/xdebug/md.evbarm:1.22	Sun Nov  3 01:35:47 2019
+++ src/distrib/sets/lists/xdebug/md.evbarm	Mon Nov  4 00:51:33 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbarm,v 1.22 2019/11/03 01:35:47 uki Exp $
+# $NetBSD: md.evbarm,v 1.23 2019/11/04 00:51:33 rin Exp $
 ./usr/X11R7/lib/libdrm_nouveau_g.a			xdebug-libdrm_nouveau-debuglib	xorg,debuglib
 ./usr/X11R7/lib/libvdpau_g.axdebug-libvdpau-debuglib	xorg,debuglib
 ./usr/X11R7/lib/modules/extensions/libdbe_g.a		xdebug-obsolete	xorg,obsolete
@@ -23,10 +23,10 @@
 ./usr/libdata/debug/usr/X11R7/lib/libvdpau.so.1.0.debug		xdebug-libvdpau-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/dri/nouveau_dri.so.0.debug	xdebug-xf86-video-nouveau-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug	xdebug-xf86-input-keyboard-debug	xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	xdebug-obsoletexorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	xdebug-obsoletexorg	xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/modesetting_drv.so.0.debug	xdebug-modesetting-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/mouse_drv.so.1.debug	xdebug-xf86-input-mouse-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ws_drv.so.1.debug	xdebug-xf86-input-ws-debug	xorg,debug

Index: src/distrib/sets/lists/xdebug/md.evbarm.armeb
diff -u src/distrib/sets/lists/xdebug/md.evbarm.armeb:1.14 src/distrib/sets/lists/xdebug/md.evbarm.armeb:1.15
--- src/distrib/sets/lists/xdebug/md.evbarm.armeb:1.14	Sun Nov  3 01:35:47 2019
+++ src/distrib/sets/lists/xdebug/md.evbarm.armeb	Mon Nov  4 00:51:33 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbarm.armeb,v 1.14 2019/11/03 01:35:47 uki Exp $
+# $NetBSD: md.evbarm.armeb,v 1.15 2019/11/04 00:51:33 rin Exp $
 ./usr/X11R7/lib/libvdpau_g.axdebug-libvdpau-debuglib	xorg,debuglib
 ./usr/X11R7/lib/modules/extensions/libdbe_g.a		-unknown-	xorg,debuglib,xorg_server_ver=110
 ./usr/X11R7/lib/modules/extensions/libdbe_g.a		xdebug-obsolete	xorg,obsolete,xorg_server_ver=120
@@ -26,10 +26,10 @@
 ./usr/libdata/debug/usr/X11R7/lib/libvdpau.so.1.0.debug		xdebug-libvdpau-debug		xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/dri/nouveau_dri.so.0.debug	xdebug-xf86-video-nouveau-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug	xdebug-xf86-input-keyboard-debug	xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	xdebug-obsoletexorg,obsolete
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	xdebug-obsoletexorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libkbd_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libmouse_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libws_drv.so.1.debug	xdebug-obsoletexorg	xorg,obsolete
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libwsfb_drv.so.0.debug	xdebug-obsoletexorg	xorg,obsolete
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/modesetting_drv.so.0.debug	xdebug-modesetting-debug	

CVS commit: src/distrib/sets/lists/xdebug

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  4 00:51:33 UTC 2019

Modified Files:
src/distrib/sets/lists/xdebug: md.evbarm md.evbarm.armeb md.ofppc
md.shark md.sparc md.vax

Log Message:
Try to fix build failure due to missing obsolete qualifier.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/xdebug/md.evbarm
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xdebug/md.evbarm.armeb \
src/distrib/sets/lists/xdebug/md.ofppc \
src/distrib/sets/lists/xdebug/md.sparc
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/xdebug/md.shark
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/xdebug/md.vax

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/xdebug

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  4 00:33:29 UTC 2019

Modified Files:
src/distrib/sets/lists/xdebug: md.amiga

Log Message:
Fix previous; restore accidentally removed newline.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.amiga

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/xdebug

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  4 00:33:29 UTC 2019

Modified Files:
src/distrib/sets/lists/xdebug: md.amiga

Log Message:
Fix previous; restore accidentally removed newline.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.amiga

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xdebug/md.amiga
diff -u src/distrib/sets/lists/xdebug/md.amiga:1.11 src/distrib/sets/lists/xdebug/md.amiga:1.12
--- src/distrib/sets/lists/xdebug/md.amiga:1.11	Sun Nov  3 01:35:47 2019
+++ src/distrib/sets/lists/xdebug/md.amiga	Mon Nov  4 00:33:29 2019
@@ -1,9 +1,10 @@
-# $NetBSD: md.amiga,v 1.11 2019/11/03 01:35:47 uki Exp $
+# $NetBSD: md.amiga,v 1.12 2019/11/04 00:33:29 rin Exp $
 ./usr/libdata/debug/usr/X11R7/bin/Xorg.debug	xdebug-xorg-server-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/bin/cvt.debug	xdebug-xorg-server-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/bin/gtf.debug	xdebug-xorg-server-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug	xdebug-xf86-input-keyboard-debug	xorg,debug
-./usr/libdata/debug/usr/X11R7/lib/modules/drivers/mouse_drv.so.1.debug	xdebug-xf86-input-mouse-debug	xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ws_drv.so.1.debug	xdebug-xf86-input-ws-debug	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/mouse_drv.so.1.debug	xdebug-xf86-input-mouse-debug	xorg,debug
+./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ws_drv.so.1.debug	xdebug-xf86-input-ws-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/wsfb_drv.so.0.debug	xdebug-xf86-video-wsfb-debug	xorg,debug
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug	-unknown-	xorg,debug,xorg_server_ver=110
 ./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug	xdebug-obsolete	xorg,obsolete,xorg_server_ver=120



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 23:31:49 UTC 2019

Modified Files:
src/sys/arch/arm/ti: ti_lcdc.c

Log Message:
Comment out mode fixup (not needed it seems)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/ti_lcdc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 23:31:49 UTC 2019

Modified Files:
src/sys/arch/arm/ti: ti_lcdc.c

Log Message:
Comment out mode fixup (not needed it seems)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/ti_lcdc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/ti/ti_lcdc.c
diff -u src/sys/arch/arm/ti/ti_lcdc.c:1.1 src/sys/arch/arm/ti/ti_lcdc.c:1.2
--- src/sys/arch/arm/ti/ti_lcdc.c:1.1	Sun Nov  3 22:59:06 2019
+++ src/sys/arch/arm/ti/ti_lcdc.c	Sun Nov  3 23:31:49 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_lcdc.c,v 1.1 2019/11/03 22:59:06 jmcneill Exp $ */
+/* $NetBSD: ti_lcdc.c,v 1.2 2019/11/03 23:31:49 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.1 2019/11/03 22:59:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.2 2019/11/03 23:31:49 jmcneill Exp $");
 
 #include 
 #include 
@@ -138,6 +138,7 @@ static bool
 tilcdc_mode_fixup(struct drm_crtc *crtc,
 const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
 {
+#if 0
 	adjusted_mode->hskew = mode->hsync_end - mode->hsync_start;
 	adjusted_mode->flags |= DRM_MODE_FLAG_HSKEW;
 
@@ -146,7 +147,7 @@ tilcdc_mode_fixup(struct drm_crtc *crtc,
 		adjusted_mode->flags |= DRM_MODE_FLAG_PHSYNC;
 	else
 		adjusted_mode->flags |= DRM_MODE_FLAG_NHSYNC;
-		
+#endif
 
 	return true;
 }



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 23:28:59 UTC 2019

Modified Files:
src/sys/dev/i2c: tda19988.c

Log Message:
Test DRM_MODE_* flags, not VID_*


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/tda19988.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 23:28:59 UTC 2019

Modified Files:
src/sys/dev/i2c: tda19988.c

Log Message:
Test DRM_MODE_* flags, not VID_*


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/tda19988.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/tda19988.c
diff -u src/sys/dev/i2c/tda19988.c:1.1 src/sys/dev/i2c/tda19988.c:1.2
--- src/sys/dev/i2c/tda19988.c:1.1	Sun Nov  3 22:57:52 2019
+++ src/sys/dev/i2c/tda19988.c	Sun Nov  3 23:28:59 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: tda19988.c,v 1.1 2019/11/03 22:57:52 jmcneill Exp $ */
+/* $NetBSD: tda19988.c,v 1.2 2019/11/03 23:28:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Oleksandr Tymoshenko 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tda19988.c,v 1.1 2019/11/03 22:57:52 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tda19988.c,v 1.2 2019/11/03 23:28:59 jmcneill Exp $");
 
 /*
 * NXP TDA19988 HDMI encoder 
@@ -421,10 +421,10 @@ tda19988_init_encoder(struct tda19988_so
 	de_start = mode->crtc_htotal - mode->crtc_hdisplay;
 	ref_pix = hs_pix_start + 3;
 
-	if (mode->flags & VID_HSKEW)
+	if (mode->flags & DRM_MODE_FLAG_HSKEW)
 		ref_pix += mode->crtc_hskew;
 
-	if ((mode->flags & VID_INTERLACE) == 0) {
+	if ((mode->flags & DRM_MODE_FLAG_INTERLACE) == 0) {
 		ref_line = 1 + mode->crtc_vsync_start - mode->crtc_vdisplay;
 		vwin1_line_start = mode->crtc_vtotal - mode->crtc_vdisplay - 1;
 		vwin1_line_end = vwin1_line_start + mode->crtc_vdisplay;
@@ -495,16 +495,16 @@ tda19988_init_encoder(struct tda19988_so
 	 * Sync on rising HSYNC/VSYNC
 	 */
 	reg = VIP_CNTRL_3_SYNC_HS;
-	if (mode->flags & VID_NHSYNC)
+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
 		reg |= VIP_CNTRL_3_H_TGL;
-	if (mode->flags & VID_NVSYNC)
+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
 		reg |= VIP_CNTRL_3_V_TGL;
 	tda19988_reg_write(sc, TDA_VIP_CNTRL_3, reg);
 
 	reg = TBG_CNTRL_1_TGL_EN;
-	if (mode->flags & VID_NHSYNC)
+	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
 		reg |= TBG_CNTRL_1_H_TGL;
-	if (mode->flags & VID_NVSYNC)
+	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
 		reg |= TBG_CNTRL_1_V_TGL;
 	tda19988_reg_write(sc, TDA_TBG_CNTRL_1, reg);
 



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
e permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _ARM_TI_TI_LCDC_H
+#define _ARM_TI_TI_LCDC_H
+
+#include 
+#include 
+
+#define DRIVER_AUTHOR		"NetBSD"
+
+#define DRIVER_NAME		"tilcdc"
+#define DRIVER_DESC		"TI LCDC"
+#define DRIVER_DATE		"20191103"
+
+#define DRIVER_MAJOR		1
+#define DRIVER_MINOR		0
+#define DRIVER_PATCHLEVEL	0
+
+struct tilcdc_softc;
+struct tilcdc_framebuffer;
+
+struct tilcdc_vblank {
+	void			*priv;
+	void			(*enable_vblank)(void *);
+	void			(*disable_vblank)(void *);
+	uint32_t		(*get_vblank_counter)(void *);
+};
+
+struct tilcdc_crtc {
+	struct drm_crtc		base;
+	struct tilcdc_softc	*sc;
+};
+
+struct tilcdc_encoder {
+	struct drm_encoder	base;
+	struct tilcdc_softc	*sc;
+};
+
+struct tilcdc_softc {
+	device_t		sc_dev;
+	struct drm_device	*sc_ddev;
+
+	bus_space_tag_t		sc_bst;
+	bus_space_handle_t	sc_bsh;
+	bus_dma_tag_t		sc_dmat;
+
+	struct clk		*sc_clk;
+	int			sc_phandle;
+
+	struct tilcdc_crtc	sc_crtc;
+	struct tilcdc_encoder	sc_encoder;
+	struct tilcdc_vblank	sc_vbl;
+
+	struct fdt_device_ports	sc_ports;
+};
+
+struct tilcdc_framebuffer {
+	struct drm_framebuffer	base;
+	struct drm_gem_cma_object *obj;
+};
+
+struct tilcdc_fbdev {
+	struct drm_fb_helper	helper;
+};
+
+struct tilcdcfb_attach_args {
+	struct drm_device	*tfa_drm_dev;
+	struct drm_fb_helper	*tfa_fb_helper;
+	struct drm_fb_helper_surface_size tfa_fb_sizes;
+	bus_space_tag_t		tfa_fb_bst;
+	bus_dma_tag_t		tfa_fb_dmat;
+	uint32_t		tfa_fb_linebytes;
+};
+
+#define tilcdc_private(ddev)		(ddev)->dev_private
+#define	to_tilcdc_framebuffer(x)	container_of(x, struct tilcdc_framebuffer, base)
+#define	to_tilcdc_crtc(x)		container_of(x, struct tilcdc_crtc, base)
+
+#define	RD4(sc, reg)			\
+	bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg))
+#define	WR4(sc, reg, val)		\
+	bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val))
+
+#endif /* _ARM_TI_TI_LCDC_H */
Index: src/sys/arch/arm/ti/ti_lcdcreg.h
diff -u /dev/null src/sys/arch/arm/ti/ti_lcdcreg.h:1.1
--- /dev/null	Sun Nov  3 22:59:06 2019
+++ src/sys/arch/arm/ti/ti_lcdcreg.h	Sun Nov  3 22:59:06 2019
@@ -0,0 +1,136 @@
+/* $NetBSD: ti_lcdcreg.h,v 1.1 2019/11/03 22:59:06 jmcneill Exp $ */
+/*-
+ * Copyright 2013 Oleksandr Tymoshenko 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#define	LCD_PID			0x00
+#define	LCD_CTRL		0x04
+#define		CTRL_DIV_MASK		0xff
+#define		CTRL_DIV_SHIFT		8
+#define		CTRL_AUTO_UFLOW_RESTART	(1 << 1)
+#define		CTRL_RASTER_MODE	1
+#define		CTRL_LIDD_MODE		0
+#define	LCD_LIDD_CTRL		0x0C
+

CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:59:06 UTC 2019

Modified Files:
src/sys/arch/arm/ti: am3_prcm.c files.ti
Added Files:
src/sys/arch/arm/ti: ti_fb.c ti_lcdc.c ti_lcdc.h ti_lcdcreg.h

Log Message:
Add support for AM335x display controller (LCDC).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/ti/am3_prcm.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/ti/files.ti
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/ti_fb.c \
src/sys/arch/arm/ti/ti_lcdc.c src/sys/arch/arm/ti/ti_lcdc.h \
src/sys/arch/arm/ti/ti_lcdcreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:59:24 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Add tdahdmi, tilcdc, tifb


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.66 src/sys/arch/evbarm/conf/GENERIC:1.67
--- src/sys/arch/evbarm/conf/GENERIC:1.66	Fri Nov  1 12:01:09 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Sun Nov  3 22:59:24 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.66 2019/11/01 12:01:09 jmcneill Exp $
+#	$NetBSD: GENERIC,v 1.67 2019/11/03 22:59:24 jmcneill Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -560,6 +560,7 @@ seeprom* 	at iic?			# AT24Cxx Serial EEP
 sy8106a* 	at iic?			# Silergy SY81061 regulator
 tcakp* 		at iic?			# TI TCA8418 Keypad Scan IC
 tcagpio* 	at iic?
+tdahdmi*	at iic? 		# NXP TDA19988 HDMI encoder
 titemp* 	at iic?
 tps65217pmic*	at iic?			# TI TPS65217 Power Management IC
 tps65217reg*	at tps65217pmic?
@@ -674,6 +675,8 @@ connector* 	at fdt? pass 4
 panel* 		at fdt? pass 4
 #sunxidep must be after display pipeline elements but before genfb@fdt
 sunxidep* 	at fdt? pass 5		# Display Engine Pipeline
+tilcdc*		at fdt?			# TI OMAP4 LCDC
+tifb*		at tilcdc?
 
 options 	VCONS_DRAW_INTR
 options 	WSEMUL_VT100



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:59:24 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Add tdahdmi, tilcdc, tifb


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:57:52 UTC 2019

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: tda19988.c

Log Message:
Add driver for NXP TDA19988 HDMI encoder


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tda19988.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:57:52 UTC 2019

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: tda19988.c

Log Message:
Add driver for NXP TDA19988 HDMI encoder


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tda19988.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.103 src/sys/dev/i2c/files.i2c:1.104
--- src/sys/dev/i2c/files.i2c:1.103	Fri Nov  1 09:59:22 2019
+++ src/sys/dev/i2c/files.i2c	Sun Nov  3 22:57:52 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.103 2019/11/01 09:59:22 jmcneill Exp $
+#	$NetBSD: files.i2c,v 1.104 2019/11/03 22:57:52 jmcneill Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -373,3 +373,8 @@ file	dev/i2c/pca9685.c			pcapwm
 device	twl
 attach	twl at iic
 file	dev/i2c/twl4030.c			twl
+
+# NXP TDA19988 HDMI encoder
+device	tdahdmi: edid, videomode, drmkms, drmkms_i2c
+attach	tdahdmi at iic
+file	dev/i2c/tda19988.c			tdahdmi

Added files:

Index: src/sys/dev/i2c/tda19988.c
diff -u /dev/null src/sys/dev/i2c/tda19988.c:1.1
--- /dev/null	Sun Nov  3 22:57:52 2019
+++ src/sys/dev/i2c/tda19988.c	Sun Nov  3 22:57:52 2019
@@ -0,0 +1,930 @@
+/* $NetBSD: tda19988.c,v 1.1 2019/11/03 22:57:52 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2015 Oleksandr Tymoshenko 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: tda19988.c,v 1.1 2019/11/03 22:57:52 jmcneill Exp $");
+
+/*
+* NXP TDA19988 HDMI encoder 
+*/
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+enum {
+	TDA19988_PORT_INPUT = 0
+};
+
+#define	MKREG(page, addr)	(((page) << 8) | (addr))
+
+#define	REGPAGE(reg)		(((reg) >> 8) & 0xff)
+#define	REGADDR(reg)		((reg) & 0xff)
+
+#define TDA_VERSION		MKREG(0x00, 0x00)
+#define TDA_MAIN_CNTRL0		MKREG(0x00, 0x01)
+#define 	MAIN_CNTRL0_SR		(1 << 0)
+#define TDA_VERSION_MSB		MKREG(0x00, 0x02)
+#define	TDA_SOFTRESET		MKREG(0x00, 0x0a)
+#define		SOFTRESET_I2C		(1 << 1)
+#define		SOFTRESET_AUDIO		(1 << 0)
+#define	TDA_DDC_CTRL		MKREG(0x00, 0x0b)
+#define		DDC_ENABLE		0
+#define	TDA_CCLK		MKREG(0x00, 0x0c)
+#define		CCLK_ENABLE		1
+#define	TDA_INT_FLAGS_2		MKREG(0x00, 0x11)
+#define		INT_FLAGS_2_EDID_BLK_RD	(1 << 1)
+
+#define	TDA_VIP_CNTRL_0		MKREG(0x00, 0x20)
+#define	TDA_VIP_CNTRL_1		MKREG(0x00, 0x21)
+#define	TDA_VIP_CNTRL_2		MKREG(0x00, 0x22)
+#define	TDA_VIP_CNTRL_3		MKREG(0x00, 0x23)
+#define		VIP_CNTRL_3_SYNC_HS	(2 << 4)
+#define		VIP_CNTRL_3_V_TGL	(1 << 2)
+#define		VIP_CNTRL_3_H_TGL	(1 << 1)
+
+#define	TDA_VIP_CNTRL_4		MKREG(0x00, 0x24)
+#define		VIP_CNTRL_4_BLANKIT_NDE		(0 << 2)
+#define		VIP_CNTRL_4_BLANKIT_HS_VS	(1 << 2)
+#define		VIP_CNTRL_4_BLANKIT_NHS_VS	(2 << 2)
+#define		VIP_CNTRL_4_BLANKIT_HE_VE	(3 << 2)
+#define		VIP_CNTRL_4_BLC_NONE		(0 << 0)
+#define		VIP_CNTRL_4_BLC_RGB444		(1 << 0)
+#define		VIP_CNTRL_4_BLC_YUV444		(2 << 0)
+#define		VIP_CNTRL_4_BLC_YUV422		(3 << 0)
+#define	TDA_VIP_CNTRL_5		MKREG(0x00, 0x25)
+#define		VIP_CNTRL_5_SP_CNT(n)	(((n) & 3) << 1)
+#define	TDA_MUX_VP_VIP_OUT	MKREG(0x00, 0x27)
+#define TDA_MAT_CONTRL		MKREG(0x00, 0x80)
+#define		MAT_CONTRL_MAT_BP	(1 << 2)
+#define	TDA_VIDFORMAT		MKREG(0x00, 0xa0)
+#define	TDA_REFPIX_MSB		MKREG(0x00, 0xa1)
+#define	TDA_REFPIX_LSB		MKREG(0x00, 0xa2)
+#define	TDA_REFLINE_MSB		MKREG(0x00, 0xa3)
+#define	TDA_REFLINE_LSB		MKREG(0x00, 0xa4)

CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:55:34 UTC 2019

Modified Files:
src/sys/dev/i2c: tps65217pmic.c

Log Message:
Defer power monitor polling to the sysmon taskq thread to avoid i2c 
transactions in intr context


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/tps65217pmic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/tps65217pmic.c
diff -u src/sys/dev/i2c/tps65217pmic.c:1.13 src/sys/dev/i2c/tps65217pmic.c:1.14
--- src/sys/dev/i2c/tps65217pmic.c:1.13	Sun Oct 27 20:11:13 2019
+++ src/sys/dev/i2c/tps65217pmic.c	Sun Nov  3 22:55:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tps65217pmic.c,v 1.13 2019/10/27 20:11:13 jmcneill Exp $ */
+/*	$NetBSD: tps65217pmic.c,v 1.14 2019/11/03 22:55:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include "opt_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.13 2019/10/27 20:11:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.14 2019/11/03 22:55:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: tps65217pmic
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -419,7 +420,7 @@ tps65217pmic_power_monitor_init(struct t
 }
 
 static void
-tps65217pmic_power_monitor(void *aux)
+tps65217pmic_power_monitor_task(void *aux)
 {
 	struct tps65217pmic_softc *sc;
 	uint8_t status;
@@ -462,6 +463,12 @@ tps65217pmic_power_monitor(void *aux)
 }
 
 static void
+tps65217pmic_power_monitor(void *aux)
+{
+	sysmon_task_queue_sched(0, tps65217pmic_power_monitor_task, aux);
+}
+
+static void
 tps65217pmic_wled_init(struct tps65217pmic_softc *sc, int isel, int fdim,
 		   int brightness)
 {



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 22:55:34 UTC 2019

Modified Files:
src/sys/dev/i2c: tps65217pmic.c

Log Message:
Defer power monitor polling to the sysmon taskq thread to avoid i2c 
transactions in intr context


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/tps65217pmic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 13:45:57 UTC 2019

Modified Files:
src/sys/arch/arm/ti: omap2_nand.c

Log Message:
Also match ti,omap2-onenand


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/omap2_nand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 13:45:57 UTC 2019

Modified Files:
src/sys/arch/arm/ti: omap2_nand.c

Log Message:
Also match ti,omap2-onenand


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/omap2_nand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/ti/omap2_nand.c
diff -u src/sys/arch/arm/ti/omap2_nand.c:1.1 src/sys/arch/arm/ti/omap2_nand.c:1.2
--- src/sys/arch/arm/ti/omap2_nand.c:1.1	Fri Nov  1 11:53:35 2019
+++ src/sys/arch/arm/ti/omap2_nand.c	Sun Nov  3 13:45:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap2_nand.c,v 1.1 2019/11/01 11:53:35 jmcneill Exp $	*/
+/*	$NetBSD: omap2_nand.c,v 1.2 2019/11/03 13:45:57 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap2_nand.c,v 1.1 2019/11/01 11:53:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_nand.c,v 1.2 2019/11/03 13:45:57 jmcneill Exp $");
 
 /* TODO move to opt_* */
 #undef OMAP2_NAND_HARDWARE_ECC
@@ -126,6 +126,7 @@ struct omap2_nand_softc {
 
 static const char * compatible[] = {
 	"ti,omap2-nand",
+	"ti,omap2-onenand",
 	NULL
 };
 



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:17:33 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: IGEPV2

Log Message:
OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r0 src/sys/arch/evbarm/conf/IGEPV2
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/README.evbarm
diff -u src/sys/arch/evbarm/conf/README.evbarm:1.26 src/sys/arch/evbarm/conf/README.evbarm:1.27
--- src/sys/arch/evbarm/conf/README.evbarm:1.26	Sun Nov  3 12:11:42 2019
+++ src/sys/arch/evbarm/conf/README.evbarm	Sun Nov  3 12:17:32 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.evbarm,v 1.26 2019/11/03 12:11:42 jmcneill Exp $
+$NetBSD: README.evbarm,v 1.27 2019/11/03 12:17:32 jmcneill Exp $
 
 config		date		boards
 ---
@@ -14,7 +14,6 @@ GEMINI		2008/10/24	Cortina Systems SL351
 GUMSTIX		2006/10/16	Gumstix Inc. PXA255/270 based boards
 HDL_G		2006/04/16	I-O DATA HDL-G Giga LANDISK
 HPT5325		2012/03/31	HP t5325 Thin Client
-IGEPV2		2010/06/16	IGEPv2 OMAP3530 eval board
 IMX31LITE	2008/04/27	Freescale i.M31 DEV LITE KIT
 INTEGRATOR	2001/10/27	ARM Integrator board
 IQ31244		2003/05/14	Intel IQ31244 reference board



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:18:28 UTC 2019

Removed Files:
src/sys/arch/evbarm/conf: std.igepv2

Log Message:
No longer used.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r0 src/sys/arch/evbarm/conf/std.igepv2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:18:28 UTC 2019

Removed Files:
src/sys/arch/evbarm/conf: std.igepv2

Log Message:
No longer used.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r0 src/sys/arch/evbarm/conf/std.igepv2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/etc.evbarm

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:16:35 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Remove commented out IGEPV2 entry


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.113 src/etc/etc.evbarm/Makefile.inc:1.114
--- src/etc/etc.evbarm/Makefile.inc:1.113	Sun Nov  3 12:09:04 2019
+++ src/etc/etc.evbarm/Makefile.inc	Sun Nov  3 12:16:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.113 2019/11/03 12:09:04 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.114 2019/11/03 12:16:35 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -86,7 +86,6 @@ EVBARM_BOARDS.armv7+=		CUBOX
 EVBARM_BOARDS.armv7hf+= 	CUBOX
 EVBARM_BOARDS.armv7+=		CUBOX-I
 EVBARM_BOARDS.armv7hf+= 	CUBOX-I
-#EVBARM_BOARDS.armv7+=		IGEPV2
 EVBARM_BOARDS.armv7+=		IMX6UL-STARTER
 EVBARM_BOARDS.armv7hf+=		IMX6UL-STARTER
 EVBARM_BOARDS.armv7+=		KOBO



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:17:33 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: IGEPV2

Log Message:
OMAP3 SoC and all peripherals in the IGEPV2 kernel are now supported by
GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r0 src/sys/arch/evbarm/conf/IGEPV2
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/etc.evbarm

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:16:35 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Remove commented out IGEPV2 entry


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:11:42 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: OVERO OVERO_INSTALL

Log Message:
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r0 src/sys/arch/evbarm/conf/OVERO
cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/OVERO_INSTALL
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/README.evbarm
diff -u src/sys/arch/evbarm/conf/README.evbarm:1.25 src/sys/arch/evbarm/conf/README.evbarm:1.26
--- src/sys/arch/evbarm/conf/README.evbarm:1.25	Thu Oct 31 01:55:12 2019
+++ src/sys/arch/evbarm/conf/README.evbarm	Sun Nov  3 12:11:42 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.evbarm,v 1.25 2019/10/31 01:55:12 jmcneill Exp $
+$NetBSD: README.evbarm,v 1.26 2019/11/03 12:11:42 jmcneill Exp $
 
 config		date		boards
 ---
@@ -39,7 +39,6 @@ OPENBLOCKS_A6	2012/08/01	Plat'Home. Open
 OPENBLOCKS_AX3	2013/09/30	Plat'Home. OpenBlockS AX3
 OPENRD		2012/08/10	open-rd.org Marvell Orion board
 OSK5912		2007/01/06	TI OMAP 5912 OSK board
-OVERO		2010/07/10	Gumstix Inc. Overo COMS boards
 PANDABOARD	2012/08/20	TI OMAP4430 PandaBoard
 PARALLELLA	2015/01/23	Xilinx Zynq and Epiphany multi-core chips
 PEPPER		2016/10/15	Gumstix Inc. Pepper SBC(Single Board Computer)



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:11:42 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: OVERO OVERO_INSTALL

Log Message:
OMAP3 SoC and all peripherals in the OVERO kernel are now supported by
GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r0 src/sys/arch/evbarm/conf/OVERO
cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/OVERO_INSTALL
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/etc.evbarm

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:09:04 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Remove OVERO from build, and commented out N900 kernel config


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.112 src/etc/etc.evbarm/Makefile.inc:1.113
--- src/etc/etc.evbarm/Makefile.inc:1.112	Thu Oct 31 01:54:34 2019
+++ src/etc/etc.evbarm/Makefile.inc	Sun Nov  3 12:09:04 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.112 2019/10/31 01:54:34 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.113 2019/11/03 12:09:04 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -93,13 +93,10 @@ EVBARM_BOARDS.armv7+=		KOBO
 EVBARM_BOARDS.armv7hf+= 	KOBO
 EVBARM_BOARDS.armv7+=		MIRABOX
 EVBARM_BOARDS.armv7hf+=		MIRABOX
-#EVBARM_BOARDS.armv7+=		N900
 EVBARM_BOARDS.armv7+=		NETWALKER
 EVBARM_BOARDS.armv7hf+=		NETWALKER
 EVBARM_BOARDS.armv7+=		OMAP5EVM
 EVBARM_BOARDS.armv7hf+=		OMAP5EVM
-EVBARM_BOARDS.armv7+=		OVERO
-EVBARM_BOARDS.armv7hf+=		OVERO
 EVBARM_BOARDS.armv7+=		PANDABOARD
 EVBARM_BOARDS.armv7hf+= 	PANDABOARD
 



CVS commit: src/etc/etc.evbarm

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:09:04 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Remove OVERO from build, and commented out N900 kernel config


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:07:46 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: N900

Log Message:
Only one instance of twl(4) is needed


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/N900

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/N900
diff -u src/sys/arch/evbarm/conf/N900:1.32 src/sys/arch/evbarm/conf/N900:1.33
--- src/sys/arch/evbarm/conf/N900:1.32	Sat Nov  2 07:56:25 2019
+++ src/sys/arch/evbarm/conf/N900	Sun Nov  3 12:07:46 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: N900,v 1.32 2019/11/02 07:56:25 martin Exp $
+#	$NetBSD: N900,v 1.33 2019/11/03 12:07:46 jmcneill Exp $
 #
 #	N900 -- Nokia N900 Kernel
 #
@@ -231,9 +231,6 @@ iic*		at omapiic?
 # I2C devices
 # Power Management and System Companion Device
 twl0		at iic0 addr 0x48
-twl1		at iic0 addr 0x49
-twl2		at iic0 addr 0x4a
-twl3		at iic0 addr 0x4b
 
 # On-board 16550 UARTs
 #com0		at obio2 addr 0x4902 intr 74 mult 4	# UART3 (console)



CVS commit: src/sys/arch/evbarm/conf

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:07:46 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: N900

Log Message:
Only one instance of twl(4) is needed


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/N900

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/fdt

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:06:33 UTC 2019

Modified Files:
src/sys/arch/arm/fdt: smsh_fdt.c

Log Message:
Match smsc,lan9115 and honour local-mac-address/mac-address properties


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/fdt/smsh_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/fdt

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 12:06:33 UTC 2019

Modified Files:
src/sys/arch/arm/fdt: smsh_fdt.c

Log Message:
Match smsc,lan9115 and honour local-mac-address/mac-address properties


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/fdt/smsh_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/fdt/smsh_fdt.c
diff -u src/sys/arch/arm/fdt/smsh_fdt.c:1.1 src/sys/arch/arm/fdt/smsh_fdt.c:1.2
--- src/sys/arch/arm/fdt/smsh_fdt.c:1.1	Fri Jun  2 10:46:07 2017
+++ src/sys/arch/arm/fdt/smsh_fdt.c	Sun Nov  3 12:06:32 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: smsh_fdt.c,v 1.1 2017/06/02 10:46:07 jmcneill Exp $ */
+/* $NetBSD: smsh_fdt.c,v 1.2 2019/11/03 12:06:32 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smsh_fdt.c,v 1.1 2017/06/02 10:46:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smsh_fdt.c,v 1.2 2019/11/03 12:06:32 jmcneill Exp $");
 
 #include 
 #include 
@@ -49,7 +49,11 @@ __KERNEL_RCSID(0, "$NetBSD: smsh_fdt.c,v
 static int	smsh_fdt_match(device_t, cfdata_t, void *);
 static void	smsh_fdt_attach(device_t, device_t, void *);
 
-static const char * const compatible[] = { "smsc,lan9118", NULL };
+static const char * const compatible[] = {
+	"smsc,lan9118",
+	"smsc,lan9115",
+	NULL
+};
 
 CFATTACH_DECL_NEW(smsh_fdt, sizeof(struct lan9118_softc),
 	smsh_fdt_match, smsh_fdt_attach, NULL, NULL);
@@ -67,10 +71,12 @@ smsh_fdt_attach(device_t parent, device_
 {
 	struct lan9118_softc * const sc = device_private(self);
 	struct fdt_attach_args * const faa = aux;
-	char intrstr[128];
 	const int phandle = faa->faa_phandle;
+	const char *enaddr;
+	char intrstr[128];
 	bus_addr_t addr;
 	bus_size_t size;
+	int len;
 	void *ih;
 
 	if (fdtbus_get_reg(phandle, 0, , ) != 0) {
@@ -95,6 +101,14 @@ smsh_fdt_attach(device_t parent, device_
 	if (of_hasprop(phandle, "smsc,irq-push-pull"))
 		sc->sc_flags |= LAN9118_FLAGS_IRQ_PP;
 
+	enaddr = fdtbus_get_prop(phandle, "local-mac-address", );
+	if (enaddr == NULL || len != ETHER_ADDR_LEN)
+		enaddr = fdtbus_get_prop(phandle, "mac-address", );
+	if (enaddr != NULL && len == ETHER_ADDR_LEN) {
+		memcpy(sc->sc_enaddr, enaddr, ETHER_ADDR_LEN);
+		sc->sc_flags |= LAN9118_FLAGS_NO_EEPROM;
+	}
+
 	if (lan9118_attach(sc) != 0)
 		goto unmap;
 



CVS commit: src/etc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 12:03:36 UTC 2019

Modified Files:
src/etc: MAKEDEV.awk

Log Message:
PR port-arm/54640: hack to work around conditional RAW_PART definition in
arm/include/disklabel.h.

Recognize this special case and skip lines between #ifndef RAW_PART and
the next #endif.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/MAKEDEV.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/MAKEDEV.awk
diff -u src/etc/MAKEDEV.awk:1.27 src/etc/MAKEDEV.awk:1.28
--- src/etc/MAKEDEV.awk:1.27	Mon Oct 28 02:53:29 2019
+++ src/etc/MAKEDEV.awk	Sun Nov  3 12:03:35 2019
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -
 #
-#	$NetBSD: MAKEDEV.awk,v 1.27 2019/10/28 02:53:29 ozaki-r Exp $
+#	$NetBSD: MAKEDEV.awk,v 1.28 2019/11/03 12:03:35 martin Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -135,7 +135,18 @@ BEGIN {
 diskpartitions = $3
 			else if ($1 == "#define" && $2 == "OLDMAXPARTITIONS")
 diskbackcompat = $3
-			else if ($1 == "#define" && $2 == "RAW_PART")
+			else if ($1 == "#ifndef" && $2 == "RAW_PART" &&
+			RAWDISK_OFF) {
+# special case to ignore #ifndef RAW_PART
+# sections (e.g. in arm/include/disklabel.h,
+# when it is already set in
+# zaurus/include/disklabel.h)
+while (getline < inc) {
+	# skip all lines upto the next #endif
+	if ($1 == "#endif")
+		break;
+}
+			} else if ($1 == "#define" && $2 == "RAW_PART")
 RAWDISK_OFF = $3
 			else if ($1 == "#include" && 
  $2 ~ "<.*/disklabel.h>" &&
@@ -214,7 +225,7 @@ BEGIN {
 	print "# Generated from:"
 
 	# MAKEDEV.awk (this script) RCS Id
-	ARCSID = "$NetBSD: MAKEDEV.awk,v 1.27 2019/10/28 02:53:29 ozaki-r Exp $"
+	ARCSID = "$NetBSD: MAKEDEV.awk,v 1.28 2019/11/03 12:03:35 martin Exp $"
 	gsub(/\$/, "", ARCSID)
 	print "#	" ARCSID
 	



CVS commit: src/etc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 12:03:36 UTC 2019

Modified Files:
src/etc: MAKEDEV.awk

Log Message:
PR port-arm/54640: hack to work around conditional RAW_PART definition in
arm/include/disklabel.h.

Recognize this special case and skip lines between #ifndef RAW_PART and
the next #endif.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/MAKEDEV.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/doc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:42:52 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #391 and #392


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.93 -r1.1.2.94 src/doc/CHANGES-9.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/doc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:42:52 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #391 and #392


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.93 -r1.1.2.94 src/doc/CHANGES-9.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.93 src/doc/CHANGES-9.0:1.1.2.94
--- src/doc/CHANGES-9.0:1.1.2.93	Fri Nov  1 18:25:22 2019
+++ src/doc/CHANGES-9.0	Sun Nov  3 11:42:52 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.93 2019/11/01 18:25:22 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.94 2019/11/03 11:42:52 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -5402,3 +5402,26 @@ sys/arch/x86/x86/cpu_rng.c			1.10
 	cpu_rng_rdrand().
 	[taca, ticket #390]
 
+sys/arch/zaurus/conf/Makefile.zaurus.inc	1.10
+sys/arch/zaurus/stand/zbsdmod/Makefile		1.12
+sys/arch/zaurus/stand/zbsdmod/compat_linux.h	1.7
+sys/arch/zaurus/stand/zbsdmod/zbsdmod.c		1.10,1.11
+
+	Explicitly set empty LINKENTRY to keep ENTRY address specified
+	in ldscript. Cacheline-align code used to enter the kernel.
+	Misc cleanup to avoid future confusion:
+	- Remove more unnecessary debug sections
+	- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
+	- Use CFLAGS and CPPFLAGS correctly
+	- Explicitly set -ffreestanding
+	Make sure to clear bss before jumping to a kernel copied from
+	load buffer.
+	[tsutsui, ticket #391]
+
+doc/HACKS	1.195,1.196
+external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h 1.11
+external/bsd/jemalloc/lib/Makefile.inc		1.11
+
+	PR port-alpha/54307: workaround for random crash of userland binaries.
+	[rin, ticket #392]
+



CVS commit: [netbsd-9] src

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:41:57 UTC 2019

Modified Files:
src/doc [netbsd-9]: HACKS
src/external/bsd/jemalloc/include/jemalloc/internal [netbsd-9]:
jemalloc_internal_defs.h
src/external/bsd/jemalloc/lib [netbsd-9]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by rin in ticket #392):

doc/HACKS: revision 1.195
doc/HACKS: revision 1.196
external/bsd/jemalloc/lib/Makefile.inc: revision 1.11

external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h: 
revision 1.11

PR/54307: Rin Okuyama: Lots of jemalloc assertions in latest -current

Workaround for random crash of userland binaries, as reported in
PR port-alpha/54307.

If rtree.c and tcache.c are compiled with -O0, userland just works
without problems as far as I can see. Alternately, you can specify
-DJEMALLOC_DEBUG to avoid random crash. Smells like compiler bug,
or wrong coding which relies on some undefined behavior.

Anyway, we need to pull this up into netbsd-9 asap.

Describe workaround for PR port-alpha/54307.

Describe that both GCC 7.4 and 8.3 fail in the last entry.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.190.2.1 src/doc/HACKS
cvs rdiff -u -r1.10 -r1.10.4.1 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/bsd/jemalloc/lib/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.190 src/doc/HACKS:1.190.2.1
--- src/doc/HACKS:1.190	Tue May 14 02:53:16 2019
+++ src/doc/HACKS	Sun Nov  3 11:41:57 2019
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.190 2019/05/14 02:53:16 maya Exp $
+# $NetBSD: HACKS,v 1.190.2.1 2019/11/03 11:41:57 martin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -929,3 +929,12 @@ file	src/libexec/ld.elf_so/Makefile: 1.1
 descr	Disable optimization for rtld.c on the vax with gcc-7. Crashes on the
 	second pass loop with elm == 0x
 kcah
+
+port	alpha
+hack	GCC 7.4/8.3: userland binaries crash randomly (port-alpha/54307)
+cdate	Fri Nov  1 20:43:35 UTC 2019
+who	rin
+file	src/external/bsd/jemalloc/lib/Makefile.inc: 1.11
+descr	rtree.c and tcache.c need to be compiled with -O0, alternatively,
+	you can compile whole jemalloc with -DJEMALLOC_DEBUG.
+kcah

Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10.4.1
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10	Tue May 14 16:22:09 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h	Sun Nov  3 11:41:57 2019
@@ -47,9 +47,13 @@
  */
 #ifdef _LP64
 /* XXX: I will take care of this later */
-#define LG_VADDR 48
+# ifdef __alpha__
+#  define LG_VADDR 43	/* bit 42 indicates direct map, 42--63 are same */
+# else
+#  define LG_VADDR 48
+# endif
 #else
-#define LG_VADDR 32
+# define LG_VADDR 32
 #endif
 
 /* Defined if C11 atomics are available. */

Index: src/external/bsd/jemalloc/lib/Makefile.inc
diff -u src/external/bsd/jemalloc/lib/Makefile.inc:1.10 src/external/bsd/jemalloc/lib/Makefile.inc:1.10.2.1
--- src/external/bsd/jemalloc/lib/Makefile.inc:1.10	Tue Jul 23 06:31:20 2019
+++ src/external/bsd/jemalloc/lib/Makefile.inc	Sun Nov  3 11:41:57 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2019/07/23 06:31:20 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.10.2.1 2019/11/03 11:41:57 martin Exp $
 
 JEMALLOC:=${.PARSEDIR}/..
 
@@ -51,6 +51,14 @@ COPTS.ctl.c+=-Wno-error=stack-protector
 COPTS.stats.c+=-Wno-error=stack-protector
 COPTS.tcache.c+=-Wno-error=stack-protector
 
+.if ${MACHINE} == "alpha"
+# These files need to be compiled with -O0, or build everything with
+# -DJEMALLOC_DEBUG. Otherwise, userland binaries crash randomly, as
+# reported in port-alpha/54307.
+COPTS.rtree.c+=-O0
+COPTS.tcache.c+=-O0
+.endif
+
 .if ${MACHINE_ARCH} == "vax"
 # in merge_overlapping_regs, at regrename.c
 COPTS.arena.c+=-O0



CVS commit: [netbsd-9] src

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:41:57 UTC 2019

Modified Files:
src/doc [netbsd-9]: HACKS
src/external/bsd/jemalloc/include/jemalloc/internal [netbsd-9]:
jemalloc_internal_defs.h
src/external/bsd/jemalloc/lib [netbsd-9]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by rin in ticket #392):

doc/HACKS: revision 1.195
doc/HACKS: revision 1.196
external/bsd/jemalloc/lib/Makefile.inc: revision 1.11

external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h: 
revision 1.11

PR/54307: Rin Okuyama: Lots of jemalloc assertions in latest -current

Workaround for random crash of userland binaries, as reported in
PR port-alpha/54307.

If rtree.c and tcache.c are compiled with -O0, userland just works
without problems as far as I can see. Alternately, you can specify
-DJEMALLOC_DEBUG to avoid random crash. Smells like compiler bug,
or wrong coding which relies on some undefined behavior.

Anyway, we need to pull this up into netbsd-9 asap.

Describe workaround for PR port-alpha/54307.

Describe that both GCC 7.4 and 8.3 fail in the last entry.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.190.2.1 src/doc/HACKS
cvs rdiff -u -r1.10 -r1.10.4.1 \
src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
cvs rdiff -u -r1.10 -r1.10.2.1 src/external/bsd/jemalloc/lib/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/doc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:39:47 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1420


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-8.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/doc

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:39:47 UTC 2019

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1420


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.57 -r1.1.2.58 src/doc/CHANGES-8.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.57 src/doc/CHANGES-8.2:1.1.2.58
--- src/doc/CHANGES-8.2:1.1.2.57	Fri Nov  1 09:30:36 2019
+++ src/doc/CHANGES-8.2	Sun Nov  3 11:39:47 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.57 2019/11/01 09:30:36 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.58 2019/11/03 11:39:47 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1404,3 +1404,19 @@ sys/kern/subr_disk.c1.129
 	or broken drives.
 	[cnst, ticket #1397]
 
+sys/arch/zaurus/conf/Makefile.zaurus.inc	1.10
+sys/arch/zaurus/stand/zbsdmod/Makefile		1.12
+sys/arch/zaurus/stand/zbsdmod/compat_linux.h	1.7
+sys/arch/zaurus/stand/zbsdmod/zbsdmod.c		1.10,1.11
+
+	Explicitly set empty LINKENTRY to keep ENTRY address specified
+	in ldscript. Cacheline-align code used to enter the kernel.
+	Misc cleanup to avoid future confusion:
+	- Remove more unnecessary debug sections
+	- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
+	- Use CFLAGS and CPPFLAGS correctly
+	- Explicitly set -ffreestanding
+	Make sure to clear bss before jumping to a kernel copied from
+	load buffer.
+	[tsutsui, ticket #1420]
+



CVS commit: [netbsd-8] src/sys/arch/zaurus

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:38:51 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf [netbsd-8]: Makefile.zaurus.inc
src/sys/arch/zaurus/stand/zbsdmod [netbsd-8]: Makefile compat_linux.h
zbsdmod.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1420):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

 -

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/zaurus/conf/Makefile.zaurus.inc
cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/arch/zaurus/stand/zbsdmod/Makefile
cvs rdiff -u -r1.6 -r1.6.40.1 \
src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/arch/zaurus

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:38:51 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf [netbsd-8]: Makefile.zaurus.inc
src/sys/arch/zaurus/stand/zbsdmod [netbsd-8]: Makefile compat_linux.h
zbsdmod.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1420):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

 -

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/zaurus/conf/Makefile.zaurus.inc
cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/arch/zaurus/stand/zbsdmod/Makefile
cvs rdiff -u -r1.6 -r1.6.40.1 \
src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/conf/Makefile.zaurus.inc
diff -u src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9 src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9.10.1
--- src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9	Tue Aug 25 02:38:15 2015
+++ src/sys/arch/zaurus/conf/Makefile.zaurus.inc	Sun Nov  3 11:38:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.zaurus.inc,v 1.9 2015/08/25 02:38:15 uebayasi Exp $
+#	$NetBSD: Makefile.zaurus.inc,v 1.9.10.1 2019/11/03 11:38:50 martin Exp $
 
 MACHINE_ARCH?=		arm
 CPPFLAGS+=		-D${MACHINE}
@@ -20,6 +20,8 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 KERNEL_BASE_VIRT=	$(LOADADDRESS)
 
 KERNLDSCRIPT=		ldscript
+TEXTADDR=		# defined in ldscript
+LINKENTRY=		# defined in ldscript
 
 EXTRA_CLEAN+=		netbsd.map assym.d ldscript tmp
 

Index: src/sys/arch/zaurus/stand/zbsdmod/Makefile
diff -u src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10 src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10.10.1
--- src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10	Sun Jan 31 15:32:13 2016
+++ src/sys/arch/zaurus/stand/zbsdmod/Makefile	Sun Nov  3 11:38:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/01/31 15:32:13 christos Exp $
+#	$NetBSD: Makefile,v 1.10.10.1 2019/11/03 11:38:50 martin Exp $
 
 WARNS?=	4
 
@@ -10,8 +10,18 @@ OBJS=	zbsdmod.o
 SRCS=	zbsdmod.c
 NOMAN=	# defined
 
+OBJCOPY_FLAGS=			\
+	-R .debug_abbrev	\
+	-R .debug_aranges	\
+	-R .debug_info		\
+	-R .debug_line		\
+	-R .debug_loc		\
+	-R .debug_ranges	\
+	-R .debug_str		\
+	-R .eh_frame
+
 realall: ${OBJS}
-	${OBJCOPY} -R .eh_frame ${.OBJDIR}/zbsdmod.o
+	${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o
 
 .include 
 .include 
@@ -21,11 +31,12 @@ afterinstall:
 		${OBJS} ${DESTDIR}/${BINDIR}
 
 CPUFLAGS=
-COPTS=		-Os
+DBG=		-Os
 CFLAGS+=	-fno-strict-aliasing
-CFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
-CPPFLAGS+=  -nostdinc -D_STANDALONE
+CFLAGS+=	-ffreestanding -nostdinc
+CFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
+CPPFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
+CPPFLAGS+=	-D_STANDALONE
 CPPFLAGS+=	-I${.OBJDIR} -I${S}
 
 release: check_RELEASEDIR

Index: src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
diff -u src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6.40.1
--- src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6	Sun Dec 11 14:05:39 2011
+++ src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h	Sun Nov  3 11:38:50 2019
@@ 

CVS commit: [netbsd-9] src/sys/arch/zaurus

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:36:56 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf [netbsd-9]: Makefile.zaurus.inc
src/sys/arch/zaurus/stand/zbsdmod [netbsd-9]: Makefile compat_linux.h
zbsdmod.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #391):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

 -

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/zaurus/conf/Makefile.zaurus.inc
cvs rdiff -u -r1.10 -r1.10.22.1 src/sys/arch/zaurus/stand/zbsdmod/Makefile
cvs rdiff -u -r1.6 -r1.6.52.1 \
src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.9 -r1.9.34.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/zaurus/conf/Makefile.zaurus.inc
diff -u src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9 src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9.22.1
--- src/sys/arch/zaurus/conf/Makefile.zaurus.inc:1.9	Tue Aug 25 02:38:15 2015
+++ src/sys/arch/zaurus/conf/Makefile.zaurus.inc	Sun Nov  3 11:36:56 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.zaurus.inc,v 1.9 2015/08/25 02:38:15 uebayasi Exp $
+#	$NetBSD: Makefile.zaurus.inc,v 1.9.22.1 2019/11/03 11:36:56 martin Exp $
 
 MACHINE_ARCH?=		arm
 CPPFLAGS+=		-D${MACHINE}
@@ -20,6 +20,8 @@ SYSTEM_LD_TAIL_EXTRA+=; \
 KERNEL_BASE_VIRT=	$(LOADADDRESS)
 
 KERNLDSCRIPT=		ldscript
+TEXTADDR=		# defined in ldscript
+LINKENTRY=		# defined in ldscript
 
 EXTRA_CLEAN+=		netbsd.map assym.d ldscript tmp
 

Index: src/sys/arch/zaurus/stand/zbsdmod/Makefile
diff -u src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10 src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10.22.1
--- src/sys/arch/zaurus/stand/zbsdmod/Makefile:1.10	Sun Jan 31 15:32:13 2016
+++ src/sys/arch/zaurus/stand/zbsdmod/Makefile	Sun Nov  3 11:36:56 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2016/01/31 15:32:13 christos Exp $
+#	$NetBSD: Makefile,v 1.10.22.1 2019/11/03 11:36:56 martin Exp $
 
 WARNS?=	4
 
@@ -10,8 +10,18 @@ OBJS=	zbsdmod.o
 SRCS=	zbsdmod.c
 NOMAN=	# defined
 
+OBJCOPY_FLAGS=			\
+	-R .debug_abbrev	\
+	-R .debug_aranges	\
+	-R .debug_info		\
+	-R .debug_line		\
+	-R .debug_loc		\
+	-R .debug_ranges	\
+	-R .debug_str		\
+	-R .eh_frame
+
 realall: ${OBJS}
-	${OBJCOPY} -R .eh_frame ${.OBJDIR}/zbsdmod.o
+	${OBJCOPY} ${OBJCOPY_FLAGS} ${.OBJDIR}/zbsdmod.o
 
 .include 
 .include 
@@ -21,11 +31,12 @@ afterinstall:
 		${OBJS} ${DESTDIR}/${BINDIR}
 
 CPUFLAGS=
-COPTS=		-Os
+DBG=		-Os
 CFLAGS+=	-fno-strict-aliasing
-CFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
-CPPFLAGS+=  -nostdinc -D_STANDALONE
+CFLAGS+=	-ffreestanding -nostdinc
+CFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
+CPPFLAGS+=	-DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
+CPPFLAGS+=	-D_STANDALONE
 CPPFLAGS+=	-I${.OBJDIR} -I${S}
 
 release: check_RELEASEDIR

Index: src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
diff -u src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6.52.1
--- src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6	Sun Dec 11 14:05:39 2011
+++ src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h	Sun Nov  3 11:36:56 2019
@@ 

CVS commit: [netbsd-9] src/sys/arch/zaurus

2019-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov  3 11:36:56 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf [netbsd-9]: Makefile.zaurus.inc
src/sys/arch/zaurus/stand/zbsdmod [netbsd-9]: Makefile compat_linux.h
zbsdmod.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #391):

sys/arch/zaurus/stand/zbsdmod/Makefile: revision 1.12
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.10
sys/arch/zaurus/conf/Makefile.zaurus.inc: revision 1.10
sys/arch/zaurus/stand/zbsdmod/zbsdmod.c: revision 1.11
sys/arch/zaurus/stand/zbsdmod/compat_linux.h: revision 1.7

Explicitly set empty LINKENTRY to keep ENTRY address specified in ldscript.

This fixes kernel boot failures of NetBSD/zaurus 8.x and later.
While here, also set empty TEXTADDR also specified in ldscript.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Fix another boot failure issue of NetBSD/zaurus 8.x and later.

It looks some cacheline alignment restriction so that zbsdmod.o in
NetBSD/zaurus 8.x release cannot jump to a loaded kernel properly.

Adding an explicit alingment pseudo op to put all instructions
between I-cache flush and jumping to the loaded kernel into the
same cacheline solves the issue.

See my post in port-zaurus@ for details:
 https://mail-index.netbsd.org/port-zaurus/2019/10/22/msg69.html

Should be pulled up to netbsd-8 and netbsd-9.

 -

Misc cleanup to avoid future confusion.
- Remove more unnecessary debug sections
- Use DBG instead of COPTS to specify -Os as defined in bsd.prog.mk
- Use CFLAGS and CPPFLAGS correctly
- Explicitly set -ffreestanding

 -

Make sure to clear bss before jumping to a kernel copied from load buffer.
This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/zaurus/conf/Makefile.zaurus.inc
cvs rdiff -u -r1.10 -r1.10.22.1 src/sys/arch/zaurus/stand/zbsdmod/Makefile
cvs rdiff -u -r1.6 -r1.6.52.1 \
src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.9 -r1.9.34.1 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 11:34:40 UTC 2019

Modified Files:
src/sys/arch/arm/ti: ti_gpio.c

Log Message:
Add support for GPIO interrupts and fix reading the state of output pins.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_gpio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/ti/ti_gpio.c
diff -u src/sys/arch/arm/ti/ti_gpio.c:1.2 src/sys/arch/arm/ti/ti_gpio.c:1.3
--- src/sys/arch/arm/ti/ti_gpio.c:1.2	Tue Oct 29 22:19:13 2019
+++ src/sys/arch/arm/ti/ti_gpio.c	Sun Nov  3 11:34:40 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_gpio.c,v 1.2 2019/10/29 22:19:13 jmcneill Exp $ */
+/* $NetBSD: ti_gpio.c,v 1.3 2019/11/03 11:34:40 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.2 2019/10/29 22:19:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.3 2019/11/03 11:34:40 jmcneill Exp $");
 
 #include 
 #include 
@@ -44,27 +44,87 @@ __KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 
 
 #include 
 
-#define	GPIO_OE0x34
-#define	GPIO_DATAIN			0x38
-#define	GPIO_CLEARDATAOUT		0x90
-#define	GPIO_SETDATAOUT			0x94
+#define	TI_GPIO_NPINS			32
+
+enum ti_gpio_type {
+	TI_GPIO_OMAP3,
+	TI_GPIO_OMAP4,
+	TI_NGPIO
+};
+
+enum {
+	GPIO_IRQSTATUS1,
+	GPIO_IRQENABLE1,	/* OMAP3 */
+	GPIO_IRQENABLE1_SET,	/* OMAP4 */
+	GPIO_IRQENABLE1_CLR,	/* OMAP4 */
+	GPIO_OE,
+	GPIO_DATAIN,
+	GPIO_DATAOUT,
+	GPIO_LEVELDETECT0,
+	GPIO_LEVELDETECT1,
+	GPIO_RISINGDETECT,
+	GPIO_FALLINGDETECT,
+	GPIO_CLEARDATAOUT,
+	GPIO_SETDATAOUT,
+	GPIO_NREG
+};
+
+static const u_int ti_gpio_regmap[TI_NGPIO][GPIO_NREG] = {
+	[TI_GPIO_OMAP3] = {
+		[GPIO_IRQSTATUS1]	= 0x18,
+		[GPIO_IRQENABLE1]	= 0x1c,
+		[GPIO_OE]		= 0x34,
+		[GPIO_DATAIN]		= 0x38,
+		[GPIO_DATAOUT]		= 0x3c,
+		[GPIO_LEVELDETECT0]	= 0x40,
+		[GPIO_LEVELDETECT1]	= 0x44,
+		[GPIO_RISINGDETECT]	= 0x48,
+		[GPIO_FALLINGDETECT]	= 0x4c,
+		[GPIO_CLEARDATAOUT]	= 0x90,
+		[GPIO_SETDATAOUT]	= 0x94,
+	},
+	[TI_GPIO_OMAP4] = {
+		[GPIO_IRQSTATUS1]	= 0x2c,
+		[GPIO_IRQENABLE1_SET]	= 0x34,
+		[GPIO_IRQENABLE1_CLR]	= 0x38,
+		[GPIO_OE]		= 0x134,
+		[GPIO_DATAIN]		= 0x138,
+		[GPIO_DATAOUT]		= 0x13c,
+		[GPIO_LEVELDETECT0]	= 0x140,
+		[GPIO_LEVELDETECT1]	= 0x144,
+		[GPIO_RISINGDETECT]	= 0x148,
+		[GPIO_FALLINGDETECT]	= 0x14c,
+		[GPIO_CLEARDATAOUT]	= 0x190,
+		[GPIO_SETDATAOUT]	= 0x194,
+	},
+};
 
 static const struct of_compat_data compat_data[] = {
-	/* compatible			reg offset */
-	{ "ti,omap3-gpio",		0x0 },
-	{ "ti,omap4-gpio",		0x100 },
+	{ "ti,omap3-gpio",		TI_GPIO_OMAP3 },
+	{ "ti,omap4-gpio",		TI_GPIO_OMAP4 },
 	{ NULL }
 };
 
+struct ti_gpio_intr {
+	u_int intr_pin;
+	int (*intr_func)(void *);
+	void *intr_arg;
+	bool intr_mpsafe;
+};
+
 struct ti_gpio_softc {
 	device_t sc_dev;
 	bus_space_tag_t sc_bst;
 	bus_space_handle_t sc_bsh;
 	kmutex_t sc_lock;
-	bus_size_t sc_regoff;
+	enum ti_gpio_type sc_type;
+	const char *sc_modname;
+	void *sc_ih;
 
 	struct gpio_chipset_tag sc_gp;
-	gpio_pin_t sc_pins[32];
+	gpio_pin_t sc_pins[TI_GPIO_NPINS];
+	bool sc_pinout[TI_GPIO_NPINS];
+	struct ti_gpio_intr sc_intr[TI_GPIO_NPINS];
 	device_t sc_gpiodev;
 };
 
@@ -76,9 +136,9 @@ struct ti_gpio_pin {
 };
 
 #define RD4(sc, reg) 		\
-bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg) + (sc)->sc_regoff)
+bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, ti_gpio_regmap[(sc)->sc_type][(reg)])
 #define WR4(sc, reg, val) 	\
-bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg) + (sc)->sc_regoff, (val))
+bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, ti_gpio_regmap[(sc)->sc_type][(reg)], (val))
 
 static int	ti_gpio_match(device_t, cfdata_t, void *);
 static void	ti_gpio_attach(device_t, device_t, void *);
@@ -100,6 +160,8 @@ ti_gpio_ctl(struct ti_gpio_softc *sc, u_
 		oe &= ~__BIT(pin);
 	WR4(sc, GPIO_OE, oe);
 
+	sc->sc_pinout[pin] = (flags & GPIO_PIN_OUTPUT) != 0;
+
 	return 0;
 }
 
@@ -162,7 +224,10 @@ ti_gpio_read(device_t dev, void *priv, b
 	const uint32_t data_mask = __BIT(pin->pin_nr);
 
 	/* No lock required for reads */
-	data = RD4(sc, GPIO_DATAIN);
+	if (sc->sc_pinout[pin->pin_nr])
+		data = RD4(sc, GPIO_DATAOUT);
+	else
+		data = RD4(sc, GPIO_DATAIN);
 	val = __SHIFTOUT(data, data_mask);
 	if (!raw && pin->pin_actlo)
 		val = !val;
@@ -195,6 +260,126 @@ static struct fdtbus_gpio_controller_fun
 	.write = ti_gpio_write,
 };
 
+static void
+ti_gpio_intr_disestablish(device_t dev, void *ih)
+{
+	struct ti_gpio_softc * const sc = device_private(dev);
+	struct ti_gpio_intr *intr = ih;
+	const u_int pin = intr->intr_pin;
+	const uint32_t pin_mask = __BIT(pin);
+	uint32_t val;
+
+	/* Disable interrupts */
+	if (sc->sc_type == TI_GPIO_OMAP3) {
+		val = RD4(sc, GPIO_IRQENABLE1);
+		WR4(sc, GPIO_IRQENABLE1, val & ~pin_mask);
+	} else {
+		WR4(sc, GPIO_IRQENABLE1_CLR, pin_mask);
+	}
+
+	intr->intr_func = NULL;
+	intr->intr_arg 

CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 11:34:40 UTC 2019

Modified Files:
src/sys/arch/arm/ti: ti_gpio.c

Log Message:
Add support for GPIO interrupts and fix reading the state of output pins.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_gpio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Nov  3 11:13:46 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c
src/sys/compat/ossaudio: ossaudio.c

Log Message:
Use record field for recording even on
SNDCTL_DSP_STEREO, SNDCTL_DSP_SETFMT, and SNDCTL_DSP_CHANNELS.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/ossaudio/ossaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.37 src/lib/libossaudio/ossaudio.c:1.38
--- src/lib/libossaudio/ossaudio.c:1.37	Sat Nov  2 11:48:23 2019
+++ src/lib/libossaudio/ossaudio.c	Sun Nov  3 11:13:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.38 2019/11/03 11:13:45 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.38 2019/11/03 11:13:45 isaki Exp $");
 
 /*
  * This is an OSS (Linux) sound API emulator.
@@ -57,6 +57,10 @@ __RCSID("$NetBSD: ossaudio.c,v 1.37 2019
 #define TO_OSSVOL(x)	(((x) * 100 + 127) / 255)
 #define FROM_OSSVOL(x)	x) > 100 ? 100 : (x)) * 255 + 50) / 100)
 
+#define GETPRINFO(info, name)	\
+	(((info)->mode == AUMODE_RECORD) \
+	? (info)->record.name : (info)->play.name)
+
 static struct audiodevinfo *getdevinfo(int);
 
 static void setblocksize(int, struct audio_info *);
@@ -104,6 +108,8 @@ audio_ioctl(int fd, unsigned long com, v
 	char version[32] = "4.01";
 	char license[16] = "NetBSD";
 	u_int u;
+	u_int encoding;
+	u_int precision;
 	int idat, idata;
 	int retval;
 	int i;
@@ -134,10 +140,7 @@ audio_ioctl(int fd, unsigned long com, v
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
 		if (retval < 0)
 			return retval;
-		if (tmpinfo.mode == AUMODE_RECORD)
-			INTARG = tmpinfo.record.sample_rate;
-		else
-			INTARG = tmpinfo.play.sample_rate;
+		INTARG = GETPRINFO(, sample_rate);
 		break;
 	case SNDCTL_DSP_STEREO:
 		AUDIO_INITINFO();
@@ -147,7 +150,7 @@ audio_ioctl(int fd, unsigned long com, v
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
 		if (retval < 0)
 			return retval;
-		INTARG = tmpinfo.play.channels - 1;
+		INTARG = GETPRINFO(, channels) - 1;
 		break;
 	case SNDCTL_DSP_GETBLKSIZE:
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
@@ -246,7 +249,9 @@ audio_ioctl(int fd, unsigned long com, v
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
 		if (retval < 0)
 			return retval;
-		switch (tmpinfo.play.encoding) {
+		encoding = GETPRINFO(, encoding);
+		precision = GETPRINFO(, precision);
+		switch (encoding) {
 		case AUDIO_ENCODING_ULAW:
 			idat = AFMT_MU_LAW;
 			break;
@@ -254,33 +259,33 @@ audio_ioctl(int fd, unsigned long com, v
 			idat = AFMT_A_LAW;
 			break;
 		case AUDIO_ENCODING_SLINEAR_LE:
-			if (tmpinfo.play.precision == 32)
+			if (precision == 32)
 idat = AFMT_S32_LE;
-			else if (tmpinfo.play.precision == 24)
+			else if (precision == 24)
 idat = AFMT_S24_LE;
-			else if (tmpinfo.play.precision == 16)
+			else if (precision == 16)
 idat = AFMT_S16_LE;
 			else
 idat = AFMT_S8;
 			break;
 		case AUDIO_ENCODING_SLINEAR_BE:
-			if (tmpinfo.play.precision == 32)
+			if (precision == 32)
 idat = AFMT_S32_BE;
-			else if (tmpinfo.play.precision == 24)
+			else if (precision == 24)
 idat = AFMT_S24_BE;
-			else if (tmpinfo.play.precision == 16)
+			else if (precision == 16)
 idat = AFMT_S16_BE;
 			else
 idat = AFMT_S8;
 			break;
 		case AUDIO_ENCODING_ULINEAR_LE:
-			if (tmpinfo.play.precision == 16)
+			if (precision == 16)
 idat = AFMT_U16_LE;
 			else
 idat = AFMT_U8;
 			break;
 		case AUDIO_ENCODING_ULINEAR_BE:
-			if (tmpinfo.play.precision == 16)
+			if (precision == 16)
 idat = AFMT_U16_BE;
 			else
 idat = AFMT_U8;
@@ -306,7 +311,7 @@ audio_ioctl(int fd, unsigned long com, v
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
 		if (retval < 0)
 			return retval;
-		INTARG = tmpinfo.play.channels;
+		INTARG = GETPRINFO(, channels);
 		break;
 	case SOUND_PCM_WRITE_FILTER:
 	case SOUND_PCM_READ_FILTER:

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.77 src/sys/compat/ossaudio/ossaudio.c:1.78
--- src/sys/compat/ossaudio/ossaudio.c:1.77	Sat Nov  2 11:56:34 2019
+++ src/sys/compat/ossaudio/ossaudio.c	Sun Nov  3 11:13:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.78 2019/11/03 11:13:46 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.78 2019/11/03 11:13:46 isaki Exp $");
 
 #include 

CVS commit: src

2019-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Nov  3 11:13:46 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c
src/sys/compat/ossaudio: ossaudio.c

Log Message:
Use record field for recording even on
SNDCTL_DSP_STEREO, SNDCTL_DSP_SETFMT, and SNDCTL_DSP_CHANNELS.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libossaudio/ossaudio.c
cvs rdiff -u -r1.77 -r1.78 src/sys/compat/ossaudio/ossaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 10:09:04 UTC 2019

Modified Files:
src/sys/arch/arm/ti: if_cpsw.c
Added Files:
src/sys/arch/arm/ti: if_cpswreg.h

Log Message:
Cleanup and remove dependency on arch/arm/omap


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/ti/if_cpsw.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/if_cpswreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/ti/if_cpsw.c
diff -u src/sys/arch/arm/ti/if_cpsw.c:1.7 src/sys/arch/arm/ti/if_cpsw.c:1.8
--- src/sys/arch/arm/ti/if_cpsw.c:1.7	Sun Oct 27 23:25:38 2019
+++ src/sys/arch/arm/ti/if_cpsw.c	Sun Nov  3 10:09:04 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.7 2019/10/27 23:25:38 jmcneill Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.8 2019/11/03 10:09:04 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.7 2019/10/27 23:25:38 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.8 2019/11/03 10:09:04 jmcneill Exp $");
 
 #include 
 #include 
@@ -73,14 +73,11 @@ __KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 
 #include 
 #include 
 
-#if 0
-#include 
-#else
 #include 
-#endif
-#include 
-#include 
-#include 
+
+#include 
+
+#define FDT_INTR_FLAGS	0
 
 #define CPSW_TXFRAGS	16
 
@@ -470,22 +467,10 @@ cpsw_attach(device_t parent, device_t se
 		memcpy(sc->sc_enaddr, macaddr, ETHER_ADDR_LEN);
 	}
 
-#if 0
-	sc->sc_rxthih = intr_establish(oa->obio_intrbase + CPSW_INTROFF_RXTH,
-	IPL_VM, IST_LEVEL, cpsw_rxthintr, sc);
-	sc->sc_rxih = intr_establish(oa->obio_intrbase + CPSW_INTROFF_RX,
-	IPL_VM, IST_LEVEL, cpsw_rxintr, sc);
-	sc->sc_txih = intr_establish(oa->obio_intrbase + CPSW_INTROFF_TX,
-	IPL_VM, IST_LEVEL, cpsw_txintr, sc);
-	sc->sc_miscih = intr_establish(oa->obio_intrbase + CPSW_INTROFF_MISC,
-	IPL_VM, IST_LEVEL, cpsw_miscintr, sc);
-#else
-#define FDT_INTR_FLAGS 0
 	sc->sc_rxthih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RXTH, IPL_VM, FDT_INTR_FLAGS, cpsw_rxthintr, sc);
 	sc->sc_rxih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RX, IPL_VM, FDT_INTR_FLAGS, cpsw_rxintr, sc);
 	sc->sc_txih = fdtbus_intr_establish(phandle, CPSW_INTROFF_TX, IPL_VM, FDT_INTR_FLAGS, cpsw_txintr, sc);
 	sc->sc_miscih = fdtbus_intr_establish(phandle, CPSW_INTROFF_MISC, IPL_VM, FDT_INTR_FLAGS, cpsw_miscintr, sc);
-#endif
 
 	sc->sc_bst = faa->faa_bst;
 	sc->sc_bss = size;
@@ -590,19 +575,6 @@ cpsw_attach(device_t parent, device_t se
 		ifmedia_set(>mii_media, IFM_ETHER | IFM_MANUAL);
 	} else {
 		sc->sc_phy_has_1000t = cpsw_phy_has_1000t(sc);
-		if (sc->sc_phy_has_1000t) {
-#if 0
-			aprint_normal_dev(sc->sc_dev, "1000baseT PHY found. "
-			"Setting RGMII Mode\n");
-			/*
-			 * Select the Interface RGMII Mode in the Control
-			 * Module
-			 */
-			sitara_cm_reg_write_4(CPSW_GMII_SEL,
-			GMIISEL_GMII2_SEL(RGMII_MODE) |
-			GMIISEL_GMII1_SEL(RGMII_MODE));
-#endif
-		}
 
 		ifmedia_set(>mii_media, IFM_ETHER | IFM_AUTO);
 	}

Added files:

Index: src/sys/arch/arm/ti/if_cpswreg.h
diff -u /dev/null src/sys/arch/arm/ti/if_cpswreg.h:1.1
--- /dev/null	Sun Nov  3 10:09:04 2019
+++ src/sys/arch/arm/ti/if_cpswreg.h	Sun Nov  3 10:09:04 2019
@@ -0,0 +1,238 @@
+/*-
+ * Copyright (c) 2012 Damjan Marion 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef	_IF_CPSWREG_H
+#define	_IF_CPSWREG_H
+
+#define CPSW_ETH_PORTS			2
+#define CPSW_CPPI_PORTS			1
+
+#define CPSW_SS_OFFSET			0x
+#define CPSW_SS_IDVER			(CPSW_SS_OFFSET + 0x00)
+#define CPSW_SS_SOFT_RESET		(CPSW_SS_OFFSET + 0x08)

CVS commit: src/sys/arch/arm/ti

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 10:09:04 UTC 2019

Modified Files:
src/sys/arch/arm/ti: if_cpsw.c
Added Files:
src/sys/arch/arm/ti: if_cpswreg.h

Log Message:
Cleanup and remove dependency on arch/arm/omap


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/ti/if_cpsw.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/if_cpswreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 09:34:09 UTC 2019

Modified Files:
src/sys/dev/i2c: twl4030.c

Log Message:
Fix non-FDT build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/twl4030.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2019-11-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov  3 09:34:09 UTC 2019

Modified Files:
src/sys/dev/i2c: twl4030.c

Log Message:
Fix non-FDT build


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/twl4030.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/twl4030.c
diff -u src/sys/dev/i2c/twl4030.c:1.2 src/sys/dev/i2c/twl4030.c:1.3
--- src/sys/dev/i2c/twl4030.c:1.2	Fri Nov  1 09:49:55 2019
+++ src/sys/dev/i2c/twl4030.c	Sun Nov  3 09:34:09 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: twl4030.c,v 1.2 2019/11/01 09:49:55 jmcneill Exp $ */
+/* $NetBSD: twl4030.c,v 1.3 2019/11/03 09:34:09 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -26,8 +26,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opt_fdt.h"
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: twl4030.c,v 1.2 2019/11/01 09:49:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twl4030.c,v 1.3 2019/11/03 09:34:09 jmcneill Exp $");
 
 #include 
 #include 
@@ -101,8 +103,10 @@ static const struct device_compatible_en
 	{ NULL,0 }
 };
 
+#ifdef FDT
 static const char * const rtc_compatible[] = { "ti,twl4030-rtc", NULL };
 static const char * const gpio_compatible[] = { "ti,twl4030-gpio", NULL };
+#endif
 
 static uint8_t
 twl_read(struct twl_softc *sc, uint8_t mod, uint8_t reg, int flags)
@@ -203,6 +207,7 @@ twl_rtc_settime(todr_chip_handle_t tch, 
 	return 0;
 }
 
+#ifdef FDT
 static int
 twl_gpio_config(struct twl_softc *sc, int pin, int flags)
 {
@@ -318,6 +323,7 @@ static struct fdtbus_gpio_controller_fun
 	.read = twl_gpio_read,
 	.write = twl_gpio_write,
 };
+#endif /* !FDT */
 
 static void
 twl_rtc_attach(struct twl_softc *sc, const int phandle)
@@ -329,13 +335,19 @@ twl_rtc_attach(struct twl_softc *sc, con
 	sc->sc_todr.todr_gettime_ymdhms = twl_rtc_gettime;
 	sc->sc_todr.todr_settime_ymdhms = twl_rtc_settime;
 	sc->sc_todr.cookie = sc;
+#ifdef FDT
 	fdtbus_todr_attach(sc->sc_dev, phandle, >sc_todr);
+#else
+	todr_attach(>sc_todr);
+#endif
 }
 
 static void
 twl_gpio_attach(struct twl_softc *sc, const int phandle)
 {
+#ifdef FDT
 	fdtbus_register_gpio_controller(sc->sc_dev, phandle, _gpio_funcs);
+#endif
 }
 
 static int
@@ -347,6 +359,9 @@ twl_match(device_t parent, cfdata_t matc
 	if (iic_use_direct_match(ia, match, compat_data, _result))
 		return match_result;
 
+	if (ia->ia_addr == 0x48)
+		return I2C_MATCH_ADDRESS_ONLY;
+
 	return 0;
 }
 
@@ -356,7 +371,6 @@ twl_attach(device_t parent, device_t sel
 	struct twl_softc * const sc = device_private(self);
 	struct i2c_attach_args *ia = aux;
 	uint32_t idcode;
-	int child;
 
 	sc->sc_dev = self;
 	sc->sc_i2c = ia->ia_tag;
@@ -367,7 +381,8 @@ twl_attach(device_t parent, device_t sel
 	aprint_naive("\n");
 	aprint_normal(": TWL4030");
 
-	for (child = OF_child(sc->sc_phandle); child; child = OF_peer(child)) {
+#ifdef FDT
+	for (int child = OF_child(sc->sc_phandle); child; child = OF_peer(child)) {
 		if (of_match_compatible(child, gpio_compatible)) {
 			aprint_normal(", GPIO");
 			twl_gpio_attach(sc, child);
@@ -376,6 +391,11 @@ twl_attach(device_t parent, device_t sel
 			twl_rtc_attach(sc, child);
 		}
 	}
+#else
+	aprint_normal("\n");
+	twl_gpio_attach(sc, -1);
+	twl_rtc_attach(sc, -1);
+#endif
 
 	I2C_LOCK(sc);
 	idcode = INT_READ(sc, IDCODE_7_0);



CVS commit: src/doc

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov  3 07:10:42 UTC 2019

Modified Files:
src/doc: HACKS

Log Message:
Describe that both GCC 7.4 and 8.3 fail in the last entry.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.195 src/doc/HACKS:1.196
--- src/doc/HACKS:1.195	Fri Nov  1 20:55:55 2019
+++ src/doc/HACKS	Sun Nov  3 07:10:42 2019
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.195 2019/11/01 20:55:55 rin Exp $
+# $NetBSD: HACKS,v 1.196 2019/11/03 07:10:42 rin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -964,7 +964,7 @@ descr	Disable optimization for rtld.c on
 kcah
 
 port	alpha
-hack	userland binaries crash randomly (port-alpha/54307)
+hack	GCC 7.4/8.3: userland binaries crash randomly (port-alpha/54307)
 cdate	Fri Nov  1 20:43:35 UTC 2019
 who	rin
 file	src/external/bsd/jemalloc/lib/Makefile.inc: 1.11



CVS commit: src/doc

2019-11-03 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov  3 07:10:42 UTC 2019

Modified Files:
src/doc: HACKS

Log Message:
Describe that both GCC 7.4 and 8.3 fail in the last entry.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.