1. 01 Apr, 2020 1 commit
    • Andre Przywara's avatar
      rpi: move plat_helpers.S to common · 07aa0c7e
      Andre Przywara authored
      
      
      The plat_helpers.S file was almost identical between its RPi3 and RPi4
      versions. Unify the two files, moving it into the common/ directory.
      
      This adds a plat_rpi_get_model() function, which can be used to trigger
      RPi4 specific action, detected at runtime. We use that to do the RPi4
      specific L2 cache initialisation.
      
      Change-Id: I2295704fd6dde7c76fe83b6d98c7bf998d4bf074
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      07aa0c7e
  2. 17 Mar, 2020 2 commits
    • Andre Przywara's avatar
      rpi: Allow using PL011 UART for RPi3/RPi4 · 5e6d821c
      Andre Przywara authored
      
      
      The Broadcom 283x SoCs feature multiple UARTs: the mostly used
      "Mini-UART", which is an 8250 compatible IP, and at least one PL011.
      While the 8250 is usually used for serial console purposes, it suffers
      from a design flaw, where its clock depends on the VPU clock, which can
      change at runtime. This will reliably mess up the baud rate.
      To avoid this problem, people might choose to use the PL011 UART for
      the serial console, which is pin-mux'ed to the very same GPIO pins.
      This can be done by adding "miniuart-bt" to the "dtoverlay=" line in
      config.txt.
      
      To prepare for this situation, use the newly gained freedom of sharing
      one console_t pointer across different UART drivers, to introduce the
      option of choosing the PL011 for the console.
      
      This is for now hard-coded to choose the Mini-UART by default.
      A follow-up patch will introduce automatic detection.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: I8cf2522151e09ff4ff94a6d396aec6fc4b091a05
      5e6d821c
    • Andre Przywara's avatar
      rpi3: console: Use same "clock-less" setup scheme as RPi4 · 795aefe5
      Andre Przywara authored
      
      
      In the wake of the upcoming unification of the console setup code
      between RPi3 and RPi4, extend the "clock-less" setup scheme to the
      RPi3. This avoid programming any clocks or baud rate registers,
      which makes the port more robust against GPU firmware changes.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Change-Id: Ida83a963bb18a878997e9cbd55f8ceac6a2e1c1f
      795aefe5
  3. 13 Sep, 2019 1 commit
    • Andre Przywara's avatar
      rpi3: Add "rpi" platform directory · ab13addd
      Andre Przywara authored
      
      
      With the incoming support for the Raspberry Pi 4 boards, one directory
      to serve both versions will not end up well.
      
      Create an additional layer by inserting a "rpi" directory betweeen /plat
      and rpi3, so that we can more easily share or separate files between the
      two later.
      
      Change-Id: I75adbb054fe7902f34db0fd5e579a55612dd8a5f
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      ab13addd
  4. 31 Jan, 2019 1 commit
  5. 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
  6. 19 Nov, 2018 1 commit
    • Pete Batard's avatar
      rpi3: add RPI3_USE_UEFI_MAP build option · 4dcf1fad
      Pete Batard authored
      
      
      The default Raspberry Pi 3 memory mapping for ATF is geared towards
      the use of uboot + Linux. This creates issues when trying to use
      ATF with an UEFI payload and Windows on ARM64.
      
      We therefore introduce new build option RPI3_USE_UEFI_MAP, that
      enables the build process to use an alternate memory mapping that
      is compatible with UEFI + Windows (as well as UEFI + Linux).
      
      Fixes ARM-software/tf-issues#649
      Signed-off-by: default avatarPete Batard <pete@akeo.ie>
      4dcf1fad
  7. 08 Nov, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Standardise header guards across codebase · c3cf06f1
      Antonio Nino Diaz authored
      
      
      All identifiers, regardless of use, that start with two underscores are
      reserved. This means they can't be used in header guards.
      
      The style that this project is now to use the full name of the file in
      capital letters followed by 'H'. For example, for a file called
      "uart_example.h", the header guard is UART_EXAMPLE_H.
      
      The exceptions are files that are imported from other projects:
      
      - CryptoCell driver
      - dt-bindings folders
      - zlib headers
      
      Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c3cf06f1
  8. 17 Aug, 2018 1 commit
  9. 30 Jul, 2018 1 commit
  10. 16 Jul, 2018 2 commits
  11. 12 Jul, 2018 1 commit
  12. 05 Jul, 2018 1 commit
  13. 19 Jun, 2018 1 commit
  14. 01 Dec, 2017 1 commit