From owner-p4-projects@FreeBSD.ORG Mon Dec 31 00:15:37 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E231E624; Mon, 31 Dec 2012 00:15:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2F2A622 for ; Mon, 31 Dec 2012 00:15:36 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 853248FC08 for ; Mon, 31 Dec 2012 00:15:36 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.5/8.14.5) with ESMTP id qBV0Fahb017672 for ; Mon, 31 Dec 2012 00:15:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qBV0Fai9017669 for perforce@freebsd.org; Mon, 31 Dec 2012 00:15:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 31 Dec 2012 00:15:36 GMT Message-Id: <201212310015.qBV0Fai9017669@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 219930 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 00:15:37 -0000 http://p4web.freebsd.org/@@219930?ac=10 Change 219930 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2012/12/31 00:15:14 Add an Intel StrataFlash (isf) driver FDT attachment, and switch to using that attachment with the FDT version of the FreeBSD/BERI kernel. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#6 edit .. //depot/projects/ctsrd/beribsd/src/sys/conf/files#11 edit .. //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_fdt.c#2 edit .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_FDT_DE4.hints#4 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#6 (text+ko) ==== @@ -103,6 +103,7 @@ 0x70000000 0x177000 0x70177000 0x2000>; }; +*/ flash@0x74000000 { compatible = "intel,strataflash"; @@ -113,6 +114,5 @@ compatible = "intel,strataflash"; reg = <0x76000000 0x2000000>; }; -*/ }; }; ==== //depot/projects/ctsrd/beribsd/src/sys/conf/files#11 (text+ko) ==== @@ -1393,6 +1393,7 @@ dev/iscsi/initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi/initiator/isc_subr.c optional iscsi_initiator scbus dev/isf/isf.c optional isf +dev/isf/isf_fdt.c optional isf fdt dev/isf/isf_nexus.c optional isf dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp ==== //depot/projects/ctsrd/beribsd/src/sys/dev/isf/isf_fdt.c#2 (text+ko) ==== @@ -51,23 +51,29 @@ #include +#include +#include +#include +#include + #include /* - * Nexus bus attachment for the Intel Strata Flash devices. Appropriate for - * most Altera FPGA SoC-style configurations in which the part will be exposed - * to the processor via a memory-mapped Avalon bus. + * FDT bus attachment for the Intel Strata Flash devices. */ static int -isf_nexus_probe(device_t dev) +isf_fdt_probe(device_t dev) { - device_set_desc(dev, "Intel StrataFlash NOR flash device"); - return (BUS_PROBE_DEFAULT); + if (ofw_bus_is_compatible(dev, "intel,strataflash")) { + device_set_desc(dev, "Intel StrataFlash NOR flash device"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); } static int -isf_nexus_attach(device_t dev) +isf_fdt_attach(device_t dev) { int error; struct isf_softc *sc; @@ -90,7 +96,7 @@ } static int -isf_nexus_detach(device_t dev) +isf_fdt_detach(device_t dev) { struct isf_softc *sc; @@ -102,19 +108,19 @@ return (0); } -static device_method_t isf_nexus_methods[] = { - DEVMETHOD(device_probe, isf_nexus_probe), - DEVMETHOD(device_attach, isf_nexus_attach), - DEVMETHOD(device_detach, isf_nexus_detach), +static device_method_t isf_fdt_methods[] = { + DEVMETHOD(device_probe, isf_fdt_probe), + DEVMETHOD(device_attach, isf_fdt_attach), + DEVMETHOD(device_detach, isf_fdt_detach), { 0, 0 } }; -static driver_t isf_nexus_driver = { +static driver_t isf_fdt_driver = { "isf", - isf_nexus_methods, + isf_fdt_methods, sizeof(struct isf_softc), }; static devclass_t isf_devclass; -DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0); +DRIVER_MODULE(isf, simplebus, isf_fdt_driver, isf_devclass, 0, 0); ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_FDT_DE4.hints#4 (text+ko) ==== @@ -85,12 +85,12 @@ # # General Intel StrataFlash driver # -hint.isf.0.at="nexus0" -hint.isf.0.maddr=0x74000000 -hint.isf.0.msize=0x2000000 -hint.isf.1.at="nexus0" -hint.isf.1.maddr=0x76000000 -hint.isf.1.msize=0x2000000 +#hint.isf.0.at="nexus0" +#hint.isf.0.maddr=0x74000000 +#hint.isf.0.msize=0x2000000 +#hint.isf.1.at="nexus0" +#hint.isf.1.maddr=0x76000000 +#hint.isf.1.msize=0x2000000 # Reserved configuration blocks. Don't touch. hint.map.0.at="isf0"