From 5a2708d1926dfdbbe91f5d12fab43eff55ea971f Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 11 Mar 2012 19:05:56 +0000 Subject: ramips: replace RALINK_SOC_* macros with global variables git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30888 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/ramips/files/arch/mips/ralink/common/prom.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'target/linux/ramips/files/arch/mips/ralink/common/prom.c') diff --git a/target/linux/ramips/files/arch/mips/ralink/common/prom.c b/target/linux/ramips/files/arch/mips/ralink/common/prom.c index d3f884b84..26169d366 100644 --- a/target/linux/ramips/files/arch/mips/ralink/common/prom.c +++ b/target/linux/ramips/files/arch/mips/ralink/common/prom.c @@ -18,26 +18,29 @@ #include #include -#include + +unsigned long ramips_mem_base; +unsigned long ramips_mem_size_min; +unsigned long ramips_mem_size_max; static inline void *to_ram_addr(void *addr) { u32 base; - base = KSEG0ADDR(RALINK_SOC_SDRAM_BASE); + base = KSEG0ADDR(ramips_mem_base); if (((u32) addr > base) && - ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) + ((u32) addr < (base + ramips_mem_size_max))) return addr; - base = KSEG1ADDR(RALINK_SOC_SDRAM_BASE); + base = KSEG1ADDR(ramips_mem_base); if (((u32) addr > base) && - ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) + ((u32) addr < (base + ramips_mem_size_max))) return addr; /* some U-Boot variants uses physical addresses */ - base = RALINK_SOC_SDRAM_BASE; + base = ramips_mem_base; if (((u32) addr > base) && - ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) + ((u32) addr < (base + ramips_mem_size_max))) return (void *)KSEG0ADDR(addr); return NULL; -- cgit v1.2.3