Skip to contentSkip to conversation

HID: intel-ish-hid: ISH firmware loader client driver

PATCH In review Rushikesh S Kadam 2 participants 3 messages Apr 2, 2019 – Apr 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 HID: intel-ish-hid: ISH firmware loader client driver

This driver adds support for loading Intel Integrated Sensor Hub (ISH) firmware from host file system to ISH SRAM and start execution.

At power-on, the ISH subsystem shall boot to an interim Shim loader-firmware, which shall expose an ISHTP loader device.

The driver implements an ISHTP client that communicates with the Shim ISHTP loader device over the intel-ish-hid stack, to download the main ISH firmware.

---
The patches are baselined to hid git tree, branch for-5.2/ish
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-5.2/ish

v5
- Added the Acked-by & Tested-by to commit message. No other change.

v4
- Changed process_recv() to wake the caller in case of error as well. Earlier caller would wait until timeout on an error.
- Change sequence of few checks in process_recv().

v3
- Moved a couple of sanity checks from loader_cl_send() to process_recv().
- Several minor changes to address review comments.

v2
- Change loader_cl_send() so that the calling function shall allocate and pass the buffer to be used for receiving firwmare response data. Corresponding changes in calling function and process_recv().
- Introduced struct response_info to encapsulate and pass data between from the process_recv() callback to calling function loader_cl_send().
- Keep count of host firmware load retries, and fail after 3 unsuccessful attempts.
- Dropped report_bad_packets() function previously used for keeping count of bad packets.
- Inlined loader_ish_hw_reset()'s functionality

v1
- Initial version.

 drivers/hid/Makefile                        |    1 +
 drivers/hid/intel-ish-hid/Kconfig           |   15 +
 drivers/hid/intel-ish-hid/Makefile          |    3 +
 drivers/hid/intel-ish-hid/ishtp-fw-loader.c | 1085 +++++++++++++++++++++++++++
 4 files changed, 1104 insertions(+)
 create mode 100644 drivers/hid/intel-ish-hid/ishtp-fw-loader.c
drivers/hid/Makefile +1 -0
index 170163b..d8d393e 100644
@@ -134,3 +134,4 @@ obj-$(CONFIG_USB_KBD)		+= usbhid/
 obj-$(CONFIG_I2C_HID)		+= i2c-hid/
 
 obj-$(CONFIG_INTEL_ISH_HID)	+= intel-ish-hid/
+obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER)	+= intel-ish-hid/
drivers/hid/intel-ish-hid/Kconfig +15 -0
index 519e4c8..786adbc 100644
@@ -14,4 +14,19 @@ config INTEL_ISH_HID
 	  Broxton and Kaby Lake.
 
 	  Say Y here if you want to support Intel ISH. If unsure, say N.
+
+config INTEL_ISH_FIRMWARE_DOWNLOADER
+	tristate "Host Firmware Load feature for Intel ISH"
+	depends on INTEL_ISH_HID
+	depends on X86
+	help
+	  The Integrated Sensor Hub (ISH) enables the kernel to offload
+	  sensor polling and algorithm processing to a dedicated low power
+	  processor in the chipset.
+
+	  The Host Firmware Load feature adds support to load the ISH
+	  firmware from host file system at boot.
+
+	  Say M here if you want to support Host Firmware Loading feature
+	  for Intel ISH. If unsure, say N.
 endmenu
drivers/hid/intel-ish-hid/Makefile +3 -0
index 825b70a..2de97e4 100644
@@ -20,4 +20,7 @@ obj-$(CONFIG_INTEL_ISH_HID) += intel-ishtp-hid.o
 intel-ishtp-hid-objs := ishtp-hid.o
 intel-ishtp-hid-objs += ishtp-hid-client.o
 
+obj-$(CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ishtp-loader.o
+intel-ishtp-loader-objs += ishtp-fw-loader.o
+
 ccflags-y += -Idrivers/hid/intel-ish-hid/ishtp
drivers/hid/intel-ish-hid/ishtp-fw-loader.c new file +1085 -0

1,085 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 8 lines · Rushikesh S Kadam

This driver adds support for loading Intel Integrated Sensor Hub (ISH) firmware from host file system to ISH SRAM and start execution.

At power-on, the ISH subsystem shall boot to an interim Shim loader-firmware, which shall expose an ISHTP loader device.

Quoted 8 lines

The driver implements an ISHTP client that communicates with the Shim ISHTP loader device over the intel-ish-hid stack, to download the main ISH firmware.

Now queued in for-5.2/ish. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 14 lines · Jiri Kosina
Quoted 12 lines · Rushikesh S Kadam

This driver adds support for loading Intel Integrated Sensor Hub (ISH) firmware from host file system to ISH SRAM and start execution.

At power-on, the ISH subsystem shall boot to an interim Shim loader-firmware, which shall expose an ISHTP loader device.

The driver implements an ISHTP client that communicates with the Shim ISHTP loader device over the intel-ish-hid stack, to download the main ISH firmware.

Quoted 11 lines
Quoted 4 lines

Now queued in for-5.2/ish. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs

Thanks Jirk & all for help with this.

Rushikesh