From c2a2d59db5ef7b8b9c35d1756585d8b3c6f35543 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Fri, 18 May 2012 20:10:53 +0000 Subject: cns3xxx: add support for 3.3 Compile tested only. SVN-Revision: 31809 --- .../patches-3.3/001-cns3xxx-clkdev-support.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 target/linux/cns3xxx/patches-3.3/001-cns3xxx-clkdev-support.patch (limited to 'target/linux/cns3xxx/patches-3.3/001-cns3xxx-clkdev-support.patch') diff --git a/target/linux/cns3xxx/patches-3.3/001-cns3xxx-clkdev-support.patch b/target/linux/cns3xxx/patches-3.3/001-cns3xxx-clkdev-support.patch new file mode 100644 index 0000000000..bc8773ca42 --- /dev/null +++ b/target/linux/cns3xxx/patches-3.3/001-cns3xxx-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 ++#include + #include + #include ++#include ++#include + #include + #include + #include +@@ -20,6 +23,10 @@ + #include + #include "core.h" + ++struct clk { ++ unsigned long rate; ++}; ++ + static struct map_desc cns3xxx_io_desc[] __initdata = { + { + .virtual = CNS3XXX_TC11MP_TWD_BASE_VIRT, +@@ -287,3 +294,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); -- cgit v1.2.3