1. 16 Feb, 2021 3 commits
    • Pali Rohár's avatar
      marvell: uart: a3720: Increase TX FIFO EMPTY timeout from 2ms to 3ms · 0d06b058
      Pali Rohár authored
      
      
      TX FIFO has space for 32 characters. With default UART baudrate 115200 it
      takes more than 2ms to transmit all 32 characters, so wait at least 3ms
      before flushing TX FIFO.
      
      If WTMI firmware transmitted something via UART before TF-A was booted,
      some characters may still wait in TX FIFO when TF-A is initializing UART
      driver. So wait at least 3ms to ensure that HW has enough time to transmit
      all characters waiting in TX FIFO.
      
      This fixes an issue where sometimes characters transmitted on UART by our
      custom WTMI image are lost.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I8ea4ea58e4ba3e0c0d7f47e679171b9b94442f19
      0d06b058
    • Pali Rohár's avatar
      marvell: uart: a3720: Update delay code to be compatible with 1200 MHz CPU · 98641515
      Pali Rohár authored
      
      
      Console initialization function needs to wait at least minimal specified
      time. The fastest Armada 3720 CPU is 1200 MHz so increase loop delay to
      wait at least for 100 us on 1200 MHz variant too. The slowest Armada 3720
      CPU is 600 MHz and in this case delay loop would take just 2 times more,
      which is not a problem.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I1f0b4aabd0e08b7696feec631419f7f7c7ec17d2
      98641515
    • Pali Rohár's avatar
      marvell: uart: a3720: Fix comments in console_a3700_core_init() function · ab1fe188
      Pali Rohár authored
      
      
      The delay loop executes 3 instructions. These 3 instructions are executed
      in 2 processor ticks and 30000 iterations on a 600 MHz CPU should yield
      approximately 100 us. This means we are waiting 2 ms, not 20 ms, for TX
      FIFO to be empty.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I2cccad405bcc73cd6d1062adc0205c405c16c15f
      ab1fe188
  2. 11 Feb, 2021 6 commits
  3. 09 Feb, 2021 1 commit
    • Heyi Guo's avatar
      tzc400: adjust filter flag if it is set to FILTER_BIT_ALL · d4c61c38
      Heyi Guo authored
      
      
      TZC_400_REGION_ATTR_FILTER_BIT_ALL is a simple constant definition, so
      it can't get the real filter number to construct the bit flag for all
      existing filters. If the platform doesn't have 4 filters, passing
      FILTER_BIT_ALL to tzc400_configure_region() will cause assertion or
      misconfiguration. So adjust the bit flag against the real filter
      number.
      Signed-off-by: default avatarHeyi Guo <guoheyi@linux.alibaba.com>
      Change-Id: Ie5c48303485f3b5015772961ee7c34746121ee84
      d4c61c38
  4. 20 Jan, 2021 1 commit
  5. 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
  6. 13 Jan, 2021 19 commits
  7. 11 Jan, 2021 8 commits