u-boot-brain/arch/arm/include/asm
Doug Anderson 306f527eff Exynos: Fix L2 cache timings on Exynos5420 and Exynos5800
It was found that the L2 cache timings that we had before could cause
freezes and hangs.  We should make things more robust with better
timings.  Currently the production ChromeOS kernel applies these
timings, but it's nice to fixup firmware too (and upstream probably
won't take our kernel hacks).

This also provides a big cleanup of the L2 cache init code avoiding
some duplication.  The way things used to work:
* low_power_start() was installed by the SPL (both at boot and resume
  time) and left resident in iRAM for the kernel to use when bringing
  up additional CPUs.  It used configure_l2_ctlr() and
  configure_l2_actlr() when it detected it was on an A15.  This was
  needed (despite the L2 cache registers being shared among all A15s)
  because we might have been the first man in after the whole A15
  cluster was shutdown.
* secondary_cores_configure() was called on at boot time and at resume
  time.  Strangely this called configure_l2_ctlr() but not
  configure_l2_actlr() which was almost certainly wrong.  Given that
  we'll call both (see next bullet) later in the boot process it
  didn't matter for normal boot, but I guess this is how L2 cache
  settings got set on 5420/5800 (but not 5250?) at resume time.
* exynos5_set_l2cache_params() was called as part of cache enablement.
  This should happen at boot time (normally in the SPL except for USB
  boot where it happens in main U-Boot).

Note that the old code wasn't setting ECC/parity in the cache
enablement code but we happened to get it anyway because we'd call
secondary_cores_configure() at boot time.  For resume time we'd get it
anyway when the 2nd A15 core came up.

Let's make this a whole lot simpler.  Now we always set these
parameters in the same place for all boots and use the same code for
setting up secondary CPUs.

Intended net effects of this change (other than cleanup):
* Timings go from before:
    data: 0 cycle setup, 3 cycles (0x2) latency
    tag:  0 cycle setup, 3 cycles (0x2) latency
  after:
    data: 1 cycle setup, 4 cycles (0x3) latency
    tag:  1 cycle setup, 4 cycles (0x3) latency
* L2ACTLR is properly initted on 5420/5800 in all cases.

One note is that we're still relying on luck to keep low_power_start()
working.  The compiler is being nice and not storing anything on the
stack.

Another note is that on its own this patch won't help to fix cache
settings in an RW U-Boot update where we still have the RO SPL.  The
plan for that is:
* Have RW U-Boot re-init the cache right before calling the kernel
  (after it has turned the L2 cache off).  This is why the functions
  are in a header file instead of lowlevel_init.c.

* Have the kernel save the L2 cache settings of the boot CPU and apply
  them to all other CPUs.  We get a little lucky here because the old
  code was using "|=" to modify the registers and all of the bits that
  it's setting are also present in the new settings (!).  That means
  that when the 2nd CPU in the A15 cluster comes up it doesn't
  actually mess up the settings of the 1st CPU in the A15 cluster.  An
  alternative option is to have the kernel write its own
  low_power_start() code.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2015-02-28 18:03:46 +09:00
..
arch-am33xx clock_am43xx:Set the MAC clock to /5 for OPP100 2015-02-16 12:41:40 -05:00
arch-arm720t Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-armada-xp arm: armada-xp: Add SPL support used to include the DDR training code 2015-02-06 17:24:56 +01:00
arch-armada100 ARM: remove CONFIG_ARM926EJS defines 2014-11-20 11:28:25 -05:00
arch-armv7 Merge branch 'u-boot/master' into u-boot-arm/master 2013-07-25 17:57:46 +02:00
arch-bcm281xx bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
arch-bcm2835 rpi: add support for Raspberry Pi 2 model B 2015-02-21 08:28:16 -05:00
arch-bcmcygnus arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-bcmnsp arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
arch-ep93xx arm: ep9315: Return back Cirrus Logic EDB9315A board support 2014-07-04 23:45:48 +02:00
arch-exynos Exynos: Fix L2 cache timings on Exynos5420 and Exynos5800 2015-02-28 18:03:46 +09:00
arch-fsl-lsch3 armv8/fsl-lsch3: Enable erratum workround for A008514 2015-02-24 13:10:12 -08:00
arch-imx imx: consolidate set_chipselect_size function 2014-11-20 10:30:19 +01:00
arch-lpc32xx ARM: lpc3250: config: add generic board support 2015-02-16 15:48:36 -05:00
arch-ls102xa arm: ls1021x: Add support for initializing CAAM's stream id 2015-02-24 13:11:05 -08:00
arch-mvebu arm: marvell: Move arch-kirkwood/spi.h to arch-mvebu/spi.h 2014-10-23 09:59:20 -04:00
arch-mx5 imx: consolidate set_chipselect_size function 2014-11-20 10:30:19 +01:00
arch-mx6 imx: mx6: Fixed AIPS3 base address issue 2015-02-10 12:48:49 +01:00
arch-mx25 imx25: Add new hardware registers 2014-05-09 15:10:53 +02:00
arch-mx27 mx27: add missing constant for mx27 2013-09-10 19:12:55 +02:00
arch-mx31 arm: mx31: use common timer functions 2014-09-16 12:51:46 +02:00
arch-mx35 arm: mx35: use common timer functions 2014-09-16 12:53:09 +02:00
arch-mxs arm: mxs: Add 'Wait for JTAG user' if booted in JTAG mode 2015-02-10 12:48:50 +01:00
arch-omap3 omap3: add some MUX definitions for upcoming cairo 2015-01-29 12:00:50 -05:00
arch-omap4 ARM: OMAP4: Panda: rework DMM logic 2015-01-05 15:13:45 -05:00
arch-omap5 ARM: OMAP5: DRA7xx: Add support for power rail grouping 2015-01-29 12:00:49 -05:00
arch-pxa include: delete include/linux/config.h 2013-11-08 15:25:13 -05:00
arch-rmobile mmc: rmobile: Add SDHC support for Renesas rmobile ARM SoC 2015-01-19 16:24:25 +02:00
arch-s3c24x0 mtd: nand: s3c: Unify the register definition and naming 2014-11-26 23:21:43 -06:00
arch-s5pc1xx dm: exynos: gpio: Convert to driver model 2014-10-22 10:36:36 -06:00
arch-sa1100 Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
arch-socfpga socfpga: correctly increment freeze_controller_base address 2014-12-06 13:53:57 +01:00
arch-spear spear: move CONFIG_SYS_I2C_BASE from arch-spear/hardware to board configs 2014-02-20 06:49:02 +01:00
arch-stv0991 stv0991: enable ethernet support 2014-12-09 15:16:19 -05:00
arch-sunxi sunxi: Fix sun5i mbus speed when booting old kernels 2015-02-21 16:53:37 +01:00
arch-tegra dm: mmc: Remove use of fdtdec GPIO support 2015-01-29 17:09:52 -07:00
arch-tegra20 dm: tegra: video: Remove use of fdtdec GPIO support 2015-01-29 17:09:51 -07:00
arch-tegra30 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tegra114 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-tegra124 ARM: tegra: Implement powergate support 2014-12-18 13:19:20 -07:00
arch-u8500 Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
arch-uniphier ARM: UniPhier: refactor pinmon command 2015-02-07 00:15:03 +09:00
arch-vf610 arm: vf610: improve evaluation of reset source 2014-12-01 10:20:22 +01:00
arch-zynq dm: zynq: Remove inline gpio functions 2015-01-29 17:09:52 -07:00
armv8 armv8/fsl-lsch3: Change normal memory shareability 2015-02-24 13:08:22 -08:00
imx-common Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-05 12:48:09 -05:00
iproc-common arm: add Cygnus and NSP boards 2014-08-30 07:46:40 -04:00
kona-common bcm281xx: add support for "USB OTG clock" 2014-12-29 16:31:23 -05:00
proc-armv ARM: add missing HYP mode constant 2014-07-28 17:06:35 +02:00
ti-common dma: ti-edma3: introduce edma3 driver 2014-10-23 11:27:29 -04:00
armv7.h Exynos542x: Add workaround for ARM errata 799270 2015-02-28 18:03:46 +09:00
assembler.h arm: build arch memset/memcpy in Thumb2 mode 2015-01-09 10:20:22 -05:00
atomic.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
bitops.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
bootm.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
byteorder.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
cache.h ARM: cache_v7: use __weak 2014-07-04 19:57:22 +02:00
config.h arm: ls102xa: Add Freescale LS102xA SoC support 2014-09-08 10:30:32 -07:00
davinci_rtc.h am33xx, davinci: Create and use <asm/davinci_rtc.h> 2013-11-01 15:30:22 -04:00
dma-mapping.h arm: dma_alloc_coherent: malloc() -> memalign() 2013-09-14 12:08:00 +02:00
ehci-omap.h usb: new board-specific USB init interface 2013-10-20 23:42:40 +02:00
emif.h ARM: DRA7: EMIF: Update SDRAM_REF_CTRL register value 2015-02-16 12:41:40 -05:00
errno.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
gic.h arm64 patch: gicv3 support 2014-04-08 00:15:12 +02:00
global_data.h armv8/fsl-lsch3: Add support for second DDR clock 2015-02-24 13:09:14 -08:00
gpio.h gpio: Replace ARM gpio.h with the common API in include/asm-generic 2012-01-09 20:10:32 -06:00
hardware.h Move architecture-specific includes to arch/$ARCH/include/asm 2010-04-13 09:13:12 +02:00
io.h arm: ls102xa: Add Freescale LS102xA SoC support 2014-09-08 10:30:32 -07:00
linkage.h arm: adapt asm/linkage.h from Linux 2012-05-15 08:31:26 +02:00
mach-types.h arm: tegra: initial support for apalis t30 2014-10-22 09:30:54 -07:00
macro.h gic: fixed compilation error in GICv2 wait for interrupt macro 2014-10-28 07:57:31 +01:00
memory.h include: delete include/linux/config.h 2013-11-08 15:25:13 -05:00
omap_boot.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
omap_common.h arm: omap_common: expose tps659038 and dra7xx_dplls 2014-12-04 11:04:14 -05:00
omap_gpio.h dm: omap: gpio: Support driver model 2014-10-23 19:29:07 -06:00
omap_mmc.h omap_hsmmc: add driver check for write protection 2013-03-08 16:41:13 -05:00
omap_musb.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pcie_layerscape.h arm: ls102xa: Update PCIe dts node status 2014-12-11 09:35:56 -08:00
pl310.h mx6: Enable L2 cache support 2014-02-11 11:24:12 +01:00
posix_types.h armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases 2014-01-10 10:10:23 +01:00
processor.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
psci.h ARM: HYP/non-sec: add generic ARMv7 PSCI code 2014-07-28 17:19:18 +02:00
ptrace.h Remove ${objtree}/include/asm/proc/ link 2014-06-11 16:27:05 -04:00
sections.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
secure.h ARM: HYP/non-sec: allow relocation to secure RAM 2014-07-28 17:19:09 +02:00
semihosting.h arm: semihosting: fix up compile bugs 2014-12-29 07:44:06 -05:00
setup.h arm bootm: Allow to pass board specified atags 2012-10-30 15:28:05 -07:00
spl.h arm: spl: Provide for a board-specific loader 2015-02-16 20:15:06 +01:00
string.h arm: Use optimized memcpy and memset from linux 2011-04-27 19:38:07 +02:00
system.h armv8/fsl-lsch3: Convert flushing L3 to assembly to avoid using stack 2015-02-24 13:08:46 -08:00
types.h arm64: core support 2014-01-09 16:08:44 +01:00
u-boot-arm.h common: Move dram_init() declaration to common location 2015-02-09 15:08:48 +01:00
u-boot.h bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
unaligned.h arm64: core support 2014-01-09 16:08:44 +01:00
utils.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00