Date: Fri, 6 Oct 2006 23:35:10 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107382 for review Message-ID: <200610062335.k96NZACN069996@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107382 Change 107382 by imp@imp_lighthouse on 2006/10/06 23:34:16 boilerplate for at45D* support, start a bit of a rename Affected files ... .. //depot/projects/arm/src/sys/arm/conf/TSC4370.hints#2 edit .. //depot/projects/arm/src/sys/dev/flash/at45.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/arm/conf/TSC4370.hints#2 (text+ko) ==== @@ -1,2 +1,5 @@ -hint.at45.0.at="spibus0" -hint.at45.0.cs=0 +# $FreeBSD$ +# $TSC$ +hint.at45d.0.at="spibus0" +hint.at45d.0.cs=0 + ==== //depot/projects/arm/src/sys/dev/flash/at45.c#3 (text+ko) ==== @@ -25,6 +25,23 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/conf.h> +#include <sys/gpio.h> +#include <sys/kernel.h> +#include <sys/lock.h> +#include <sys/mbuf.h> +#include <sys/malloc.h> +#include <sys/module.h> +#include <sys/mutex.h> + +struct at45d_softc +{ + int dummy; +}; + #define CONTINUOUS_ARRAY_READ 0xE8 #define CONTINUOUS_ARRAY_READ_HF 0x0B #define CONTINUOUS_ARRAY_READ_LF 0x03 @@ -215,3 +232,42 @@ WaitForDeviceReady(); } #endif + + +static int +at45d_probe(device_t dev) +{ + device_set_desc(dev, "AT45 Flash Family"); + return (0); +} + +static int +at45d_attach(device_t dev) +{ + return (0); +} + +static int +at45d_detach(device_t dev) +{ + return EIO; +} + +static devclass_t at45d_devclass; + +static device_method_t at45d_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, at45d_probe), + DEVMETHOD(device_attach, at45d_attach), + DEVMETHOD(device_detach, at45d_detach), + + { 0, 0 } +}; + +static driver_t at45d_driver = { + "at45d", + at45d_methods, + sizeof(struct at45d_softc), +}; + +DRIVER_MODULE(at45d, spibus, at45_driver, at45_devclass, 0, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610062335.k96NZACN069996>