aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/rbtx4938
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-18 12:51:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-20 09:38:21 -0400
commit255033a9bb900a06c9a7798908ce12557d24fb66 (patch)
tree9bb4b8a54d8737d2126fb6e00c2d1bbe99670a89 /arch/mips/txx9/rbtx4938
parentb5d5accc7a2eb41f43ef346f3b258ba2f6342a1c (diff)
[MIPS] TXx9: Cleanups for 64-bit support
* Unify (and fix) mem_tx4938.c and mem_tx4927.c * Simplify prom_init * Kill volatiles and unused definitions for tx4927.h and tx4938.h 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/rbtx4938')
-rw-r--r--arch/mips/txx9/rbtx4938/prom.c6
-rw-r--r--arch/mips/txx9/rbtx4938/setup.c11
2 files changed, 7 insertions, 10 deletions
diff --git a/arch/mips/txx9/rbtx4938/prom.c b/arch/mips/txx9/rbtx4938/prom.c
index fbb37458ddb2..ee189519ce5a 100644
--- a/arch/mips/txx9/rbtx4938/prom.c
+++ b/arch/mips/txx9/rbtx4938/prom.c
@@ -18,12 +18,8 @@
18 18
19void __init rbtx4938_prom_init(void) 19void __init rbtx4938_prom_init(void)
20{ 20{
21 extern int tx4938_get_mem_size(void);
22 int msize;
23#ifndef CONFIG_TX4938_NAND_BOOT 21#ifndef CONFIG_TX4938_NAND_BOOT
24 prom_init_cmdline(); 22 prom_init_cmdline();
25#endif 23#endif
26 24 add_memory_region(0, tx4938_get_mem_size(), BOOT_MEM_RAM);
27 msize = tx4938_get_mem_size();
28 add_memory_region(0, msize << 20, BOOT_MEM_RAM);
29} 25}
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c
index c2da92396b7a..c1e076c7b2d2 100644
--- a/arch/mips/txx9/rbtx4938/setup.c
+++ b/arch/mips/txx9/rbtx4938/setup.c
@@ -310,7 +310,7 @@ void __init tx4938_board_setup(void)
310 310
311 printk(KERN_INFO "%s SDRAMC --", txx9_pcode_str); 311 printk(KERN_INFO "%s SDRAMC --", txx9_pcode_str);
312 for (i = 0; i < 4; i++) { 312 for (i = 0; i < 4; i++) {
313 unsigned long long cr = tx4938_sdramcptr->cr[i]; 313 u64 cr = TX4938_SDRAMC_CR(i);
314 unsigned long ram_base, ram_size; 314 unsigned long ram_base, ram_size;
315 if (!((unsigned long)cr & 0x00000400)) 315 if (!((unsigned long)cr & 0x00000400))
316 continue; /* disabled */ 316 continue; /* disabled */
@@ -318,20 +318,21 @@ void __init tx4938_board_setup(void)
318 ram_size = ((unsigned long)(cr >> 33) + 1) << 21; 318 ram_size = ((unsigned long)(cr >> 33) + 1) << 21;
319 if (ram_base >= 0x20000000) 319 if (ram_base >= 0x20000000)
320 continue; /* high memory (ignore) */ 320 continue; /* high memory (ignore) */
321 printk(" CR%d:%016Lx", i, cr); 321 printk(KERN_CONT " CR%d:%016llx", i, cr);
322 tx4938_sdram_resource[i].name = "SDRAM"; 322 tx4938_sdram_resource[i].name = "SDRAM";
323 tx4938_sdram_resource[i].start = ram_base; 323 tx4938_sdram_resource[i].start = ram_base;
324 tx4938_sdram_resource[i].end = ram_base + ram_size - 1; 324 tx4938_sdram_resource[i].end = ram_base + ram_size - 1;
325 tx4938_sdram_resource[i].flags = IORESOURCE_MEM; 325 tx4938_sdram_resource[i].flags = IORESOURCE_MEM;
326 request_resource(&iomem_resource, &tx4938_sdram_resource[i]); 326 request_resource(&iomem_resource, &tx4938_sdram_resource[i]);
327 } 327 }
328 printk(" TR:%09Lx\n", tx4938_sdramcptr->tr); 328 printk(KERN_CONT " TR:%09llx\n", ____raw_readq(&tx4938_sdramcptr->tr));
329 329
330 /* SRAM */ 330 /* SRAM */
331 if (tx4938_sramcptr->cr & 1) { 331 if (____raw_readq(&tx4938_sramcptr->cr) & 1) {
332 unsigned int size = 0x800; 332 unsigned int size = 0x800;
333 unsigned long base = 333 unsigned long base =
334 (tx4938_sramcptr->cr >> (39-11)) & ~(size - 1); 334 (____raw_readq(&tx4938_sramcptr->cr) >> (39-11))
335 & ~(size - 1);
335 tx4938_sram_resource.name = "SRAM"; 336 tx4938_sram_resource.name = "SRAM";
336 tx4938_sram_resource.start = base; 337 tx4938_sram_resource.start = base;
337 tx4938_sram_resource.end = base + size - 1; 338 tx4938_sram_resource.end = base + size - 1;