Go to file
Miquel Raynal 1759279ad1 lib/bch: Allow easy bit swapping
It seems that several hardware ECC engine use a swapped representation
of bytes compared to software. This might having to do with how the
ECC engine is wired to the NAND controller or the order the bits are
passed to the hardware BCH logic.

This means that when the software BCH engine is working in conjunction
with data generated with hardware, sometimes we might need to swap the
bits inside bytes, eg:

    0x0A = b0000_1010 -> b0101_0000 = 0x50

Make it possible by adding a boolean to the BCH initialization routine.

Regarding the implementation itself, this is a rather simple approach
that can probably be enhanced in the future by preparing the
->a_{mod,pow}_tab tables with the swapping in mind.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200519074549.23673-3-miquel.raynal@bootlin.com
2020-05-24 20:48:11 +02:00
Documentation dt-bindings: mtd: partition: Document the slc-mode property 2020-05-11 09:51:41 +02:00
LICENSES
arch s390 fixes for 5.7-rc3 2020-04-26 10:58:49 -07:00
block
certs
crypto
drivers lib/bch: Allow easy bit swapping 2020-05-24 20:48:11 +02:00
fs Five cifs/smb3 fixes, 3 for DFS, one for stable 2020-04-26 11:44:17 -07:00
include lib/bch: Allow easy bit swapping 2020-05-24 20:48:11 +02:00
init
ipc
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2020-04-25 12:25:32 -07:00
lib lib/bch: Allow easy bit swapping 2020-05-24 20:48:11 +02:00
mm
net
samples
scripts
security
sound
tools Two fixes: fix an off-by-one bug, and fix 32-bit builds on 64-bit systems. 2020-04-25 11:52:02 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Remove Xiaolei Li and mark MTK NFC as orphaned 2020-05-24 20:39:32 +02:00
Makefile Linux 5.7-rc3 2020-04-26 13:51:02 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.