1. 14 Dec, 2020 2 commits
    • Samuel Holland's avatar
      allwinner: Add SPC security setup for H6 · 49d98cd5
      Samuel Holland authored
      
      
      The H6 has a "secure port controller" similar to the A64/H5, but with
      more ports and a different register layout. Split the platform-specific
      parts out into a header, and add the missing MMIO base address.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: I3703868bc595459ecf9568b9d1605cb1be014bf5
      49d98cd5
    • Samuel Holland's avatar
      allwinner: Add R_PRCM security setup for H6 · 978a8240
      Samuel Holland authored
      
      
      H6 has a reorganized R_PRCM compared to A64/H5, with the security switch
      at a different offset. Until now, we did not notice, because the switch
      has no effect unless the secure mode e-fuse is blown.
      
      Since we are adding more platform-specific CCU registers, move them to
      their own header, and out of the memory map (where they do not belong).
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: Ie77476db0515080954eaa2e32bf6c3de657cda86
      978a8240
  2. 29 Jun, 2020 1 commit
  3. 04 Jan, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Sanitise includes across codebase · 09d40e0e
      Antonio Nino Diaz authored
      Enforce full include path for includes. Deprecate old paths.
      
      The following folders inside include/lib have been left unchanged:
      
      - include/lib/cpus/${ARCH}
      - include/lib/el3_runtime/${ARCH}
      
      The reason for this change is that having a global namespace for
      includes isn't a good idea. It defeats one of the advantages of having
      folders and it introduces problems that are sometimes subtle (because
      you may not know the header you are actually including if there are two
      of them).
      
      For example, this patch had to be created because two headers were
      called the same way: e0ea0928 ("Fix gpio includes of mt8173 platform
      to avoid collision."). More recently, this patch has had similar
      problems: 46f9b2c3 ("drivers: add tzc380 support").
      
      This problem was introduced in commit 4ecca339
      
       ("Move include and
      source files to logical locations"). At that time, there weren't too
      many headers so it wasn't a real issue. However, time has shown that
      this creates problems.
      
      Platforms that want to preserve the way they include headers may add the
      removed paths to PLAT_INCLUDES, but this is discouraged.
      
      Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      09d40e0e
  4. 20 Oct, 2018 1 commit
    • Andre Przywara's avatar
      allwinner: Export sunxi_private.h · 4ec1a239
      Andre Przywara authored
      
      
      So far we have a sunxi_private.h header file in the common code directory.
      This holds the prototypes of various functions we share in *common*
      code. However we will need some of those in the platform specific code
      parts as well, and want to introduce new functions shared across the
      whole platform port.
      
      So move the sunxi_private.h file into the common/include directory, so
      that it becomes visible to all parts of the platform code.
      Fix up the existing #includes and add missing ones, also add the
      sunxi_read_soc_id() prototype here.
      
      This will be used in follow up patches.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      4ec1a239
  5. 28 Jun, 2018 1 commit
    • Andre Przywara's avatar
      allwinner: security: Fix SPC guard · 88aa5c43
      Andre Przywara authored
      
      
      The "#ifdef SUNXI_SPC_BASE" guard was meant to allow the build on SoCs
      without a Secure Peripherals Controller, so that we skip that part of
      the security setup. But in the current position this will trigger a
      warning about an unused variable.
      
      Simply move the guard one line up to cover the variable as well.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      88aa5c43
  6. 15 Jun, 2018 1 commit
    • Andre Przywara's avatar
      allwinner: Add security setup · acb8b3ca
      Andre Przywara authored
      
      
      Some peripherals are TrustZone aware, so they need to be configured to
      be accessible from non-secure world, as we don't need any of them being
      exclusive to the secure world.
      This affects some clocks, DMA channels and the Secure Peripheral
      Controller (SPC). The latter controls access to most devices, but is not
      active unless booting with the secure boot fuse burnt.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      acb8b3ca