diff options
Diffstat (limited to 'arch/mips/txx9/rbtx4939/prom.c')
-rw-r--r-- | arch/mips/txx9/rbtx4939/prom.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/mips/txx9/rbtx4939/prom.c b/arch/mips/txx9/rbtx4939/prom.c new file mode 100644 index 000000000..ba25ba1bd --- /dev/null +++ b/arch/mips/txx9/rbtx4939/prom.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * rbtx4939 specific prom routines | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/memblock.h> | ||
11 | #include <asm/txx9/generic.h> | ||
12 | #include <asm/txx9/rbtx4939.h> | ||
13 | |||
14 | void __init rbtx4939_prom_init(void) | ||
15 | { | ||
16 | unsigned long start, size; | ||
17 | u64 win; | ||
18 | int i; | ||
19 | |||
20 | for (i = 0; i < 4; i++) { | ||
21 | if (!((__u32)____raw_readq(&tx4939_ddrcptr->winen) & (1 << i))) | ||
22 | continue; | ||
23 | win = ____raw_readq(&tx4939_ddrcptr->win[i]); | ||
24 | start = (unsigned long)(win >> 48); | ||
25 | size = (((unsigned long)(win >> 32) & 0xffff) + 1) - start; | ||
26 | memblock_add(start << 20, size << 20); | ||
27 | } | ||
28 | txx9_sio_putchar_init(TX4939_SIO_REG(0) & 0xfffffffffULL); | ||
29 | } | ||