1. 04 Sep, 2018 1 commit
    • Bryan O'Donoghue's avatar
      imx: imx_snvs: Add an SNVS core functionality · f7ea6d52
      Bryan O'Donoghue authored
      
      
      This patch adds snvs.c with a imx_snvs_init() function.
      
      imx_snvs_init() sets up permissions of the RTC via the SNVS HPCOMR.
      
      During previous work with OPTEE on the i.MX7 part we discovered that prior
      to switching from secure-world to normal-world it is required to apply more
      permissive permissions than are defaulted to in order for Linux to be able
      to access the RTC and CAAM functionality in general.
      
      This patch pertains to fixing the RTC permissions by way of the
      HPCOMR.NPSWA_EN bit.
      
      Once set non-privileged code aka Linux-kernel code has permissions to
      access the SNVS where the RTC resides.
      
      Perform that permissions fix in imx_snvs_init() now, with a later patch making
      the call from our platform setup code.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      f7ea6d52