From 8b6c2324bf2b023e26d53052bbcddcbf2f2c97ee Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Wed, 24 Oct 2007 23:16:56 +0900 Subject: [MIPS] cleanup tx39/tx49 setup code Remove some unnecessary codes, includes and files. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle --- arch/mips/tx4938/toshiba_rbtx4938/setup.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'arch/mips/tx4938/toshiba_rbtx4938') diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 632e5d20135..2333d9ff879 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c @@ -24,16 +24,12 @@ #include #include -#include #include #include -#include #include #include #include #ifdef CONFIG_SERIAL_TXX9 -#include -#include #include #endif #include @@ -855,7 +851,7 @@ void __init plat_time_init(void) txx9_gbus_clock / 2); } -void __init toshiba_rbtx4938_setup(void) +void __init plat_mem_setup(void) { unsigned long long pcfg; char *argptr; -- cgit v1.2.2 From 7f3f4900619743f4e3af21e9228748c3d692a2c2 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Fri, 26 Oct 2007 22:42:31 +0900 Subject: [MIPS] remove unused mips_machtype Removed unused mips_machtype. These are only set but not used. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/tx4938/toshiba_rbtx4938/prom.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/mips/tx4938/toshiba_rbtx4938') diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c index 69f21c1b794..1644bffa501 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/prom.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c @@ -47,7 +47,6 @@ void __init prom_init(void) #ifndef CONFIG_TX4938_NAND_BOOT prom_init_cmdline(); #endif - mips_machtype = MACH_TOSHIBA_RBTX4938; msize = tx4938_get_mem_size(); add_memory_region(0, msize << 20, BOOT_MEM_RAM); -- cgit v1.2.2 From 2064ba23e58daa929eec6f5e7a2abc24574a95b9 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Sat, 24 Nov 2007 01:20:27 +0900 Subject: [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 Signed-off-by: Ralf Baechle --- arch/mips/tx4938/toshiba_rbtx4938/setup.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'arch/mips/tx4938/toshiba_rbtx4938') diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 2333d9ff879..61249f049cd 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c @@ -724,6 +724,8 @@ void __init tx4938_board_setup(void) /* CCFG */ /* clear WatchDogReset,BusErrorOnWrite flag (W1C) */ tx4938_ccfgptr->ccfg |= TX4938_CCFG_WDRST | TX4938_CCFG_BEOW; + /* do reset on watchdog */ + tx4938_ccfgptr->ccfg |= TX4938_CCFG_WR; /* clear PCIC1 reset */ if (tx4938_ccfgptr->clkctr & TX4938_CLKCTR_PCIC1RST) tx4938_ccfgptr->clkctr &= ~TX4938_CLKCTR_PCIC1RST; @@ -1121,12 +1123,35 @@ static int __init rbtx4938_spi_init(void) } arch_initcall(rbtx4938_spi_init); +/* Watchdog support */ + +static int __init txx9_wdt_init(unsigned long base) +{ + struct resource res = { + .start = base, + .end = base + 0x100 - 1, + .flags = IORESOURCE_MEM, + .parent = &tx4938_reg_resource, + }; + struct platform_device *dev = + platform_device_register_simple("txx9wdt", -1, &res, 1); + return IS_ERR(dev) ? PTR_ERR(dev) : 0; +} + +static int __init rbtx4938_wdt_init(void) +{ + return txx9_wdt_init(TX4938_TMR_REG(2) & 0xfffffffffULL); +} +device_initcall(rbtx4938_wdt_init); + /* Minimum CLK support */ struct clk *clk_get(struct device *dev, const char *id) { if (!strcmp(id, "spi-baseclk")) return (struct clk *)(txx9_gbus_clock / 2 / 4); + if (!strcmp(id, "imbus_clk")) + return (struct clk *)(txx9_gbus_clock / 2); return ERR_PTR(-ENOENT); } EXPORT_SYMBOL(clk_get); -- cgit v1.2.2