提交 b522842c 编写于 作者: L Linus Walleij 提交者: Russell King

ARM: 8448/1: add some L220 DT settings

The RealView ARM11MPCore enables parity, eventmon and shared
override in the cache controller through its current boardfile,
but the code and DT bindings for the ARM L220 is currently
lacking the ability to set this up from DT. Add the required
bool parameters for parity and shared override, but keep
eventmon out of it: this should be enabled by the event
monitor code.

Cc: devicetree@vger.kernel.org
Acked-by: NRob Herring <robh@kernel.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 8005c49d
...@@ -67,12 +67,14 @@ Optional properties: ...@@ -67,12 +67,14 @@ Optional properties:
disable if zero. disable if zero.
- arm,prefetch-offset : Override prefetch offset value. Valid values are - arm,prefetch-offset : Override prefetch offset value. Valid values are
0-7, 15, 23, and 31. 0-7, 15, 23, and 31.
- arm,shared-override : The default behavior of the pl310 cache controller with - arm,shared-override : The default behavior of the L220 or PL310 cache
respect to the shareable attribute is to transform "normal memory controllers with respect to the shareable attribute is to transform "normal
non-cacheable transactions" into "cacheable no allocate" (for reads) or memory non-cacheable transactions" into "cacheable no allocate" (for reads)
"write through no write allocate" (for writes). or "write through no write allocate" (for writes).
On systems where this may cause DMA buffer corruption, this property must be On systems where this may cause DMA buffer corruption, this property must be
specified to indicate that such transforms are precluded. specified to indicate that such transforms are precluded.
- arm,parity-enable : enable parity checking on the L2 cache (L220 or PL310).
- arm,parity-disable : disable parity checking on the L2 cache (L220 or PL310).
- prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1> - prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1>
(forcibly enable), property absent (retain settings set by firmware) (forcibly enable), property absent (retain settings set by firmware)
- prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable), - prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable),
......
...@@ -1060,6 +1060,18 @@ static void __init l2x0_of_parse(const struct device_node *np, ...@@ -1060,6 +1060,18 @@ static void __init l2x0_of_parse(const struct device_node *np,
val |= (dirty - 1) << L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT; val |= (dirty - 1) << L2X0_AUX_CTRL_DIRTY_LATENCY_SHIFT;
} }
if (of_property_read_bool(np, "arm,parity-enable")) {
mask &= ~L2C_AUX_CTRL_PARITY_ENABLE;
val |= L2C_AUX_CTRL_PARITY_ENABLE;
} else if (of_property_read_bool(np, "arm,parity-disable")) {
mask &= ~L2C_AUX_CTRL_PARITY_ENABLE;
}
if (of_property_read_bool(np, "arm,shared-override")) {
mask &= ~L2C_AUX_CTRL_SHARED_OVERRIDE;
val |= L2C_AUX_CTRL_SHARED_OVERRIDE;
}
ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_256K); ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_256K);
if (ret) if (ret)
return; return;
...@@ -1176,6 +1188,14 @@ static void __init l2c310_of_parse(const struct device_node *np, ...@@ -1176,6 +1188,14 @@ static void __init l2c310_of_parse(const struct device_node *np,
*aux_mask &= ~L2C_AUX_CTRL_SHARED_OVERRIDE; *aux_mask &= ~L2C_AUX_CTRL_SHARED_OVERRIDE;
} }
if (of_property_read_bool(np, "arm,parity-enable")) {
*aux_val |= L2C_AUX_CTRL_PARITY_ENABLE;
*aux_mask &= ~L2C_AUX_CTRL_PARITY_ENABLE;
} else if (of_property_read_bool(np, "arm,parity-disable")) {
*aux_val &= ~L2C_AUX_CTRL_PARITY_ENABLE;
*aux_mask &= ~L2C_AUX_CTRL_PARITY_ENABLE;
}
prefetch = l2x0_saved_regs.prefetch_ctrl; prefetch = l2x0_saved_regs.prefetch_ctrl;
ret = of_property_read_u32(np, "arm,double-linefill", &val); ret = of_property_read_u32(np, "arm,double-linefill", &val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册