From 69cc6817e99f2dc0a34706e69874e06785a7b376 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Thu, 21 Sep 2017 22:28:50 +0200 Subject: lib/bch.c: modify algorithm for all writebcb users With the Colibri iMX6ULL there is a second user of the bch algorithms to encode the FCB. Use the more universal CONFIG_CMD_WRITEBCB_MX7 to decide if the modifications are needed. Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- lib/bch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bch.c b/lib/bch.c index bb4e15a377..2ebd8c9edb 100644 --- a/lib/bch.c +++ b/lib/bch.c @@ -154,7 +154,7 @@ static void store_ecc8(struct bch_control *bch, uint8_t *dst, memcpy(dst, pad, BCH_ECC_BYTES(bch)-4*nwords); } -#ifdef CONFIG_TARGET_COLIBRI_IMX7 +#if defined(CONFIG_CMD_WRITEBCB_MX7) /* * reverse bit for byte */ @@ -251,7 +251,7 @@ void encode_bch(struct bch_control *bch, const uint8_t *data, */ while (mlen--) { /* input data is read in big-endian format */ -#if CONFIG_TARGET_COLIBRI_IMX7 +#if defined(CONFIG_CMD_WRITEBCB_MX7) /*TODO: big little endian*/ /*w = r[0]^cpu_to_be32(*pdata++);*/ /*w = r[0]^(uint32_t)(*pdata++);*/ -- cgit v1.2.3