Skip to contentSkip to conversation

ARM: CSR: add rtc i/o bridge interface for SiRFprimaII

PATCH New Barry Song 1 participant 1 message Aug 31, 2011

Subsystems (4)
lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH v3 1/4 ARM: CSR: add rtc i/o bridge interface for SiRFprimaII

From: Zhiwu Song <[email protected]>

The module is a bridge between the RTC clock domain and the CPU interface clock domain. ARM access the register of SYSRTC, GPSRTC and PWRC through this module.

---
-v3:
fix issues pointed out by Jamie Iles;
add some comments to describle sirfsoc_rtciobrg_base and extern functions used only by pm asm codes

 arch/arm/boot/dts/prima2-cb.dts      |    2 +-
 arch/arm/mach-prima2/Makefile        |    1 +
 arch/arm/mach-prima2/rtciobrg.c      |  139 ++++++++++++++++++++++++++++++++++
 include/linux/rtc/sirfsoc_rtciobrg.h |   18 +++++
 4 files changed, 159 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-prima2/rtciobrg.c
 create mode 100644 include/linux/rtc/sirfsoc_rtciobrg.h
arch/arm/boot/dts/prima2-cb.dts +1 -1
index 6fecc88..e5e9bc6 100644
@@ -358,7 +358,7 @@
 		};
 
 		rtc-iobg {
-			compatible = "sirf,prima2-rtciobg", "simple-bus";
+			compatible = "sirf,prima2-rtciobg", "sirf-prima2-rtciobg-bus";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			reg = <0x80030000 0x10000>;
arch/arm/mach-prima2/Makefile +1 -0
index 7af7fc0..f49d70b 100644
@@ -3,5 +3,6 @@ obj-y += irq.o
 obj-y += clock.o
 obj-y += rstc.o
 obj-y += prima2.o
+obj-y += rtciobrg.o
 obj-$(CONFIG_DEBUG_LL) += lluart.o
 obj-$(CONFIG_CACHE_L2X0) += l2x0.o
arch/arm/mach-prima2/rtciobrg.c new file +139 -0

139 lines not on this page · raw message

include/linux/rtc/sirfsoc_rtciobrg.h new file +18 -0
new file mode 100644
index 0000000..2c92e1c
@@ -0,0 +1,18 @@
+/*
+ * RTC I/O Bridge interfaces for CSR SiRFprimaII
+ * ARM access the registers of SYSRTC, GPSRTC and PWRC through this module
+ *
+ * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */
+#ifndef _SIRFSOC_RTC_IOBRG_H_
+#define _SIRFSOC_RTC_IOBRG_H_
+
+extern void sirfsoc_rtc_iobrg_besyncing(void);
+
+extern u32 sirfsoc_rtc_iobrg_readl(u32 addr);
+
+extern void sirfsoc_rtc_iobrg_writel(u32 val, u32 addr);
+
+#endif
Signature · 6 lines
1.7.1



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog