2 * Keystone2: Architecture initialization
4 * (C) Copyright 2012-2014
5 * Texas Instruments Incorporated, <www.ti.com>
7 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/clock.h>
13 #include <asm/arch/hardware.h>
15 void chip_configuration_unlock(void)
17 __raw_writel(KEYSTONE_KICK0_MAGIC, KEYSTONE_KICK0);
18 __raw_writel(KEYSTONE_KICK1_MAGIC, KEYSTONE_KICK1);
21 int arch_cpu_init(void)
23 chip_configuration_unlock();
26 #ifdef CONFIG_SOC_K2HK
27 share_all_segments(8);
28 share_all_segments(9);
29 share_all_segments(10); /* QM PDSP */
30 share_all_segments(11); /* PCIE */
36 void reset_cpu(ulong addr)
38 volatile u32 *rstctrl = (volatile u32 *)(KS2_RSTCTRL);
41 tmp = *rstctrl & KS2_RSTCTRL_MASK;
42 *rstctrl = tmp | KS2_RSTCTRL_KEY;
44 *rstctrl &= KS2_RSTCTRL_SWRST;
50 void enable_caches(void)
52 #ifndef CONFIG_SYS_DCACHE_OFF
53 /* Enable D-cache. I-cache is already enabled in start.S */