]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3036: Add a simple syscon driver
authorhuang lin <hl@rock-chips.com>
Tue, 17 Nov 2015 06:20:19 +0000 (14:20 +0800)
committerSimon Glass <sjg@chromium.org>
Tue, 1 Dec 2015 15:07:22 +0000 (08:07 -0700)
Add a driver that provides access to system controllers

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-rockchip/rk3036/Makefile
arch/arm/mach-rockchip/rk3036/syscon_rk3036.c [new file with mode: 0644]

index a48334733580d34601bd16691280c5ed87c27d5f..5d14b95eb1b4dad8dbe4a7f71315923b50591736 100644 (file)
@@ -6,5 +6,5 @@
 
 ifndef CONFIG_SPL_BUILD
 obj-y += reset_rk3036.o
+obj-y += syscon_rk3036.o
 endif
-
diff --git a/arch/arm/mach-rockchip/rk3036/syscon_rk3036.c b/arch/arm/mach-rockchip/rk3036/syscon_rk3036.c
new file mode 100644 (file)
index 0000000..965afde
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * (C) Copyright 2015 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <syscon.h>
+#include <asm/arch/clock.h>
+
+static const struct udevice_id rk3036_syscon_ids[] = {
+       { .compatible = "rockchip,rk3036-grf", .data = ROCKCHIP_SYSCON_GRF },
+       { }
+};
+
+U_BOOT_DRIVER(syscon_rk3036) = {
+       .name = "rk3036_syscon",
+       .id = UCLASS_SYSCON,
+       .of_match = rk3036_syscon_ids,
+};