Home | History | Annotate | Download | only in nand
History log of /src/sys/dev/nand/nand.c
RevisionDateAuthorComments
 1.29  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28  24-Apr-2021  thorpej branches: 1.28.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.27  13-Nov-2017  jmcneill branches: 1.27.20;
Add support for dynamic flash partitions
 1.26  09-Nov-2017  jmcneill Add support for decoding legacy Toshiba TC58NVG2S0H NAND chip params.
 1.25  04-Oct-2016  kiyohara Use ONFI_STATUS_WP instead of 0x80.
 1.24  04-Oct-2016  kiyohara Wait STATUS_RDY after ONFI_RESET.
 1.23  20-Oct-2013  christos branches: 1.23.6; 1.23.10;
remove unused
 1.22  03-Nov-2012  ahoka branches: 1.22.2;
Endiannes fixes from Brett Slager in ONFI Param page parsing.
Similar changes in nandemulator by me.
Remove panic about more than one LUNs.
 1.21  03-Nov-2012  ahoka Make nc_block_pages go aways, its redundant and unused.
Print more info on attach including the width.
 1.20  02-Nov-2012  pgoyette Use %zu formats to print size_t values.
 1.19  02-Nov-2012  ahoka No longer use size_t in the chip structure.
 1.18  31-Oct-2012  riz Hook nand_samsung.c into the build, and use it if a legacy chip
from Samsung is found.
 1.17  12-Jul-2012  matt branches: 1.17.2;
Deal with a spare size of 32. XXX necc_offset is only a guess.
 1.16  28-Aug-2011  martin branches: 1.16.2; 1.16.8;
Rename isbad argument to is_bad - stupid namespace pollution and ancient
bad sector routines interfere on some archs and cause global shadowing
warnings.
 1.15  15-Jul-2011  cliff branches: 1.15.2;
Add support for CFI NOR, using MPC8536DS as initial example.
Only AMD/Fujitsu command set is suported so far.
This is still work in progress, be advised.
 1.14  01-Jul-2011  ahoka Make this actually compile by adding a wrapper function which calls
flash_io_submit.
 1.13  28-Jun-2011  ahoka Refactor flash and nand driver, so we can reuse the io thread code
in the future nor driver (and any other future driver).

Also simplify some of the code in the process, eg. saner flash attachment.
 1.12  28-Jun-2011  ahoka follow bus_space conventions in naming
 1.11  01-May-2011  rmind branches: 1.11.4;
Remove trailing tabs, add RCS IDs.
 1.10  26-Apr-2011  ahoka it seems we have a config_detach_children (though undocumented)
lets use that to detach flash devices before detaching nand
 1.9  26-Apr-2011  ahoka fix some bugs in detachment
 1.8  10-Apr-2011  ahoka Fix locking and simplify some error path.
 1.7  04-Apr-2011  ahoka Fix badblock checking
Replace flash_addr_t with flash_off_t and use it to address flash everywhere
 1.6  27-Mar-2011  ahoka Add support for redifining page read and program functions by drivers.
Some controllers implement read/write in one step, so this is required
to support those.
 1.5  09-Mar-2011  ahoka Add some PRIxxx macros to correctly print stdint types
 1.4  09-Mar-2011  martin Use %zu for size_t
 1.3  09-Mar-2011  ahoka Add support for legacy devices not supporting the ONFI READ_PARAMETER_PAGE
command with example usage for Micron chips
 1.2  09-Mar-2011  ahoka cleanup comments, prototypes
remove unused leftover debug code
 1.1  26-Feb-2011  ahoka branches: 1.1.2; 1.1.4;
Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards
 1.1.4.4  31-May-2011  rmind sync with head
 1.1.4.3  21-Apr-2011  rmind sync with head
 1.1.4.2  05-Mar-2011  rmind sync with head
 1.1.4.1  26-Feb-2011  rmind file nand.c was added on branch rmind-uvmplock on 2011-03-05 20:53:33 +0000
 1.1.2.2  05-Mar-2011  bouyer Sync with HEAD
 1.1.2.1  26-Feb-2011  bouyer file nand.c was added on branch bouyer-quota2 on 2011-03-05 15:10:22 +0000
 1.11.4.2  06-Jun-2011  jruoho Sync with HEAD.
 1.11.4.1  01-May-2011  jruoho file nand.c was added on branch jruoho-x86intr on 2011-06-06 09:08:07 +0000
 1.15.2.2  26-Jul-2011  matt Backport flash/nand/nor subsystem from -HEAD.
 1.15.2.1  15-Jul-2011  matt file nand.c was added on branch matt-nb5-pq3 on 2011-07-26 03:22:27 +0000
 1.16.8.2  27-Dec-2011  matt Merge flash/nand/nor infrastruct from matt-nb5-pq3.
 1.16.8.1  28-Aug-2011  matt file nand.c was added on branch matt-nb5-mips64 on 2011-12-27 17:35:47 +0000
 1.16.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.16.2.1  30-Oct-2012  yamt sync with head
 1.17.2.3  03-Dec-2017  jdolecek update from HEAD
 1.17.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.22.2.1  18-May-2014  rmind sync with head
 1.23.10.1  04-Nov-2016  pgoyette Sync with HEAD
 1.23.6.1  05-Dec-2016  skrll Sync with HEAD
 1.27.20.5  05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.27.20.4  04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.27.20.3  03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.27.20.2  02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.27.20.1  20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.28.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed