Skip to content
GitLab
Menu
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
Apr 13, 2018
by
Dimitris Papastamos
Committed by
GitHub
Apr 13, 2018
Browse files
Merge pull request #1352 from hzhuang1/hikey_ddr
Hikey ddr
parents
22bcf51e
ed253f54
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
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
;
...
...
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
);
...
...
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