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
bfc0c079
"vscode:/vscode.git/clone" did not exist on "bc9d4b89bb3985a250e5a702a0f2d76a8632cd8a"
Commit
bfc0c079
authored
Aug 20, 2019
by
Paul Beesley
Committed by
TrustedFirmware Code Review
Aug 20, 2019
Browse files
Merge "intel: agilex: HMC driver calculate DDR size" into integration
parents
c3db45fb
24d16a2e
Changes
1
Show whitespace changes
Inline
Side-by-side
plat/intel/soc/agilex/soc/agilex_memory_controller.c
View file @
bfc0c079
...
...
@@ -160,8 +160,6 @@ int init_hard_memory_controller(void)
return
status
;
}
/* mmio_clrbits_32(AGX_RSTMGR_BRGMODRST, AGX_RSTMGR_BRGMODRST_DDRSCH);*/
status
=
mem_calibration
();
if
(
status
)
{
ERROR
(
"DDR: Memory Calibration Failed
\n
"
);
...
...
@@ -169,7 +167,6 @@ int init_hard_memory_controller(void)
}
configure_hmc_adaptor_regs
();
/* configure_ddr_sched_ctrl_regs();*/
return
0
;
}
...
...
@@ -359,16 +356,17 @@ void configure_hmc_adaptor_regs(void)
mmio_write_32
(
AGX_MPFE_HMC_ADP
(
ADP_DRAMADDRWIDTH
),
data
);
/* Enable nonsecure access to DDR */
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_MPUREGION0ADDR_LIMIT
,
AGX_DDR_SIZE
-
1
);
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_MPUREGION0ADDR_LIMITEXT
,
0x1f
);
data
=
get_physical_dram_size
();
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_NONMPUREGION0ADDR_LIMIT
,
AGX_DDR_SIZE
-
1
)
;
if
(
data
<
AGX_DDR_SIZE
)
data
=
AGX_DDR_SIZE
;
mmio_write_32
(
AGX_SOC_NOC_FW_DDR_SCR_ENABLESET
,
BIT
(
0
)
|
BIT
(
8
));
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_MPUREGION0ADDR_LIMIT
,
data
-
1
);
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_MPUREGION0ADDR_LIMITEXT
,
0x1f
);
mmio_write_32
(
AGX_NOC_FW_DDR_SCR_NONMPUREGION0ADDR_LIMIT
,
data
-
1
);
mmio_write_32
(
AGX_SOC_NOC_FW_DDR_SCR_ENABLESET
,
BIT
(
0
)
|
BIT
(
8
));
/* ECC enablement */
data
=
mmio_read_32
(
AGX_MPFE_IOHMC_REG_CTRLCFG1
);
...
...
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