diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-09-21 22:28:50 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-10-03 10:32:00 +0200 |
commit | 69cc6817e99f2dc0a34706e69874e06785a7b376 (patch) | |
tree | 63349aeb6167a109ed9448cdbb051bac5913cf9c | |
parent | 27e56efed6f7d0f035f9358e1f819776f1c65a73 (diff) |
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 <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r-- | lib/bch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bch.c b/lib/bch.c index bb4e15a377d..2ebd8c9edb3 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++);*/ |