[PATCH 5/9] ARM: am625-sk: enable 32k crystal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The am625-sk board has the 32k crystal equipped. Enable it to source the
RTC from the crystal rather than from the imprecise RC oscillator.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/am625-sk/Makefile |  1 +
 arch/arm/boards/am625-sk/board.c  | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/arch/arm/boards/am625-sk/Makefile b/arch/arm/boards/am625-sk/Makefile
index 1ff9e75a00..8c45b1e154 100644
--- a/arch/arm/boards/am625-sk/Makefile
+++ b/arch/arm/boards/am625-sk/Makefile
@@ -1,3 +1,4 @@
 pbl-y += lowlevel.o
+obj-y += board.o
 pbl-$(CONFIG_MACH_K3_CORTEX_A) += entry.o
 pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o am625-sk-ddr.o am625sip-sk-ddr.o
diff --git a/arch/arm/boards/am625-sk/board.c b/arch/arm/boards/am625-sk/board.c
new file mode 100644
index 0000000000..fd3bcdeac6
--- /dev/null
+++ b/arch/arm/boards/am625-sk/board.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#define pr_fmt(fmt) "am625-sk: " fmt
+
+#include <linux/kernel.h>
+#include <mach/k3/common.h>
+#include <driver.h>
+#include <bbu.h>
+
+static int am625_sk_probe(struct device *dev)
+{
+	am625_enable_32k_crystal();
+
+	return 0;
+}
+
+static __maybe_unused struct of_device_id am625_sk_ids[] = {
+	{
+		.compatible = "ti,am625-sk",
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct driver am625_sk_driver = {
+	.name = "am625-sk",
+	.probe = am625_sk_probe,
+	.of_compatible = am625_sk_ids,
+};
+coredevice_platform_driver(am625_sk_driver);

-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux