Commit 43fab085 authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer

MIPS: tx49xx: move tx4939_add_memory_regions into only user

tx4939_add_memory_regions() is only used in txx9/rbtx4939/prom.c.
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 9b722483
...@@ -498,7 +498,6 @@ struct tx4939_vpc_desc { ...@@ -498,7 +498,6 @@ struct tx4939_vpc_desc {
((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2)
void tx4939_wdt_init(void); void tx4939_wdt_init(void);
void tx4939_add_memory_regions(void);
void tx4939_setup(void); void tx4939_setup(void);
void tx4939_time_init(unsigned int tmrnr); void tx4939_time_init(unsigned int tmrnr);
void tx4939_sio_init(unsigned int sclk, unsigned int cts_mask); void tx4939_sio_init(unsigned int sclk, unsigned int cts_mask);
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/txx9/ndfmc.h> #include <linux/platform_data/txx9/ndfmc.h>
#include <asm/bootinfo.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/txx9irq.h> #include <asm/txx9irq.h>
...@@ -94,22 +93,6 @@ static struct resource tx4939_sdram_resource[4]; ...@@ -94,22 +93,6 @@ static struct resource tx4939_sdram_resource[4];
static struct resource tx4939_sram_resource; static struct resource tx4939_sram_resource;
#define TX4939_SRAM_SIZE 0x800 #define TX4939_SRAM_SIZE 0x800
void __init tx4939_add_memory_regions(void)
{
int i;
unsigned long start, size;
u64 win;
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;
add_memory_region(start << 20, size << 20, BOOT_MEM_RAM);
}
}
void __init tx4939_setup(void) void __init tx4939_setup(void)
{ {
int i; int i;
......
...@@ -7,11 +7,23 @@ ...@@ -7,11 +7,23 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <asm/bootinfo.h>
#include <asm/txx9/generic.h> #include <asm/txx9/generic.h>
#include <asm/txx9/rbtx4939.h> #include <asm/txx9/rbtx4939.h>
void __init rbtx4939_prom_init(void) void __init rbtx4939_prom_init(void)
{ {
tx4939_add_memory_regions(); 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;
add_memory_region(start << 20, size << 20, BOOT_MEM_RAM);
}
txx9_sio_putchar_init(TX4939_SIO_REG(0) & 0xfffffffffULL); txx9_sio_putchar_init(TX4939_SIO_REG(0) & 0xfffffffffULL);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment