CVS commit: src

2012-07-11 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Wed Jul 11 00:19:28 UTC 2012

Modified Files:
src/common/lib/libc/gen: ptree.c
src/sys/sys: ptree.h

Log Message:
ptree: add context argument.  OK matt@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/gen/ptree.c
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/ptree.h

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

Modified files:

Index: src/common/lib/libc/gen/ptree.c
diff -u src/common/lib/libc/gen/ptree.c:1.5 src/common/lib/libc/gen/ptree.c:1.6
--- src/common/lib/libc/gen/ptree.c:1.5	Sun Jun  7 03:12:40 2009
+++ src/common/lib/libc/gen/ptree.c	Wed Jul 11 00:19:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ptree.c,v 1.5 2009/06/07 03:12:40 yamt Exp $ */
+/*	$NetBSD: ptree.c,v 1.6 2012/07/11 00:19:28 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #include sys/types.h
 #include sys/systm.h
 #include lib/libkern/libkern.h
-__KERNEL_RCSID(0, $NetBSD: ptree.c,v 1.5 2009/06/07 03:12:40 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ptree.c,v 1.6 2012/07/11 00:19:28 rmind Exp $);
 #else
 #include stddef.h
 #include stdint.h
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, $NetBSD: ptree.c,v 1.
 #else
 #define	KASSERT(e)	do { } while (/*CONSTCOND*/ 0)
 #endif
-__RCSID($NetBSD: ptree.c,v 1.5 2009/06/07 03:12:40 yamt Exp $);
+__RCSID($NetBSD: ptree.c,v 1.6 2012/07/11 00:19:28 rmind Exp $);
 #endif /* _KERNEL || _STANDALONE */
 
 #ifdef _LIBC
@@ -124,8 +124,8 @@ ptree_matchnode(const pt_tree_t *pt, con
 	pt_bitoff_t *bitoff_p, pt_slot_t *slots_p)
 {
 	return (*pt-pt_ops-ptto_matchnode)(NODETOKEY(pt, target),
-	(ptn != NULL ? NODETOKEY(pt, ptn) : NULL), max_bitoff,
-	bitoff_p, slots_p);
+	(ptn != NULL ? NODETOKEY(pt, ptn) : NULL),
+	max_bitoff, bitoff_p, slots_p, pt-pt_context);
 }
 
 static inline pt_slot_t
@@ -136,8 +136,7 @@ ptree_testnode(const pt_tree_t *pt, cons
 	if (bitlen == 0)
 		return PT_SLOT_ROOT;
 	return (*pt-pt_ops-ptto_testnode)(NODETOKEY(pt, target),
-	 PTN_BRANCH_BITOFF(ptn),
-	 bitlen);
+	PTN_BRANCH_BITOFF(ptn), bitlen, pt-pt_context);
 }
 
 static inline bool
@@ -145,15 +144,14 @@ ptree_matchkey(const pt_tree_t *pt, cons
 	const pt_node_t *ptn, pt_bitoff_t bitoff, pt_bitlen_t bitlen)
 {
 	return (*pt-pt_ops-ptto_matchkey)(key, NODETOKEY(pt, ptn),
-	bitoff, bitlen);
+	bitoff, bitlen, pt-pt_context);
 }
 
 static inline pt_slot_t
 ptree_testkey(const pt_tree_t *pt, const void *key, const pt_node_t *ptn)
 {
-	return (*pt-pt_ops-ptto_testkey)(key,
-	PTN_BRANCH_BITOFF(ptn),
-	PTN_BRANCH_BITLEN(ptn));
+	return (*pt-pt_ops-ptto_testkey)(key, PTN_BRANCH_BITOFF(ptn),
+	PTN_BRANCH_BITLEN(ptn), pt-pt_context);
 }
 
 static inline void
@@ -166,12 +164,13 @@ ptree_set_position(uintptr_t node, pt_sl
 }
 
 void
-ptree_init(pt_tree_t *pt, const pt_tree_ops_t *ops, size_t node_offset,
-	size_t key_offset)
+ptree_init(pt_tree_t *pt, const pt_tree_ops_t *ops, void *context,
+	size_t node_offset, size_t key_offset)
 {
 	memset(pt, 0, sizeof(*pt));
 	pt-pt_node_offset = node_offset;
 	pt-pt_key_offset = key_offset;
+	pt-pt_context = context;
 	pt-pt_ops = ops;
 }
 

Index: src/sys/sys/ptree.h
diff -u src/sys/sys/ptree.h:1.5 src/sys/sys/ptree.h:1.6
--- src/sys/sys/ptree.h:1.5	Fri Mar  9 15:35:28 2012
+++ src/sys/sys/ptree.h	Wed Jul 11 00:19:28 2012
@@ -1,4 +1,5 @@
-/* $NetBSD: ptree.h,v 1.5 2012/03/09 15:35:28 christos Exp $ */
+/*	$NetBSD: ptree.h,v 1.6 2012/07/11 00:19:28 rmind Exp $	*/
+
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,6 +28,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef _SYS_PTREE_H_
 #define _SYS_PTREE_H_
 
@@ -155,12 +157,14 @@ typedef struct pt_node {
 #endif /* _PT_PRIVATE */
 
 typedef struct pt_tree_ops {
-	bool (*ptto_matchnode)(const void *, const void *, pt_bitoff_t,
-		pt_bitoff_t *, pt_slot_t *);
-	bool (*ptto_matchkey)(const void *, const void *, pt_bitoff_t,
-		pt_bitlen_t);
-	pt_slot_t (*ptto_testnode)(const void *, pt_bitoff_t, pt_bitlen_t);
-	pt_slot_t (*ptto_testkey)(const void *, pt_bitoff_t, pt_bitlen_t);
+	bool (*ptto_matchnode)(const void *, const void *,
+		pt_bitoff_t, pt_bitoff_t *, pt_slot_t *, void *);
+	bool (*ptto_matchkey)(const void *, const void *,
+		pt_bitoff_t, pt_bitlen_t, void *);
+	pt_slot_t (*ptto_testnode)(const void *,
+		pt_bitoff_t, pt_bitlen_t, void *);
+	pt_slot_t (*ptto_testkey)(const void *,
+		pt_bitoff_t, pt_bitlen_t, void *);
 } pt_tree_ops_t;
 
 typedef struct pt_tree {
@@ -170,13 +174,14 @@ typedef struct pt_tree {
 	const pt_tree_ops_t *pt_ops;
 	size_t pt_node_offset;
 	size_t pt_key_offset;
-	uintptr_t pt_spare[4];
+	void *pt_context;
+	uintptr_t pt_spare[3];
 } pt_tree_t;
 
 #define	PT_FILTER_MASK		0x0001	/* node is a mask */
 typedef bool (*pt_filter_t)(void *, const void *, int);
 
-void	

CVS commit: src/gnu/dist/gcc4/gcc/config/vax

2012-07-11 Thread Anders Magnusson
Module Name:src
Committed By:   ragge
Date:   Wed Jul 11 13:34:45 UTC 2012

Modified Files:
src/gnu/dist/gcc4/gcc/config/vax: builtins.md

Log Message:
Bugfix builtin ffs, fixes PR port-vax/46677, fix from Paul Koning.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/vax/builtins.md

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

Modified files:

Index: src/gnu/dist/gcc4/gcc/config/vax/builtins.md
diff -u src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2 src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.3
--- src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2	Mon Apr  2 16:45:39 2007
+++ src/gnu/dist/gcc4/gcc/config/vax/builtins.md	Wed Jul 11 13:34:45 2012
@@ -25,7 +25,7 @@
   
 {
   rtx label = gen_label_rtx ();
-  emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[0]));
+  emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[1]));
   emit_jump_insn (gen_bne (label));
   emit_insn (gen_negsi2 (operands[0], const1_rtx));
   emit_label (label);
@@ -36,6 +36,6 @@
 (define_insn ffssi2_internal
   [(set (match_operand:SI 0 nonimmediate_operand =g)
 (ffs:SI (match_operand:SI 1 general_operand nrQ)))
-   (set (cc0) (match_operand:SI 2 nonimmediate_operand 0))]
+   (set (cc0) (ffs:SI (match_operand:SI 2 general_operand 1)))]
   
   ffs $0,$32,%1,%0)



CVS commit: src/sys/dev/sun

2012-07-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jul 11 15:03:15 UTC 2012

Modified Files:
src/sys/dev/sun: cgsix.c

Log Message:
don't set clipping parameters and such every time we send a blitter command


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sun/cgsix.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/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.54 src/sys/dev/sun/cgsix.c:1.55
--- src/sys/dev/sun/cgsix.c:1.54	Tue Jul 10 22:50:41 2012
+++ src/sys/dev/sun/cgsix.c	Wed Jul 11 15:03:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix.c,v 1.54 2012/07/10 22:50:41 macallan Exp $ */
+/*	$NetBSD: cgsix.c,v 1.55 2012/07/11 15:03:14 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.54 2012/07/10 22:50:41 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.55 2012/07/11 15:03:14 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -318,6 +318,7 @@ static void cg6_ras_eraserows(void *, in
 #if defined(RASTERCONSOLE)  defined(CG6_BLIT_CURSOR)
 static void cg6_ras_do_cursor(struct rasops_info *);
 #endif
+
 static void
 cg6_ras_init(struct cgsix_softc *sc)
 {
@@ -326,6 +327,16 @@ cg6_ras_init(struct cgsix_softc *sc)
 	CG6_DRAIN(fbc);
 	fbc-fbc_mode = ~CG6_MODE_MASK;
 	fbc-fbc_mode |= CG6_MODE;
+
+	/* set some common drawing engine parameters */
+	fbc-fbc_clip = 0;
+	fbc-fbc_s = 0;
+	fbc-fbc_offx = 0;
+	fbc-fbc_offy = 0;
+	fbc-fbc_clipminx = 0;
+	fbc-fbc_clipminy = 0;
+	fbc-fbc_clipmaxx = 0x3fff;
+	fbc-fbc_clipmaxy = 0x3fff;
 }
 
 static void
