2008-09-01 21:22:40 +08:00
|
|
|
/*
|
|
|
|
* rbtx4939 specific prom routines
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
2020-10-09 20:14:46 +08:00
|
|
|
#include <linux/memblock.h>
|
2008-09-01 21:22:40 +08:00
|
|
|
#include <asm/txx9/generic.h>
|
|
|
|
#include <asm/txx9/rbtx4939.h>
|
|
|
|
|
|
|
|
void __init rbtx4939_prom_init(void)
|
|
|
|
{
|
2020-10-06 21:58:37 +08:00
|
|
|
unsigned long start, size;
|
|
|
|
u64 win;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
if (!((__u32)____raw_readq(&tx4939_ddrcptr->winen) & (1 << i)))
|
|
|
|
continue;
|
|
|
|
win = ____raw_readq(&tx4939_ddrcptr->win[i]);
|
|
|
|
start = (unsigned long)(win >> 48);
|
|
|
|
size = (((unsigned long)(win >> 32) & 0xffff) + 1) - start;
|
2020-10-09 20:14:46 +08:00
|
|
|
memblock_add(start << 20, size << 20);
|
2020-10-06 21:58:37 +08:00
|
|
|
}
|
2008-09-01 21:22:40 +08:00
|
|
|
txx9_sio_putchar_init(TX4939_SIO_REG(0) & 0xfffffffffULL);
|
|
|
|
}
|