]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rk3288: add arch_cpu_init for rk3288
authorKever Yang <kever.yang@rock-chips.com>
Fri, 12 Aug 2016 09:58:12 +0000 (17:58 +0800)
committerSimon Glass <sjg@chromium.org>
Thu, 22 Sep 2016 13:32:22 +0000 (07:32 -0600)
We do some SoC level one time setting initialization in
arch_cpu_init.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-rockchip/rk3288/Makefile
arch/arm/mach-rockchip/rk3288/rk3288.c [new file with mode: 0644]

index 5ec3f0d7e2bad0f288b5feef9ab511733bc8f793..b5b28efbe8163ee2f561ba486940e7e09b2aed6e 100644 (file)
@@ -5,5 +5,6 @@
 #
 
 obj-y += clk_rk3288.o
+obj-y += rk3288.o
 obj-y += sdram_rk3288.o
 obj-y += syscon_rk3288.o
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
new file mode 100644 (file)
index 0000000..92f34bb
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2016 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+#include <asm/io.h>
+#include <asm/arch/hardware.h>
+
+#define GRF_SOC_CON2 0x24c
+
+int arch_cpu_init(void)
+{
+       /* We do some SoC one time setting here. */
+
+       /* Use rkpwm by default */
+       rk_setreg(GRF_SOC_CON2, 1 << 0);
+
+       return 0;
+}