errata_a010539.c 585 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright 2022 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #include <mmio.h>
  8. #include <plat_common.h>
  9. void erratum_a010539(void)
  10. {
  11. if (get_boot_dev() == BOOT_DEVICE_QSPI) {
  12. unsigned int *porsr1 = (void *)(NXP_DCFG_ADDR +
  13. DCFG_PORSR1_OFFSET);
  14. uint32_t val;
  15. val = (gur_in32(porsr1) & ~PORSR1_RCW_MASK);
  16. mmio_write_32((uint32_t)(NXP_DCSR_DCFG_ADDR +
  17. DCFG_DCSR_PORCR1_OFFSET), htobe32(val));
  18. /* Erratum need to set '1' to all bits for reserved SCFG register 0x1a8 */
  19. mmio_write_32((uint32_t)(NXP_SCFG_ADDR + 0x1a8),
  20. htobe32(0xffffffff));
  21. }
  22. }