summaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-12 09:18:00 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-12 09:18:00 +0000
commitd5f52f466ee5b18a569603b6b6f1e01974e8346f (patch)
tree97b650ca1cf4ee2701cbd835e0fcf87dc20e0b8a /target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch
parent3b06668af54dcebe230843328debfb52a5768c0a (diff)
[cns3xxx]: reorder, rename and refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34169 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch')
-rw-r--r--target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch b/target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch
new file mode 100644
index 000000000..8d10822bd
--- /dev/null
+++ b/target/linux/cns3xxx/patches-3.3/015-clkdev_support.patch
@@ -0,0 +1,69 @@
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -368,6 +368,7 @@ config ARCH_CNS3XXX
+ select CPU_V6K
+ select GENERIC_CLOCKEVENTS
+ select ARM_GIC
++ select CLKDEV_LOOKUP
+ select MIGHT_HAVE_CACHE_L2X0
+ select MIGHT_HAVE_PCI
+ select PCI_DOMAINS if PCI
+--- a/arch/arm/mach-cns3xxx/core.c
++++ b/arch/arm/mach-cns3xxx/core.c
+@@ -9,8 +9,11 @@
+ */
+
+ #include <linux/init.h>
++#include <linux/export.h>
+ #include <linux/interrupt.h>
+ #include <linux/clockchips.h>
++#include <linux/clk.h>
++#include <linux/clkdev.h>
+ #include <linux/io.h>
+ #include <asm/mach/map.h>
+ #include <asm/mach/time.h>
+@@ -20,6 +23,10 @@
+ #include <mach/cns3xxx.h>
+ #include "core.h"
+
++struct clk {
++ unsigned long rate;
++};
++
+ static struct map_desc cns3xxx_io_desc[] __initdata = {
+ {
+ .virtual = CNS3XXX_TC11MP_TWD_BASE_VIRT,
+@@ -277,3 +284,33 @@ void __init cns3xxx_l2x0_init(void)
+ }
+
+ #endif /* CONFIG_CACHE_L2X0 */
++
++int clk_enable(struct clk *clk)
++{
++ return 0;
++}
++EXPORT_SYMBOL(clk_enable);
++
++void clk_disable(struct clk *clk)
++{
++}
++EXPORT_SYMBOL(clk_disable);
++
++unsigned long clk_get_rate(struct clk *clk)
++{
++ return clk->rate;
++}
++EXPORT_SYMBOL(clk_get_rate);
++
++static struct clk_lookup cns3xxx_clocks[] = {
++ {
++ /* TODO */
++ },
++};
++
++int __init cns3xxx_clocks_init(void)
++{
++ clkdev_add_table(cns3xxx_clocks, ARRAY_SIZE(cns3xxx_clocks));
++ return 0;
++}
++postcore_initcall(cns3xxx_clocks_init);