History log of /optee_os/core/drivers/crypto/caam/caam_jr.c (Results 1 – 9 of 9)
Revision Date Author Comments
# 297c6cbc 16-May-2023 Etienne Carriere <etienne.carriere@foss.st.com>

drivers: crypto: caam: upgrade to new interrupt framework

Moves CAAM job ring driver to the new interrupt framework API functions.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off

drivers: crypto: caam: upgrade to new interrupt framework

Moves CAAM job ring driver to the new interrupt framework API functions.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# a3cfa14a 23-Apr-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: enable the CAAM clock when submitting a new job

Make sure the CAAM clock is running before writing to CAAM registers
when submitting a new CAAM job.
Otherwise, it would generate an OP

drivers: caam: enable the CAAM clock when submitting a new job

Make sure the CAAM clock is running before writing to CAAM registers
when submitting a new CAAM job.
Otherwise, it would generate an OPTEE data-abort.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 316fd6e9 23-Mar-2022 Clement Faure <clement.faure@nxp.com>

drivers: caam: add missing header file

Fix the following warning:

In file included from core/drivers/crypto/caam/hal/imx_8m/hal_cfg.c:8:
core/drivers/crypto/caam/hal/imx_8m/../../include/caam_hal_j

drivers: caam: add missing header file

Fix the following warning:

In file included from core/drivers/crypto/caam/hal/imx_8m/hal_cfg.c:8:
core/drivers/crypto/caam/hal/imx_8m/../../include/caam_hal_jr.h:22:16: warning: ‘enum caam_jr_owner’ declared inside parameter list will not be visible outside of this definition or declaration
22 | enum caam_jr_owner owner);
| ^~~~~~~~~~~~~

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 0e467cb0 13-Apr-2022 Clement Faure <clement.faure@nxp.com>

drivers: caam: add JR interrupt only if CFG_CAAM_ITR=y

Adding the JR interrupt in the OPTEE CAAM driver, even if not used in
OPTEE, prevents the Linux CAAM driver from using the JR interrupt on
plat

drivers: caam: add JR interrupt only if CFG_CAAM_ITR=y

Adding the JR interrupt in the OPTEE CAAM driver, even if not used in
OPTEE, prevents the Linux CAAM driver from using the JR interrupt on
platforms sharing the same line of interruption for all job rings.

To dequeue job from the job ring, the Linux CAAM driver would pull the
number of jobs done from the output ring slot full register.

The fix is to add the JR interrupt only if CFG_CAAM_ITR=y. This
allows the Linux CAAM driver to dequeue jobs faster than polling from
a register.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 742ce3ad 25-Aug-2020 Cedric Neveux <cedric.neveux@nxp.com>

drivers: caam: fix CAAM Job Ring halt/flush/cancel

Fix CAAM halt/flush jobs by calling dequeue operation to complete all jobs.
Add spinlock management in the cancel function because of the shared JR

drivers: caam: fix CAAM Job Ring halt/flush/cancel

Fix CAAM halt/flush jobs by calling dequeue operation to complete all jobs.
Add spinlock management in the cancel function because of the shared JR
structure.

Fixes: 2d7a896 ("driver: implement CAAM driver")
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 84989f86 28-May-2021 Franck LENORMAND <franck.lenormand@nxp.com>

drivers: caam: ack the interrupt when completing a job

The ITR will only be acked if the job finishes between the
do_jr_dequeue() and caam_hal_jr_check_ack_itr().
With this fix, we ensure the ITR is

drivers: caam: ack the interrupt when completing a job

The ITR will only be acked if the job finishes between the
do_jr_dequeue() and caam_hal_jr_check_ack_itr().
With this fix, we ensure the ITR is acked when leaving
caam_jr_dequeue() function.

Fixes: 2d7a896 ("driver: implement CAAM driver")
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 6a16bb35 03-Apr-2020 Clement Faure <clement.faure@nxp.com>

drivers: caam: use pointers to out/inring_entry for CAAM

Use pointers to outring_entry and inring_entry as input for
caam_desc_pop(), caam_desc_push() and caam_desc_jobstatus() functions.

This quic

drivers: caam: use pointers to out/inring_entry for CAAM

Use pointers to outring_entry and inring_entry as input for
caam_desc_pop(), caam_desc_push() and caam_desc_jobstatus() functions.

This quick re-work originaly comes from the initiative to get rid of a
GGC 9.2 warning -Waddress-of-packed-member

core/drivers/crypto/caam/caam_jr.c: In function ‘do_jr_dequeue’:
core/drivers/crypto/caam/caam_jr.c:262:22: warning: taking address of packed member of ‘struct outring_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
262 | if (caam_desc_pop(&jr_out->desc) == caller->pdesc) {
| ^~~~~~~~~~~~~
core/drivers/crypto/caam/caam_jr.c:265:26: warning: taking address of packed member of ‘struct outring_entry’ may result in an unaligned pointer value [-Waddress-of-packed-member]
265 | caam_read_jobstatus(&jr_out->status);
| ^~~~~~~~~~~~~~~

By doing this, we let the function safely extracting the field.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# f5342ba3 24-Feb-2020 Cedric Neveux <cedric.neveux@nxp.com>

drivers: caam: fix suspend/resume issue

Add missing save/restore of the Secure JR configuration (all devices).
On i.MX6Q/D fix the job ring resume to reconfigure the Software JR queues
and re-instan

drivers: caam: fix suspend/resume issue

Add missing save/restore of the Secure JR configuration (all devices).
On i.MX6Q/D fix the job ring resume to reconfigure the Software JR queues
and re-instantiate the RNG if needed.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 2d7a8964 06-Aug-2019 Cedric Neveux <cedric.neveux@nxp.com>

driver: implement CAAM driver

Add the NXP CAAM drivers:
- Random generator (instantiation and random generation)
- Hash

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Etienne Ca

driver: implement CAAM driver

Add the NXP CAAM drivers:
- Random generator (instantiation and random generation)
- Hash

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...