1. 03 Feb, 2021 5 commits
    • Heyi Guo's avatar
      drivers/gicv3: add debug log for maximum INTID of SPI and eSPI · 705032de
      Heyi Guo authored
      
      
      Add debug log for the maximum supported INTID of SPI and eSPI on the
      current GIC implementation.
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: Ie45ab1d85b39658c4ca4bc54ee433ac44e41d03f
      705032de
    • Heyi Guo's avatar
      drivers/gicv3: limit SPI ID to avoid misjudgement in GICD_OFFSET() · 4e42c227
      Heyi Guo authored
      
      
      The GICv3 architecture allows GICD_TYPER.ITLinesNumber to be 31, so
      the maximum possible value for num_ints is 1024. The value must be
      limited to (MAX_SPI_ID + 1), or GICD_OFFSET() will consider it as ESPI
      INTID and return wrong register address.
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: Iddcb83d3e5d241b39f4176c19c2bceaa2c3dd653
      4e42c227
    • Heyi Guo's avatar
      drivers/gicv3: fix logical issue for num_eints · 69ae4427
      Heyi Guo authored
      
      
      In function gicv3_spis_config_defaults(), the variable num_ints is set
      to (maximum SPI INTID + 1), while num_eints is set to (maximum ESPI
      INTID). It introduces not only inconsistency to the code, but also
      logical bug in the "for" loops, for the INTID of num_eints is also
      valid and the check should be inclusive.
      
      Fix this by setting num_eints to (maximum ESPI INTID + 1) as well.
      
      Fix similar issues in gicv3_distif_save() and
      gicv3_distif_init_restore().
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: I4425777d17e84e85f38853603340bd348640154f
      69ae4427
    • Heyi Guo's avatar
      drivers/gicv3: fix potential GICD context override with ESPI enabled · deb18901
      Heyi Guo authored
      
      
      RESTORE/SAVE_GICD_EREGS uses (int_id - (MIN_ESPI_ID - MIN_SPI_ID)) to
      get the context array index for ESPI, which will override the space of
      standard SPI starting from (MIN_SPI_ID + MIN_SPI_ID).
      
      However, using TOTAL_SPI_INTR_NUM to replace the above MIN_SPI_ID
      cannot totally fix the issue, for TOTAL_SPI_INTR_NUM is not well
      aligned and the array index will be rounded down by the shifting
      operation if being shifted more than 2 bits. It will cause buffer
      override again when the existing maximum SPI reaches 1019.
      
      So round up TOTAL_SPI_INTR_NUM with (1 << REG##R_SHIFT) for GICD
      context arrays.
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: I5be2837c42f381a62f8d46a4ecd778009b1fe059
      deb18901
    • Heyi Guo's avatar
      drivers/gicv3: use mpidr to probe GICR for current CPU · 60cd8030
      Heyi Guo authored
      
      
      In function gicv3_rdistif_probe(), line #1322 implies
      gicv3_driver_data->mpidr_to_core_pos() may be null, but the original
      code uses this interface to get current CPU index unconditionally.
      
      It is better to use MPIDR to probe GICR which does not depend on
      gicv3_driver_data->mpidr_to_core_pos().
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: I64add055385040fe0a56b977e2299608e2309a6e
      60cd8030
  2. 20 Jan, 2021 1 commit
  3. 18 Jan, 2021 2 commits
    • Pali Rohár's avatar
      marvell: uart: a3720: Fix macro name for 6th bit of Status Register · b8e637f4
      Pali Rohár authored
      
      
      This patch does not change code, it only updates comments and macro name
      for 6th bit of Status Register. So TF-A binary stay same.
      
      6th bit of the Status Register is named TX EMPTY and is set to 1 when both
      Transmitter Holding Register (THR) or Transmitter Shift Register (TSR) are
      empty. It is when all characters were already transmitted.
      
      There is also TX FIFO EMPTY bit in the Status Register which is set to 1
      only when THR is empty.
      
      In both console_a3700_core_init() and console_a3700_core_flush() functions
      we should wait until both THR and TSR are empty therefore we should check
      6th bit of the Status Register.
      
      So current code is correct, just had misleading macro names and comments.
      This change fixes this "documentation" issue, fixes macro name for 6th bit
      of the Status Register and also updates comments.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I19e4e7f53a90bcfb318e6dd1b1249b6cbf81c4d3
      b8e637f4
    • Pali Rohár's avatar
      marvell: uart: a3720: Implement console_a3700_core_getc · 74867756
      Pali Rohár authored
      
      
      Implementation is simple, just check if there is a pending character in
      RX FIFO via RXRDY bit of Status Register and if yes, read it from
      UART_RX_REG register.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I226b6e336f44f5d0ca8dcb68e49a68e8f2f49708
      74867756
  4. 13 Jan, 2021 19 commits
  5. 11 Jan, 2021 11 commits
  6. 23 Dec, 2020 1 commit
    • Pali Rohár's avatar
      marvell: uart: a3720: Implement console_a3700_core_flush · e63e4140
      Pali Rohár authored
      
      
      Implementation is simple, just wait for the TX FIFO to be empty.
      
      Without this patch TF-A on A3720 truncate the last line:
      
        NOTICE:  BL31: Built : 16:1
      
      With this patch TF-A on A3720 print correctly also the last line:
      
        NOTICE:  BL31: Built : 19:03:31, Dec 23 2020
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I2f2ea42beab66ba132afdb400ca7898c5419db09
      e63e4140
  7. 21 Dec, 2020 1 commit