Ignore:
Timestamp:
Nov 14, 2019, 4:03:25 PM (3 years ago)
Author:
alain
Message:

euh...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_mmc.c

    r626 r654  
    116116
    117117    // get faulty ADDRESS and SRCID from MMC registers
    118     uint32_t paddr_lo = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_ADDR_LO);
    119     uint32_t paddr_hi = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_ADDR_HI);
    120     uint32_t srcid    = *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_SRCID);
     118    uint32_t paddr_lo = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_ADDR_LO ) );
     119    uint32_t paddr_hi = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_ADDR_HI ) );
     120    uint32_t srcid    = *(base + MMC_REG( SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_SRCID ) );
    121121
    122     paddr_t paddr = (((paddr_t)paddr_hi)<<32) + ((paddr_t)paddr_lo);
     122    // print an error message on kernel terminal
     123    printk("\n[ERROR] reported from MMC : cxy %x / cycle %d / bad address [%x,%x] / srcid %x\n",
     124    local_cxy , (uint32_t)hal_get_cycles() , paddr_hi , paddr_lo , srcid );
     125
     126    // reset MMC IRQ
     127    *(base + MMC_REG(SOCLIB_MMC_ERROR_FUNC , SOCLIB_MMC_ERROR_IRQ_RESET) ) = 0;
    123128   
    124     // reset MMC IRQ
    125     *(base + (SOCLIB_MMC_ERROR_FUNC << 7) + SOCLIB_MMC_ERROR_IRQ_RESET) = 0;
    126    
    127     // print an error message on kernel terminal TODO : should be improved
    128     printk("\n[ERROR] reported from MMC in cluster %x : faulty address = %l / srcid = %x\n",
    129            paddr , srcid );
    130 
    131129} // end soclib_mmc_isr()
    132130
Note: See TracChangeset for help on using the changeset viewer.