aboutsummaryrefslogtreecommitdiff
path: root/lib/bch.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-03bch: don't use __BSD_VISIBLE to test for flsJonathan Gray1-1/+1
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 Vadot1-0/+6
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 Ripard1-0/+48
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 Rini1-12/+1
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 Hitz1-0/+1358
[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>