diff options
Diffstat (limited to 'arch/mips/tx4938')
-rw-r--r-- | arch/mips/tx4938/common/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/tx4938/common/setup.c | 45 | ||||
-rw-r--r-- | arch/mips/tx4938/toshiba_rbtx4938/prom.c | 1 | ||||
-rw-r--r-- | arch/mips/tx4938/toshiba_rbtx4938/setup.c | 31 |
4 files changed, 27 insertions, 52 deletions
diff --git a/arch/mips/tx4938/common/Makefile b/arch/mips/tx4938/common/Makefile index eff3d1d47f88..56aa1ed1ee0c 100644 --- a/arch/mips/tx4938/common/Makefile +++ b/arch/mips/tx4938/common/Makefile @@ -2,7 +2,7 @@ # Makefile for common code for Toshiba TX4927 based systems # -obj-y += prom.o setup.o irq.o +obj-y += prom.o irq.o obj-$(CONFIG_KGDB) += dbgio.o EXTRA_CFLAGS += -Werror diff --git a/arch/mips/tx4938/common/setup.c b/arch/mips/tx4938/common/setup.c deleted file mode 100644 index 3ba4101d141e..000000000000 --- a/arch/mips/tx4938/common/setup.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * linux/arch/mips/tx4938/common/setup.c - * - * common tx4938 setup routines - * - * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the - * terms of the GNU General Public License version 2. This program is - * licensed "as is" without any warranty of any kind, whether express - * or implied. - * - * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) - */ - -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/kernel_stat.h> -#include <linux/module.h> -#include <linux/signal.h> -#include <linux/sched.h> -#include <linux/types.h> -#include <linux/interrupt.h> -#include <linux/ioport.h> -#include <linux/timex.h> -#include <linux/slab.h> -#include <linux/random.h> -#include <linux/irq.h> -#include <linux/bitops.h> -#include <asm/bootinfo.h> -#include <asm/io.h> -#include <asm/irq.h> -#include <asm/mipsregs.h> -#include <asm/system.h> -#include <asm/time.h> -#include <asm/tx4938/rbtx4938.h> - -extern void toshiba_rbtx4938_setup(void); - -void __init tx4938_setup(void); -void dump_cp0(char *key); - -void __init -plat_mem_setup(void) -{ - toshiba_rbtx4938_setup(); -} diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c index 69f21c1b7942..1644bffa501a 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); diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 632e5d201353..61249f049cd6 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c @@ -24,16 +24,12 @@ #include <asm/wbflush.h> #include <asm/reboot.h> -#include <asm/irq.h> #include <asm/time.h> #include <asm/txx9tmr.h> -#include <asm/uaccess.h> #include <asm/io.h> #include <asm/bootinfo.h> #include <asm/tx4938/rbtx4938.h> #ifdef CONFIG_SERIAL_TXX9 -#include <linux/tty.h> -#include <linux/serial.h> #include <linux/serial_core.h> #endif #include <linux/spi/spi.h> @@ -728,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; @@ -855,7 +853,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; @@ -1125,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); |