Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e174833 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville
Browse files

mwifiex: add more dump information for PCIe interface



We will now dump MAC, APU, CIU, ICU firmware memory segments also
for PCIe interface. Following is the updated userspace script which
reads firmware dump information.

    mwifiex_pcie_fw_dump.sh: #!/bin/bash
    ethtool --set-dump mlan0 0
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/ITCM.log

    ethtool --set-dump mlan0 1
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/DTCM.log

    ethtool --set-dump mlan0 2
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/SQRAM.log

    ethtool --set-dump mlan0 3
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/IRAM.log

    ethtool --set-dump mlan0 4
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/APU.log

    ethtool --set-dump mlan0 5
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/CIU.log

    ethtool --set-dump mlan0 6
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/ICU.log

    ethtool --set-dump mlan0 7
    ethtool --get-dump mlan0
    ethtool --get-dump mlan0 data /tmp/MAC.log

Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 24716876
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -413,6 +413,7 @@ struct mwifiex_roc_cfg {
#define FW_DUMP_MAX_NAME_LEN		8
#define FW_DUMP_MAX_NAME_LEN		8
#define FW_DUMP_HOST_READY		0xEE
#define FW_DUMP_HOST_READY		0xEE
#define FW_DUMP_DONE			0xFF
#define FW_DUMP_DONE			0xFF
#define FW_DUMP_READ_DONE		0xFE


struct memory_type_mapping {
struct memory_type_mapping {
	u8 mem_name[FW_DUMP_MAX_NAME_LEN];
	u8 mem_name[FW_DUMP_MAX_NAME_LEN];
+10 −0
Original line number Original line Diff line number Diff line
@@ -42,6 +42,10 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = {
	{"DTCM", NULL, 0, 0xF1},
	{"DTCM", NULL, 0, 0xF1},
	{"SQRAM", NULL, 0, 0xF2},
	{"SQRAM", NULL, 0, 0xF2},
	{"IRAM", NULL, 0, 0xF3},
	{"IRAM", NULL, 0, 0xF3},
	{"APU", NULL, 0, 0xF4},
	{"CIU", NULL, 0, 0xF5},
	{"ICU", NULL, 0, 0xF6},
	{"MAC", NULL, 0, 0xF7},
};
};


static int
static int
@@ -2310,6 +2314,12 @@ static void mwifiex_pcie_fw_dump_work(struct mwifiex_adapter *adapter)


		if (memory_size == 0) {
		if (memory_size == 0) {
			dev_info(adapter->dev, "Firmware dump Finished!\n");
			dev_info(adapter->dev, "Firmware dump Finished!\n");
			ret = mwifiex_write_reg(adapter, creg->fw_dump_ctrl,
						FW_DUMP_READ_DONE);
			if (ret) {
				dev_err(adapter->dev, "PCIE write err\n");
				goto done;
			}
			break;
			break;
		}
		}