Skip to content

Commit

Permalink
ltq-deu: set correct control register for AES
Browse files Browse the repository at this point in the history
Some devices initialize AES during boot and AES works out of the box
and the correct endianess is set.
NDC means (No Danube Compatibility Mode) and the endianess setting has
no effect if its set to 0.
NDC 0: OFF ENDI bit cannot be written as in Danube
To make it work for other devices, the NDC control register needs to
be set to 1.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
  • Loading branch information
kestrel1974 authored and hauke committed Jan 5, 2022
1 parent 8dafa98 commit c8967d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.c
Expand Up @@ -107,7 +107,7 @@ void aes_chip_init (void)

// start crypto engine with write to ILR
aes->controlr.SM = 1;
aes->controlr.NDC = 0;
aes->controlr.NDC = 1;
asm("sync");
aes->controlr.ENDI = 1;
asm("sync");
Expand Down

0 comments on commit c8967d6

Please sign in to comment.