linux/Documentation/devicetree/bindings/arm
Linus Walleij f3354ab674 ARM: 8169/1: l2c: parse cache properties from ePAPR definitions
When both 'cache-size' and 'cache-sets' are specified for a L2 cache
controller node, parse those properties and set up the
set size based on which type of L2 cache controller we are using.

Update the L2 cache controller Device Tree binding with the optional
'cache-size', 'cache-sets', 'cache-block-size' and 'cache-line-size'
properties. These come from the ePAPR specification.

Using the cache size, number of sets and cache line size we can
calculate desired associativity of the L2 cache. This is done
by the calculation:

    set size = cache size / sets
    ways = set size / line size
    way size = cache size / ways = sets * line size
    associativity = cache size / way size

Example output from the PB1176 DT that look like this:

L2: l2-cache {
    compatible = "arm,l220-cache";
    (...)
    arm,override-auxreg;
    cache-size = <131072>; // 128kB
    cache-sets = <512>;
    cache-line-size = <32>;
};

Ends up like this:

L2C OF: override cache size: 131072 bytes (128KB)
L2C OF: override line size: 32 bytes
L2C OF: override way size: 16384 bytes (16KB)
L2C OF: override associativity: 8
L2C: DT/platform modifies aux control register: 0x02020fff -> 0x02030fff
L2C-220 cache controller enabled, 8 ways, 128 kB
L2C-220: CACHE_ID 0x41000486, AUX_CTRL 0x06030fff

Which is consistent with the value earlier hardcoded for the
PB1176 platform.

