summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-30 16:55:34 -0600
committerSimon Glass <sjg@chromium.org>2015-09-02 21:28:24 -0600
commit13d80ff5afae155a33e826399b7d47f69aa2451e (patch)
treebc2619990c09d0185bd3ee91a14c9accd5f7548b
parent3c5d0e34f6fe64144de0ad84e42f113c1cc2e0ca (diff)
rockchip: rk3288: Add a simple syscon driver
Add a driver that provides access to system controllers. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arm/mach-rockchip/rk3288/Makefile1
-rw-r--r--arch/arm/mach-rockchip/rk3288/syscon_rk3288.c25
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/Makefile b/arch/arm/mach-rockchip/rk3288/Makefile
index c6663f022a..3f9900dcef 100644
--- a/arch/arm/mach-rockchip/rk3288/Makefile
+++ b/arch/arm/mach-rockchip/rk3288/Makefile
@@ -5,3 +5,4 @@
#
obj-y += reset_rk3288.o
+obj-y += syscon_rk3288.o
diff --git a/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
new file mode 100644
index 0000000000..c9f7c4e32f
--- /dev/null
+++ b/arch/arm/mach-rockchip/rk3288/syscon_rk3288.c
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * 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 rk3288_syscon_ids[] = {
+ { .compatible = "rockchip,rk3288-noc", .data = ROCKCHIP_SYSCON_NOC },
+ { .compatible = "rockchip,rk3288-grf", .data = ROCKCHIP_SYSCON_GRF },
+ { .compatible = "rockchip,rk3288-sgrf", .data = ROCKCHIP_SYSCON_SGRF },
+ { .compatible = "rockchip,rk3288-pmu", .data = ROCKCHIP_SYSCON_PMU },
+ { }
+};
+
+U_BOOT_DRIVER(syscon_rk3288) = {
+ .name = "rk3288_syscon",
+ .id = UCLASS_SYSCON,
+ .of_match = rk3288_syscon_ids,
+};