diff options
| author | Antti Laakso <antti.laakso@linux.intel.com> | 2026-10-01 15:45:38 +0300 |
|---|---|---|
| committer | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-10-01 22:36:32 +0300 |
| commit | b173b44e0d8aaca972b497007faff0cd86571561 (patch) | |
| tree | 2b3605a99b073f3241c3ff60399cf229d4886db2 | |
| parent | 91e25ccee76d34c69dd0b2fbe0cb255f8a3a03d5 (diff) | |
media: ipu6: Export the ipu7 firmware boot state
Export a boot state accessor, so subsystem interrupt handler can detect
a firmware error state.
Assisted-by: LLM
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
| -rw-r--r-- | drivers/media/pci/intel/ipu6/ipu7-boot.c | 9 | ||||
| -rw-r--r-- | drivers/media/pci/intel/ipu6/ipu7-boot.h | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/pci/intel/ipu6/ipu7-boot.c b/drivers/media/pci/intel/ipu6/ipu7-boot.c index f695d668d46b..965783fd50d2 100644 --- a/drivers/media/pci/intel/ipu6/ipu7-boot.c +++ b/drivers/media/pci/intel/ipu6/ipu7-boot.c @@ -18,9 +18,6 @@ #define IPU7_FW_START_STOP_TIMEOUT 2000 #define IPU7_BOOT_CELL_RESET_TIMEOUT (2 * USEC_PER_SEC) -#define IPU7_BOOT_STATE_CRITICAL(s) (((s) & 0xffff0000U) == 0xdead0000U) -#define IPU7_BOOT_STATE_READY(s) ((s) == 0x57a7e100U) -#define IPU7_BOOT_STATE_INACTIVE(s) ((s) == 0x57a7e300U) #define IPU7_BUTTRESS_REG_FW_BOOT_PARAMS0 0x4000 #define IPU7_BUTTRESS_FW_BOOT_PARAMS_ENTRY(i) \ (IPU7_BUTTRESS_REG_FW_BOOT_PARAMS0 + ((i) * 4U)) @@ -395,3 +392,9 @@ int ipu6_ipu7_boot_stop_fw(const struct ipu6_bus_device *adev) return 0; } EXPORT_SYMBOL_NS_GPL(ipu6_ipu7_boot_stop_fw, "INTEL_IPU6"); + +u32 ipu6_ipu7_boot_get_state(const struct ipu6_bus_device *adev) +{ + return read_fw_boot_param(adev, IPU7_FW_BOOT_STATE_ID); +} +EXPORT_SYMBOL_NS_GPL(ipu6_ipu7_boot_get_state, "INTEL_IPU6"); diff --git a/drivers/media/pci/intel/ipu6/ipu7-boot.h b/drivers/media/pci/intel/ipu6/ipu7-boot.h index 48b7cbbde3d3..a7e59067b3eb 100644 --- a/drivers/media/pci/intel/ipu6/ipu7-boot.h +++ b/drivers/media/pci/intel/ipu6/ipu7-boot.h @@ -8,6 +8,10 @@ #define IPU7_BOOT_MSG_VER_MAX_ENTRIES 3U +#define IPU7_BOOT_STATE_CRITICAL(s) (((s) & 0xffff0000U) == 0xdead0000U) +#define IPU7_BOOT_STATE_READY(s) ((s) == 0x57a7e100U) +#define IPU7_BOOT_STATE_INACTIVE(s) ((s) == 0x57a7e300U) + struct ipu7_boot_abi_version { u8 patch; u8 subminor; @@ -45,5 +49,6 @@ void ipu6_ipu7_release_boot_config(struct ipu6_bus_device *adev, int ipu6_ipu7_boot_start_fw(const struct ipu6_bus_device *adev, struct ipu7_fw_com_context *fwctx); int ipu6_ipu7_boot_stop_fw(const struct ipu6_bus_device *adev); +u32 ipu6_ipu7_boot_get_state(const struct ipu6_bus_device *adev); #endif |
