summaryrefslogtreecommitdiff
path: root/drivers/net/wwan/t7xx/t7xx_reg.h
diff options
context:
space:
mode:
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>2022-08-16 07:24:05 +0300
committerDavid S. Miller <davem@davemloft.net>2022-08-17 13:53:53 +0300
commit87dae9e70bf7be2bd8a3c561fe3ddf666eb8a7a4 (patch)
tree3cb8ed4f3782244f5db700550f78d4edbd5e8b59 /drivers/net/wwan/t7xx/t7xx_reg.h
parent140424d90165d83c75b23ead7c3573bb6dd74f50 (diff)
downloadlinux-87dae9e70bf7be2bd8a3c561fe3ddf666eb8a7a4.tar.xz
net: wwan: t7xx: Enable devlink based fw flashing and coredump collection
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: M Chetan Kumar <m.chetan.kumar@linux.intel.com> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@intel.com> Signed-off-by: Mishra Soumya Prakash <soumya.prakash.mishra@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wwan/t7xx/t7xx_reg.h')
-rw-r--r--drivers/net/wwan/t7xx/t7xx_reg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wwan/t7xx/t7xx_reg.h b/drivers/net/wwan/t7xx/t7xx_reg.h
index 60e025e57baa..3a758bf79a4e 100644
--- a/drivers/net/wwan/t7xx/t7xx_reg.h
+++ b/drivers/net/wwan/t7xx/t7xx_reg.h
@@ -101,11 +101,17 @@ enum t7xx_pm_resume_state {
PM_RESUME_REG_STATE_L2_EXP,
};
+enum host_event_e {
+ HOST_EVENT_INIT = 0,
+ FASTBOOT_DL_NOTY = 0x3,
+};
+
#define T7XX_PCIE_MISC_DEV_STATUS 0x0d1c
#define MISC_RESET_TYPE_FLDR BIT(27)
#define MISC_RESET_TYPE_PLDR BIT(26)
#define MISC_DEV_STATUS_MASK GENMASK(15, 0)
#define LK_EVENT_MASK GENMASK(11, 8)
+#define HOST_EVENT_MASK GENMASK(31, 28)
enum lk_event_id {
LK_EVENT_NORMAL = 0,