Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
9d82dd9b
Unverified
Commit
9d82dd9b
authored
6 years ago
by
Dimitris Papastamos
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1352 from hzhuang1/hikey_ddr
Hikey ddr
parents
22bcf51e
ed253f54
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plat/hisilicon/hikey/hikey_bl2_setup.c
+6
-5
plat/hisilicon/hikey/hikey_bl2_setup.c
plat/hisilicon/hikey/hikey_ddr.c
+587
-104
plat/hisilicon/hikey/hikey_ddr.c
plat/hisilicon/hikey/hikey_private.h
+9
-1
plat/hisilicon/hikey/hikey_private.h
with
602 additions
and
110 deletions
+602
-110
plat/hisilicon/hikey/hikey_bl2_setup.c
View file @
9d82dd9b
...
...
@@ -304,15 +304,13 @@ void bl2_platform_setup(void)
hikey_gpio_init
();
hikey_pmussi_init
();
hikey_hi6553_init
();
/* Clear SRAM since it'll be used by MCU right now. */
memset
((
void
*
)
SRAM_BASE
,
0
,
SRAM_SIZE
);
dsb
();
hikey_ddr_init
();
hikey_ddr_init
(
DDR_FREQ_800M
);
hikey_security_setup
();
/* Clear SRAM since it'll be used by MCU right now. */
memset
((
void
*
)
SRAM_BASE
,
0
,
SRAM_SIZE
);
clean_dcache_range
(
SRAM_BASE
,
SRAM_SIZE
);
hikey_boardid_init
();
init_acpu_dvfs
();
hikey_rtc_init
();
...
...
@@ -321,6 +319,9 @@ void bl2_platform_setup(void)
hikey_mmc_pll_init
();
/* Clean SRAM before MCU used */
clean_dcache_range
(
SRAM_BASE
,
SRAM_SIZE
);
reset_dwmmc_clk
();
memset
(
&
params
,
0
,
sizeof
(
dw_mmc_params_t
));
params
.
reg_base
=
DWMMC0_BASE
;
...
...
This diff is collapsed.
Click to expand it.
plat/hisilicon/hikey/hikey_ddr.c
View file @
9d82dd9b
This diff is collapsed.
Click to expand it.
plat/hisilicon/hikey/hikey_private.h
View file @
9d82dd9b
...
...
@@ -12,6 +12,14 @@
#define RANDOM_MAX 0x7fffffffffffffff
#define RANDOM_MAGIC 0x9a4dbeaf
enum
{
DDR_FREQ_150M
=
150
*
1000
,
DDR_FREQ_266M
=
266
*
1000
,
DDR_FREQ_400M
=
400
*
1000
,
DDR_FREQ_533M
=
533
*
1000
,
DDR_FREQ_800M
=
800
*
1000
};
struct
random_serial_num
{
uint64_t
magic
;
uint64_t
data
;
...
...
@@ -34,7 +42,7 @@ void hikey_init_mmu_el3(unsigned long total_base,
unsigned
long
coh_start
,
unsigned
long
coh_limit
);
void
hikey_ddr_init
(
void
);
void
hikey_ddr_init
(
unsigned
int
ddr_freq
);
void
hikey_io_setup
(
void
);
void
hikey_sp804_init
(
void
);
...
...
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
Menu
Projects
Groups
Snippets
Help