@@ -355,15 +366,10 @@ cg6_ras_copyrows(void *cookie, int src, 
 	n *= ri-ri_font-fontheight;
 	src *= ri-ri_font-fontheight;
 	dst *= ri-ri_font-fontheight;
-	fbc-fbc_clip = 0;
-	fbc-fbc_s = 0;
-	fbc-fbc_offx = 0;
-	fbc-fbc_offy = 0;
-	fbc-fbc_clipminx = 0;
-	fbc-fbc_clipminy = 0;
-	fbc-fbc_clipmaxx = ri-ri_width - 1;
-	fbc-fbc_clipmaxy = ri-ri_height - 1;
+
 	fbc-fbc_alu = CG6_ALU_COPY;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
 	fbc-fbc_x0 = ri-ri_xorigin;
 	fbc-fbc_y0 = ri-ri_yorigin + src;
 	fbc-fbc_x1 = ri-ri_xorigin + ri-ri_emuwidth - 1;
@@ -406,15 +412,10 @@ cg6_ras_copycols(void *cookie, int row, 
 	src *= ri-ri_font-fontwidth;
 	dst *= ri-ri_font-fontwidth;
 	row *= ri-ri_font-fontheight;
-	fbc-fbc_clip = 0;
-	fbc-fbc_s = 0;
-	fbc-fbc_offx = 0;
-	fbc-fbc_offy = 0;
-	fbc-fbc_clipminx = 0;
-	fbc-fbc_clipminy = 0;
-	fbc-fbc_clipmaxx = ri-ri_width - 1;
-	fbc-fbc_clipmaxy = ri-ri_height - 1;
+
 	fbc-fbc_alu = CG6_ALU_COPY;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
 	fbc-fbc_x0 = ri-ri_xorigin + src;
 	fbc-fbc_y0 = ri-ri_yorigin + row;
 	fbc-fbc_x1 = ri-ri_xorigin + src + n - 1;
@@ -450,15 +451,10 @@ cg6_ras_erasecols(void *cookie, int row,
 	n *= ri-ri_font-fontwidth;
 	col *= ri-ri_font-fontwidth;
 	row *= ri-ri_font-fontheight;
-	fbc-fbc_clip = 0;
-	fbc-fbc_s = 0;
-	fbc-fbc_offx = 0;
-	fbc-fbc_offy = 0;
-	fbc-fbc_clipminx = 0;
-	fbc-fbc_clipminy = 0;
-	fbc-fbc_clipmaxx = ri-ri_width - 1;
-	fbc-fbc_clipmaxy = ri-ri_height - 1;
+
 	fbc-fbc_alu = CG6_ALU_FILL;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
 	fbc-fbc_fg = ri-ri_devcmap[(attr  16)  0xff];
 	fbc-fbc_arecty = ri-ri_yorigin + row;
 	fbc-fbc_arectx = ri-ri_xorigin + col;
@@ -485,15 +481,10 @@ cg6_ras_eraserows(void *cookie, int row,
 		n = ri-ri_rows - row;
 	if (n = 0)
 		return;
-	fbc-fbc_clip = 0;
-	fbc-fbc_s = 0;
-	fbc-fbc_offx = 0;
-	fbc-fbc_offy = 0;
-	fbc-fbc_clipminx = 0;
-	fbc-fbc_clipminy = 0;
-	fbc-fbc_clipmaxx = ri-ri_width - 1;
-	fbc-fbc_clipmaxy = ri-ri_height - 1;
+
 	fbc-fbc_alu = CG6_ALU_FILL;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
 	fbc-fbc_fg = ri-ri_devcmap[(attr  16)  0xff];
 	if ((n == ri-ri_rows)  (ri-ri_flg  RI_FULLCLEAR)) {
 		fbc-fbc_arecty = 0;
@@ -1286,15 +1277,10 @@ cgsix_rectfill(struct cgsix_softc *sc, i
 	volatile struct cg6_fbc *fbc = sc-sc_fbc;
 	
 	CG6_DRAIN(fbc);
-	fbc-fbc_clip = 0;
-	fbc-fbc_s = 0;
-	fbc-fbc_offx = 0;
-	fbc-fbc_offy = 0;
-	fbc-fbc_clipminx = 0;
-	fbc-fbc_clipminy = 0;
-	fbc-fbc_clipmaxx = sc-sc_width - 1;
-	fbc-fbc_clipmaxy = sc-sc_height - 1;
+
 	fbc-fbc_alu = CG6_ALU_FILL;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
 	fbc-fbc_fg = col;
 	fbc-fbc_arecty = ys;
 	fbc-fbc_arectx = xs;
@@ -1398,7 +1384,6 @@ cgsix_putchar(void *cookie, int row, int
 }
 /* put the chip back to normal */
 fbc-fbc_incy = 0;
-fbc-fbc_mode = GX_BLIT_NOSRC | GX_MODE_COLOR8;
 			}
 		}
 	}
@@ -1448,15 +1433,10 @@ cgsix_clearscreen(struct cgsix_softc *sc
 		volatile struct cg6_fbc *fbc = sc-sc_fbc;
 		
 		CG6_DRAIN(fbc);
-		fbc-fbc_clip = 0;
-		fbc-fbc_s = 0;
-		fbc-fbc_offx = 0;
-		fbc-fbc_offy = 0;
-		fbc-fbc_clipminx = 0;
-		fbc-fbc_clipminy = 0;
-		fbc-fbc_clipmaxx = ri-ri_width - 1;
-		fbc-fbc_clipmaxy = ri-ri_height - 1;
+
 		fbc-fbc_alu = CG6_ALU_FILL;
+		

CVS commit: src/sys/dev/mscp

2012-07-11 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Wed Jul 11 16:41:16 UTC 2012

Modified Files:
src/sys/dev/mscp: mscp_disk.c

Log Message:
- Unconditionally initialise tp to avoid a warning
- Use DK_CLOSED rather than CLOSED (no functional change)


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/mscp/mscp_disk.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/mscp/mscp_disk.c
diff -u src/sys/dev/mscp/mscp_disk.c:1.74 src/sys/dev/mscp/mscp_disk.c:1.75
--- src/sys/dev/mscp/mscp_disk.c:1.74	Tue Jul 10 22:34:37 2012
+++ src/sys/dev/mscp/mscp_disk.c	Wed Jul 11 16:41:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_disk.c,v 1.74 2012/07/10 22:34:37 abs Exp $	*/
+/*	$NetBSD: mscp_disk.c,v 1.75 2012/07/11 16:41:16 abs Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -82,7 +82,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mscp_disk.c,v 1.74 2012/07/10 22:34:37 abs Exp $);
+__KERNEL_RCSID(0, $NetBSD: mscp_disk.c,v 1.75 2012/07/11 16:41:16 abs Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -305,7 +305,7 @@ raclose(dev_t dev, int flags, int fmt, s
 			(void) tsleep(udautab[unit], PZERO - 1,
 			raclose, 0);
 		splx(s);
-		ra-ra_state = CLOSED;
+		ra-ra_state = DK_CLOSED;
 		ra-ra_wlabel = 0;
 	}
 #endif
@@ -461,9 +461,8 @@ raioctl(dev_t dev, u_long cmd, void *dat
 		if (cmd == ODIOCGDEFLABEL)
 			tp = newlabel;
 		else
-#else
-		tp = (struct disklabel *)data;
 #endif
+		tp = (struct disklabel *)data;
 		memset(tp, 0, sizeof(struct disklabel));
 		tp-d_secsize = lp-d_secsize;
 		tp-d_nsectors = lp-d_nsectors;
@@ -523,7 +522,6 @@ raioctl(dev_t dev, u_long cmd, void *dat
 	return (error);
 }
 
-
 int
 radump(dev_t dev, daddr_t blkno, void *va, size_t size)
 {



CVS commit: src/sys/dev/sun

2012-07-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jul 11 16:59:55 UTC 2012

Modified Files:
src/sys/dev/sun: cgsix.c

Log Message:
don't wait for the blitter unless we want to send another command and the
pipeline is full


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/sun/cgsix.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/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.55 src/sys/dev/sun/cgsix.c:1.56
--- src/sys/dev/sun/cgsix.c:1.55	Wed Jul 11 15:03:14 2012
+++ src/sys/dev/sun/cgsix.c	Wed Jul 11 16:59:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix.c,v 1.55 2012/07/11 15:03:14 macallan Exp $ */
+/*	$NetBSD: cgsix.c,v 1.56 2012/07/11 16:59:55 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.55 2012/07/11 15:03:14 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.56 2012/07/11 16:59:55 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -281,22 +281,14 @@ int cgsix_use_rasterconsole = 1;
 )
 
 /*
- * Wait for a blit to finish.
- * 0x800 bit: function unknown; 0x2000 bit: GX_BLT_INPROGRESS
+ * Run a blitter command
  */
-#define CG6_BLIT_WAIT(fbc) do {		\
-	while (((fbc)-fbc_blit  0xa000) == 0xa000)		\
-		/*EMPTY*/;		\
-} while (0)
+#define CG6_BLIT(f) { volatile uint32_t foo; foo = f-fbc_blit; }
 
 /*
- * Wait for a drawing operation to finish, or at least get queued.
- * 0x800 bit: function unknown; 0x2000 bit: GX_FULL
+ * Run a drawing command
  */
-#define CG6_DRAW_WAIT(fbc) do {		\
-   	while (((fbc)-fbc_draw  0xa000) == 0xa000)		\
-		/*EMPTY*/;		\
-} while (0)
+#define CG6_DRAW(f) { volatile uint32_t foo; foo = f-fbc_draw; }
 
 /*
  * Wait for the whole engine to go idle.  This may not matter in our case;
@@ -305,7 +297,12 @@ int cgsix_use_rasterconsole = 1;
  * 0x1000 bit: GX_INPROGRESS
  */
 #define CG6_DRAIN(fbc) do {		\
-	while ((fbc)-fbc_s  0x1000)\
+	while ((fbc)-fbc_s  GX_INPROGRESS)\
+		/*EMPTY*/;		\
+} while (0)
+
+#define CG6_WAIT_READY(fbc) do {	\
+   	while (((fbc)-fbc_s  GX_FULL) != 0)\
 		/*EMPTY*/;		\
 } while (0)
 
