提交 5c95ed47 编写于 作者: F Fabrice Gasnier 提交者: Russell King

ARM: 8310/1: l2c: Fix prefetch settings dt parsing

Allow prefetch settings overriding by device tree, in case
l2x0_cache_size_of_parse() returns value, prefetch tuning
properties are silently ignored. E.g. arm,double-linefill* and
arm,prefetch*.
This happens for example, when "cache-size" or "cache-sets"
properties haven't been filled in l2c dt node.

Comments from Fabrice Gasnier:

 Allow device tree to override the L2C prefetch settings, even when
 l2x0_cache_size_of_parse() fails to parse the cache geometry due to (eg)
 missing "cache-size" or "cache-sets" properties.
Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: NTomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 6d021b72
...@@ -1131,9 +1131,7 @@ static void __init l2c310_of_parse(const struct device_node *np, ...@@ -1131,9 +1131,7 @@ static void __init l2c310_of_parse(const struct device_node *np,
} }
ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K); ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K);
if (ret) if (!ret) {
return;
switch (assoc) { switch (assoc) {
case 16: case 16:
*aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK;
...@@ -1149,6 +1147,7 @@ static void __init l2c310_of_parse(const struct device_node *np, ...@@ -1149,6 +1147,7 @@ static void __init l2c310_of_parse(const struct device_node *np,
assoc); assoc);
break; break;
} }
}
prefetch = l2x0_saved_regs.prefetch_ctrl; prefetch = l2x0_saved_regs.prefetch_ctrl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册