Changeset 8728


Ignore:
Timestamp:
2007-09-10T11:54:35+02:00 (10 years ago)
Author:
juhosg
Message:

[adm5120] fix memory size detection (#2244)

Location:
trunk/target/linux/adm5120/files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/adm5120/files/arch/mips/adm5120/memory.c

    r8705 r8728  
    5151        u32 *p2 = (u32 *)(addr+offs); 
    5252        u32 t,u,v; 
     53 
    5354        /* save original value */ 
    5455        t = MEM_READL(p1); 
     56 
    5557        u = MEM_READL(p2); 
    56  
    5758        if (t != u) 
    5859                return 0; 
     
    6566 
    6667        MEM_WRITEL(p1, v); 
    67  
    68         /* flush write buffers */ 
    69         MPMC_WRITE_REG(CTRL, MPMC_READ_REG(CTRL) | MPMC_CTRL_DWB); 
    70  
     68        adm5120_ndelay(1000); 
    7169        u = MEM_READL(p2); 
    7270 
  • trunk/target/linux/adm5120/files/include/asm-mips/mach-adm5120/adm5120_mpmc.h

    r8704 r8728  
    5353 
    5454/* Control register bits */ 
    55 #define MPMC_CTRL_AM            ( 1 << 1 ) 
    56 #define MPMC_CTRL_DWB           ( 1 << 3 ) 
     55#define MPMC_CTRL_AM            ( 1 << 1 )      /* Address Mirror */ 
     56#define MPMC_CTRL_LPM           ( 1 << 2 )      /* Low Power Mode */ 
     57#define MPMC_CTRL_DWB           ( 1 << 3 )      /* Drain Write Buffers */ 
     58 
     59/* Status register bits */ 
     60#define MPMC_STATUS_BUSY        ( 1 << 0 )      /* Busy */ 
     61#define MPMC_STATUS_WBS         ( 1 << 1 )      /* Write Buffer Status */ 
     62#define MPMC_STATUS_SRA         ( 1 << 2 )      /* Self-Refresh Acknowledge*/ 
    5763 
    5864/* Dynamic Control register bits */ 
Note: See TracChangeset for help on using the changeset viewer.