<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/fdt, branch release/11.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2019-10-03T12:47:05Z</updated>
<entry>
<title>MFC r352863: fdt_slicer: bump to SI_ORDER_THIRD following r347183</title>
<updated>2019-10-03T12:47:05Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-10-03T12:47:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fe62f5783b5af49c6516a4143a96f35bf7f13441'/>
<id>urn:sha1:fe62f5783b5af49c6516a4143a96f35bf7f13441</id>
<content type='text'>
r347183 bumped GEOM classes to SI_ORDER_SECOND to resolve a race between
them and the initialization of devsoftc.mtx in devinit, but missed this
dependency on g_flashmap that may now lose the race against GEOM
classes/g_init.

There's a great comment that describes the situation that has also been
updated with the new ordering of GEOM classes.
</content>
</entry>
<entry>
<title>MFC r335159, r344505-r344507, r344523, r344525-r344526, r344529, r344556,</title>
<updated>2019-04-22T15:04:11Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2019-04-22T15:04:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=755cea5587b1ff5f93350e2ee35a4b5a26ce0591'/>
<id>urn:sha1:755cea5587b1ff5f93350e2ee35a4b5a26ce0591</id>
<content type='text'>
r344606-r344612, r344614-r344616, r344681, r344684-r344686, r344728,
r344733-r344734, r344981

A large set of changes that collectively modernize the at45d and mx25l
(DataFlash and SpiFlash) drivers, add FDT support, and add geom_flashmap
support to them.

r335159 by manu:
mx25l: Add pnp info

r344505:
Add a functional detach() implementation to make module unloading possible.

r344506:
Add support for probing/attaching on FDT-based systems.

r344507:
Switch to using config_intrhook_oneshot().  That allows the error handling
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.

r344523:
Include the jedec "extended device information string" in the criteria used
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.

r344525:
Add a metadata entry for the AT45DB641E chip.  This chip has the same 3-byte
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.)

r344526:
Resolve a name conflict when both SpiFlash and DataFlash devices are present.

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).

r344529:
Fix a paste-o that broke the build on all arches.

r344556:
Set maximum bus clock speed from hints when attaching hinted spibus(4) children.

Some devices (such as spigen(4)) document that this works, but it appears that the
code to implement it never got added.

r344606:
Add support for geom_flashmap by providing a getattr() for "SPI:device".

r344607:
Compile fdt_slicer and geom_flashmap when the at45d device is included.

r344608:
Update a comment to reflect reality; no functional changes.

r344609:
Make it possible to load fdt_slicer as a module (unloading works too fwiw).

r344610:
Add manpages for at45d(4) and mx25l(4).

r344611:
Add a module dependency on fdt_slicer.

r344612:
Add a module dependency on fdt_slicer.  Also, move the PNP_INFO to its more
usual location, down near the DRIVER_MODULE() stuff.

r344614:
Rename some functions and variables to have shorter names, which allows
unwrapping multiple lines of code.  Also, convert some short multiline
comments into single-line comments.  Change old-school FALSE to false.

All in all, no functional changes, it's just more compact and readable.

r344615:
Child nodes with a compatible property are not slices, according to the
devicetree/bindings/mtd/partitions.txt document, so just ignore them.

r344616:
Add support to fdt_slicer for the new style partition data documented in
devicetree/bindings/mtd/partition.txt.

In the old style, all the children of the device node which did not have a
compatible property were the partitions.  In the new style, there is a child
node of the device which has a compatible string of "fixed-partitions", and
its children are the individual partitions.

Also, support the read-only property by setting the corresponding slice flag.

r344681:
Build fdt support modules on systems that use fdt data.

kern.opts.mk sets make var OPT_FDT to a non-empty value if platform.h
contains OPT_FDT.

r344684:
Undo accidental part of r344681.

I think I must have accidentally mouse-click pasted while scrolling and
didn't notice it.

r344685:
Add required header file to SRCS.

r344686:
Add another required header file.

For some reason this seems to be required on aarch64, but I can build armv7
from clean without needing this in the list.  (The file does get included,
so the mystery is why armv7 works.)

r344728:
Bugfix: use a dummy buffer for the inactive side of a transfer.

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.

r344733:
Add some comments.  Give #define'd names to some scattered numbers.  Change
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.

r344734:
Allow the sector size of the disk device to be configured using hints or
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.

