Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2012 08:20:57 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 211312 for review
Message-ID:  <201205180820.q4I8KvRH011627@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@211312?ac=10

Change 211312 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/05/18 08:19:58

	Checkpoint initial version of the avgen(4) driver -- a generic
	device driver that can be attached to memory-mapped devices on the
	Avalon bus, exporting them to userspace for I/O via traditional
	read(2)/write(2), or for memory mapping via mmap(4).
	
	device.hints(5) entries specify the location and size of the
	mapping, which must be both page-aligned and an even multiple of
	page size.  An initial entry is installed for the DE4 flash device
	so that we can directly program the flash from userspace, via
	/dev/de4flash.  
	
	Refinement (and fixing) of this driver will likely be required
	before it can be used.
	
	There is some argument that this should really be named socgen,
	or similar, because it likely will work unmodified with other
	System-on-Chip buses such as AXI, as well.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.c#1 add
.. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.h#1 add
.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#13 edit
.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/std.beri#2 edit
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI.hints#11 edit
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_MDROOT#9 edit
.. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SDROOT#9 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#13 (text+ko) ====

@@ -1,4 +1,5 @@
 # $FreeBSD$
+dev/altera/avgen/altera_avgen.c		optional altera_avgen
 dev/altera/jtag_uart/altera_jtag_uart.c		optional altera_jtag_uart
 dev/altera/sdcard/altera_sdcard.c	optional altera_sdcard
 dev/altera/sdcard/altera_sdcard_disk.c	optional altera_sdcard

==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/std.beri#2 (text+ko) ====


==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI.hints#11 (text+ko) ====

@@ -31,3 +31,14 @@
 hint.terasic_mtl.0.pixel_msize=0x177000
 hint.terasic_mtl.0.text_maddr=0x70177000
 hint.terasic_mtl.0.text_msize=0x2000
+
+#
+# Expose the DE4 flash via an Avalon "generic" device.
+#
+hint.altera_avgen.0.at="nexus0"
+hint.altera_avgen.0.maddr=0x74000000
+hint.altera_avgen.0.msize=0x4000000
+hint.altera_avgen.0.width=2
+hint.altera_avgen.0.fileio="rw"
+hint.altera_avgen.0.memio="rwx"
+hint.altera_avgen.0.devname="de4flash"

==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_MDROOT#9 (text+ko) ====

@@ -54,6 +54,7 @@
 makeoptions	MFS_IMAGE=/local/scratch/rnw24/mdroot.img
 options 	ROOTDEVNAME=\"ufs:md0\"
 
+device		altera_avgen
 device		altera_jtag_uart
 device		altera_sdcard
 device		terasic_de4led

==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SDROOT#9 (text+ko) ====

@@ -46,6 +46,7 @@
 
 options 	ROOTDEVNAME=\"ufs:altera_sdcard0\"
 
+device		altera_avgen
 device		altera_jtag_uart
 device		altera_sdcard
 device		terasic_de4led



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205180820.q4I8KvRH011627>