Browse Source

fix(intel): enable HPS QSPI access by default

Request ownership and direct access to QSPI by default in BL2.
Previously, this is only done on QSPI boot mode.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ie222bbf9d719f2f70f89d4739c285efe6df4c955
pull/1985/head
Abdul Halim, Muhammad Hadi Asyrafi 4 years ago
committed by Jit Loon Lim
parent
commit
000267be22
  1. 5
      plat/intel/soc/agilex/bl2_plat_setup.c
  2. 3
      plat/intel/soc/common/include/socfpga_mailbox.h
  3. 6
      plat/intel/soc/common/soc/socfpga_mailbox.c
  4. 5
      plat/intel/soc/stratix10/bl2_plat_setup.c

5
plat/intel/soc/agilex/bl2_plat_setup.c

@ -113,6 +113,9 @@ void bl2_el3_plat_arch_setup(void)
mmc_info.mmc_dev_type = MMC_IS_SD;
mmc_info.ocr_voltage = OCR_3_3_3_4 | OCR_3_2_3_3;
/* Request ownership and direct access to QSPI */
mailbox_hps_qspi_enable();
switch (boot_source) {
case BOOT_SOURCE_SDMMC:
dw_mmc_init(&params, &mmc_info);
@ -120,8 +123,6 @@ void bl2_el3_plat_arch_setup(void)
break;
case BOOT_SOURCE_QSPI:
mailbox_set_qspi_open();
mailbox_set_qspi_direct();
cad_qspi_init(0, QSPI_CONFIG_CPHA, QSPI_CONFIG_CPOL,
QSPI_CONFIG_CSDA, QSPI_CONFIG_CSDADS,
QSPI_CONFIG_CSEOT, QSPI_CONFIG_CSSOT, 0);

3
plat/intel/soc/common/include/socfpga_mailbox.h

@ -139,8 +139,7 @@
void mailbox_set_int(uint32_t interrupt_input);
int mailbox_init(void);
void mailbox_set_qspi_close(void);
void mailbox_set_qspi_open(void);
void mailbox_set_qspi_direct(void);
void mailbox_hps_qspi_enable(void);
int mailbox_send_cmd(uint32_t job_id, uint32_t cmd, uint32_t *args,
unsigned int len, uint32_t urgent, uint32_t *response,

6
plat/intel/soc/common/soc/socfpga_mailbox.c

@ -393,6 +393,12 @@ void mailbox_qspi_set_cs(uint32_t device_select)
1U, CMD_CASUAL, NULL, 0U);
}
void mailbox_hps_qspi_enable(void)
{
mailbox_set_qspi_open();
mailbox_set_qspi_direct();
}
void mailbox_reset_cold(void)
{
mailbox_set_int(MBOX_INT_FLAG_COE | MBOX_INT_FLAG_RIE);

5
plat/intel/soc/stratix10/bl2_plat_setup.c

@ -109,6 +109,9 @@ void bl2_el3_plat_arch_setup(void)
mmc_info.mmc_dev_type = MMC_IS_SD;
mmc_info.ocr_voltage = OCR_3_3_3_4 | OCR_3_2_3_3;
/* Request ownership and direct access to QSPI */
mailbox_hps_qspi_enable();
switch (boot_source) {
case BOOT_SOURCE_SDMMC:
dw_mmc_init(&params, &mmc_info);
@ -116,8 +119,6 @@ void bl2_el3_plat_arch_setup(void)
break;
case BOOT_SOURCE_QSPI:
mailbox_set_qspi_open();
mailbox_set_qspi_direct();
cad_qspi_init(0, QSPI_CONFIG_CPHA, QSPI_CONFIG_CPOL,
QSPI_CONFIG_CSDA, QSPI_CONFIG_CSDADS,
QSPI_CONFIG_CSEOT, QSPI_CONFIG_CSSOT, 0);

Loading…
Cancel
Save