This patch is an extended version based on the initial patch
by Florian Fainelli.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-10-02 21:26:37 +01:00
..
altera Documentation: dt: reset: move socfpga-reset 2014-05-05 22:33:17 -05:00
bcm devicetree: bindings: document Broadcom CPU enable method 2014-07-28 09:41:05 -04:00
calxeda ARM: dts: calxeda: move memory-controller node out of ecx-common.dtsi 2013-11-04 17:01:05 -06:00
cpu-enable-method Documentation: bindings: add the marvell,berlin-smp CPU enable method 2014-06-16 13:17:52 +02:00
davinci mtd: nand: davinci: move bindings under mtd 2014-01-03 11:22:25 -08:00
exynos ARM: EXYNOS: Add support for clock handling in power domain 2014-07-11 08:03:19 +09:00
firmware of: add Trusted Foundations bindings documentation 2013-12-13 12:50:30 -07:00
hisilicon ARM: hisi: enable hix5hd2 SoC 2014-07-30 22:32:20 -07:00
keystone ARM: dts: keystone: use common "ti,keystone" compatible instead of -evm 2014-03-20 17:00:27 -04:00
mrvl ARM: MM: Add DT binding for Feroceon L2 cache 2014-02-22 20:43:49 +00:00
msm devicetree: bindings: Document qcom,saw2 node 2014-02-11 15:00:39 -06:00
omap Merge branch 'for-v3.17/omap2-use-dt-clks' of http://github.com/t-kristo/linux-pm into omap-for-v3.17/dt 2014-07-09 04:58:54 -07:00
rockchip ARM: rockchip: add power-management-unit 2014-03-01 17:21:53 +01:00
samsung ARM: SoC device-tree changes for 3.17 2014-08-08 11:16:58 -07:00
spear doc: fix misspellings with 'codespell' tool 2013-05-28 12:02:12 +02:00
tegra ARM: tegra: add missing clock documentation to DT bindings 2013-12-11 16:41:55 -07:00
vt8500
adapteva.txt Documentation: devicetree: Adapteva boards 2014-07-25 09:45:44 +02:00
arch_timer.txt clocksource: arch_arm_timer: Fix age-old arch timer C3STOP detection issue 2014-04-29 15:06:36 +02:00
arm-boards dt/bindings: arm-boards: add binding for Versatile core module 2014-06-24 14:16:02 -05:00
armada-38x.txt ARM: mvebu: Fix the improper use of the compatible string armada38x using a wildcard 2014-06-24 11:33:24 +00:00
armada-370-xp-pmsu.txt ARM: mvebu: add Armada 38x compatible string to pmsu 2014-05-08 16:08:38 +00:00
armada-370-xp.txt
armada-375.txt ARM: mvebu: add initial support for the Armada 375 SOCs 2014-02-22 00:41:10 +00:00
armada-380-mpcore-soc-ctrl.txt ARM: mvebu: add CA9 MPcore SoC Controller node 2014-07-16 12:34:22 +00:00
armada-cpu-reset.txt ARM: mvebu: introduce CPU reset code 2014-04-24 05:24:02 +00:00
armadeus.txt ARM: dts: Add apf51 basic support 2013-02-10 23:25:45 +08:00
atmel-at91.txt ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
atmel-pmc.txt Documentation: dt: document all the atmel pmc compatibles 2014-07-09 19:05:10 +02:00
axxia.txt ARM: Add platform support for LSI AXM55xx SoC 2014-05-23 18:18:39 +02:00
bcm2835.txt
bcm4708.txt ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU 2014-03-06 00:36:02 -05:00
brcm-brcmstb.txt ARM: brcmstb: add misc. DT bindings for brcmstb 2014-07-28 10:01:09 -04:00
calxeda.txt ARM: dts: Add Calxeda ECX-2000 support 2012-10-31 13:46:17 -05:00
cci.txt ARM: dts: Document the CCI PMU DT bindings 2013-09-17 12:02:15 +01:00
ccn.txt bus: ARM CCN PMU driver 2014-07-23 22:14:43 +02:00
coherency-fabric.txt ARM: mvebu: add Armada 38x support to the coherency code 2014-04-24 05:00:38 +00:00
cpus.txt ARM: mach-bcm: dt updatees for 3.17 2014-07-28 17:05:59 +02:00
davinci.txt ARM: davinci: add support for am1808 based EnBW CMC board 2012-10-29 15:43:43 +05:30
fsl.txt ARM: mx25pdk: Add device tree support 2013-02-10 23:25:42 +08:00
gic-v3.txt arm64: GICv3 device tree binding documentation 2014-07-11 04:57:30 -07:00
gic.txt ARM: brcmstb: gic: add compatible string for Broadcom Brahma15 2014-07-28 10:01:28 -04:00
global_timer.txt documentaion: DT: allow a A5 compatible string in global timer 2014-04-22 11:44:25 +02:00
insignal-boards.txt
kirkwood.txt cpufreq: kirkwood: Add a cpufreq driver for Marvell Kirkwood SoCs 2013-02-09 12:56:08 +01:00
l2cc.txt ARM: 8169/1: l2c: parse cache properties from ePAPR definitions 2014-10-02 21:26:37 +01:00
lpc32xx-mic.txt
lpc32xx.txt
marvell,berlin.txt Documentation: bindings: add the Berlin CPU control doc 2014-06-16 13:17:51 +02:00
marvell,dove.txt devicetree: bindings: add missing Marvell Dove SoC documentation 2014-02-25 18:54:02 +01:00
marvell,kirkwood.txt DT: bindings: add missing Marvell Kirkwood SoC documentation 2014-04-14 12:23:04 -05:00
mediatek.txt dt-bindings: add documentation for Mediatek SoC 2014-07-22 17:52:38 +02:00
moxart.txt ARM: moxart: add MOXA ART SoC device tree files 2013-12-22 11:57:57 -08:00
mvebu-system-controller.txt ARM: mvebu: add Armada 375 support to the system-controller driver 2014-02-22 00:41:09 +00:00
nspire.txt arm: Add device trees for TI-Nspire hardware 2013-06-21 20:06:29 +02:00
olimex.txt
picoxcell.txt
pmu.txt ARM: 8054/1: perf: add support for the Cortex-A17 PMU 2014-05-25 23:49:43 +01:00
primecell.txt serial: pl011: use generic DMA slave configuration if possible 2013-03-12 17:56:09 +01:00
psci.txt Documentation: devicetree: Add new binding for PSCIv0.2 2014-05-15 10:16:24 -04:00
rockchip.txt ARM: dts: rockchip: add root compatible properties 2014-05-10 01:38:00 +02:00
rtsm-dcscb.txt ARM: vexpress: introduce DCSCB support 2013-05-29 15:50:34 -04:00
samsung-boards.txt ARM: EXYNOS: Add support for Exynos secure firmware 2013-04-09 01:52:30 +09:00
sirf.txt ARM: PRIMA2: add CSR SiRFmarco device tree .dts 2013-01-22 19:33:30 +08:00
spear-misc.txt ARM: SPEAr13xx: Add bindings and dt node for misc block 2014-07-14 11:04:42 +05:30
spear-timer.txt
spear.txt
ste-nomadik.txt ARM: nomadik: convert all clocks except timer to dt 2013-05-12 21:49:56 +02:00
ste-u300.txt doc: devicetree: bindings: Fix typo in bindings 2013-07-25 12:32:07 +02:00
sti.txt ARM: STi: Add STiH407 SoC support 2014-05-17 10:22:30 +02:00
tegra.txt ARM: tegra: initial support for apalis t30 2014-07-17 15:02:09 +02:00
topology.txt ARM: topology: Make it clear that all CPUs need to be described 2014-04-02 12:14:16 +01:00
twd.txt
versatile-fpga-irq.txt irqchip: versatile FPGA: support cascaded interrupts from DT 2014-01-03 22:26:13 +01:00
vexpress-scc.txt ARM: vexpress: Add SCC to V2P-CA15_A7's device tree 2013-08-07 14:55:27 +01:00
vexpress-sysreg.txt mfd: vexpress: Define the device as MFD cells 2014-05-15 17:02:19 +01:00
vexpress.txt mfd: vexpress: Convert custom func API to regmap 2014-05-15 17:02:18 +01:00
vic.txt irqchip: vic: Parse interrupt and resume masks from device tree 2013-09-17 06:48:27 +09:00
vt8500.txt arm: vt8500: Add support for Wondermedia WM8750/WM8850 2013-01-12 15:51:24 +13:00
xen.txt
xilinx.txt ARM: zynq: DT: Clarify Xilinx Zynq platform 2014-07-30 13:26:54 +02:00