Changeset 30887


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

ramips: introduce ramips_soc_prom_init and move SoC detection into that

Location:
trunk/target/linux/ramips/files/arch/mips
Files:
11 edited

Legend:

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

    r26325 r30887  
    1616u32 ramips_intc_get_status(void); 
    1717 
     18void ramips_soc_prom_init(void); 
    1819void ramips_soc_setup(void); 
    1920void ramips_early_serial_setup(int line, unsigned base, unsigned freq, 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x.h

    r30574 r30887  
    1717#include <linux/init.h> 
    1818#include <linux/io.h> 
    19  
    20 void rt288x_detect_sys_type(void); 
    2119 
    2220#define RT288X_CPU_IRQ_BASE     0 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x.h

    r25124 r30887  
    1616#include <linux/init.h> 
    1717#include <linux/io.h> 
    18  
    19 void rt305x_detect_sys_type(void); 
    2018 
    2119#define RT305X_MEM_SIZE_MIN (2 * 1024 * 1024) 
  • trunk/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt3883.h

    r30575 r30887  
    1616#include <linux/init.h> 
    1717#include <linux/io.h> 
    18  
    19 void rt3883_detect_sys_type(void); 
    2018 
    2119#define RT3883_MEM_SIZE_MIN (2 * 1024 * 1024) 
  • trunk/target/linux/ramips/files/arch/mips/ralink/common/prom.c

    r30424 r30887  
    144144        char **argv; 
    145145 
     146        ramips_soc_prom_init(); 
     147 
    146148        printk(KERN_DEBUG 
    147149               "prom: fw_arg0=%08x, fw_arg1=%08x, fw_arg2=%08x, fw_arg3=%08x\n", 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt288x/rt288x.c

    r26326 r30887  
    2424void __iomem * rt288x_memc_base; 
    2525 
    26 void __init rt288x_detect_sys_type(void) 
     26void __init ramips_soc_prom_init(void) 
    2727{ 
     28        void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT2880_SYSC_BASE); 
    2829        u32 n0; 
    2930        u32 n1; 
    3031        u32 id; 
    3132 
    32         n0 = rt288x_sysc_rr(SYSC_REG_CHIP_NAME0); 
    33         n1 = rt288x_sysc_rr(SYSC_REG_CHIP_NAME1); 
    34         id = rt288x_sysc_rr(SYSC_REG_CHIP_ID); 
     33        n0 = __raw_readl(sysc + SYSC_REG_CHIP_NAME0); 
     34        n1 = __raw_readl(sysc + SYSC_REG_CHIP_NAME1); 
     35        id = __raw_readl(sysc + SYSC_REG_CHIP_ID); 
    3536 
    3637        snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN, 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt288x/setup.c

    r25125 r30887  
    5353        rt288x_memc_base = ioremap_nocache(RT2880_MEMC_BASE, RT2880_MEMC_SIZE); 
    5454 
    55         rt288x_detect_sys_type(); 
    5655        rt288x_clocks_init(); 
    5756 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/rt305x.c

    r26326 r30887  
    2424void __iomem * rt305x_memc_base; 
    2525 
    26 void __init rt305x_detect_sys_type(void) 
     26void __init ramips_soc_prom_init(void) 
    2727{ 
     28        void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT305X_SYSC_BASE); 
    2829        u32 n0; 
    2930        u32 n1; 
    3031        u32 id; 
    3132 
    32         n0 = rt305x_sysc_rr(SYSC_REG_CHIP_NAME0); 
    33         n1 = rt305x_sysc_rr(SYSC_REG_CHIP_NAME1); 
    34         id = rt305x_sysc_rr(SYSC_REG_CHIP_ID); 
     33        n0 = __raw_readl(sysc + SYSC_REG_CHIP_NAME0); 
     34        n1 = __raw_readl(sysc + SYSC_REG_CHIP_NAME1); 
     35        id = __raw_readl(sysc + SYSC_REG_CHIP_ID); 
    3536 
    3637        snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN, 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt305x/setup.c

    r25124 r30887  
    5353        rt305x_memc_base = ioremap_nocache(RT305X_MEMC_BASE, PAGE_SIZE); 
    5454 
    55         rt305x_detect_sys_type(); 
    5655        rt305x_clocks_init(); 
    5756 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt3883/rt3883.c

    r30495 r30887  
    2323void __iomem * rt3883_memc_base; 
    2424 
    25 void __init rt3883_detect_sys_type(void) 
     25void __init ramips_soc_prom_init(void) 
    2626{ 
     27        void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT3883_SYSC_BASE); 
    2728        u32 n0; 
    2829        u32 n1; 
    2930        u32 id; 
    3031 
    31         n0 = rt3883_sysc_rr(RT3883_SYSC_REG_CHIPID0_3); 
    32         n1 = rt3883_sysc_rr(RT3883_SYSC_REG_CHIPID4_7); 
    33         id = rt3883_sysc_rr(RT3883_SYSC_REG_REVID); 
     32        n0 = __raw_readl(sysc + RT3883_SYSC_REG_CHIPID0_3); 
     33        n1 = __raw_readl(sysc + RT3883_SYSC_REG_CHIPID4_7); 
     34        id = __raw_readl(sysc + RT3883_SYSC_REG_REVID); 
    3435 
    3536        snprintf(ramips_sys_type, RAMIPS_SYS_TYPE_LEN, 
  • trunk/target/linux/ramips/files/arch/mips/ralink/rt3883/setup.c

    r30495 r30887  
    5353        rt3883_memc_base = ioremap_nocache(RT3883_MEMC_BASE, PAGE_SIZE); 
    5454 
    55         rt3883_detect_sys_type(); 
    5655        rt3883_clocks_init(); 
    5756 
Note: See TracChangeset for help on using the changeset viewer.