Wen Gong <wg...@codeaurora.org> writes:

> When firmware assert, it need coredump to analyze, this patch will
> collect the register and memory info for sdio chip.
>
> The coredump configuration is different between PCIE and SDIO for
> the same reversion, so this patch add bus type to distinguish PCIE
> and SDIO chip for coredump.
>
> Tested with QCA6174 SDIO with firmware
> WLAN.RMH.4.4.1-00007-QCARMSWP-1.
>
> Signed-off-by: Wen Gong <wg...@codeaurora.org>

[...]

> +static int ath10k_sdio_read_mem(struct ath10k *ar, u32 address, void *buf,
> +                             u32 buf_len)
> +{
> +     u32 val;
> +     int i, ret;
> +
> +     for (i = 0; i < buf_len; i += 4) {
> +             ret = ath10k_sdio_hif_diag_read32(ar, address + i, &val);
> +             if (ret) {
> +                     ath10k_warn(ar, "unable to read mem %d value\n", 
> address + i);
> +                     break;
> +             }
> +             memcpy(buf + i, &val, 4);
> +     }
> +
> +     return ret;
> +}

What's wrong with ath10k_sdio_hif_diag_read()? AFAICS this whole
function duplicates just what it does.

-- 
Kalle Valo

Reply via email to