12 Mar, 2020

1 commit


22 Feb, 2020

3 commits

  • Miscellaneous improvements:
    - Start comment blocks with "/**" to enable kerneldoc,
    - Fix descriptor type of set_dout_mlli(),
    - Fix copied config parameter of set_cipher_config1(),
    - Fix copied config parameter of set_bytes_swap(),
    - Add missing function names to kerneldoc headers,
    - Add missing parameter descriptions,
    - Remove descriptions for nonexistent parameters,
    - Add missing colons,
    - Remove references to obsolete camelcase parameter names,
    - Sort according to actual parameter order,
    - Fix grammar and spelling.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Herbert Xu

    Geert Uytterhoeven
     
  • SRAM addresses are small integer offsets into local SRAM. Currently
    they are stored using a mixture of cc_sram_addr_t (u64), u32, and
    dma_addr_t types.

    Settle on u32, and remove the cc_sram_addr_t typedefs.
    This allows to drop several casts.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Herbert Xu

    Geert Uytterhoeven
     
  • Use the existing lower_32_bits() and upper_32_bits() macros instead of
    explicit casts and shifts to split a 64-bit address in its two 32-bit
    parts.
    Drop the superfluous cast to "u16", as the FIELD_PREP() macro already
    masks it to the specified field width.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Herbert Xu

    Geert Uytterhoeven
     

25 Apr, 2019

3 commits


09 Nov, 2018

3 commits


17 Oct, 2018

1 commit

  • Clang warns when one enumerated type is implicitly converted to another
    and this happens in several locations in this driver, ultimately related
    to the set_cipher_{mode,config0} functions. set_cipher_mode expects a mode
    of type drv_cipher_mode and set_cipher_config0 expects a mode of type
    drv_crypto_direction.

    drivers/crypto/ccree/cc_ivgen.c:58:35: warning: implicit conversion from
    enumeration type 'enum cc_desc_direction' to different enumeration type
    'enum drv_crypto_direction' [-Wenum-conversion]
    set_cipher_config0(&iv_seq[idx], DESC_DIRECTION_ENCRYPT_ENCRYPT);

    drivers/crypto/ccree/cc_hash.c:99:28: warning: implicit conversion from
    enumeration type 'enum cc_hash_conf_pad' to different enumeration type
    'enum drv_crypto_direction' [-Wenum-conversion]
    set_cipher_config0(desc, HASH_DIGEST_RESULT_LITTLE_ENDIAN);

    drivers/crypto/ccree/cc_aead.c:1643:30: warning: implicit conversion
    from enumeration type 'enum drv_hash_hw_mode' to different enumeration
    type 'enum drv_cipher_mode' [-Wenum-conversion]
    set_cipher_mode(&desc[idx], DRV_HASH_HW_GHASH);

    Since this fundamentally isn't a problem because these values just
    represent simple integers for a shift operation, make it clear to Clang
    that this is okay by making the mode parameter in both functions an int.

    Link: https://github.com/ClangBuiltLinux/linux/issues/46
    Signed-off-by: Nathan Chancellor
    Acked-by: Gilad Ben-Yossef
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Herbert Xu

    Nathan Chancellor
     

31 Mar, 2018

1 commit


03 Mar, 2018

1 commit


15 Feb, 2018

1 commit

  • Introduce basic low level Arm TrustZone CryptoCell HW support.
    This first patch doesn't actually register any Crypto API
    transformations, these will follow up in the next patch.

    This first revision supports the CC 712 REE component.

    Signed-off-by: Gilad Ben-Yossef
    Signed-off-by: Herbert Xu

    Gilad Ben-Yossef