Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel Firmware
Bare Metal Firmware
Commits
860658c1
Commit
860658c1
authored
4 years ago
by
Raptor Engineering Development Team
Browse files
Options
Download
Email Patches
Plain Diff
Adjust SPI Flash clock speed to compensate for main bus speed reduction from 75MHz to 50MHz
parent
066b0159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
main.c
main.c
+2
-2
No files found.
main.c
View file @
860658c1
...
...
@@ -2383,10 +2383,10 @@ static int host_spi_flash_init(void)
dword
|=
((
TERCEL_SPI_PHY_IO_TYPE_QUAD
&
TERCEL_SPI_PHY_IO_TYPE_MASK
)
<<
TERCEL_SPI_PHY_IO_TYPE_SHIFT
);
write_tercel_register
(
HOSTSPIFLASHCFG_BASE
,
TERCEL_SPI_REG_SYS_PHY_CFG1
,
dword
);
// Set SPI clock cycle divider to
8
// Set SPI clock cycle divider to
5
dword
=
read_tercel_register
(
HOSTSPIFLASHCFG_BASE
,
TERCEL_SPI_REG_SYS_PHY_CFG1
);
dword
&=
~
(
TERCEL_SPI_PHY_CLOCK_DIVISOR_MASK
<<
TERCEL_SPI_PHY_CLOCK_DIVISOR_SHIFT
);
dword
|=
((
8
&
TERCEL_SPI_PHY_CLOCK_DIVISOR_MASK
)
<<
TERCEL_SPI_PHY_CLOCK_DIVISOR_SHIFT
);
dword
|=
((
5
&
TERCEL_SPI_PHY_CLOCK_DIVISOR_MASK
)
<<
TERCEL_SPI_PHY_CLOCK_DIVISOR_SHIFT
);
write_tercel_register
(
HOSTSPIFLASHCFG_BASE
,
TERCEL_SPI_REG_SYS_PHY_CFG1
,
dword
);
// Calculate and dump configured SPI clock speed
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment