aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/flash
Commit message (Collapse)AuthorAgeFilesLines
* MFC r242625:Dimitry Andric2012-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove duplicate const specifiers in many drivers (I hope I got all of them, please let me know if not). Most of these are of the form: static const struct bzzt_type { [...list of members...] } const bzzt_devs[] = { [...list of initializers...] }; The second const is unnecessary, as arrays cannot be modified anyway, and if the elements are const, the whole thing is const automatically (e.g. it is placed in .rodata). I have verified this does not change the binary output of a full kernel build (except for build timestamps embedded in the object files). Reviewed by: yongari, marius Notes: svn path=/stable/9/; revision=242908
* MFC: r236496Marius Strobl2012-06-211-96/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Loop up to 3 seconds when waiting for a device to get ready. [1] - Make the device description match the driver name. - Identify the chip variant based on the JEDEC and use that information to use the proper values for page count, offset and size instead of hardcoding a AT45DB642x with 2^N byte page support disabled. - Take advantage of bioq_takefirst(). - Given that CONTINUOUS_ARRAY_READ_HF (0x0b) command isn't even mentioned in Atmel's DataFlash Application Note, as suggested by the previous comment may not work on all all devices and actually doesn't properly on at least AT45DB321D (JEDEC 0x1f2701), rewrite at45d_task() to use CONTINUOUS_ARRAY_READ (0xe8) for reading instead. This rewrite is laid out in a way allowing to easily add support for BIO_DELETE later on. - Add support for reads and writes not starting on a page boundary. - Verify the flash content after writing. - Let at45d_task() gracefully handle errors on SPI transfers and the device not becoming ready afterwards again. [1] - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1] Additional testing by: Ian Lepore Submitted by: Ian Lepore [1] Notes: svn path=/stable/9/; revision=237384
* Modify the spi flash driver to allow smaller read IO sizes, but enforceAdrian Chadd2011-02-161-17/+18
| | | | | | | | | | | | | | | the larger, aligned write+erase sizes the driver currently implements. This preserves write behaviour but makes the flash driver usable for things like a read-only FFS or a geom_uzip/geom_compress . Note that since GEOM will now return the sector size as being smaller, writes of sector size/alignment will now fail with an EIO. Code which writes to the flash device will have to be (for now) manually taught about the flash write blocksize. Notes: svn path=/head/; revision=218747
* Add support for the m25p64; lifted straight from Linux.Adrian Chadd2011-01-301-0/+1
| | | | | | | | This flash chip is found on the Ubiquiti LS-SR71 board. I've successfully tested reading; I've not tried writing to it yet. Notes: svn path=/head/; revision=218088
* Add s25sl064a, an 8mb SPI flash part.Adrian Chadd2010-08-171-0/+1
| | | | Notes: svn path=/head/; revision=211432
* Fix naming to be consistent.Adrian Chadd2010-07-191-2/+2
| | | | Notes: svn path=/head/; revision=210265
* Extend the mx25l erase function to support different erase commands.Adrian Chadd2010-07-191-3/+3
| | | | Notes: svn path=/head/; revision=210264
* Extend the mx25l flash device support to include a set of per-deviceAdrian Chadd2010-07-191-4/+11
| | | | | | | | | | flags. Some of these parts will support 4K/32K block erases rather than a sector erase. This includes (at least) the MX25L128. Notes: svn path=/head/; revision=210262
* Include 4k/32k erase commands.Adrian Chadd2010-07-191-0/+4
| | | | | | | | | | These were sourced from the MX25L128 datasheet and match up with what is used in Linux mtd/devices/m25p80.c . Add a FreeBSD keyword whilst I'm here. Notes: svn path=/head/; revision=210238
* Fix KASSERT() messages to reflect reality.Adrian Chadd2010-07-161-2/+2
| | | | Notes: svn path=/head/; revision=210156
* - Code reorg: extract mx25l_read and mx25l_write methodsOleksandr Tymoshenko2009-11-181-81/+146
| | | | | | | | - Add entry for Spansion flash controller Submitted by: Eric L. Chen <lihong@ieee.org> Notes: svn path=/projects/mips/; revision=199494
* - Add write support for mx25l flash chipOleksandr Tymoshenko2009-10-252-1/+104
| | | | | | | - Some minor style(9) fixes Notes: svn path=/projects/mips/; revision=198465
* o Move the driveid.h fileWarner Losh2009-06-141-259/+0
| | | | | | | | | | o lots of tweaks to header paths. o comment out SMP for the moment # we now make it through the .c make depend, the .s needs more work. Notes: svn path=/projects/mips/; revision=194155
* Part of the cf driver missed.Warner Losh2009-06-141-0/+259
| | | | Notes: svn path=/projects/mips/; revision=194154
* Move dev/flash/ cf driver into octeon dir where it belongs.Warner Losh2009-06-142-654/+0
| | | | Notes: svn path=/projects/mips/; revision=194150
* Merge in Cavium's CF driver. This too is in the wrong place and willWarner Losh2009-06-142-0/+654
| | | | | | | be moved. Notes: svn path=/projects/mips/; revision=194149
* Merge from HEADOleksandr Tymoshenko2009-05-261-1/+0
|\ | | | | | | Notes: svn path=/projects/mips/; revision=192819
| * - Remove nonexistent header file from includes listOleksandr Tymoshenko2009-05-131-1/+0
| | | | | | | | Notes: svn path=/head/; revision=192058
* | - Add support for MX25Lxxx SPI flash (readonly atm)Oleksandr Tymoshenko2009-05-182-0/+369
|/ | | | Notes: svn path=/projects/mips/; revision=192355
* Rename the kthread_xxx (e.g. kthread_create()) callsJulian Elischer2007-10-201-1/+1
| | | | | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls. Notes: svn path=/head/; revision=172836
* MFp4:Warner Losh2006-11-291-0/+284
Preliminary support for Atmel AT45D series of DataFlash on the SPI bus (ok, not really a hardware bus, but a logical connection). This works only for the 8MB version of the part due to hard coding. Both read and write are supported. Notes: svn path=/head/; revision=164742