• M Chetan Kumar's avatar
    net: wwan: t7xx: Enable devlink based fw flashing and coredump collection · 87dae9e7
    M Chetan Kumar authored
    This patch brings-in support for t7xx wwan device firmware flashing &
    coredump collection using devlink.
    
    Driver Registers with Devlink framework.
    Implements devlink ops flash_update callback that programs modem firmware.
    Creates region & snapshot required for device coredump log collection.
    On early detection of wwan device in fastboot mode driver sets up CLDMA0 HW
    tx/rx queues for raw data transfer then registers with devlink framework.
    Upon receiving firmware image & partition details driver sends fastboot
    commands for flashing the firmware.
    
    In this flow the fastboot command & response gets exchanged between driver
    and device. Once firmware flashing is success completion status is reported
    to user space application.
    
    Below is the devlink command usage for firmware flashing
    
    $devlink dev flash pci/$BDF file ABC.img component ABC
    
    Note: ABC.img is the firmware to be programmed to "ABC" partition.
    
    In case of coredump collection when wwan device encounters an exception
    it reboots & stays in fastboot mode for coredump collection by host driver.
    On detecting exception state driver collects the core dump, creates the
    devlink region & reports an event to user space application for dump
    collection. The user space application invokes devlink region read command
    for dump collection.
    
    Below are the devlink commands used for coredump collection.
    
    devlink region new pci/$BDF/mr_dump
    devlink region read pci/$BDF/mr_dump snapshot $ID address $ADD length $LEN
    devlink region del pci/$BDF/mr_dump snapshot $ID
    Signed-off-by: default avatarM Chetan Kumar <m.chetan.kumar@linux.intel.com>
    Signed-off-by: default avatarDevegowda Chandrashekar <chandrashekar.devegowda@intel.com>
    Signed-off-by: default avatarMishra Soumya Prakash <soumya.prakash.mishra@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    87dae9e7
t7xx_port_devlink.c 18.8 KB