r344981:
Give the mx25l device sole ownership of the name /dev/flash/spi* instead of
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.
</content>
</entry>
<entry>
<title>MFC r308533 by andrew:</title>
<updated>2018-04-02T20:54:33Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2018-04-02T20:54:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=134c55cbdef7494e4248e6b54e59f75f5528ccdf'/>
<id>urn:sha1:134c55cbdef7494e4248e6b54e59f75f5528ccdf</id>
<content type='text'>
Use ofw_bus_node_is_compatible in more drivers used on arm.

Sponsored by:	ABT Systems Ltd
</content>
</entry>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC: r314097</title>
<updated>2017-05-10T21:42:12Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2017-05-10T21:42:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=43388a73999b9669dbecd54ada1439e89f225498'/>
<id>urn:sha1:43388a73999b9669dbecd54ada1439e89f225498</id>
<content type='text'>
- Allow different slicers for different flash types to be registered
  with geom_flashmap(4) and teach it about MMC for slicing enhanced
  user data area partitions. The FDT slicer still is the default for
  CFI, NAND and SPI flash on FDT-enabled platforms.
- In addition to a device_t, also pass the name of the GEOM provider
  in question to the slicers as a single device may provide more than
  one provider.
- Build a geom_flashmap.ko.
- Use MODULE_VERSION() so other modules can depend on geom_flashmap(4).
- Remove redundant/superfluous GEOM routines that either do nothing
  or provide/just call default GEOM (slice) functionality.
- Trim/adjust includes
</content>
</entry>
<entry>
<title>MFC r304459,r305527:</title>
<updated>2016-11-05T10:23:02Z</updated>
<author>
<name>Michal Meloun</name>
<email>mmel@FreeBSD.org</email>
</author>
<published>2016-11-05T10:23:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=378123720df7b4d2b4c7668b2690fc23a8973d35'/>
<id>urn:sha1:378123720df7b4d2b4c7668b2690fc23a8973d35</id>
<content type='text'>
  r304459:
    INTRNG: Rework handling with resources. Partially revert r301453.
     - Read interrupt properties at bus enumeration time and store
       it into global mapping table.
     - At bus_activate_resource() time, given mapping entry is resolved and
       connected to real interrupt source. A copy of mapping entry is attached
       to given resource.
     - At bus_setup_intr() time, mapping entry stored in resource is used
       for delivery of requested interrupt configuration.
     - For MSI/MSIX interrupts, mapping entry is created within
       pci_alloc_msi()/pci_alloc_msix() call.
     - For legacy PCI interrupts, mapping entry must be created within
       pcib_route_interrupt() by pcib driver itself.
  r305527:
    Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459
</content>
</entry>
<entry>
<title>INTRNG - change the way how an interrupt mapping data are provided</title>
<updated>2016-06-05T16:20:12Z</updated>
<author>
<name>Svatopluk Kraus</name>
<email>skra@FreeBSD.org</email>
</author>
<published>2016-06-05T16:20:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ad5244ece1eb60357d5fefa1b17632a25fcd116e'/>
<id>urn:sha1:ad5244ece1eb60357d5fefa1b17632a25fcd116e</id>
<content type='text'>
to the framework in OFW (FDT) case.

This is a follow-up to r301451.

Differential Revision:	https://reviews.freebsd.org/D6634
</content>
</entry>
<entry>
<title>Add OF_prop_free function as a counterpart for OF_*prop_alloc</title>
<updated>2016-05-11T18:20:02Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2016-05-11T18:20:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=bc90a48ccf2a906024256a42463b47dd99631796'/>
<id>urn:sha1:bc90a48ccf2a906024256a42463b47dd99631796</id>
<content type='text'>
- Introduce new OF API function OF_prop_free to free memory allocated by
  OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9)
  with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc
  functions' internals and leads to unneccessary code coupling

- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free

Files affected by this commit are the ones I was able to test on real
hardware. The rest of free(..., M_OFWPROP) instances will be handled with
idividual maintainers

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D6315
</content>
</entry>
<entry>
<title>sys/dev: minor spelling fixes.</title>
<updated>2016-05-03T03:41:25Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-05-03T03:41:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=453130d9bfc1c6d68b366dfcb041689d69f81295'/>
<id>urn:sha1:453130d9bfc1c6d68b366dfcb041689d69f81295</id>
<content type='text'>
Most affect comments, very few have user-visible effects.
</content>
</entry>
</feed>
