diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 19:05:56 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-03-11 19:05:56 +0000 |
commit | acb4ad86e57db55e3f33c50b2ecd9252eff7da63 (patch) | |
tree | b90f0e7ddc157391ec33e3cc27692ec5ac0eb94b /target/linux/ramips/files/arch/mips/ralink/common/prom.c | |
parent | 8cff770eb35ddb48e62cf95e83c8f1777c8db56a (diff) | |
download | master-31e0f0ae-acb4ad86e57db55e3f33c50b2ecd9252eff7da63.tar.gz master-31e0f0ae-acb4ad86e57db55e3f33c50b2ecd9252eff7da63.tar.bz2 master-31e0f0ae-acb4ad86e57db55e3f33c50b2ecd9252eff7da63.zip |
ramips: replace RALINK_SOC_* macros with global variables
SVN-Revision: 30888
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink/common/prom.c')
-rw-r--r-- | target/linux/ramips/files/arch/mips/ralink/common/prom.c | 17 |
1 files changed, 10 insertions, 7 deletions
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 d3f884b844..26169d366d 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 <asm/mach-ralink/common.h> #include <asm/mach-ralink/machine.h> -#include <ralink_soc.h> + +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; |