| Age | Commit message (Collapse) | Author |
|
Changes:
- Fixed incorrect register write for TXFIFO invalidation (FSPI_IPRXFCR → FSPI_IPTXFCR).
- Corrected error message for TXFIFO wait timeout (FSPI_INTR_IPRXWA → FSPI_INTR_IPTXWE).
- Corrected comment for TXFIFO available (RXFIFO -> TXFIFO)
Reviewed-by: imp@FreeBSD.org
Reviewed-by: jlduran@FreeBSD.org
Pull-request: https://github.com/freebsd/freebsd-src/pull/1604
|
|
This adds read only support for the W25N series of flash parts.
Specifically starting with the W25N01GV, a 128MiB SPI NAND flash.
This doesn't currently support writing or erasing, as this requires
a NAND flash layer that we don't currently have. There are also
plenty of other commands that aren't currently supported - notably
maintaining the on-chip flash translation layer, flash wear statistics,
etc.
But read support is fine enough for now; it at least allows for
reading the boot / config / calibration flash on my ASUS IPQ4018 based
router.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D48979
|
|
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47675
|
|
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852
|
|
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43191
|
|
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
|
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
|
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
|
This is for 64Mb Micron N25Q serial NOR flash memory
Obtained from: Juniper Networks, Inc.
|
|
|
|
|
|
Sponsored by: Netflix
|
|
Sponsored by: Netflix
|
|
Try to stop and destroy the dist only if the driver has been successfully
attached. Otherwise a kernel panic will be triggered from disk_destroy.
The issue was observed on a board that missed SPI clock description in DT.
|
|
NXP FlexSPI is a complex SPI controller which provides
full offload for accessing NOR Flash.
Create a Flash driver which attaches to existing FreeBSD
infrastructure and exports generic READ and WRITE disk commands.
The Flash has to be identified first to configure controller
internals. For now, only one NOR Flash chip is supported.
Future commits shall either increase number of known chips
or implement SFDP mechanism which can be used by other Flash
drivers.
Sponsored by: Alstom
Obtained from: Semihalf
Differential revision: https://reviews.freebsd.org/D33117
|
|
This is used for the on-board flash on the HiFive Unmatched board.
Reviewed by: #riscv, jrtc27
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31562
|
|
Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*). Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys. Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight. Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*)
Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D27225
Notes:
svn path=/head/; revision=368124
|
|
Reviewed by: kp
Approved by: kp (mentor)
Sponsored by: Axiado
Notes:
svn path=/head/; revision=366366
|
|
by a peripheral device driver.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=357686
|
|
BIO_READ and BIO_WRITE, we've handled this expanded syntax poorly in
drivers when the driver doesn't support a particular command. Do a
sweep and fix that.
Reported by: imp
Notes:
svn path=/head/; revision=357647
|
|
This is a qspi driver for the Xilinx Zynq-7000 chip.
It could be useful for anyone wanting to boot a system from flash memory
instead of SD cards.
Submitted by: Thomas Skibo (thomasskibo@yahoo.com)
Differential Revision: https://reviews.freebsd.org/D14698
Notes:
svn path=/head/; revision=356895
|
|
other header.
Notes:
svn path=/head/; revision=356294
|
|
o Remove All Rights Reserved from my notices
o imp@FreeBSD.org everywhere
o regularize punctiation, eliminate date ranges
o Make sure that it's clear that I don't claim All Rights reserved by listing
All Rights Reserved on same line as other copyright holders (but not
me). Other such holders are also listed last where it's clear.
Notes:
svn path=/head/; revision=355394
|
|
Add this flash chip which is a 128Mb spi flash.
MFC after: 1 week
Notes:
svn path=/head/; revision=354086
|
|
Also rename SPIBUS_PNP_INFO -> SPIBUS_FDT_PNP_INFO because there could be
other kinds of pnpinfo for other (non-fdt) bus attachments.
Notes:
svn path=/head/; revision=348172
|
|
trying to use disk_add_alias() to make spi* an alias for mx25l*. It turns
out disk_add_alias() works for partitions, but not slices, and that's hard
to fix.
This change is, in effect, a partial revert of r344526.
The mips world relies on the existence of flashmap names formatted as
/dev/flash/spi0s.name, whereas pretty much nothing relies on at45d devices
using the /dev/spi* names (because until recently the at45d driver didn't
even work reliably). So this change makes mx25l devices the sole owner of
the /dev/flash/spi* namespace, which actually makes some sense because it is
a SpiFlash(tm) device, so flash/spi isn't a horrible name.
Reported by: Mori Hiroki <yamori813@yahoo.co.jp>
Notes:
svn path=/head/; revision=344981
|
|
FDT data. The sector size must be a multiple of the device's page size.
If not configured, use the historical default of the device page size.
Setting the disk sector size to 512 or 4096 allows a variety of standard
filesystems to be used on the device. Of course you wouldn't want to be
writing frequently to a SPI flash chip like it was a disk drive, but for
data that gets written once (or rarely) and read often, using a standard
filesystem is a nice convenient thing.
Notes:
svn path=/head/; revision=344734
|
|
some #define'd names to be more descriptive. When reporting a post-write
compare failure, report the page number, not the byte address of the page.
The latter is the only functional change, it makes the number match the
words of the error message.
Notes:
svn path=/head/; revision=344733
|
|
This is especially important for writes. SPI is inherently a bidirectional
bus; you receive data (even if it's garbage) while writing. We should not
receive that data into the same buffer we're writing to the device.
When reading it doesn't matter what we send to the device, but using the
dummy buffer for that as well is pleasingly symmetrical.
Notes:
svn path=/head/; revision=344728
|
|
usual location, down near the DRIVER_MODULE() stuff.
Notes:
svn path=/head/; revision=344612
|
|
Notes:
svn path=/head/; revision=344611
|
|
Notes:
svn path=/head/; revision=344606
|
|
Reported by: many
Pointy hat: ian@
Notes:
svn path=/head/; revision=344529
|
|
Both SpiFlash (mx25l) and DataFlash (at45d) drivers create a disk device
with a name of /dev/flash/spiN where N is the driver's unit number. If
both types of devices are present in the same system, this creates a fatal
conflict that prevents attachment of whichever device attaches second
(because mx25l0 and at45d0 both try to create a spi0).
This gives each type of device a unique name (mx25lN or at45dN respectively)
and also adds an alias of spiN for compatibility. When both device types
appear in the same system, only the first to attach gets the spiN alias.
When the second device attaches there is a non-fatal warning that the alias
can't be created, but both devices are still accessible via their primary
names (and there is no need for the spiN name to work for backwards
compatibility on such a system, because it has never been possible to use
the spiN names when both devices exist).
Notes:
svn path=/head/; revision=344526
|
|
jedec ID as its older cousin the AT45DB642D, but uses a different page size.
The only way to distinguish between the two chips is that the 2D chip has
0 bytes of extended ID info and the new 1E has 1 byte of extended ID. The
actual value of the extended ID byte is all zeroes. In other words, it's
the presence of the extended info that identifies this chip. (Presumably
a future upgrade might define non-zero values for the extended ID byte.)
Notes:
svn path=/head/; revision=344525
|
|
to match a chip to our table of metadata describing the chips. At least one
new DataFlash chip has a 3-byte jedec ID identical to its predecessors and
differs only in the extended info, and it has different metadata requiring a
unique entry in the table. This paves the way for supporting such chips.
The metadata table now includes two new fields, extmask and extid. The two
bytes of extended info obtained from the chip are ANDed with extmask then
compared to extid, so it's possible to use only a subset of the extended
info in the matching.
We now always read 6 bytes of jedec ID info. Most chips don't return any
extended info, and the values read back for those two bytes may be
indeterminate, but such chips have extmask and extid values of 0x0000 in the
table, so the extid effectively doesn't participate in the matching on those
chips and it doesn't matter what they return in the extended info bytes.
Notes:
svn path=/head/; revision=344523
|
|
in the delayed attach to use early returns, which allows reducing the level
of indentation. So all in all, what looks like a lot of changes is really
no change in behavior, mostly just moving whitespace around.
Notes:
svn path=/head/; revision=344507
|
|
Notes:
svn path=/head/; revision=344506
|
|
Notes:
svn path=/head/; revision=344505
|
|
Remove the all rights reserved clause from my copyright, and make
other minor tweaks needed where that might have created ambiguity.
Notes:
svn path=/head/; revision=343811
|
|
that both of these drivers can exist in the same kernel.
Notes:
svn path=/head/; revision=336869
|
|
Reported by: O. Hartmann <ohartmann@walstatt.org>
Notes:
svn path=/head/; revision=335170
|
|
Notes:
svn path=/head/; revision=335159
|
|
This is a 16Mbits spi flash arranged in 32x64k blocks or 512x4k
sectors.
Notes:
svn path=/head/; revision=333706
|
|
Intel® Arria® 10 SoC.
Cadence Quad SPI Flash is not generic SPI controller, but SPI flash
controller, so don't use spibus here, instead provide quad spi flash
interface.
Since it is not on spibus, then mx25l flash device driver is not usable
here, so provide new n25q flash device driver with quad spi flash
interface.
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10245
Notes:
svn path=/head/; revision=332885
|
|
about the chip including the erase block size at attach time.
Also add myself to the copyrights since at this point svn blame would point
to me as the culprit for much of this.
Notes:
svn path=/head/; revision=331141
|
|
have these flags set in the ident table, but there was no code to support
using the smaller erase sizes.
Notes:
svn path=/head/; revision=331139
|
|
status at all call points. Combine the get_status and wait_for_ready
routines, since waiting for ready is the only reason to ever get status.
Notes:
svn path=/head/; revision=331138
|