summaryrefslogtreecommitdiff
path: root/lib/bch.c
AgeCommit message (Collapse)Author
2019-04-03fix compile error on macOS Mojave默默
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-03bch: don't use __BSD_VISIBLE to test for flsJonathan Gray
Commit 4ecc988301bc8e981e6d7538c57cdb3aa82f7c1d assumes fls is in libc if __BSD_VISIBLE is defined. This appears to only be true on FreeBSD and DragonFlyBSD. OpenBSD defines __BSD_VISIBLE and does not have fls in strings.h/libc. Switch the test for __BSD_VISIBLE to one for __DragonFly__ and __FreeBSD__ to unbreak the build on OpenBSD. Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
2017-06-20bch: Fix build on FreeBSD hostEmmanuel Vadot
endian.h on FreeBSD system exist in sys/ subdirectory. FreeBSD already have a fls function defined in strings.h which is included in string.h if __BSD_VISIBLE is defined, as a check for this. Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
2017-04-07bch: Allow to build for the hostMaxime Ripard
We will need the bch functions in the tool to generate the SPL images for the Allwinner SoCs. Do the needed adjustments so that we can use it on the host. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2016-01-19Add more SPDX-License-Identifier tagsTom Rini
In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by: Tom Rini <trini@konsulko.com>
2012-01-26nand: Merge BCH code from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the BCH ECC algorithm from the 3.0 Linux kernel. This enables U-Boot to support modern NAND flash chips that require more than 1-bit of ECC in software. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>