Commit Graph

12 Commits

Author SHA1 Message Date
Warner Losh
f3a36f8193 Move from using devclass_find_free_unit(cfi_diskclass, 0) to -1, since
they have the same basic behavior.
2009-06-10 17:41:24 +00:00
Sam Leffler
7bed4560f3 choose the size of the last region for d_stripsize instead of the first;
this fixes geom_redboot on boards that have multiple parts/regions as it
uses the value to locate the FIS directory which is in the last erase
region of flash
2009-03-10 22:29:42 +00:00
Sam Leffler
f2c6781bfd Add cfid, a disk interface to CFI flash devices; this enables construction
of flash-based filesystems.

Note this is not interlocked against the raw CFI device.
2009-03-09 23:16:02 +00:00
Sam Leffler
30b00c24b0 fix whitespace 2009-02-17 23:43:17 +00:00
Sam Leffler
26b3568c2f fix typo
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2009-02-08 20:29:37 +00:00
Sam Leffler
9313bae41d fix building w/o CFI_ARMEDANDDANGEROUS 2009-02-07 05:32:19 +00:00
Sam Leffler
bd8c9fc04d expand CFI_ARMEDANDDANGEROUS to include writing the user segment
of the PR; this register is actually write-once so deserves the
safety-belt as much as the PLR
2009-02-07 05:03:25 +00:00
Sam Leffler
63425a7f25 Add support for frobbing Intel StrataFlash Protection Registers:
o add CFI_SUPPORT_STRATAFLASH compile option to enable support
o add new ioctls to get/set the factory and user/oem segments of the PR
  and to get/set Protection Lock Register that fuses the user segment
o add #defines for bits in the status register
o update cfi_wait_ready to take an offset so it can be used to wait for
  PR write completion and replace constants w/ symbolic names

Note: writing the user segment isn't correct; committing now to get review.

Sponsored by:	Carlson Wireless
Reviewed by:	imp, Chris Anderson
2009-02-05 18:12:07 +00:00
Sam Leffler
8313510315 add Roel's copyright as he did the initial version 2009-02-03 19:21:15 +00:00
Sam Leffler
e73090b5d3 honor any interface width (e.g. setup by the bus shim) and don't probe;
this is needed for the moment to workaround bus shim issues
2009-02-03 19:09:16 +00:00
Sam Leffler
3a114d1f92 reorg ioctl code to simplify adding new requests 2009-02-03 19:07:41 +00:00
Marcel Moolenaar
e00251b7ed Add a driver for flash memory that implements to the Common Flash
Memory Interface (CFI). The flash memory can be read and written
to through /dev/cfi# and an ioctl() exists so processes can read
the query information.
The driver supports the AMD and Intel command set, though only
the AMD command has been tested.

Obtained from:	Juniper Networks, Inc.
2008-10-25 06:18:12 +00:00