[U-Boot] [PATCH 5/5] rk3288: add arch_cpu_init for rk3288

Kever Yang kever.yang at rock-chips.com
Fri Aug 12 11:58:12 CEST 2016


We do some SoC level one time setting initialization in
arch_cpu_init.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 arch/arm/mach-rockchip/rk3288/Makefile |  1 +
 arch/arm/mach-rockchip/rk3288/rk3288.c | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 arch/arm/mach-rockchip/rk3288/rk3288.c

diff --git a/arch/arm/mach-rockchip/rk3288/Makefile b/arch/arm/mach-rockchip/rk3288/Makefile
index 82b00a1..2e0be74 100644
--- a/arch/arm/mach-rockchip/rk3288/Makefile
+++ b/arch/arm/mach-rockchip/rk3288/Makefile
@@ -6,5 +6,6 @@
 
 obj-y += clk_rk3288.o
 obj-y += reset_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
index 0000000..92f34bb
--- /dev/null
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -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;
+}
-- 
1.9.1




More information about the U-Boot mailing list