Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/imx6qdl leave ecc to gpmi nand #32

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

leiflm
Copy link

@leiflm leiflm commented Jun 21, 2021

These changes add/fix support for:

  • Hardware (BCH) ECC: I.e. i.MX6QDL's GPMI NAND interface
  • BCB search area fuse configuration

Furthermore does this changeset a cover boot switch mechanism, courtesy of jan Remmet and Bernd Westermann

Leif Middelschulte and others added 14 commits June 21, 2021 14:01
Make the BCB handling (BCB, LDLB, FCB, DBBT) configurable.
Some SoCs, like the i.MX6, might use the modern gpmi-nand.
This moved error code implementation and some bad block handling to the
hardware or, at least, driver.
This is preparatory work to leverage these interfaces.

Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
Query the boot fuses to determine the search area count.

Signed-off-by: Leif Middelschulte <[email protected]>
Warn the user if she targets a multiarea chip. The i.MX manual does not
explicitly mention those in the FCB context.

Signed-off-by: Leif Middelschulte <[email protected]>
It is eventually used by dbbt _and_ fcb.

On the i.MX 6 it is documented to be only used by the fcb.

Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
The LDLB is not supported on many platforms. So, eventually, skip its
update.

Signed-off-by: Leif Middelschulte <[email protected]>
Signed-off-by: Leif Middelschulte <[email protected]>
Adds switch to select on of the two firmware slots. This allow to safely
update on slot while the other slot is still valid. Behavior taken from
barebox.

Signed-off-by: Jan Remmet <[email protected]>

Taken from: https://git.phytec.de/meta-phytec/tree/recipes-bsp/imx-kobs/imx-kobs/0001-Slot-switch.patch?h=zeus&id=72ef16bdeef886e9939ef25b66ad68bc50810a78
The slot feature allows to switch the two boot streams. So we can write
the "unused" slot first.
But in mtd_commit_structures first the FCB is written and thereafter the
boot streams. If a power cut occurs, the FCB may point to a partial
written boot stream.
Now first the "unused" bootstream is written, than the FCB table and the
"actual" boot stream.
Making the update is power cut tolerant.

Taken from: https://git.phytec.de/meta-phytec/tree/recipes-bsp/imx-kobs/imx-kobs/0001-mtd-write-boot-streams-separately.patch?h=zeus&id=72ef16bdeef886e9939ef25b66ad68bc50810a78
The search exponent as passed by the user shall not be overwritten.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants