From owner-svn-src-head@FreeBSD.ORG Wed Apr 3 22:37:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0F4B7A03; Wed, 3 Apr 2013 22:37:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DCE153FC; Wed, 3 Apr 2013 22:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33MbfDj003624; Wed, 3 Apr 2013 22:37:41 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33MbfNw003622; Wed, 3 Apr 2013 22:37:41 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201304032237.r33MbfNw003622@svn.freebsd.org> From: Brooks Davis Date: Wed, 3 Apr 2013 22:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249072 - in head/sys: conf dev/cfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 22:37:42 -0000 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 -#include -#include - 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);