@@ -367,6 +364,8 @@ cg6_ras_copyrows(void *cookie, int src, 
 	src *= ri-ri_font-fontheight;
 	dst *= ri-ri_font-fontheight;
 
+	CG6_WAIT_READY(fbc);
+
 	fbc-fbc_alu = CG6_ALU_COPY;
 	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
 
@@ -378,8 +377,7 @@ cg6_ras_copyrows(void *cookie, int src, 
 	fbc-fbc_y2 = ri-ri_yorigin + dst;
 	fbc-fbc_x3 = ri-ri_xorigin + ri-ri_emuwidth - 1;
 	fbc-fbc_y3 = ri-ri_yorigin + dst + n - 1;
-	CG6_BLIT_WAIT(fbc);
-	CG6_DRAIN(fbc);
+	CG6_BLIT(fbc);
 }
 
 static void
@@ -413,6 +411,8 @@ cg6_ras_copycols(void *cookie, int row, 
 	dst *= ri-ri_font-fontwidth;
 	row *= ri-ri_font-fontheight;
 
+	CG6_WAIT_READY(fbc);
+
 	fbc-fbc_alu = CG6_ALU_COPY;
 	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
 
@@ -426,8 +426,7 @@ cg6_ras_copycols(void *cookie, int row, 
 	fbc-fbc_x3 = ri-ri_xorigin + dst + n - 1;
 	fbc-fbc_y3 = ri-ri_yorigin + row + 
 	ri-ri_font-fontheight - 1;
-	CG6_BLIT_WAIT(fbc);
-	CG6_DRAIN(fbc);
+	CG6_BLIT(fbc);
 }
 
 static void
@@ -452,6 +451,7 @@ cg6_ras_erasecols(void *cookie, int row,
 	col *= ri-ri_font-fontwidth;
 	row *= ri-ri_font-fontheight;
 
+	CG6_WAIT_READY(fbc);
 	fbc-fbc_alu = CG6_ALU_FILL;
 	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
 
@@ -461,8 +461,7 @@ cg6_ras_erasecols(void *cookie, int row,
 	fbc-fbc_arecty = ri-ri_yorigin + row + 
 	ri-ri_font-fontheight - 1;
 	fbc-fbc_arectx = ri-ri_xorigin + col + n - 1;
-	CG6_DRAW_WAIT(fbc);
-	CG6_DRAIN(fbc);
+	CG6_DRAW(fbc);
 }
 
 static void
@@ -482,6 +481,7 @@ cg6_ras_eraserows(void *cookie, int row,
 	if (n = 0)
 		return;
 
+	CG6_WAIT_READY(fbc);
 	fbc-fbc_alu = CG6_ALU_FILL;
 	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
 
@@ -499,8 +499,7 @@ cg6_ras_eraserows(void *cookie, int row,
 		(n * ri-ri_font-fontheight) - 1;
 		fbc-fbc_arectx = ri-ri_xorigin + ri-ri_emuwidth - 1;
 	}
-	CG6_DRAW_WAIT(fbc);
-	CG6_DRAIN(fbc);
+	CG6_DRAW(fbc);
 }
 
 #if defined(RASTERCONSOLE)  defined(CG6_BLIT_CURSOR)
@@ -1275,8 +1274,8 @@ cgsix_rectfill(struct cgsix_softc *sc, i
 uint32_t col)
 {
 	volatile struct cg6_fbc *fbc = sc-sc_fbc;
-	
-	CG6_DRAIN(fbc);
+
+	CG6_WAIT_READY(fbc);
 
 	fbc-fbc_alu = CG6_ALU_FILL;
 	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
@@ -1286,7 +1285,7 @@ cgsix_rectfill(struct cgsix_softc *sc, i
 	fbc-fbc_arectx = xs;
 	fbc-fbc_arecty = ys + he - 1;
 	fbc-fbc_arectx = xs + wi - 1;
-	CG6_DRAW_WAIT(fbc);
+	CG6_DRAW(fbc);
 }
 
 void 
@@ -1294,7 +1293,9 @@ cgsix_setup_mono(struct cgsix_softc *sc,
 uint32_t fg, uint32_t bg) 
 {
 	volatile struct cg6_fbc *fbc=sc-sc_fbc;
-	CG6_DRAIN(fbc);
+
+	CG6_WAIT_READY(fbc);
+
 	fbc-fbc_x0 = x;
 	fbc-fbc_x1 = x + wi - 1;
 	fbc-fbc_y0 = y;
@@ -1432,7 

CVS commit: src/sys/arch

2012-07-11 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Jul 11 17:13:31 UTC 2012

Modified Files:
src/sys/arch/amiga/conf: files.amiga
src/sys/arch/amiga/include: pci_machdep.h
src/sys/arch/amiga/pci: p5pb.c p5pbreg.h
src/sys/arch/m68k/m68k: bus_dma.c

Log Message:
Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/amiga/conf/files.amiga
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/include/pci_machdep.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/pci/p5pb.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/pci/p5pbreg.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/m68k/m68k/bus_dma.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/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.159 src/sys/arch/amiga/conf/files.amiga:1.160
--- src/sys/arch/amiga/conf/files.amiga:1.159	Thu Jun  7 23:30:52 2012
+++ src/sys/arch/amiga/conf/files.amiga	Wed Jul 11 17:13:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.159 2012/06/07 23:30:52 rkujawa Exp $
+#	$NetBSD: files.amiga,v 1.160 2012/07/11 17:13:31 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -455,6 +455,7 @@ file	arch/m68k/m68k/pmap_motorola.c
 file	arch/m68k/m68k/procfs_machdep.c	procfs
 file	arch/m68k/m68k/sys_machdep.c
 file	arch/m68k/m68k/vm_machdep.c
+file	arch/m68k/m68k/bus_dma.c
 
 define	gayle
 file	arch/amiga/amiga/gayle.c		gayle

Index: src/sys/arch/amiga/include/pci_machdep.h
diff -u src/sys/arch/amiga/include/pci_machdep.h:1.6 src/sys/arch/amiga/include/pci_machdep.h:1.7
--- src/sys/arch/amiga/include/pci_machdep.h:1.6	Fri Jun  1 09:41:35 2012
+++ src/sys/arch/amiga/include/pci_machdep.h	Wed Jul 11 17:13:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.h,v 1.6 2012/06/01 09:41:35 rkujawa Exp $ */
+/*	$NetBSD: pci_machdep.h,v 1.7 2012/07/11 17:13:31 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include machine/intr.h
 
-/* #define __HAVE_PCI_CONF_HOOK */
+#define __HAVE_PCI_CONF_HOOK 
 
 /*
  * Forward declarations.
@@ -50,6 +50,8 @@ typedef struct	amiga_pci_chipset *pci_ch
 typedef u_long	pcitag_t;
 typedef u_long	pci_intr_handle_t;
 
+extern struct m68k_bus_dma_tag pci_bus_dma_tag;
+
 /*
  * amiga-specific PCI structure and type definitions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.

Index: src/sys/arch/amiga/pci/p5pb.c
diff -u src/sys/arch/amiga/pci/p5pb.c:1.8 src/sys/arch/amiga/pci/p5pb.c:1.9
--- src/sys/arch/amiga/pci/p5pb.c:1.8	Sun Jan 29 15:32:52 2012
+++ src/sys/arch/amiga/pci/p5pb.c	Wed Jul 11 17:13:31 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: p5pb.c,v 1.8 2012/01/29 15:32:52 para Exp $ */
+/*	$NetBSD: p5pb.c,v 1.9 2012/07/11 17:13:31 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
@@ -41,6 +41,7 @@
 
 #include uvm/uvm_extern.h
 
+#define _M68K_BUS_DMA_PRIVATE
 #include machine/bus.h
 #include machine/cpu.h
 
@@ -67,6 +68,19 @@
 #define P5GFX_DEPTH		8
 #define P5GFX_LINEBYTES		640
 
+struct m68k_bus_dma_tag p5pb_bus_dma_tag = {
+	0,
+	0, 
+	_bus_dmamap_create,
+	_bus_dmamap_destroy,
+	_bus_dmamap_load_direct,
+	_bus_dmamap_load_mbuf_direct,
+	_bus_dmamap_load_uio_direct,
+	_bus_dmamap_load_raw_direct,
+	_bus_dmamap_unload,
+	_bus_dmamap_sync
+};
+
 static int	p5pb_match(struct device *, struct cfdata *, void *);
 static void	p5pb_attach(struct device *, struct device *, void *);
 void		p5pb_set_props(struct p5pb_softc *sc);
@@ -193,7 +207,7 @@ p5pb_attach(device_t parent, device_t se
  
 	pba.pba_iot = (sc-pci_io_area);
 	pba.pba_memt = (sc-pci_mem_area);
-	pba.pba_dmat = NULL; 
+	pba.pba_dmat = p5pb_bus_dma_tag; 
 	pba.pba_dmat64 = NULL;
 	pba.pba_pc = pc;
 	pba.pba_flags = PCI_FLAGS_MEM_OKAY | PCI_FLAGS_IO_OKAY; 
@@ -337,11 +351,26 @@ p5pb_pci_conf_read(pci_chipset_tag_t pc,
 {
 	uint32_t data;
 	uint32_t bus, dev, func;
-	
+	uint32_t offset;
+
 	pci_decompose_tag(pc, tag, bus, dev, func);
 
+	offset = (OFF_PCI_DEVICE  dev) + reg;
+
+	if(func == 0)	/* ugly, ugly hack */
+		offset += 0;
+	else if(func == 1)
+		offset += OFF_PCI_FUNCTION;
+	else
+		return 0x;	
+
+	if(badaddr((void *)__UNVOLATILE(((uint32_t)
+	bus_space_vaddr(pc-pci_conf_datat, pc-pci_conf_datah) 
+	+ offset 
+		return 0x;	
+
 	data = bus_space_read_4(pc-pci_conf_datat, pc-pci_conf_datah,
-	+ reg + (dev * OFF_PCI_DEVICE));
+	offset);
 #ifdef P5PB_DEBUG_CONF
 	aprint_normal(p5pb conf read va: %lx, bus: %d, dev: %d, 
 	func: %d, reg: %d -r- data %x\n,
@@ -354,11 +383,26 @@ void
 p5pb_pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t val)
 {
 	uint32_t bus, dev, func;
-	
+	uint32_t offset;
+
 	pci_decompose_tag(pc, tag, bus, dev, func);
-	
+
+	offset = 

CVS commit: src/share/man/man9

2012-07-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jul 11 18:17:50 UTC 2012

Modified Files:
src/share/man/man9: rnd.9

Log Message:
Use correct source file reference


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/rnd.9

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

Modified files:

Index: src/share/man/man9/rnd.9
diff -u src/share/man/man9/rnd.9:1.20 src/share/man/man9/rnd.9:1.21
--- src/share/man/man9/rnd.9:1.20	Sat Dec 17 21:25:12 2011
+++ src/share/man/man9/rnd.9	Wed Jul 11 18:17:50 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: rnd.9,v 1.20 2011/12/17 21:25:12 wiz Exp $
+.\	$NetBSD: rnd.9,v 1.21 2012/07/11 18:17:50 pgoyette Exp $
 .\
 .\ Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -209,7 +209,7 @@ There is no supported API for direct acc
 .\ .Sh ERRORS
 .Sh FILES
 These functions are declared in src/sys/sys/rnd.h and defined in
-src/sys/dev/rnd.c.
+src/sys/kern/kern_rndq.c.
 .Sh SEE ALSO
 .Xr rnd 4 ,
 .Xr rndctl 8 ,



CVS commit: src/sys/dev/sdmmc

2012-07-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jul 11 18:21:28 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdmmcvar.h

Log Message:
Fix transposition typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sdmmc/sdmmcvar.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/dev/sdmmc/sdmmcvar.h
diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.12 src/sys/dev/sdmmc/sdmmcvar.h:1.13
--- src/sys/dev/sdmmc/sdmmcvar.h:1.12	Wed Feb  1 22:34:43 2012
+++ src/sys/dev/sdmmc/sdmmcvar.h	Wed Jul 11 18:21:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmcvar.h,v 1.12 2012/02/01 22:34:43 matt Exp $	*/
+/*	$NetBSD: sdmmcvar.h,v 1.13 2012/07/11 18:21:27 jakllsch Exp $	*/
 /*	$OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -183,7 +183,7 @@ struct sdmmc_function {
 	struct sdmmc_cid cid;		/* decoded CID value */
 	sdmmc_response raw_cid;		/* temp. storage for decoding */
 	uint32_t raw_scr[2];
-	struct sdmmc_scr scr;		/* decoded CSR value */
+	struct sdmmc_scr scr;		/* decoded SCR value */
 
 	void *bbuf;			/* bounce buffer */
 	bus_dmamap_t bbuf_dmap;		/* DMA map for bounce buffer */



CVS commit: src/lib/libc/arch/arm/gen

2012-07-11 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Wed Jul 11 18:24:27 UTC 2012

Modified Files:
src/lib/libc/arch/arm/gen: Makefile.inc

Log Message:
On the libc/libgcc clashes cleanup that removed divsi3.o from libc, ARM/evbarm
was forgotten. This patch fixes it making static binaries possible again!


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/arch/arm/gen/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/lib/libc/arch/arm/gen/Makefile.inc
diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.16 src/lib/libc/arch/arm/gen/Makefile.inc:1.17
--- src/lib/libc/arch/arm/gen/Makefile.inc:1.16	Sun Dec  6 07:12:17 2009
+++ src/lib/libc/arch/arm/gen/Makefile.inc	Wed Jul 11 18:24:27 2012
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile.inc,v 1.16 2009/12/06 07:12:17 uebayasi Exp $
+# $NetBSD: Makefile.inc,v 1.17 2012/07/11 18:24:27 reinoud Exp $
 
-SRCS+=	alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \
+SRCS+=	alloca.S byte_swap_2.S byte_swap_4.S bswap64.c \
 	fabs.c flt_rounds.c
 
 # Common ieee754 constants and functions



CVS commit: src/sbin/mount_nfs

2012-07-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jul 11 18:33:14 UTC 2012

Modified Files:
src/sbin/mount_nfs: mount_nfs.8

Log Message:
minor wording improvement.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sbin/mount_nfs/mount_nfs.8

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

Modified files:

Index: src/sbin/mount_nfs/mount_nfs.8
diff -u src/sbin/mount_nfs/mount_nfs.8:1.42 src/sbin/mount_nfs/mount_nfs.8:1.43
--- src/sbin/mount_nfs/mount_nfs.8:1.42	Sun Apr  8 22:00:37 2012
+++ src/sbin/mount_nfs/mount_nfs.8	Wed Jul 11 18:33:14 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_nfs.8,v 1.42 2012/04/08 22:00:37 wiz Exp $
+.\	$NetBSD: mount_nfs.8,v 1.43 2012/07/11 18:33:14 dholland Exp $
 .\
 .\ Copyright (c) 1992, 1993, 1994, 1995
 .\	The Regents of the University of California.  All rights reserved.
@@ -531,5 +531,6 @@ cannot resolve the name of the remote ho
 .%T Authentication Mechanisms for ONC RPC
 .Re
 .Sh CAVEATS
-An NFS server shouldn't loopback-mount its own exported file systems because
-it's fundamentally prone to deadlock.
+An NFS server should not mount its own exported file systems
+.Pq loopback fashion
+because doing so is fundamentally prone to deadlock.



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2012-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 18:48:28 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: idea.inc mdc2.inc
Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto: i_cbc_dummy.c
i_skey_dummy.c mdc2dgst_dummy.c

Log Message:
Enable ciphers with expired patents:
mdc2 4,908,861 (expired August 28, 2007)
idea 5,214,703 (expired January 7, 2012)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto/i_cbc_dummy.c \
src/crypto/external/bsd/openssl/lib/libcrypto/i_skey_dummy.c \
src/crypto/external/bsd/openssl/lib/libcrypto/mdc2dgst_dummy.c
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc:1.1	Sun Jul 19 19:30:43 2009
+++ src/crypto/external/bsd/openssl/lib/libcrypto/idea.inc	Wed Jul 11 14:48:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: idea.inc,v 1.1 2009/07/19 23:30:43 christos Exp $
+#	$NetBSD: idea.inc,v 1.2 2012/07/11 18:48:27 christos Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -11,9 +11,7 @@
 IDEA_SRCS = i_cfb64.c i_ofb64.c i_ecb.c
 # IDEA is a patented algorithm; abort().
 # see ../libcrypto_idea
-IDEA_SRCS += i_cbc_dummy.c i_skey_dummy.c
-#SRCS+=i_cbc.c i_skey.c
-SRCS += ${IDEA_SRCS}
+SRCS+=i_cbc.c i_skey.c
 
 .for cryptosrc in ${IDEA_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/idea
Index: src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc:1.1	Sun Jul 19 19:30:44 2009
+++ src/crypto/external/bsd/openssl/lib/libcrypto/mdc2.inc	Wed Jul 11 14:48:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mdc2.inc,v 1.1 2009/07/19 23:30:44 christos Exp $
+#	$NetBSD: mdc2.inc,v 1.2 2012/07/11 18:48:27 christos Exp $
 #
 #	@(#) Copyright (c) 1995 Simon J. Gerraty
 #
@@ -11,9 +11,7 @@
 MDC2_SRCS = mdc2_one.c
 # MDC2 is a patented algorithm; abort().
 # see ../libcrypto_mdc2
-MDC2_SRCS += mdc2dgst_dummy.c
-#SRCS+=	mdc2dgst.c
-SRCS += ${MDC2_SRCS}
+SRCS+=	mdc2dgst.c
 
 .for cryptosrc in ${MDC2_SRCS}
 CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/mdc2



CVS commit: src/crypto/external/bsd/openssl/lib

2012-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 18:50:24 UTC 2012

Modified Files:
src/crypto/external/bsd/openssl/lib: Makefile
Removed Files:
src/crypto/external/bsd/openssl/lib/libcrypto_idea: Makefile
shlib_version
src/crypto/external/bsd/openssl/lib/libcrypto_mdc2: Makefile
shlib_version

Log Message:
remove unneeded libraries


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/openssl/lib/Makefile
cvs rdiff -u -r1.3 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto_idea/Makefile
cvs rdiff -u -r1.1 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto_idea/shlib_version
cvs rdiff -u -r1.3 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto_mdc2/Makefile
cvs rdiff -u -r1.1 -r0 \
src/crypto/external/bsd/openssl/lib/libcrypto_mdc2/shlib_version

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/Makefile
diff -u src/crypto/external/bsd/openssl/lib/Makefile:1.1 src/crypto/external/bsd/openssl/lib/Makefile:1.2
--- src/crypto/external/bsd/openssl/lib/Makefile:1.1	Sun Jul 19 19:30:42 2009
+++ src/crypto/external/bsd/openssl/lib/Makefile	Wed Jul 11 14:50:23 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/07/19 23:30:42 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2012/07/11 18:50:23 christos Exp $
 
 .include bsd.own.mk
 
@@ -7,14 +7,6 @@
 # OpenSSL libraries.
 SUBDIR= libcrypto libdes
 
-.if (${MKCRYPTO_IDEA} != no)
-SUBDIR+= libcrypto_idea
-.endif	# MKCRYPTO_IDEA != no
-
-.if (${MKCRYPTO_MDC2} != no)
-SUBDIR+= libcrypto_mdc2
-.endif	# MKCRYPTO_MDC2 != no
-
 .if (${MKCRYPTO_RC5} != no)
 SUBDIR+= libcrypto_rc5
 .endif	# MKCRYPTO_RC5 != no



CVS commit: src/distrib/sets/lists

2012-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 18:59:32 UTC 2012

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi

Log Message:
mark idea and mdc2 libraries obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.169 -r1.170 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.159 -r1.160 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.629 -r1.630 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/comp/ad.mips64eb
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.168 -r1.169 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.1768 -r1.1769 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.226 -r1.227 src/distrib/sets/lists/comp/shl.mi

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/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.94 src/distrib/sets/lists/base/ad.mips64eb:1.95
--- src/distrib/sets/lists/base/ad.mips64eb:1.94	Tue Jul 10 15:15:48 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Wed Jul 11 14:59:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.94 2012/07/10 19:15:48 christos Exp $
+# $NetBSD: ad.mips64eb,v 1.95 2012/07/11 18:59:28 christos Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -75,10 +75,10 @@
 ./usr/lib/64/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libcrypto.so.7			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libcrypto.so.7.0			base-compat-shlib	compat,pic,crypto
-./usr/lib/64/libcrypto_idea.so.7		base-compat-shlib	compat,pic,crypto,crypto_idea
-./usr/lib/64/libcrypto_idea.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_idea
-./usr/lib/64/libcrypto_mdc2.so.7		base-compat-shlib	compat,pic,crypto,crypto_mdc2
-./usr/lib/64/libcrypto_mdc2.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_mdc2
+./usr/lib/64/libcrypto_idea.so.7		base-obsolete		obsolete
+./usr/lib/64/libcrypto_idea.so.7.0		base-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.so.7		base-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.so.7.0		base-obsolete		obsolete
 ./usr/lib/64/libcrypto_rc5.so.7			base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcurses.so.7			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.93 src/distrib/sets/lists/base/ad.mips64el:1.94
--- src/distrib/sets/lists/base/ad.mips64el:1.93	Tue Jul 10 15:15:48 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Wed Jul 11 14:59:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.93 2012/07/10 19:15:48 christos Exp $
+# $NetBSD: ad.mips64el,v 1.94 2012/07/11 18:59:28 christos Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -73,10 +73,10 @@
 ./usr/lib/64/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libcrypto.so.7			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libcrypto.so.7.0			base-compat-shlib	compat,pic,crypto
-./usr/lib/64/libcrypto_idea.so.7		base-compat-shlib	compat,pic,crypto,crypto_idea
-./usr/lib/64/libcrypto_idea.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_idea
-./usr/lib/64/libcrypto_mdc2.so.7		base-compat-shlib	compat,pic,crypto,crypto_mdc2
-./usr/lib/64/libcrypto_mdc2.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_mdc2
+./usr/lib/64/libcrypto_idea.so.7		base-obsolete		obsolete
+./usr/lib/64/libcrypto_idea.so.7.0		base-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.so.7		base-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.so.7.0		base-obsolete		obsolete
 ./usr/lib/64/libcrypto_rc5.so.7			base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcurses.so.7			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.169 src/distrib/sets/lists/base/md.amd64:1.170
--- src/distrib/sets/lists/base/md.amd64:1.169	Tue Jul 10 15:15:48 2012
+++ src/distrib/sets/lists/base/md.amd64	Wed Jul 11 14:59:28 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.169 2012/07/10 19:15:48 christos Exp $
+# $NetBSD: md.amd64,v 1.170 2012/07/11 18:59:28 christos Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			

CVS commit: src/doc

2012-07-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 11 19:00:12 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
Fill in homepage for file(1). From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.945 -r1.946 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.945 src/doc/3RDPARTY:1.946
--- src/doc/3RDPARTY:1.945	Sun Jul  8 08:22:24 2012
+++ src/doc/3RDPARTY	Wed Jul 11 19:00:12 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.945 2012/07/08 08:22:24 jruoho Exp $
+#	$NetBSD: 3RDPARTY,v 1.946 2012/07/11 19:00:12 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -328,7 +328,7 @@ Version:	5.11
 Current Vers:	5.11
 Maintainer:	Christos Zoulas chris...@zoulas.com
 Archive Site:	ftp://ftp.astron.com/pub/file/
-Home Page:
+Home Page:	http://www.darwinsys.com/file/
 Mailing List:	f...@mx.gw.com
 Responsible:	christos, pooka
 License:	BSD (2-clause)



CVS commit: src/crypto/external/bsd/netpgp/lib

2012-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 19:01:02 UTC 2012

Modified Files:
src/crypto/external/bsd/netpgp/lib: Makefile

Log Message:
no need for MKCRYPTO_IDEA


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/crypto/external/bsd/netpgp/lib/Makefile

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

Modified files:

Index: src/crypto/external/bsd/netpgp/lib/Makefile
diff -u src/crypto/external/bsd/netpgp/lib/Makefile:1.14 src/crypto/external/bsd/netpgp/lib/Makefile:1.15
--- src/crypto/external/bsd/netpgp/lib/Makefile:1.14	Tue Jul 10 15:38:17 2012
+++ src/crypto/external/bsd/netpgp/lib/Makefile	Wed Jul 11 15:01:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2012/07/10 19:38:17 christos Exp $
+# $NetBSD: Makefile,v 1.15 2012/07/11 19:01:02 christos Exp $
 
 .include bsd.own.mk
 
@@ -22,9 +22,6 @@ INCSDIR=/usr/include
 
 OPENSSL=${NETBSDSRCDIR}/crypto/external/bsd/openssl
 LIBDPLIBS+=	mj	${.CURDIR}/../libmj
-.if (${MKCRYPTO_IDEA} != no)
-LIBDPLIBS+=	crypto_idea	${OPENSSL}/lib/libcrypto_idea
-.endif  # MKCRYPTO_IDEA != no
 LIBDPLIBS+=	crypto		${OPENSSL}/lib/libcrypto
 LIBDPLIBS+=	z		${NETBSDSRCDIR}/lib/libz
 LIBDPLIBS+=	bz2		${NETBSDSRCDIR}/lib/libbz2



CVS commit: src/lib

2012-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 19:02:19 UTC 2012

Removed Files:
src/lib/libcrypto_idea: Makefile
src/lib/libcrypto_mdc2: Makefile
src/lib/libcrypto_rc5: Makefile

Log Message:
leave the roach motel


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r0 src/lib/libcrypto_idea/Makefile
cvs rdiff -u -r1.2 -r0 src/lib/libcrypto_mdc2/Makefile
cvs rdiff -u -r1.7 -r0 src/lib/libcrypto_rc5/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/amiga/pci

2012-07-11 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Jul 11 19:14:18 UTC 2012

Modified Files:
src/sys/arch/amiga/pci: p5pb.c

Log Message:
Fix incomplete bus_dma tag.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amiga/pci/p5pb.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/amiga/pci/p5pb.c
diff -u src/sys/arch/amiga/pci/p5pb.c:1.9 src/sys/arch/amiga/pci/p5pb.c:1.10
--- src/sys/arch/amiga/pci/p5pb.c:1.9	Wed Jul 11 17:13:31 2012
+++ src/sys/arch/amiga/pci/p5pb.c	Wed Jul 11 19:14:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: p5pb.c,v 1.9 2012/07/11 17:13:31 rkujawa Exp $ */
+/*	$NetBSD: p5pb.c,v 1.10 2012/07/11 19:14:17 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
@@ -78,7 +78,12 @@ struct m68k_bus_dma_tag p5pb_bus_dma_tag
 	_bus_dmamap_load_uio_direct,
 	_bus_dmamap_load_raw_direct,
 	_bus_dmamap_unload,
-	_bus_dmamap_sync
+	_bus_dmamap_sync,
+	_bus_dmamem_alloc,
+	_bus_dmamem_free,
+	_bus_dmamem_map,
+	_bus_dmamem_unmap,
+	_bus_dmamem_mmap
 };
 
 static int	p5pb_match(struct device *, struct cfdata *, void *);



CVS commit: src/share/man/man4/man4.amiga

2012-07-11 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Jul 11 19:24:14 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: p5pb.4

Log Message:
The p5pb driver now supports all G-REX slots.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/man4.amiga/p5pb.4

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

Modified files:

Index: src/share/man/man4/man4.amiga/p5pb.4
diff -u src/share/man/man4/man4.amiga/p5pb.4:1.8 src/share/man/man4/man4.amiga/p5pb.4:1.9
--- src/share/man/man4/man4.amiga/p5pb.4:1.8	Thu Jan 19 09:25:51 2012
+++ src/share/man/man4/man4.amiga/p5pb.4	Wed Jul 11 19:24:13 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: p5pb.4,v 1.8 2012/01/19 09:25:51 wiz Exp $
+.\ $NetBSD: p5pb.4,v 1.9 2012/07/11 19:24:13 rkujawa Exp $
 .\
 .\ Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 19, 2012
+.Dd July 11, 2012
 .Dt P5PB 4 amiga
 .Os
 .Sh NAME
@@ -61,8 +61,8 @@ driver supports the following hardware:
 .Bl -tag -offset indent
 .It Phase5 BlizzardVisionPPC graphics card
 .It Phase5 CyberVisionPPC graphics card
-.It DCE Computer G-REX 1200 (experimental, first slot only)
-.It DCE Computer G-REX 4000 (experimental, first slot only)
+.It DCE Computer G-REX 1200
+.It DCE Computer G-REX 4000
 .El
 .Sh SEE ALSO
 .Xr cv3dpb 4 ,



CVS commit: src/external/bsd/atf/dist

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:37:16 UTC 2012

Update of /cvsroot/src/external/bsd/atf/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv29292

Log Message:
Import atf 0.16:

Experimental version released on July 10th, 2012.

* Added a --enable-tools flag to configure to request the build of the
  deprecated ATF tools, whose build is now disabled by default.  In order
  to continue running tests, you should migrate to Kyua instead of enabling
  the build of the deprecated tools.  The kyua-atf-compat package provides
  transitional compatibility versions of atf-run and atf-report built on
  top of Kyua.

* Tweaked the ATF_TEST_CASE macro of atf-c++ so that the compiler can
  detect defined but unused test cases.

* PR bin/45859: Fixed some XSLT bugs that resulted in the tc-time and
  tp-time XML tags leaking into the generated HTML file.  Also improved
  the CSS file slightly to correct alignment and color issues with the
  timestamps column.

* Optimized atf-c++/macros.hpp so that GNU G++ consumes less memory during
  compilation with GNU G++.

* Flipped the default to building shared libraries for atf-c and atf-c++,
  and started versioning them.  As a side-effect, this removes the
  --enable-unstable-shared flag from configure that appears to not work any
  more (under NetBSD).  Additionally, some distributions require the use of
  shared libraries for proper dependency tracking (e.g. Fedora), so it is
  better if we do the right versioning upstream.

* Project hosting moved from an adhoc solution (custom web site and
  Monotone repository) to Google Code (standard wiki and Git).  ATF now
  lives in a subcomponent of the Kyua project.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-16

U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/test-programs/meta_data_test.sh
U src/external/bsd/atf/dist/test-programs/Atffile
U src/external/bsd/atf/dist/test-programs/Kyuafile
U src/external/bsd/atf/dist/test-programs/c_helpers.c
U src/external/bsd/atf/dist/test-programs/srcdir_test.sh
U src/external/bsd/atf/dist/test-programs/fork_test.sh
U src/external/bsd/atf/dist/test-programs/config_test.sh
U src/external/bsd/atf/dist/test-programs/common.sh
U src/external/bsd/atf/dist/test-programs/cpp_helpers.cpp
U src/external/bsd/atf/dist/test-programs/sh_helpers.sh
U src/external/bsd/atf/dist/test-programs/result_test.sh
U src/external/bsd/atf/dist/test-programs/expect_test.sh
U src/external/bsd/atf/dist/atf-version/generate-revision.sh
C src/external/bsd/atf/dist/atf-version/atf-version.cpp
U src/external/bsd/atf/dist/atf-version/atf-version.1
U src/external/bsd/atf/dist/atf-run/atf-run.1
U src/external/bsd/atf/dist/atf-run/timer.hpp
U src/external/bsd/atf/dist/atf-run/io.hpp
U src/external/bsd/atf/dist/atf-run/atffile.hpp
U src/external/bsd/atf/dist/atf-run/Atffile
U src/external/bsd/atf/dist/atf-run/config_test.cpp
U src/external/bsd/atf/dist/atf-run/Kyuafile
U src/external/bsd/atf/dist/atf-run/signals.hpp
U src/external/bsd/atf/dist/atf-run/user.hpp
U src/external/bsd/atf/dist/atf-run/requirements_test.cpp
U src/external/bsd/atf/dist/atf-run/test-program.hpp
U src/external/bsd/atf/dist/atf-run/atffile_test.cpp
U src/external/bsd/atf/dist/atf-run/config.cpp
U src/external/bsd/atf/dist/atf-run/zero_tcs_helper.c
U src/external/bsd/atf/dist/atf-run/signals_test.cpp
U src/external/bsd/atf/dist/atf-run/pass_helper.cpp
U src/external/bsd/atf/dist/atf-run/io.cpp
U src/external/bsd/atf/dist/atf-run/io_test.cpp
C src/external/bsd/atf/dist/atf-run/fs.cpp
U src/external/bsd/atf/dist/atf-run/test-program.cpp
U src/external/bsd/atf/dist/atf-run/bad_metadata_helper.c
U src/external/bsd/atf/dist/atf-run/user_test.cpp
U src/external/bsd/atf/dist/atf-run/signals.cpp
U src/external/bsd/atf/dist/atf-run/integration_test.sh
U src/external/bsd/atf/dist/atf-run/atffile.cpp
U src/external/bsd/atf/dist/atf-run/atf-run.cpp
U src/external/bsd/atf/dist/atf-run/fs.hpp
C src/external/bsd/atf/dist/atf-run/test_program_test.cpp
U src/external/bsd/atf/dist/atf-run/fs_test.cpp
U src/external/bsd/atf/dist/atf-run/expect_helpers.c
U src/external/bsd/atf/dist/atf-run/user.cpp
U src/external/bsd/atf/dist/atf-run/timer.cpp
U src/external/bsd/atf/dist/atf-run/requirements.hpp
U src/external/bsd/atf/dist/atf-run/requirements.cpp
U src/external/bsd/atf/dist/atf-run/misc_helpers.cpp
U src/external/bsd/atf/dist/atf-run/several_tcs_helper.c
U src/external/bsd/atf/dist/atf-run/config.hpp
U src/external/bsd/atf/dist/atf-run/share/atf-run.hooks
U src/external/bsd/atf/dist/atf-run/sample/atf-run.hooks
U src/external/bsd/atf/dist/atf-run/sample/common.conf
U src/external/bsd/atf/dist/atf-c++/pkg_config_test.sh
U 

CVS commit: src/external/bsd/atf/dist

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:38:40 UTC 2012

Modified Files:
src/external/bsd/atf/dist/atf-c/detail: test_helpers.c
src/external/bsd/atf/dist/atf-run: test_program_test.cpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp
src/external/bsd/atf/dist/atf-version: atf-version.cpp

Log Message:
Post-import merge of atf 0.16.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-run/test_program_test.cpp
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/atf/dist/atf-version/atf-version.cpp

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

Modified files:

Index: src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
diff -u src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.3 src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.4
--- src/external/bsd/atf/dist/atf-c/detail/test_helpers.c:1.3	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-c/detail/test_helpers.c	Wed Jul 11 22:38:40 2012
@@ -46,33 +46,37 @@
 
 static
 void
-build_check_c_o_aux(const char *path, const char *failmsg)
+build_check_c_o_aux(const char *path, const char *failmsg,
+const bool expect_pass)
 {
 bool success;
 atf_dynstr_t iflag;
-const char *optargs[2];
+const char *optargs[4];
 
 RE(atf_dynstr_init_fmt(iflag, -I%s, atf_config_get(atf_includedir)));
 
 optargs[0] = atf_dynstr_cstring(iflag);
-optargs[1] = NULL;
+optargs[1] = -Wall;
+optargs[2] = -Werror;
+optargs[3] = NULL;
 
 RE(atf_check_build_c_o(path, test.o, optargs, success));
 
 atf_dynstr_fini(iflag);
 
-if (!success)
+if ((expect_pass  !success) || (!expect_pass  success))
 atf_tc_fail(%s, failmsg);
 }
 
 void
-build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg)
+build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg,
+const bool expect_pass)
 {
 atf_fs_path_t path;
 
 RE(atf_fs_path_init_fmt(path, %s/%s,
 atf_tc_get_config_var(tc, srcdir), sfile));
-build_check_c_o_aux(atf_fs_path_cstring(path), failmsg);
+build_check_c_o_aux(atf_fs_path_cstring(path), failmsg, expect_pass);
 atf_fs_path_fini(path);
 }
 
@@ -90,7 +94,7 @@ header_check(const char *hdrname)
 snprintf(failmsg, sizeof(failmsg),
  Header check failed; %s is not self-contained, hdrname);
 
-build_check_c_o_aux(test.c, failmsg);
+build_check_c_o_aux(test.c, failmsg, true);
 }
 
 void

Index: src/external/bsd/atf/dist/atf-run/test_program_test.cpp
diff -u src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.4 src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.5
--- src/external/bsd/atf/dist/atf-run/test_program_test.cpp:1.4	Mon Jan 16 22:41:30 2012
+++ src/external/bsd/atf/dist/atf-run/test_program_test.cpp	Wed Jul 11 22:38:40 2012
@@ -1008,6 +1008,8 @@ ATF_INIT_TEST_CASES(tcs)
 ATF_ADD_TEST_CASE(tcs, parse_test_case_result_skipped);
 ATF_ADD_TEST_CASE(tcs, parse_test_case_result_unknown);
 
+ATF_ADD_TEST_CASE(tcs, read_test_case_result_failed);
+ATF_ADD_TEST_CASE(tcs, read_test_case_result_skipped);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_no_file);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_empty_file);
 ATF_ADD_TEST_CASE(tcs, read_test_case_result_multiline);

Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp
diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.6 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.7
--- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.6	Mon Jan 16 22:41:31 2012
+++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp	Wed Jul 11 22:38:40 2012
@@ -271,7 +271,7 @@ parse_status_check_arg(const std::string
 else
 value = parse_signal(value_str);
 } else
-throw atf::application::usage_error(Invalid output checker);
+throw atf::application::usage_error(Invalid status checker);
 
 return status_check(type, negated, value);
 }

Index: src/external/bsd/atf/dist/atf-version/atf-version.cpp
diff -u src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.6 src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.7
--- src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.6	Mon Jan 16 22:41:31 2012
+++ src/external/bsd/atf/dist/atf-version/atf-version.cpp	Wed Jul 11 22:38:40 2012
@@ -69,7 +69,7 @@ atf_version::main(void)
 #if defined(PACKAGE_REVISION_TYPE_DIST)
 std::cout  format_text(Built from a distribution file; no revision 
 information available.)  \n;
-#elif defined(PACKAGE_REVISION_TYPE_MTN)
+#elif defined(PACKAGE_REVISION_TYPE_GIT)
 std::cout  format_text_with_tag(PACKAGE_REVISION_BRANCH, Branch: ,
   

CVS commit: src/external/bsd/atf

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:40:16 UTC 2012

Modified Files:
src/external/bsd/atf/lib/libatf-c: Makefile bconfig.h
src/external/bsd/atf/lib/libatf-c++: Makefile
src/external/bsd/atf/tests/atf/atf-c: Makefile
src/external/bsd/atf/tests/atf/atf-c++: Makefile
src/external/bsd/atf/usr.bin/atf-sh: Makefile
Added Files:
src/external/bsd/atf/lib/libatf-c: shlib_version
src/external/bsd/atf/lib/libatf-c++: shlib_version

Log Message:
Update reachover Makefiles for atf 0.16.

As part of this change (and as done upstream and in various packaging
systems), start shipping shared libraries of both libatf-c and libatf-c++.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/atf/lib/libatf-c/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/lib/libatf-c/bconfig.h
cvs rdiff -u -r0 -r1.1 src/external/bsd/atf/lib/libatf-c/shlib_version
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/atf/lib/libatf-c++/shlib_version
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/tests/atf/atf-c/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/tests/atf/atf-c++/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/usr.bin/atf-sh/Makefile

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

Modified files:

Index: src/external/bsd/atf/lib/libatf-c/Makefile
diff -u src/external/bsd/atf/lib/libatf-c/Makefile:1.14 src/external/bsd/atf/lib/libatf-c/Makefile:1.15
--- src/external/bsd/atf/lib/libatf-c/Makefile:1.14	Mon Jan 16 22:42:40 2012
+++ src/external/bsd/atf/lib/libatf-c/Makefile	Wed Jul 11 22:40:16 2012
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.14 2012/01/16 22:42:40 jmmv Exp $
+# $NetBSD: Makefile,v 1.15 2012/07/11 22:40:16 jmmv Exp $
 
 NOLINT=		# defined
 
 .include bsd.own.mk
 
 LIB=		atf-c
-NOPIC=		# defined; interface is still too unstable
 
 CWARNFLAGS+=	-Wno-missing-noreturn
 
@@ -90,7 +89,7 @@ FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c.pc
 atf-c.pc: Makefile atf-c.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.15,g' \
+	${TOOL_SED} -e 's,__ATF_VERSION__,0.16,g' \
 	-e 's,__CC__,gcc,g' \
 	-e 's,__INCLUDEDIR__,/usr/include,g' \
 	-e 's,__LIBDIR__,/usr/lib,g' \

Index: src/external/bsd/atf/lib/libatf-c/bconfig.h
diff -u src/external/bsd/atf/lib/libatf-c/bconfig.h:1.10 src/external/bsd/atf/lib/libatf-c/bconfig.h:1.11
--- src/external/bsd/atf/lib/libatf-c/bconfig.h:1.10	Mon Jan 16 22:42:40 2012
+++ src/external/bsd/atf/lib/libatf-c/bconfig.h	Wed Jul 11 22:40:16 2012
@@ -96,19 +96,19 @@
 #define PACKAGE_NAME Automated Testing Framework
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING Automated Testing Framework 0.15
+#define PACKAGE_STRING Automated Testing Framework 0.16
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME atf
 
 /* Define to the home page for this package. */
-#define PACKAGE_URL http://www.NetBSD.org/~jmmv/atf/;
+#define PACKAGE_URL http://code.google.com/p/kyua/wiki/ATF;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 0.15
+#define PACKAGE_VERSION 0.16
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION 0.15
+#define VERSION 0.16

Index: src/external/bsd/atf/lib/libatf-c++/Makefile
diff -u src/external/bsd/atf/lib/libatf-c++/Makefile:1.12 src/external/bsd/atf/lib/libatf-c++/Makefile:1.13
--- src/external/bsd/atf/lib/libatf-c++/Makefile:1.12	Mon Jan 16 22:42:40 2012
+++ src/external/bsd/atf/lib/libatf-c++/Makefile	Wed Jul 11 22:40:16 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2012/01/16 22:42:40 jmmv Exp $
+# $NetBSD: Makefile,v 1.13 2012/07/11 22:40:16 jmmv Exp $
 
 NOLINT=		# defined
 
@@ -8,7 +8,6 @@ LIB=		atf-c++
 LIBISCXX=	yes
 LDADD=		-L${.OBJDIR}/../libatf-c -latf-c
 DPADD=		${LIBATF_C}
-NOPIC=		# defined; interface is still too unstable
 
 SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}
@@ -55,7 +54,7 @@ FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c++.pc
 atf-c++.pc: Makefile atf-c++.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.15,g' \
+	${TOOL_SED} -e 's,__ATF_VERSION__,0.16,g' \
 	-e 's,__CXX__,g++,g' \
 	-e 's,__INCLUDEDIR__,/usr/include,g' \
 	-e 's,__LIBDIR__,/usr/lib,g' \

Index: src/external/bsd/atf/tests/atf/atf-c/Makefile
diff -u src/external/bsd/atf/tests/atf/atf-c/Makefile:1.7 src/external/bsd/atf/tests/atf/atf-c/Makefile:1.8
--- src/external/bsd/atf/tests/atf/atf-c/Makefile:1.7	Wed Oct 20 09:20:10 2010
+++ src/external/bsd/atf/tests/atf/atf-c/Makefile	Wed Jul 11 22:40:16 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2010/10/20 09:20:10 jmmv Exp $
+# $NetBSD: Makefile,v 1.8 2012/07/11 22:40:16 jmmv Exp $
 
 .include bsd.own.mk
 
@@ -16,6 +16,7 @@ CPPFLAGS+=	-I${NETBSDSRCDIR}/external/bs
 
 FILESDIR=	${TESTSDIR}
 

CVS commit: src/distrib/sets/lists

2012-07-11 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Wed Jul 11 22:42:40 UTC 2012

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/tests: mi

Log Message:
Update file sets for atf 0.16.

In particular, add entries for the new libatf-c and libatf-c++ shared
libraries.  I have followed existing entries to come up with the right
lines to add... but this is quite tricky, so please forgive any fallout
that may follow (and let me know if there is any!).


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.170 -r1.171 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.160 -r1.161 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.630 -r1.631 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/comp/ad.mips64eb
cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.169 -r1.170 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.151 -r1.152 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.227 -r1.228 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.475 -r1.476 src/distrib/sets/lists/tests/mi

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/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.95 src/distrib/sets/lists/base/ad.mips64eb:1.96
--- src/distrib/sets/lists/base/ad.mips64eb:1.95	Wed Jul 11 18:59:28 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Wed Jul 11 22:42:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.95 2012/07/11 18:59:28 christos Exp $
+# $NetBSD: ad.mips64eb,v 1.96 2012/07/11 22:42:38 jmmv Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -55,6 +55,10 @@
 ./usr/lib/64/libarchive.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libasn1.so.9			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos
+./usr/lib/64/libatf-c.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c.so.0.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c++.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c++.so.0.0			base-compat-shlib	compat,pic,atf
 ./usr/lib/64/libbfd.so.12			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbfd.so.12.0			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbind9.so.5			base-compat-shlib	compat,pic
@@ -361,6 +365,10 @@
 ./usr/lib/o32/libarchive.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libasn1.so.9			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/o32/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos
+./usr/lib/o32/libatf-c.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/o32/libatf-c.so.0.0			base-compat-shlib	compat,pic,atf
+./usr/lib/o32/libatf-c++.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/o32/libatf-c++.so.0.0			base-compat-shlib	compat,pic,atf
 ./usr/lib/o32/libbfd.so.12			base-compat-shlib	compat,pic,binutils
 ./usr/lib/o32/libbfd.so.12.0			base-compat-shlib	compat,pic,binutils
 ./usr/lib/o32/libbind9.so.5			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.94 src/distrib/sets/lists/base/ad.mips64el:1.95
--- src/distrib/sets/lists/base/ad.mips64el:1.94	Wed Jul 11 18:59:28 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Wed Jul 11 22:42:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.94 2012/07/11 18:59:28 christos Exp $
+# $NetBSD: ad.mips64el,v 1.95 2012/07/11 22:42:38 jmmv Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -55,6 +55,10 @@
 ./usr/lib/64/libarchive.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libasn1.so.9			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos
+./usr/lib/64/libatf-c.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c.so.0.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c++.so.0			base-compat-shlib	compat,pic,atf
+./usr/lib/64/libatf-c++.so.0.0			base-compat-shlib	compat,pic,atf
 ./usr/lib/64/libbfd.so.12			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbfd.so.12.0			base-compat-shlib	compat,pic,binutils
 ./usr/lib/64/libbind9.so.5			base-compat-shlib	compat,pic
@@ -361,6 +365,10 @@
 ./usr/lib/o32/libarchive.so.3.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libasn1.so.9			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/o32/libasn1.so.9.0			base-compat-shlib	compat,pic,kerberos
+./usr/lib/o32/libatf-c.so.0			

CVS commit: src/share/man/man9

2012-07-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 12 00:07:36 UTC 2012

Modified Files:
src/share/man/man9: rnd.9

Log Message:
More updates, since the structure name has changed from rndsourc_element_t
to krndsource_t.  While here, add RND_TYPE_ENV to the list of source types.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/rnd.9

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

Modified files:

Index: src/share/man/man9/rnd.9
diff -u src/share/man/man9/rnd.9:1.21 src/share/man/man9/rnd.9:1.22
--- src/share/man/man9/rnd.9:1.21	Wed Jul 11 18:17:50 2012
+++ src/share/man/man9/rnd.9	Thu Jul 12 00:07:36 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: rnd.9,v 1.21 2012/07/11 18:17:50 pgoyette Exp $
+.\	$NetBSD: rnd.9,v 1.22 2012/07/12 00:07:36 pgoyette Exp $
 .\
 .\ Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -40,13 +40,13 @@
 .Sh SYNOPSIS
 .In sys/rnd.h
 .Ft void
-.Fn rnd_attach_source rndsource_element_t *rnd_source char *devname uint32_t source_type uint32_t flags
+.Fn rnd_attach_source krndsource_t *rnd_source char *devname uint32_t source_type uint32_t flags
 .Ft void
-.Fn rnd_detach_source rndsource_element_t *rnd_source
+.Fn rnd_detach_source krndsource_t *rnd_source
 .Ft void
-.Fn rnd_add_data rndsource_element_t *rnd_source void *data uint32_t len uint32_t entropy
+.Fn rnd_add_data krndsource_t *rnd_source void *data uint32_t len uint32_t entropy
 .Ft void
-.Fn rnd_add_uint32 rndsource_element_t *rnd_source uint32_t datum
+.Fn rnd_add_uint32 krndsource_t *rnd_source uint32_t datum
 .Sh DESCRIPTION
 These
 .Nm
@@ -68,7 +68,7 @@ Do not share
 structures between two devices.
 .Pp
 .Bl -tag -width 8n
-.It Fn rnd_attach_source rndsource_element_t *rnd_source char *devname uint32_t source_type uint32_t flags
+.It Fn rnd_attach_source krndsource_t *rnd_source char *devname uint32_t source_type uint32_t flags
 This function announces the availability of a device for entropy collection.
 It must be called before the source struct pointed to by
 .Fa rnd_source
@@ -89,9 +89,11 @@ for physical disks,
 .Dv RND_TYPE_TAPE
 for a tape drive,
 .Dv RND_TYPE_TTY
-for a tty, and
+for a tty,
 .Dv RND_TYPE_RNG
-for a random number generator.
+for a random number generator, and
+.Dv RND_TYPE_ENV
+for an environment sensor.
 .Dv RND_TYPE_UNKNOWN
 is not to be used as a type.
 It is used internally to the rnd system.
@@ -108,9 +110,9 @@ Note that devices of type
 default to
 .Dv RND_FLAG_NO_ESTIMATE .
 .Pp
-.It Fn rnd_detach_source rndsource_element_t *rnd_source
+.It Fn rnd_detach_source krndsource_t *rnd_source
 This function disconnects the device from entropy collection.
-.It Fn rnd_add_uint32 rndsource_element_t *rnd_source uint32_t datum
+.It Fn rnd_add_uint32 krndsource_t *rnd_source uint32_t datum
 This function adds the value of
 .Va datum
 to the entropy pool.
@@ -143,7 +145,7 @@ of randomness, passing
 for
 .Va rnd_source
 is permitted, and the device does not need to be attached.
-.It Fn rnd_add_data rndsource_element_t *rnd_source void *data uint32_t len uint32_t entropy
+.It Fn rnd_add_data krndsource_t *rnd_source void *data uint32_t len uint32_t entropy
 adds (hopefully) random
 .Fa data
 to the entropy pool.



CVS commit: src/sys/dev/sun

2012-07-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 12 01:20:22 UTC 2012

Modified Files:
src/sys/dev/sun: cgsix.c cgsixvar.h files.sun

Log Message:
support anti-aliased fonts


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/sun/cgsix.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sun/cgsixvar.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sun/files.sun

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/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.56 src/sys/dev/sun/cgsix.c:1.57
--- src/sys/dev/sun/cgsix.c:1.56	Wed Jul 11 16:59:55 2012
+++ src/sys/dev/sun/cgsix.c	Thu Jul 12 01:20:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix.c,v 1.56 2012/07/11 16:59:55 macallan Exp $ */
+/*	$NetBSD: cgsix.c,v 1.57 2012/07/12 01:20:22 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.56 2012/07/11 16:59:55 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.57 2012/07/12 01:20:22 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -167,10 +167,12 @@ void 	cgsix_setup_mono(struct cgsix_soft
 		uint32_t);
 void 	cgsix_feed_line(struct cgsix_softc *, int, uint8_t *);
 void 	cgsix_rectfill(struct cgsix_softc *, int, int, int, int, uint32_t);
+void	cgsix_bitblt(void *, int, int, int, int, int, int, int);
 
 int	cgsix_putcmap(struct cgsix_softc *, struct wsdisplay_cmap *);
 int	cgsix_getcmap(struct cgsix_softc *, struct wsdisplay_cmap *);
 void	cgsix_putchar(void *, int, int, u_int, long);
+void	cgsix_putchar_aa(void *, int, int, u_int, long);
 void	cgsix_cursor(void *, int, int, int);
 
 struct wsdisplay_accessops cgsix_accessops = {
@@ -607,6 +609,10 @@ cg6attach(struct cgsix_softc *sc, const 
 	cg6_setup_palette(sc);
 	cgsix_clearscreen(sc);
 
+	sc-sc_gc.gc_bitblt = cgsix_bitblt;
+	sc-sc_gc.gc_blitcookie = sc;
+	sc-sc_gc.gc_rop = CG6_ALU_COPY;
+
 	if(isconsole) {
 		/* we mess with cg6_console_screen only once */
 		vcons_init_screen(sc-vd, cg6_console_screen, 1,
@@ -620,13 +626,34 @@ cg6attach(struct cgsix_softc *sc, const 
 		SCREEN_VISIBLE(cg6_console_screen);
 		sc-vd.active = cg6_console_screen;
 		wsdisplay_cnattach(cgsix_defaultscreen, ri, 0, 0, defattr);
+		glyphcache_init(sc-sc_gc, sc-sc_height + 5,
+(sc-sc_ramsize / sc-sc_stride) - 
+  sc-sc_height - 5,
+sc-sc_width,
+ri-ri_font-fontwidth,
+ri-ri_font-fontheight,
+defattr);
+		
 		vcons_replay_msgbuf(cg6_console_screen);
 	} else {
-		/* 
-		 * we're not the console so we just clear the screen and don't 
-		 * set up any sort of text display
+		/*
+		 * since we're not the console we can postpone the rest
+		 * until someone actually allocates a screen for us
 		 */
+		if (cg6_console_screen.scr_ri.ri_rows == 0) {
+			/* do some minimal setup to avoid weirdnesses later */
+			vcons_init_screen(sc-vd, cg6_console_screen, 1,
+			defattr);
+		}
+		glyphcache_init(sc-sc_gc, sc-sc_height + 5,
+(sc-sc_ramsize / sc-sc_stride) - 
+  sc-sc_height - 5,
+sc-sc_width,
+ri-ri_font-fontwidth,
+ri-ri_font-fontheight,
+defattr);
 	}
+	cg6_setup_palette(sc);
 	
 	aa.scrdata = cgsix_screenlist;
 	aa.console = isconsole;
@@ -1095,6 +1122,8 @@ cg6_setup_palette(struct cgsix_softc *sc
 {
 	int i, j;
 
+	rasops_get_cmap(cg6_console_screen.scr_ri, sc-sc_default_cmap,
+	sizeof(sc-sc_default_cmap));
 	j = 0;
 	for (i = 0; i  256; i++) {
 		sc-sc_cmap.cm_map[i][0] = sc-sc_default_cmap[j];
@@ -1246,7 +1275,7 @@ cgsix_init_screen(void *cookie, struct v
 	ri-ri_width = sc-sc_width;
 	ri-ri_height = sc-sc_height;
 	ri-ri_stride = sc-sc_stride;
-	ri-ri_flg = RI_CENTER;
+	ri-ri_flg = RI_CENTER | RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
 
 	ri-ri_bits = sc-sc_fb.fb_pixels;
 	
@@ -1266,7 +1295,10 @@ cgsix_init_screen(void *cookie, struct v
 	ri-ri_ops.eraserows = cg6_ras_eraserows;
 	ri-ri_ops.erasecols = cg6_ras_erasecols;
 	ri-ri_ops.cursor = cgsix_cursor;
-	ri-ri_ops.putchar = cgsix_putchar;
+	if (FONT_IS_ALPHA(ri-ri_font)) {
+		ri-ri_ops.putchar = cgsix_putchar_aa;
+	} else
+		ri-ri_ops.putchar = cgsix_putchar;
 }
 
 void 
@@ -1288,6 +1320,28 @@ cgsix_rectfill(struct cgsix_softc *sc, i
 	CG6_DRAW(fbc);
 }
 
+void
+cgsix_bitblt(void *cookie, int xs, int ys, int xd, int yd,
+int wi, int he, int rop)
+{
+	struct cgsix_softc *sc = cookie;
+	volatile struct cg6_fbc *fbc = sc-sc_fbc;
+	CG6_WAIT_READY(fbc);
+
+	fbc-fbc_alu = rop;
+	fbc-fbc_mode = GX_BLIT_SRC | GX_MODE_COLOR8;
+
+	fbc-fbc_x0 = xs;
+	fbc-fbc_y0 = ys;
+	fbc-fbc_x1 = xs + wi - 1;
+	fbc-fbc_y1 = ys + he - 1;
+	fbc-fbc_x2 = xd;
+	fbc-fbc_y2 = yd;
+	fbc-fbc_x3 = xd + wi - 1;
+	fbc-fbc_y3 = yd + he - 1;
+	CG6_BLIT(fbc);
+}
+
 void 
 cgsix_setup_mono(struct cgsix_softc *sc, int x, int y, int wi, int he, 
 uint32_t fg, uint32_t bg) 
@@ -1391,6 +1445,109 @@ cgsix_putchar(void *cookie, int row, int
 }
 
 void

CVS commit: src/sys/dev/wscons

2012-07-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 12 01:21:08 UTC 2012

Modified Files:
src/sys/dev/wscons: wsdisplay_glyphcache.c

Log Message:
deal with negative cache sizes


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wscons/wsdisplay_glyphcache.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/wscons/wsdisplay_glyphcache.c
diff -u src/sys/dev/wscons/wsdisplay_glyphcache.c:1.2 src/sys/dev/wscons/wsdisplay_glyphcache.c:1.3
--- src/sys/dev/wscons/wsdisplay_glyphcache.c:1.2	Thu Apr 19 08:46:17 2012
+++ src/sys/dev/wscons/wsdisplay_glyphcache.c	Thu Jul 12 01:21:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_glyphcache.c,v 1.2 2012/04/19 08:46:17 macallan Exp $	*/
+/*	$NetBSD: wsdisplay_glyphcache.c,v 1.3 2012/07/12 01:21:08 macallan Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -47,6 +47,7 @@ glyphcache_init(glyphcache *gc, int firs
 	gc-gc_cellheight = cellheight;
 	gc-gc_firstline = first;
 	gc-gc_cellsperline = width / cellwidth;
+	if (lines  0) lines = 0;
 	cache_lines = lines / cellheight;
 	gc-gc_numcells = cache_lines * gc-gc_cellsperline;
 	if (gc-gc_numcells  256)



CVS commit: src/sys/dev/nand

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:05:01 UTC 2012

Modified Files:
src/sys/dev/nand: nand.c

Log Message:
Deal with a spare size of 32.  XXX necc_offset is only a guess.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/nand/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/dev/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.16 src/sys/dev/nand/nand.c:1.17
--- src/sys/dev/nand/nand.c:1.16	Sun Aug 28 20:49:30 2011
+++ src/sys/dev/nand/nand.c	Thu Jul 12 03:05:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.c,v 1.16 2011/08/28 20:49:30 martin Exp $	*/
+/*	$NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
 /* Common driver for NAND chips implementing the ONFI 2.2 specification */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.16 2011/08/28 20:49:30 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $);
 
 #include locators.h
 
@@ -429,6 +429,9 @@ nand_scan_media(device_t self, struct na
 	case 16:
 		ecc-necc_offset = 0;
 		break;
+	case 32:
+		ecc-necc_offset = 0;
+		break;
 	case 64:
 		ecc-necc_offset = 40;
 		break;
@@ -436,7 +439,7 @@ nand_scan_media(device_t self, struct na
 		ecc-necc_offset = 80;
 		break;
 	default:
-		panic(OOB size is unexpected);
+		panic(OOB size %zu is unexpected, chip-nc_spare_size);
 	}
 
 	ecc-necc_steps = chip-nc_page_size / ecc-necc_block_size;



CVS commit: src/sys/dev/sdmmc

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:05:49 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdhc.c sdhcvar.h

Log Message:
Add a flag for the lack of LED_ON in HOST_CTL (ti omap3 doesn't do that).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdhcvar.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/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.13 src/sys/dev/sdmmc/sdhc.c:1.14
--- src/sys/dev/sdmmc/sdhc.c:1.13	Thu Mar 15 18:37:43 2012
+++ src/sys/dev/sdmmc/sdhc.c	Thu Jul 12 03:05:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.13 2012/03/15 18:37:43 bouyer Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.14 2012/07/12 03:05:49 matt Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.13 2012/03/15 18:37:43 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.14 2012/07/12 03:05:49 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -1031,7 +1031,8 @@ out:
 	}
 #endif
 
-	if (!ISSET(hp-sc-sc_flags, SDHC_FLAG_ENHANCED)) {
+	if (!ISSET(hp-sc-sc_flags, SDHC_FLAG_ENHANCED)
+	 !ISSET(hp-sc-sc_flags, SDHC_FLAG_NO_LED_ON)) {
 		mutex_enter(hp-host_mtx);
 		/* Turn off the LED. */
 		HCLR1(hp, SDHC_HOST_CTL, SDHC_LED_ON);

Index: src/sys/dev/sdmmc/sdhcvar.h
diff -u src/sys/dev/sdmmc/sdhcvar.h:1.6 src/sys/dev/sdmmc/sdhcvar.h:1.7
--- src/sys/dev/sdmmc/sdhcvar.h:1.6	Wed Feb  1 23:03:30 2012
+++ src/sys/dev/sdmmc/sdhcvar.h	Thu Jul 12 03:05:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcvar.h,v 1.6 2012/02/01 23:03:30 matt Exp $	*/
+/*	$NetBSD: sdhcvar.h,v 1.7 2012/07/12 03:05:49 matt Exp $	*/
 /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
 
 /*
@@ -43,6 +43,7 @@ struct sdhc_softc {
 #define	SDHC_FLAG_ENHANCED	0x0020	/* Freescale ESDHC */
 #define	SDHC_FLAG_8BIT_MODE	0x0040	/* MMC 8bit mode is supported */
 #define	SDHC_FLAG_HAVE_CGM	0x0080	/* Netlogic XLP */
+#define	SDHC_FLAG_NO_LED_ON	0x0100	/* LED_ON unsupported in HOST_CTL */
 	uint32_t		sc_clkbase;
 };
 



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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:08:26 UTC 2012

Added Files:
src/sys/arch/arm/omap: omap3_sdhc.c omap3_sdmmcreg.h

Log Message:
First pass at supporting the SD/MMC controllers on TI OMAP3/OMAP4 SoCs.
They are mostly SDHC.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/omap3_sdhc.c \
src/sys/arch/arm/omap/omap3_sdmmcreg.h

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

Added files:

Index: src/sys/arch/arm/omap/omap3_sdhc.c
diff -u /dev/null src/sys/arch/arm/omap/omap3_sdhc.c:1.1
--- /dev/null	Thu Jul 12 03:08:26 2012
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Thu Jul 12 03:08:26 2012
@@ -0,0 +1,139 @@
+/*	$NetBSD: omap3_sdhc.c,v 1.1 2012/07/12 03:08:26 matt Exp $	*/
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: omap3_sdhc.c,v 1.1 2012/07/12 03:08:26 matt Exp $);
+
+#include opt_omap.h
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/kernel.h
+#include sys/proc.h
+#include sys/queue.h
+
+#include sys/bus.h
+
+#include arm/omap/omap2_obiovar.h
+#include arm/omap/omap3_sdmmcreg.h
+
+#include dev/sdmmc/sdhcreg.h
+#include dev/sdmmc/sdhcvar.h
+
+static int obiosdhc_match(device_t, cfdata_t, void *);
+static void obiosdhc_attach(device_t, device_t, void *);
+
+struct obiosdhc_softc {
+	struct sdhc_softc	sc;
+	bus_space_tag_t		sc_bst;
+	bus_space_handle_t	sc_bsh;
+	bus_space_handle_t	sc_sdhc_bsh;
+	struct sdhc_host	*sc_hosts[1];
+	void 			*sc_ih;		/* interrupt vectoring */
+};
+
+CFATTACH_DECL_NEW(obiosdhc, sizeof(struct obiosdhc_softc),
+obiosdhc_match, obiosdhc_attach, NULL, NULL);
+
+static int
+obiosdhc_match(device_t parent, cfdata_t cf, void *aux)
+{
+#ifdef OMAP_3530
+	struct obio_attach_args * const oa = aux;
+#endif
+
+#ifdef OMAP_3530
+	if (oa-obio_addr == SDMMC1_BASE_3530
+	|| oa-obio_addr == SDMMC2_BASE_3530
+	|| oa-obio_addr == SDMMC3_BASE_3530)
+return 1;
+#endif
+
+return 0;
+}
+
+static void
+obiosdhc_attach(device_t parent, device_t self, void *aux)
+{
+	struct obiosdhc_softc * const sc = device_private(self);
+	struct obio_attach_args * const oa = aux;
+	int error;
+
+	sc-sc.sc_dmat = oa-obio_dmat;
+	sc-sc.sc_dev = self;
+	//sc-sc.sc_flags |= SDHC_FLAG_USE_DMA;
+	sc-sc.sc_flags |= SDHC_FLAG_32BIT_ACCESS;
+	sc-sc.sc_flags |= SDHC_FLAG_HAVE_CGM;
+	sc-sc.sc_flags |= SDHC_FLAG_NO_LED_ON;
+	sc-sc.sc_host = sc-sc_hosts;
+	sc-sc.sc_clkbase = 96000;	/* 96MHZ */
+	sc-sc_bst = oa-obio_iot;
+
+	error = bus_space_map(sc-sc_bst, oa-obio_addr, oa-obio_size, 0,
+	sc-sc_bsh);
+	if (error) {
+		aprint_error_dev(self,
+		can't map registers: %d\n, error);
+		return;
+	}
+
+	bus_space_subregion(sc-sc_bst, sc-sc_bsh, OMAP3_SDMMC_SDHC_OFFSET,
+	OMAP3_SDMMC_SDHC_SIZE, sc-sc_sdhc_bsh);
+
+	aprint_naive(: SDHC controller\n);
+	aprint_normal(: SDHC controller\n);
+
+	sc-sc_ih = intr_establish(oa-obio_intr, IPL_VM, IST_LEVEL, 
+	sdhc_intr, sc-sc);
+	if (sc-sc_ih == NULL) {
+		aprint_error_dev(self, failed to establish interrupt %d\n,
+		 oa-obio_intr);
+		goto fail;
+	}
+	aprint_normal_dev(self, interrupting on irq %d\n,
+	 oa-obio_intr);
+
+	error = sdhc_host_found(sc-sc, sc-sc_bst, sc-sc_sdhc_bsh,
+	oa-obio_size - OMAP3_SDMMC_SDHC_OFFSET);
+	if (error != 0) {
+		aprint_error_dev(self, couldn't initialize host, error=%d\n,
+		error);
+		goto fail;
+	}
+	

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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:08:48 UTC 2012

Modified Files:
src/sys/arch/arm/omap: files.omap2

Log Message:
Add omap3 ehci and sdhc attachments


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/omap/files.omap2

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/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.9 src/sys/arch/arm/omap/files.omap2:1.10
--- src/sys/arch/arm/omap/files.omap2:1.9	Wed Jun  6 20:21:45 2012
+++ src/sys/arch/arm/omap/files.omap2	Thu Jul 12 03:08:48 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.9 2012/06/06 20:21:45 skrll Exp $
+#	$NetBSD: files.omap2,v 1.10 2012/07/12 03:08:48 matt Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -79,6 +79,10 @@ device	gpmc { [addr=-1], [size=0], [intr
 attach	gpmc at mainbus
 file	arch/arm/omap/omap2_gpmc.c		gpmc
 
+# SDMMC controller
+attach	sdhc at obio with obiosdhc
+file	arch/arm/omap/omap3_sdhc.c		obiosdhc
+
 # NAND flash controller
 device	omapnand: nandbus
 attach	omapnand at gpmc
@@ -94,6 +98,9 @@ file	arch/arm/omap/omap2_prcm.c		prcm ne
 attach	ohci at obio with obioohci
 file	arch/arm/omap/obio_ohci.c		obioohci
 
+attach	ehci at obio with obioehci
+file	arch/arm/omap/omap3_ehci.c		obioehci
+
 device	omapfb: rasops16, rasops8, wsemuldisplaydev, vcons
 attach	omapfb at obio
 file	arch/arm/omap/omapfb.c			omapfb



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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:28:45 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap2_reg.h

Log Message:
Add EHCI/OHCI base addresses for 3530/4430


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/omap/omap2_reg.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/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.3 src/sys/arch/arm/omap/omap2_reg.h:1.4
--- src/sys/arch/arm/omap/omap2_reg.h:1.3	Sat Aug 28 13:02:32 2010
+++ src/sys/arch/arm/omap/omap2_reg.h	Thu Jul 12 03:28:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.3 2010/08/28 13:02:32 ahoka Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.4 2012/07/12 03:28:45 matt Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -532,4 +532,15 @@
 #define GPIO_CLEARDATAOUT		0x090
 #define GPIO_SETDATAOUT			0x094
 
+/*
+ * USB Host
+ */
+#define	OHCI1_BASE_3530			0x48064400
+#deifne	EHCI1_BASE_3530			0x48064800
+
+#define	OHCI1_BASE_4430			OHCI1_BASE_3530
+#deifne	EHCI1_BASE_4430			EHCI1_BASE_3530
+
+#define	OHCI2_BASE_4430			0x4A0A9000
+
 #endif	/* _ARM_OMAP_OMAP2_REG_H_ */



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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:30:29 UTC 2012

Modified Files:
src/sys/arch/arm/omap: files.omap2

Log Message:
Add OMAP_4430 and OMAP4


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/omap/files.omap2

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/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.10 src/sys/arch/arm/omap/files.omap2:1.11
--- src/sys/arch/arm/omap/files.omap2:1.10	Thu Jul 12 03:08:48 2012
+++ src/sys/arch/arm/omap/files.omap2	Thu Jul 12 03:30:29 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.10 2012/07/12 03:08:48 matt Exp $
+#	$NetBSD: files.omap2,v 1.11 2012/07/12 03:30:29 matt Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -14,9 +14,11 @@ defparam opt_omap.hMEMSIZE
 defparam opt_omap.hOMAP_EMIFF_PBASE OMAP_EMIFF_SIZE
 defflag opt_omap.hOMAP2
 defflag opt_omap.hOMAP3: OMAP2
+defflag opt_omap.hOMAP4: OMAP3
 defflag	opt_omap.hOMAP_2430: OMAP2
 defflag opt_omap.hOMAP_2420: OMAP2
 defflag opt_omap.hOMAP_3530: OMAP3
+defflag opt_omap.hOMAP_4430: OMAP4
 
 # OBIO just an attach point
 device	obio { [addr=-1], [size=0], [intr=-1], [mult=1], [intrbase=-1], [nobyteacc=0]



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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:38:25 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap2_reg.h

Log Message:
typo fix


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/omap2_reg.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/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.4 src/sys/arch/arm/omap/omap2_reg.h:1.5
--- src/sys/arch/arm/omap/omap2_reg.h:1.4	Thu Jul 12 03:28:45 2012
+++ src/sys/arch/arm/omap/omap2_reg.h	Thu Jul 12 03:38:25 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.4 2012/07/12 03:28:45 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.5 2012/07/12 03:38:25 matt Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -536,10 +536,10 @@
  * USB Host
  */
 #define	OHCI1_BASE_3530			0x48064400
-#deifne	EHCI1_BASE_3530			0x48064800
+#define	EHCI1_BASE_3530			0x48064800
 
 #define	OHCI1_BASE_4430			OHCI1_BASE_3530
-#deifne	EHCI1_BASE_4430			EHCI1_BASE_3530
+#define	EHCI1_BASE_4430			EHCI1_BASE_3530
 
 #define	OHCI2_BASE_4430			0x4A0A9000
 



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

2012-07-11 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jul 12 03:38:50 UTC 2012

Added Files:
src/sys/arch/arm/omap: omap3_ehci.c

Log Message:
First pass at an EHCI attachment.  It does compile.  Untested.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/omap3_ehci.c

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

Added files:

Index: src/sys/arch/arm/omap/omap3_ehci.c
diff -u /dev/null src/sys/arch/arm/omap/omap3_ehci.c:1.1
--- /dev/null	Thu Jul 12 03:38:50 2012
+++ src/sys/arch/arm/omap/omap3_ehci.c	Thu Jul 12 03:38:50 2012
@@ -0,0 +1,319 @@
+/*	$Id: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $	*/
+
+/* adapted from: */
+/*	$NetBSD: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $	*/
+/*	$OpenBSD: pxa2x0_ehci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
+
+/*
+ * Copyright (c) 2005 David Gwynne d...@openbsd.org
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include opt_omap.h
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/kernel.h
+#include sys/intr.h
+#include sys/bus.h
+#include sys/device.h
+#include sys/kernel.h
+
+#include dev/usb/usb.h
+#include dev/usb/usbdi.h
+#include dev/usb/usbdivar.h
+#include dev/usb/usb_mem.h
+
+#include dev/usb/ehcireg.h
+#include dev/usb/ehcivar.h
+
+#include arm/omap/omap2_reg.h
+#include arm/omap/omap2_obiovar.h
+#include arm/omap/omap2_obioreg.h
+
+#include locators.h
+
+struct obioehci_softc {
+	ehci_softc_t	sc;
+
+	void		*sc_ih;
+	bus_addr_t	sc_addr;
+	bus_size_t	sc_size;
+	void		*sc_powerhook;
+};
+
+static int	obioehci_match(struct device *, struct cfdata *, void *);
+static void	obioehci_attach(struct device *, struct device *, void *);
+static int	obioehci_detach(struct device *, int);
+void *		obioehci_fake_intr_establish(int (*)(void *), void *);
+void		obioehci_fake_intr(void);
+
+CFATTACH_DECL_NEW(obioehci, sizeof(struct obioehci_softc),
+obioehci_match, obioehci_attach, obioehci_detach, ehci_activate);
+
+static void	obioehci_clkinit(struct obio_attach_args *);
+static void	obioehci_power(int, void *);
+static void	obioehci_enable(struct obioehci_softc *);
+static void	obioehci_disable(struct obioehci_softc *);
+
+#define	HREAD4(sc,r)	bus_space_read_4((sc)-sc.iot, (sc)-sc.ioh, (r))
+#define	HWRITE4(sc,r,v)	bus_space_write_4((sc)-sc.iot, (sc)-sc.ioh, (r), (v))
+
+static int
+obioehci_match(device_t parent, cfdata_t cf, void *aux)
+{
+
+	struct obio_attach_args *obio = aux;
+
+	if (obio-obio_addr == OBIOCF_ADDR_DEFAULT
+	|| obio-obio_size == OBIOCF_SIZE_DEFAULT
+	|| obio-obio_intr == OBIOCF_INTR_DEFAULT)
+		panic(obioehci must have addr, size and intr
+			 specified in config.);
+
+#ifdef OMAP_3530
+#endif
+
+#ifdef OMAP_4430
+#endif
+
+	obioehci_clkinit(obio);
+
+	return 0;	/* XXX */
+}
+
+static void
+obioehci_attach(device_t parent, device_t self, void *aux)
+{
+	struct obioehci_softc *sc = device_private(self);
+	struct obio_attach_args *obio = aux;
+	usbd_status r;
+
+	sc-sc.sc_size = 0;
+	sc-sc_ih = NULL;
+	sc-sc.sc_bus.dmatag = 0;
+
+	/* Map I/O space */
+	if (bus_space_map(obio-obio_iot, obio-obio_addr, obio-obio_size, 0,
+	sc-sc.ioh)) {
+		aprint_error(: couldn't map memory space\n);
+		return;
+	}
+	sc-sc.iot = obio-obio_iot;
+	sc-sc_addr = obio-obio_addr;
+	sc-sc.sc_dev = self;
+	sc-sc.sc_size = obio-obio_size;
+	sc-sc.sc_bus.dmatag = obio-obio_dmat;
+	sc-sc.sc_bus.usbrev = USBREV_2_0;
+	sc-sc.sc_bus.hci_private = sc;
+	sc-sc.sc_ncomp = 0;
+
+	/* XXX copied from ehci_pci.c. needed? */
+	bus_space_barrier(sc-sc.iot, sc-sc.ioh, 0, sc-sc.sc_size,
+	BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE);
+
+	/* start the usb clock */
+#ifdef NOTYET
+	pxa2x0_clkman_config(CKEN_USBHC, 1);
+#endif
+	obioehci_enable(sc);
+
+	/* offs is needed for EOWRITEx */
+	sc-sc.sc_offs = EREAD1(sc-sc, EHCI_CAPLENGTH);
+
+	/* Disable interrupts, so we don't get any spurious ones. */
+	EOWRITE2(sc-sc, EHCI_USBINTR, 0);
+
+#if 1
+	sc-sc_ih = intr_establish(obio-obio_intr, IPL_USB, IST_LEVEL,
+		ehci_intr, sc-sc);
+	if (sc-sc_ih == NULL) {
+		aprint_error(: unable to establish interrupt\n);
+		goto free_map;
+	}
+#else
+	sc-sc_ih =