]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: sun8i-ce - wrap accesses to descriptor address fields
authorAndre Przywara <andre.przywara@arm.com>
Mon, 24 Jun 2024 23:21:08 +0000 (00:21 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 6 Jul 2024 00:19:59 +0000 (10:19 +1000)
commite0740bee6c21c209191f55d8dfff7c16aeb3578a
tree407011699c374b65b9c72fff62907f767887caa7
parent996f8a9654d0c7b8742379d4e2f1052fccac6643
crypto: sun8i-ce - wrap accesses to descriptor address fields

The Allwinner H616 (and later) SoCs support more than 32 bits worth of
physical addresses. To accommodate the larger address space, the CE task
descriptor fields holding addresses are now encoded as "word addresses",
so take the actual address divided by four.
This is true for the fields within the descriptor, but also for the
descriptor base address, in the CE_TDA register.

Wrap all accesses to those fields in a function, which will do the
required division if needed. For now this in unused, so there should be
no change in behaviour.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h