aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/tx4927
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2007-11-23 11:20:27 -0500
committerRalf Baechle <ralf@linux-mips.org>2008-01-29 05:14:58 -0500
commit2064ba23e58daa929eec6f5e7a2abc24574a95b9 (patch)
tree77967a6451b379f49a62c364e7ef352a0de50f5a /arch/mips/tx4927
parent68efdb81c6c3b5c1df7169a4b460907198b19103 (diff)
[MIPS] TXx9 watchdog support for rbhma3100,rbhma4200,rbhma4500
This patch adds support for txx9wdt driver to rbhma3100, rbhma4200 and rbhma4500 platform. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/tx4927')
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index c29a5283237b..e466e5e711d8 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -50,6 +50,7 @@
50#include <linux/pci.h> 50#include <linux/pci.h>
51#include <linux/pm.h> 51#include <linux/pm.h>
52#include <linux/platform_device.h> 52#include <linux/platform_device.h>
53#include <linux/clk.h>
53 54
54#include <asm/bootinfo.h> 55#include <asm/bootinfo.h>
55#include <asm/io.h> 56#include <asm/io.h>
@@ -803,6 +804,8 @@ void __init plat_mem_setup(void)
803 } 804 }
804 805
805 /* CCFG */ 806 /* CCFG */
807 /* do reset on watchdog */
808 tx4927_ccfgptr->ccfg |= TX4927_CCFG_WR;
806 /* enable Timeout BusError */ 809 /* enable Timeout BusError */
807 if (tx4927_ccfg_toeon) 810 if (tx4927_ccfg_toeon)
808 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE; 811 tx4927_ccfgptr->ccfg |= TX4927_CCFG_TOE;
@@ -944,3 +947,55 @@ static int __init rbtx4927_ne_init(void)
944 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 947 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
945} 948}
946device_initcall(rbtx4927_ne_init); 949device_initcall(rbtx4927_ne_init);
950
951/* Watchdog support */
952
953static int __init txx9_wdt_init(unsigned long base)
954{
955 struct resource res = {
956 .start = base,
957 .end = base + 0x100 - 1,
958 .flags = IORESOURCE_MEM,
959 };
960 struct platform_device *dev =
961 platform_device_register_simple("txx9wdt", -1, &res, 1);
962 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
963}
964
965static int __init rbtx4927_wdt_init(void)
966{
967 return txx9_wdt_init(TX4927_TMR_REG(2) & 0xfffffffffULL);
968}
969device_initcall(rbtx4927_wdt_init);
970
971/* Minimum CLK support */
972
973struct clk *clk_get(struct device *dev, const char *id)
974{
975 if (!strcmp(id, "imbus_clk"))
976 return (struct clk *)50000000;
977 return ERR_PTR(-ENOENT);
978}
979EXPORT_SYMBOL(clk_get);
980
981int clk_enable(struct clk *clk)
982{
983 return 0;
984}
985EXPORT_SYMBOL(clk_enable);
986
987void clk_disable(struct clk *clk)
988{
989}
990EXPORT_SYMBOL(clk_disable);
991
992unsigned long clk_get_rate(struct clk *clk)
993{
994 return (unsigned long)clk;
995}
996EXPORT_SYMBOL(clk_get_rate);
997
998void clk_put(struct clk *clk)
999{
1000}
1001EXPORT_SYMBOL(clk_put);