• Igal Chernobelsky's avatar
    wlcore: read FW logs from FW memory on watchdog recovery · 1e41213f
    Igal Chernobelsky authored
    FW uses a few memory blocks as a buffer to accumulate FW logs before
    transmitting them to the host over SDIO. When FW WatchDog recovery
    occurs, the last FW traces are still pending in the buffer. Driver is
    to read these FW traces whether log mode is continuous or on demand.
    
    FW memory blocks allocated for the log buffer are handled as a link list:
    the first 4 bytes in each memory block contain FW address to the next block.
    The end of list condition depends on FW log mode:
    - on demand: the list is cyclic, the next address is equal to the first address
    - continuous: the address is  equal to 0x2000000
    
    Log data resides inside FW memory block with offset depending on
    logger mode:
    - on demand:  4 bytes (address of the next memory block)
    - continuous: 4 bytes and Rx Descriptor structure size
    
    Described FW logger API is backward compatible with previous FW versions.
    Signed-off-by: default avatarIgal Chernobelsky <igalc@ti.com>
    Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
    1e41213f
main.c 136 KB