Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

+13 -19
-1
arch/mips/include/asm/txx9/tx4939.h
··· 498 498 ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) 499 499 500 500 void tx4939_wdt_init(void); 501 - void tx4939_add_memory_regions(void); 502 501 void tx4939_setup(void); 503 502 void tx4939_time_init(unsigned int tmrnr); 504 503 void tx4939_sio_init(unsigned int sclk, unsigned int cts_mask);
-17
arch/mips/txx9/generic/setup_tx4939.c
··· 22 22 #include <linux/mtd/physmap.h> 23 23 #include <linux/platform_device.h> 24 24 #include <linux/platform_data/txx9/ndfmc.h> 25 - #include <asm/bootinfo.h> 26 25 #include <asm/reboot.h> 27 26 #include <asm/traps.h> 28 27 #include <asm/txx9irq.h> ··· 92 93 static struct resource tx4939_sdram_resource[4]; 93 94 static struct resource tx4939_sram_resource; 94 95 #define TX4939_SRAM_SIZE 0x800 95 - 96 - void __init tx4939_add_memory_regions(void) 97 - { 98 - int i; 99 - unsigned long start, size; 100 - u64 win; 101 - 102 - for (i = 0; i < 4; i++) { 103 - if (!((__u32)____raw_readq(&tx4939_ddrcptr->winen) & (1 << i))) 104 - continue; 105 - win = ____raw_readq(&tx4939_ddrcptr->win[i]); 106 - start = (unsigned long)(win >> 48); 107 - size = (((unsigned long)(win >> 32) & 0xffff) + 1) - start; 108 - add_memory_region(start << 20, size << 20, BOOT_MEM_RAM); 109 - } 110 - } 111 96 112 97 void __init tx4939_setup(void) 113 98 {
+13 -1
arch/mips/txx9/rbtx4939/prom.c
··· 7 7 */ 8 8 9 9 #include <linux/init.h> 10 + #include <asm/bootinfo.h> 10 11 #include <asm/txx9/generic.h> 11 12 #include <asm/txx9/rbtx4939.h> 12 13 13 14 void __init rbtx4939_prom_init(void) 14 15 { 15 - tx4939_add_memory_regions(); 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 + add_memory_region(start << 20, size << 20, BOOT_MEM_RAM); 27 + } 16 28 txx9_sio_putchar_init(TX4939_SIO_REG(0) & 0xfffffffffULL); 17 29 }