diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
commit | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch) | |
tree | 5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/tx4938 | |
parent | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff) | |
parent | a9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits)
[MIPS] remove Documentation/mips/GT64120.README
[MIPS] Malta: remaining bits of the board support code cleanup
[MIPS] Malta: make the helper function static
[MIPS] Malta: fix braces at single statement blocks
[MIPS] Malta, Atlas: move an extern function declaration to the header file
[MIPS] Malta: Use C89 style for comments
[MIPS] Malta: else should follow close brace in malta_int.c
[MIPS] Malta: remove a superfluous comment
[MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
[MIPS] Malta, Atlas, Sead: remove an extern from .c files
[MIPS] Malta: fix oversized lines in malta_int.c
[MIPS] Malta: remove a dead function declaration
[MIPS] Malta: use tabs not spaces
[MIPS] Malta: set up the screen info in a separate function
[MIPS] Malta: check the PCI clock frequency in a separate function
[MIPS] Malta: use the KERN_ facility level in printk()
[MIPS] Malta: use Linux kernel style for structure initialization
[MIPS]: constify function pointer tables
[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64
[MIPS] Cobalt 64-bits kernels can be safely unmarked experimental
...
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 @@ | |||
2 | # Makefile for common code for Toshiba TX4927 based systems | 2 | # Makefile for common code for Toshiba TX4927 based systems |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += prom.o setup.o irq.o | 5 | obj-y += prom.o irq.o |
6 | obj-$(CONFIG_KGDB) += dbgio.o | 6 | obj-$(CONFIG_KGDB) += dbgio.o |
7 | 7 | ||
8 | EXTRA_CFLAGS += -Werror | 8 | 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 @@ | |||
1 | /* | ||
2 | * linux/arch/mips/tx4938/common/setup.c | ||
3 | * | ||
4 | * common tx4938 setup routines | ||
5 | * | ||
6 | * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the | ||
7 | * terms of the GNU General Public License version 2. This program is | ||
8 | * licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | * | ||
11 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) | ||
12 | */ | ||
13 | |||
14 | #include <linux/errno.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel_stat.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/signal.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/types.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/timex.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/random.h> | ||
26 | #include <linux/irq.h> | ||
27 | #include <linux/bitops.h> | ||
28 | #include <asm/bootinfo.h> | ||
29 | #include <asm/io.h> | ||
30 | #include <asm/irq.h> | ||
31 | #include <asm/mipsregs.h> | ||
32 | #include <asm/system.h> | ||
33 | #include <asm/time.h> | ||
34 | #include <asm/tx4938/rbtx4938.h> | ||
35 | |||
36 | extern void toshiba_rbtx4938_setup(void); | ||
37 | |||
38 | void __init tx4938_setup(void); | ||
39 | void dump_cp0(char *key); | ||
40 | |||
41 | void __init | ||
42 | plat_mem_setup(void) | ||
43 | { | ||
44 | toshiba_rbtx4938_setup(); | ||
45 | } | ||
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) | |||
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 632e5d201353..61249f049cd6 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 | ||
858 | void __init toshiba_rbtx4938_setup(void) | 856 | void __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 | } |
1126 | arch_initcall(rbtx4938_spi_init); | 1124 | arch_initcall(rbtx4938_spi_init); |
1127 | 1125 | ||
1126 | /* Watchdog support */ | ||
1127 | |||
1128 | static 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 | |||
1141 | static int __init rbtx4938_wdt_init(void) | ||
1142 | { | ||
1143 | return txx9_wdt_init(TX4938_TMR_REG(2) & 0xfffffffffULL); | ||
1144 | } | ||
1145 | device_initcall(rbtx4938_wdt_init); | ||
1146 | |||
1128 | /* Minimum CLK support */ | 1147 | /* Minimum CLK support */ |
1129 | 1148 | ||
1130 | struct clk *clk_get(struct device *dev, const char *id) | 1149 | struct 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 | } |
1136 | EXPORT_SYMBOL(clk_get); | 1157 | EXPORT_SYMBOL(clk_get); |