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
bc3579b7
Commit
bc3579b7
authored
5 years ago
by
Manish Pandey
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "intel: Fix memory calibration" into integration
parents
f1c94d1e
3d9f7264
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plat/intel/soc/agilex/soc/agilex_memory_controller.c
+3
-4
plat/intel/soc/agilex/soc/agilex_memory_controller.c
plat/intel/soc/stratix10/soc/s10_memory_controller.c
+6
-7
plat/intel/soc/stratix10/soc/s10_memory_controller.c
with
9 additions
and
11 deletions
+9
-11
plat/intel/soc/agilex/soc/agilex_memory_controller.c
View file @
bc3579b7
...
@@ -20,9 +20,8 @@
...
@@ -20,9 +20,8 @@
#define PRE_CALIBRATION_DELAY 1
#define PRE_CALIBRATION_DELAY 1
#define POST_CALIBRATION_DELAY 1
#define POST_CALIBRATION_DELAY 1
#define TIMEOUT_EMIF_CALIBRATION 1000
#define TIMEOUT_EMIF_CALIBRATION 1000
#define CLEAR_EMIF_DELAY 50000
#define CLEAR_EMIF_DELAY 1000
#define CLEAR_EMIF_TIMEOUT 0x100000
#define CLEAR_EMIF_TIMEOUT 1000
#define TIMEOUT_INT_RESP 10000
#define DDR_CONFIG(A, B, C, R) (((A) << 24) | ((B) << 16) | ((C) << 8) | (R))
#define DDR_CONFIG(A, B, C, R) (((A) << 24) | ((B) << 16) | ((C) << 8) | (R))
#define DDR_CONFIG_ELEMENTS (sizeof(ddr_config)/sizeof(uint32_t))
#define DDR_CONFIG_ELEMENTS (sizeof(ddr_config)/sizeof(uint32_t))
...
@@ -125,7 +124,7 @@ static int mem_calibration(void)
...
@@ -125,7 +124,7 @@ static int mem_calibration(void)
data
=
mmio_read_32
(
AGX_MPFE_HMC_ADP_DDRCALSTAT
);
data
=
mmio_read_32
(
AGX_MPFE_HMC_ADP_DDRCALSTAT
);
if
(
AGX_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
1
)
if
(
AGX_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
1
)
break
;
break
;
m
delay
(
1
);
u
delay
(
500
);
}
while
(
++
timeout
<
TIMEOUT_EMIF_CALIBRATION
);
}
while
(
++
timeout
<
TIMEOUT_EMIF_CALIBRATION
);
if
(
AGX_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
0
)
{
if
(
AGX_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
plat/intel/soc/stratix10/soc/s10_memory_controller.c
View file @
bc3579b7
...
@@ -22,10 +22,9 @@
...
@@ -22,10 +22,9 @@
#define MAX_MEM_CAL_RETRY 3
#define MAX_MEM_CAL_RETRY 3
#define PRE_CALIBRATION_DELAY 1
#define PRE_CALIBRATION_DELAY 1
#define POST_CALIBRATION_DELAY 1
#define POST_CALIBRATION_DELAY 1
#define TIMEOUT_EMIF_CALIBRATION 100
#define TIMEOUT_EMIF_CALIBRATION 1000
#define CLEAR_EMIF_DELAY 50000
#define CLEAR_EMIF_DELAY 1000
#define CLEAR_EMIF_TIMEOUT 0x100000
#define CLEAR_EMIF_TIMEOUT 1000
#define TIMEOUT_INT_RESP 10000
#define DDR_CONFIG(A, B, C, R) (((A) << 24) | ((B) << 16) | ((C) << 8) | (R))
#define DDR_CONFIG(A, B, C, R) (((A) << 24) | ((B) << 16) | ((C) << 8) | (R))
#define DDR_CONFIG_ELEMENTS (sizeof(ddr_config)/sizeof(uint32_t))
#define DDR_CONFIG_ELEMENTS (sizeof(ddr_config)/sizeof(uint32_t))
...
@@ -128,13 +127,13 @@ static int mem_calibration(void)
...
@@ -128,13 +127,13 @@ static int mem_calibration(void)
data
=
mmio_read_32
(
S10_MPFE_HMC_ADP_DDRCALSTAT
);
data
=
mmio_read_32
(
S10_MPFE_HMC_ADP_DDRCALSTAT
);
if
(
S10_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
1
)
if
(
S10_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
1
)
break
;
break
;
udelay
(
1
);
udelay
(
500
);
}
while
(
++
timeout
<
TIMEOUT_EMIF_CALIBRATION
);
}
while
(
++
timeout
<
TIMEOUT_EMIF_CALIBRATION
);
if
(
S10_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
0
)
{
if
(
S10_MPFE_HMC_ADP_DDRCALSTAT_CAL
(
data
)
==
0
)
{
status
=
clear_emif
();
status
=
clear_emif
();
if
(
status
)
if
(
status
)
ERROR
(
"Failed to clear Emif
\n
"
);
ERROR
(
"Failed to clear Emif
\n
"
);
}
else
{
}
else
{
break
;
break
;
}
}
...
...
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