Changeset 30888


Ignore:
Timestamp:
2012-03-11T20:05:56+01:00 (5 years ago)
Author:
juhosg
Message:

ramips: replace RALINK_SOC_* macros with global variables

Location:
trunk/target/linux/ramips/files/arch/mips
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/common.h

    r30887 r30888  
    1212#define RAMIPS_SYS_TYPE_LEN     64 
    1313extern unsigned char ramips_sys_type[RAMIPS_SYS_TYPE_LEN]; 
     14extern unsigned long ramips_mem_base; 
     15extern unsigned long ramips_mem_size_min; 
     16extern unsigned long ramips_mem_size_max; 
    1417 
    1518void ramips_intc_irq_init(unsigned intc_base, unsigned irq, unsigned irq_base); 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x.h

    r30887 r30888  
    1717#include <linux/init.h> 
    1818#include <linux/io.h> 
     19 
     20#define RT288X_MEM_SIZE_MIN    (2 * 1024 * 1024) 
     21#define RT288X_MEM_SIZE_MAX    (128 * 1024 * 1024) 
    1922 
    2023#define RT288X_CPU_IRQ_BASE     0 
  • trunk/target/linux/ramips/files/arch/mips/ralink/common/prom.c

    r30887 r30888  
    1919#include <asm/mach-ralink/common.h> 
    2020#include <asm/mach-ralink/machine.h> 
    21 #include <ralink_soc.h> 
     21 
     22unsigned long ramips_mem_base; 
     23unsigned long ramips_mem_size_min; 
     24unsigned long ramips_mem_size_max; 
    2225 
    2326static inline void *to_ram_addr(void *addr) 
     
    2528        u32 base; 
    2629 
    27         base = KSEG0ADDR(RALINK_SOC_SDRAM_BASE); 
     30        base = KSEG0ADDR(ramips_mem_base); 
    2831        if (((u32) addr > base) && 
    29             ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) 
     32            ((u32) addr < (base + ramips_mem_size_max))) 
    3033                return addr; 
    3134 
    32         base = KSEG1ADDR(RALINK_SOC_SDRAM_BASE); 
     35        base = KSEG1ADDR(ramips_mem_base); 
    3336        if (((u32) addr > base) && 
    34             ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) 
     37            ((u32) addr < (base + ramips_mem_size_max))) 
    3538                return addr; 
    3639 
    3740        /* some U-Boot variants uses physical addresses */ 
    38         base = RALINK_SOC_SDRAM_BASE; 
     41        base = ramips_mem_base; 
    3942        if (((u32) addr > base) && 
    40             ((u32) addr < (base + RALINK_SOC_MEM_SIZE_MAX))) 
     43            ((u32) addr < (base + ramips_mem_size_max))) 
    4144                return (void *)KSEG0ADDR(addr); 
    4245 
  • trunk/target/linux/ramips/files/arch/mips/ralink/common/setup.c

    r30438 r30888  
    2020#include <asm/mach-ralink/common.h> 
    2121#include <asm/mach-ralink/machine.h> 
    22 #include <ralink_soc.h> 
    2322 
    2423unsigned char ramips_sys_type[RAMIPS_SYS_TYPE_LEN]; 
     
    3534 
    3635        base = (void *) KSEG1ADDR(detect_mem_size); 
    37         for (size = RALINK_SOC_MEM_SIZE_MIN; size < RALINK_SOC_MEM_SIZE_MAX; 
     36        for (size = ramips_mem_size_min; size < ramips_mem_size_max; 
    3837             size <<= 1 ) { 
    3938                if (!memcmp(base, base + size, 1024)) 
     
    4140        } 
    4241 
    43         add_memory_region(RALINK_SOC_SDRAM_BASE, size, BOOT_MEM_RAM); 
     42        add_memory_region(ramips_mem_base, size, BOOT_MEM_RAM); 
    4443} 
    4544 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c

    r30887 r30888  
    4343                (id >> CHIP_ID_ID_SHIFT) & CHIP_ID_ID_MASK, 
    4444                (id & CHIP_ID_REV_MASK)); 
     45 
     46        ramips_mem_base = RT2880_SDRAM_BASE; 
     47        ramips_mem_size_min = RT288X_MEM_SIZE_MIN; 
     48        ramips_mem_size_max = RT288X_MEM_SIZE_MAX; 
    4549} 
    4650 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c

    r30887 r30888  
    4343                (id >> CHIP_ID_ID_SHIFT) & CHIP_ID_ID_MASK, 
    4444                (id & CHIP_ID_REV_MASK)); 
     45 
     46        ramips_mem_base = RT305X_SDRAM_BASE; 
     47        ramips_mem_size_min = RT305X_MEM_SIZE_MIN; 
     48        ramips_mem_size_max = RT305X_MEM_SIZE_MAX; 
    4549} 
    4650 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c

    r30887 r30888  
    4242                (id >> RT3883_REVID_VER_ID_SHIFT) & RT3883_REVID_VER_ID_MASK, 
    4343                (id & RT3883_REVID_ECO_ID_MASK)); 
     44 
     45        ramips_mem_base = RT3883_SDRAM_BASE; 
     46        ramips_mem_size_min = RT3883_MEM_SIZE_MIN; 
     47        ramips_mem_size_max = RT3883_MEM_SIZE_MAX; 
    4448} 
    4549 
Note: See TracChangeset for help on using the changeset viewer.