aboutsummaryrefslogtreecommitdiffstats
path: root/include/clocksource
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-05-06 23:49:09 +0200
committerArnd Bergmann <arnd@arndb.de>2013-05-06 23:49:09 +0200
commit241a9871263f3114717c0ed416a1bd1d2415d1fb (patch)
treec41f73f7c38ae2120c3507cd2d487eeed160472a /include/clocksource
parentMerge branch 'samsung/exynos-multiplatform-drivers' into late/multiplatform (diff)
parentARM: dts: exynops4210: really add universal_c210 dts (diff)
downloadlinux-dev-241a9871263f3114717c0ed416a1bd1d2415d1fb.tar.xz
linux-dev-241a9871263f3114717c0ed416a1bd1d2415d1fb.zip
Merge branch 'exynos/pwm-clocksource' into late/multiplatform
This series from Tomasz Figa restores support for the pwm clocksource in Exynos, which was broken during the conversion of the platform to the common clk framework. The clocksource is only used in one board in the mainline kernel (universal_c210), and this makes it work for DT based probing as well as restoring the non-DT based case. * exynos/pwm-clocksource: ARM: dts: exynops4210: really add universal_c210 dts ARM: dts: exynos4210: Add basic dts file for universal_c210 board ARM: dts: exynos4: Add node for PWM device ARM: SAMSUNG: Do not register legacy timer interrupts on Exynos clocksource: samsung_pwm_timer: Work around rounding errors in clockevents core clocksource: samsung_pwm_timer: Correct programming of clock events clocksource: samsung_pwm_timer: Use proper clockevents max_delta clocksource: samsung_pwm_timer: Add support for non-DT platforms clocksource: samsung_pwm_timer: Drop unused samsung_pwm struct clocksource: samsung_pwm_timer: Keep all driver data in a structure clocksource: samsung_pwm_timer: Make PWM spinlock global clocksource: samsung_pwm_timer: Let platforms select the driver Documentation: Add device tree bindings for Samsung PWM timers clocksource: add samsung pwm timer driver Conflicts: arch/arm/boot/dts/Makefile arch/arm/mach-exynos/common.c drivers/clocksource/Kconfig drivers/clocksource/Makefile Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/clocksource')
-rw-r--r--include/clocksource/samsung_pwm.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/clocksource/samsung_pwm.h b/include/clocksource/samsung_pwm.h
new file mode 100644
index 000000000000..5c449c8199e9
--- /dev/null
+++ b/include/clocksource/samsung_pwm.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __CLOCKSOURCE_SAMSUNG_PWM_H
+#define __CLOCKSOURCE_SAMSUNG_PWM_H
+
+#include <linux/spinlock.h>
+
+#define SAMSUNG_PWM_NUM 5
+
+extern spinlock_t samsung_pwm_lock;
+
+struct samsung_pwm_variant {
+ u8 bits;
+ u8 div_base;
+ u8 tclk_mask;
+ u8 output_mask;
+ bool has_tint_cstat;
+};
+
+void samsung_pwm_clocksource_init(void __iomem *base,
+ unsigned int *irqs, struct samsung_pwm_variant *variant);
+
+#endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */