aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/tx4938/toshiba_rbtx4938
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/tx4938/toshiba_rbtx4938')
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/prom.c1
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/setup.c31
2 files changed, 26 insertions, 6 deletions
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)
47#ifndef CONFIG_TX4938_NAND_BOOT 47#ifndef CONFIG_TX4938_NAND_BOOT
48 prom_init_cmdline(); 48 prom_init_cmdline();
49#endif 49#endif
50 mips_machtype = MACH_TOSHIBA_RBTX4938;
51 50
52 msize = tx4938_get_mem_size(); 51 msize = tx4938_get_mem_size();
53 add_memory_region(0, msize << 20, BOOT_MEM_RAM); 52 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 632e5d20135..61249f049cd 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -24,16 +24,12 @@
24 24
25#include <asm/wbflush.h> 25#include <asm/wbflush.h>
26#include <asm/reboot.h> 26#include <asm/reboot.h>
27#include <asm/irq.h>
28#include <asm/time.h> 27#include <asm/time.h>
29#include <asm/txx9tmr.h> 28#include <asm/txx9tmr.h>
30#include <asm/uaccess.h>
31#include <asm/io.h> 29#include <asm/io.h>
32#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
33#include <asm/tx4938/rbtx4938.h> 31#include <asm/tx4938/rbtx4938.h>
34#ifdef CONFIG_SERIAL_TXX9 32#ifdef CONFIG_SERIAL_TXX9
35#include <linux/tty.h>
36#include <linux/serial.h>
37#include <linux/serial_core.h> 33#include <linux/serial_core.h>
38#endif 34#endif
39#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
@@ -728,6 +724,8 @@ void __init tx4938_board_setup(void)
728 /* CCFG */ 724 /* CCFG */
729 /* clear WatchDogReset,BusErrorOnWrite flag (W1C) */ 725 /* clear WatchDogReset,BusErrorOnWrite flag (W1C) */
730 tx4938_ccfgptr->ccfg |= TX4938_CCFG_WDRST | TX4938_CCFG_BEOW; 726 tx4938_ccfgptr->ccfg |= TX4938_CCFG_WDRST | TX4938_CCFG_BEOW;
727 /* do reset on watchdog */
728 tx4938_ccfgptr->ccfg |= TX4938_CCFG_WR;
731 /* clear PCIC1 reset */ 729 /* clear PCIC1 reset */
732 if (tx4938_ccfgptr->clkctr & TX4938_CLKCTR_PCIC1RST) 730 if (tx4938_ccfgptr->clkctr & TX4938_CLKCTR_PCIC1RST)
733 tx4938_ccfgptr->clkctr &= ~TX4938_CLKCTR_PCIC1RST; 731 tx4938_ccfgptr->clkctr &= ~TX4938_CLKCTR_PCIC1RST;
@@ -855,7 +853,7 @@ void __init plat_time_init(void)
855 txx9_gbus_clock / 2); 853 txx9_gbus_clock / 2);
856} 854}
857 855
858void __init toshiba_rbtx4938_setup(void) 856void __init plat_mem_setup(void)
859{ 857{
860 unsigned long long pcfg; 858 unsigned long long pcfg;
861 char *argptr; 859 char *argptr;
@@ -1125,12 +1123,35 @@ static int __init rbtx4938_spi_init(void)
1125} 1123}
1126arch_initcall(rbtx4938_spi_init); 1124arch_initcall(rbtx4938_spi_init);
1127 1125
1126/* Watchdog support */
1127
1128static int __init txx9_wdt_init(unsigned long base)
1129{
1130 struct resource res = {
1131 .start = base,
1132 .end = base + 0x100 - 1,
1133 .flags = IORESOURCE_MEM,
1134 .parent = &tx4938_reg_resource,
1135 };
1136 struct platform_device *dev =
1137 platform_device_register_simple("txx9wdt", -1, &res, 1);
1138 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
1139}
1140
1141static int __init rbtx4938_wdt_init(void)
1142{
1143 return txx9_wdt_init(TX4938_TMR_REG(2) & 0xfffffffffULL);
1144}
1145device_initcall(rbtx4938_wdt_init);
1146
1128/* Minimum CLK support */ 1147/* Minimum CLK support */
1129 1148
1130struct clk *clk_get(struct device *dev, const char *id) 1149struct clk *clk_get(struct device *dev, const char *id)
1131{ 1150{
1132 if (!strcmp(id, "spi-baseclk")) 1151 if (!strcmp(id, "spi-baseclk"))
1133 return (struct clk *)(txx9_gbus_clock / 2 / 4); 1152 return (struct clk *)(txx9_gbus_clock / 2 / 4);
1153 if (!strcmp(id, "imbus_clk"))
1154 return (struct clk *)(txx9_gbus_clock / 2);
1134 return ERR_PTR(-ENOENT); 1155 return ERR_PTR(-ENOENT);
1135} 1156}
1136EXPORT_SYMBOL(clk_get); 1157EXPORT_SYMBOL(clk_get);