Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/arm64/imx9 4byte addressing to nor #288

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions arch/arm64/src/imx9/imx9_flexspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ void imx9_flexspi_init(struct flexspi_type_s *base,

void imx9_flexspi_get_default_config(struct flexspi_config_s *config)
{
int i;

/* Initializes the configure structure to zero */

memset(config, 0, sizeof(*config));
Expand Down Expand Up @@ -588,7 +590,7 @@ void imx9_flexspi_get_default_config(struct flexspi_config_s *config)
* buffers.
*/

for (uint8_t i = 0; i < ((uint8_t)FLEXSPI_AHB_BUFFER_COUNT - 2u); i++)
for (i = 0; i < (FLEXSPI_AHB_BUFFER_COUNT - 2u); i++)
{
/* Default enable AHB prefetch */

Expand All @@ -605,8 +607,7 @@ void imx9_flexspi_get_default_config(struct flexspi_config_s *config)
config->ahb_config.buffer[i].buffer_size = 0;
}

for (uint8_t i = ((uint8_t)FLEXSPI_AHB_BUFFER_COUNT - 2);
i < (uint8_t)FLEXSPI_AHB_BUFFER_COUNT; i++)
for (; i < FLEXSPI_AHB_BUFFER_COUNT; i++)
{
config->ahb_config.buffer[i].enable_prefetch = true; /* Default enable
* AHB prefetch.
Expand All @@ -618,8 +619,8 @@ void imx9_flexspi_get_default_config(struct flexspi_config_s *config)
}

config->ahb_config.enable_clear_ahb_buffer_opt = false;
config->ahb_config.enable_read_address_opt = false;
config->ahb_config.enable_ahb_prefetch = false;
config->ahb_config.enable_read_address_opt = true;
config->ahb_config.enable_ahb_prefetch = true;
config->ahb_config.enable_ahb_bufferable = false;
config->ahb_config.enable_ahb_cachable = false;
}
Expand Down Expand Up @@ -1235,9 +1236,9 @@ struct flexspi_dev_s *imx9_flexspi_initialize(int intf)

imx9_ccm_gate_on(CCM_LPCG_FLEXSPI1, true);

/* Configure clock to safe 50MHz, src clock is 800Mhz */
/* Configure clock to 133MHz, src clock is 800Mhz */

imx9_ccm_configure_root_clock(CCM_CR_FLEXSPI1, SYS_PLL1PFD1, 16);
imx9_ccm_configure_root_clock(CCM_CR_FLEXSPI1, SYS_PLL1PFD1, 6);

/* Has the FlexSPI hardware been initialized? */

Expand Down
Loading
Loading