svn commit: r249072 - in head/sys: conf dev/cfi

Brooks Davis brooks at FreeBSD.org
Wed Apr 3 22:37:42 UTC 2013


Author: brooks
Date: Wed Apr  3 22:37:40 2013
New Revision: 249072
URL: http://svnweb.freebsd.org/changeset/base/249072

Log:
  MFP4 change 217313 and part of 222068:
  
  Add a simple nexus attachment for cfi(4).

Added:
  head/sys/dev/cfi/cfi_bus_nexus.c
     - copied, changed from r249062, head/sys/dev/cfi/cfi_bus_ixp4xx.c
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Wed Apr  3 22:24:36 2013	(r249071)
+++ head/sys/conf/files	Wed Apr  3 22:37:40 2013	(r249072)
@@ -1051,6 +1051,7 @@ dev/cardbus/cardbus.c		optional cardbus
 dev/cardbus/cardbus_cis.c	optional cardbus
 dev/cardbus/cardbus_device.c	optional cardbus
 dev/cas/if_cas.c		optional cas
+dev/cfi/cfi_bus_nexus.c		optional cfi
 dev/cfi/cfi_core.c		optional cfi
 dev/cfi/cfi_dev.c		optional cfi
 dev/cfi/cfi_disk.c		optional cfid

Copied and modified: head/sys/dev/cfi/cfi_bus_nexus.c (from r249062, head/sys/dev/cfi/cfi_bus_ixp4xx.c)
==============================================================================
--- head/sys/dev/cfi/cfi_bus_ixp4xx.c	Wed Apr  3 18:30:09 2013	(r249062, copy source)
+++ head/sys/dev/cfi/cfi_bus_nexus.c	Wed Apr  3 22:37:40 2013	(r249072)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2012 SRI International
  * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc.
  * Copyright (c) 2009 Sam Leffler, Errno Consulting
  * All rights reserved.
@@ -41,40 +42,25 @@ __FBSDID("$FreeBSD$");
 
 #include <dev/cfi/cfi_var.h>
 
-#include <arm/xscale/ixp425/ixp425reg.h>
-#include <arm/xscale/ixp425/ixp425var.h>
-
 static int
-cfi_ixp4xx_probe(device_t dev)
+cfi_nexus_probe(device_t dev)
 {
-	struct cfi_softc *sc = device_get_softc(dev);
-	/*
-	 * NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET
-	 * according to the flash on the board.  If it does not then it
-	 * can be done here.
-	 */
-	if (bootverbose) {
-		struct ixp425_softc *sa =
-		    device_get_softc(device_get_parent(dev));
-		device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n",
-		    EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET));
-	}
-	sc->sc_width = 2;		/* NB: don't probe interface width */
+
 	return cfi_probe(dev);
 }
 
-static device_method_t cfi_ixp4xx_methods[] = {
+static device_method_t cfi_nexus_methods[] = {
 	/* device interface */
-	DEVMETHOD(device_probe,		cfi_ixp4xx_probe),
+	DEVMETHOD(device_probe,		cfi_nexus_probe),
 	DEVMETHOD(device_attach,	cfi_attach),
 	DEVMETHOD(device_detach,	cfi_detach),
 
-	DEVMETHOD_END
+	{0, 0}
 };
 
-static driver_t cfi_ixp4xx_driver = {
+static driver_t cfi_nexus_driver = {
 	cfi_driver_name,
-	cfi_ixp4xx_methods,
+	cfi_nexus_methods,
 	sizeof(struct cfi_softc),
 };
-DRIVER_MODULE(cfi, ixp, cfi_ixp4xx_driver, cfi_devclass, 0, 0);
+DRIVER_MODULE(cfi, nexus, cfi_nexus_driver, cfi_devclass, 0, 0);


More information about the svn-src-all mailing list