[U-Boot] [PATCH v1 08/12] rockchip: rk3036: Add a simple syscon driver

Lin Huang hl at rock-chips.com
Wed Oct 21 07:37:49 CEST 2015


Add a driver that provides access to system controllers

Signed-off-by: Lin Huang <hl at rock-chips.com>
---
Changes in v1:
-clean copyright announcement

 arch/arm/mach-rockchip/rk3036/Makefile        |  2 +-
 arch/arm/mach-rockchip/rk3036/syscon_rk3036.c | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-rockchip/rk3036/syscon_rk3036.c

diff --git a/arch/arm/mach-rockchip/rk3036/Makefile b/arch/arm/mach-rockchip/rk3036/Makefile
index 643c8d1..5071551 100644
--- a/arch/arm/mach-rockchip/rk3036/Makefile
+++ b/arch/arm/mach-rockchip/rk3036/Makefile
@@ -5,4 +5,4 @@
 #
 
 obj-y += reset_rk3036.o
-
+obj-y += syscon_rk3036.o
diff --git a/arch/arm/mach-rockchip/rk3036/syscon_rk3036.c b/arch/arm/mach-rockchip/rk3036/syscon_rk3036.c
new file mode 100644
index 0000000..965afde
--- /dev/null
+++ b/arch/arm/mach-rockchip/rk3036/syscon_rk3036.c
@@ -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,
+};
-- 
1.9.1



More information about the U-Boot mailing list