aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-18 12:51:47 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-20 09:38:21 -0400
commit94a4c32939dede9328c6e4face335eb8441fc18d (patch)
tree0ac510bf3b90cb79fe94112b95dd77d96c190bf9 /arch/mips/txx9/generic/setup.c
parent255033a9bb900a06c9a7798908ce12557d24fb66 (diff)
[MIPS] TXx9: Add 64-bit support
SYS_SUPPORTS_64BIT_KERNEL is enabled for RBTX4927/RBTX4938, but actually it was broken for long time (or from the beginning). Now it should work. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r--arch/mips/txx9/generic/setup.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 8caef07701bb..3715a8f5ea44 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -30,6 +30,7 @@ struct resource txx9_ce_res[8];
30static char txx9_ce_res_name[8][4]; /* "CEn" */ 30static char txx9_ce_res_name[8][4]; /* "CEn" */
31 31
32/* pcode, internal register */ 32/* pcode, internal register */
33unsigned int txx9_pcode;
33char txx9_pcode_str[8]; 34char txx9_pcode_str[8];
34static struct resource txx9_reg_res = { 35static struct resource txx9_reg_res = {
35 .name = txx9_pcode_str, 36 .name = txx9_pcode_str,
@@ -59,15 +60,16 @@ unsigned int txx9_master_clock;
59unsigned int txx9_cpu_clock; 60unsigned int txx9_cpu_clock;
60unsigned int txx9_gbus_clock; 61unsigned int txx9_gbus_clock;
61 62
63int txx9_ccfg_toeon __initdata = 1;
62 64
63/* Minimum CLK support */ 65/* Minimum CLK support */
64 66
65struct clk *clk_get(struct device *dev, const char *id) 67struct clk *clk_get(struct device *dev, const char *id)
66{ 68{
67 if (!strcmp(id, "spi-baseclk")) 69 if (!strcmp(id, "spi-baseclk"))
68 return (struct clk *)(txx9_gbus_clock / 2 / 4); 70 return (struct clk *)((unsigned long)txx9_gbus_clock / 2 / 4);
69 if (!strcmp(id, "imbus_clk")) 71 if (!strcmp(id, "imbus_clk"))
70 return (struct clk *)(txx9_gbus_clock / 2); 72 return (struct clk *)((unsigned long)txx9_gbus_clock / 2);
71 return ERR_PTR(-ENOENT); 73 return ERR_PTR(-ENOENT);
72} 74}
73EXPORT_SYMBOL(clk_get); 75EXPORT_SYMBOL(clk_get);
@@ -123,6 +125,12 @@ void __init prom_init_cmdline(void)
123 int argc = (int)fw_arg0; 125 int argc = (int)fw_arg0;
124 char **argv = (char **)fw_arg1; 126 char **argv = (char **)fw_arg1;
125 int i; /* Always ignore the "-c" at argv[0] */ 127 int i; /* Always ignore the "-c" at argv[0] */
128#ifdef CONFIG_64BIT
129 char *fixed_argv[32];
130 for (i = 0; i < argc; i++)
131 fixed_argv[i] = (char *)(long)(*((__s32 *)argv + i));
132 argv = fixed_argv;
133#endif
126 134
127 /* ignore all built-in args if any f/w args given */ 135 /* ignore all built-in args if any f/w args given */
128 if (argc > 1) 136 if (argc > 1)
@@ -180,6 +188,10 @@ char * __init prom_getcmdline(void)
180/* wrappers */ 188/* wrappers */
181void __init plat_mem_setup(void) 189void __init plat_mem_setup(void)
182{ 190{
191 ioport_resource.start = 0;
192 ioport_resource.end = ~0UL; /* no limit */
193 iomem_resource.start = 0;
194 iomem_resource.end = ~0UL; /* no limit */
183 txx9_board_vec->mem_setup(); 195 txx9_board_vec->mem_setup();
184} 196}
185 197