[PATCHv3 1/3] firmware_class: move NO_CACHE from private to driver_data_req_params

2017-06-16 Thread yi1 . li
From: Yi Li This adds DRIVER_DATA_REQ_NO_CACHE flag with .req flag under struct driver_data_req_params. When this flag is set, the driver_data driver will not cache the firmware during PM cycle, which is expensive. It will be used by streaming case and other drivers which

[PATCHv3 1/3] firmware_class: move NO_CACHE from private to driver_data_req_params

2017-06-16 Thread yi1 . li
From: Yi Li This adds DRIVER_DATA_REQ_NO_CACHE flag with .req flag under struct driver_data_req_params. When this flag is set, the driver_data driver will not cache the firmware during PM cycle, which is expensive. It will be used by streaming case and other drivers which implement their own

[PATCHv3 2/3] iwlwifi: use DRIVER_DATA_REQ_NO_CACHE for driver_data

2017-06-16 Thread yi1 . li
From: Yi Li Set DRIVER_DATA_REQ_NO_CACHE flag to disable driver_data driver caching mechanism, iwlwifi has its own firmware cache management. Signed-off-by: Yi Li --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 ++ 1 file changed, 2

[PATCHv3 0/3] Enable no_cache in driver_data

2017-06-16 Thread yi1 . li
From: Yi Li Changes in v3: - Add a platform device to enable PM support in test driver - Add a debugfs device to enable driver data cache testing - Fix a logic error so driver_data can be able to cache - Add two test cases for caching and non-caching - Rebase

[PATCHv3 3/3] test: add no_cache to driver_data load tester

2017-06-16 Thread yi1 . li
From: Yi Li Add a platform device to enable PM cache and add cache/no_cache test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 97 ++--- tools/testing/selftests/firmware/driver_data.sh | 67

[PATCHv3 2/3] iwlwifi: use DRIVER_DATA_REQ_NO_CACHE for driver_data

2017-06-16 Thread yi1 . li
From: Yi Li Set DRIVER_DATA_REQ_NO_CACHE flag to disable driver_data driver caching mechanism, iwlwifi has its own firmware cache management. Signed-off-by: Yi Li --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCHv3 0/3] Enable no_cache in driver_data

2017-06-16 Thread yi1 . li
From: Yi Li Changes in v3: - Add a platform device to enable PM support in test driver - Add a debugfs device to enable driver data cache testing - Fix a logic error so driver_data can be able to cache - Add two test cases for caching and non-caching - Rebase to Luis R. Rodriguez's

[PATCHv3 3/3] test: add no_cache to driver_data load tester

2017-06-16 Thread yi1 . li
From: Yi Li Add a platform device to enable PM cache and add cache/no_cache test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 97 ++--- tools/testing/selftests/firmware/driver_data.sh | 67 + 2 files changed, 154

[PATCHv2 1/3] firmware: Add streaming support for driver_data_request_sync API

2017-05-20 Thread yi1 . li
From: Yi Li By setting the driver_data_req_params req flag of DRIVER_DATA_REQ_STREAMING and DRIVER_DATA_REQ_NO_CACHE, caller can streaming firmware image to the pre-allocated buffer in small trunks. Caller also need to setup the img_offset pointer and firmware image

[PATCHv2 1/3] firmware: Add streaming support for driver_data_request_sync API

2017-05-20 Thread yi1 . li
From: Yi Li By setting the driver_data_req_params req flag of DRIVER_DATA_REQ_STREAMING and DRIVER_DATA_REQ_NO_CACHE, caller can streaming firmware image to the pre-allocated buffer in small trunks. Caller also need to setup the img_offset pointer and firmware image **path to avoid searching the

[PATCHv2 3/3] fpga_mgr: Add streaming support through the new driver_data API

2017-05-20 Thread yi1 . li
From: Yi Li Since the FPGA image are getting bigger in size, this add an new API fpga_mgr_firmware_stream in FPGA manager, which will stream FPGA image in 4KB trunks. Signed-off-by: Yi Li --- drivers/fpga/fpga-mgr.c | 111

[PATCHv2 3/3] fpga_mgr: Add streaming support through the new driver_data API

2017-05-20 Thread yi1 . li
From: Yi Li Since the FPGA image are getting bigger in size, this add an new API fpga_mgr_firmware_stream in FPGA manager, which will stream FPGA image in 4KB trunks. Signed-off-by: Yi Li --- drivers/fpga/fpga-mgr.c | 111 ++

[PATCHv2 0/3] Add streaming support to driver_data API

2017-05-20 Thread yi1 . li
From: Yi Li This series enables the streaming support on driver_data sync API and add self test and FPGA mgr to test/use stream firmware in 4KB trucks. Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expended

[PATCHv2 0/3] Add streaming support to driver_data API

2017-05-20 Thread yi1 . li
From: Yi Li This series enables the streaming support on driver_data sync API and add self test and FPGA mgr to test/use stream firmware in 4KB trucks. Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expended fw_get_filesystem_firmware function and

[PATCHv2 2/3] test: add streaming test to driver_data tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds streaming test case, which pre-allocate the buffer and ask driver_data_request_sync API to read 4KB each. Since the dummy firmware image is very small, the test only stream couple bytes. A manual test method: echo -n 'bigfile' >

[PATCHv2 2/3] test: add streaming test to driver_data tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds streaming test case, which pre-allocate the buffer and ask driver_data_request_sync API to read 4KB each. Since the dummy firmware image is very small, the test only stream couple bytes. A manual test method: echo -n 'bigfile' >

[PATCHv2 2/2] test: add pre-allocated buffer to driver_data tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds pre-allocated buffer test cases to the simple sync and async test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 68 - tools/testing/selftests/firmware/driver_data.sh |

[PATCHv2 2/2] test: add pre-allocated buffer to driver_data tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds pre-allocated buffer test cases to the simple sync and async test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 68 - tools/testing/selftests/firmware/driver_data.sh | 36 + 2 files changed, 103

[PATCHv2 0/2] Enable pre-allocated buffer support for driver_data

2017-05-20 Thread yi1 . li
From: Yi Li This series enables the equivalent pre-allocated buffer feature in request_firmware_into_buf to driver_data API, so caller can allocate firmware data buffer and pass to driver_data. This will be used for streaming support of driver_data, which allow caller to

[PATCHv2 0/2] Enable pre-allocated buffer support for driver_data

2017-05-20 Thread yi1 . li
From: Yi Li This series enables the equivalent pre-allocated buffer feature in request_firmware_into_buf to driver_data API, so caller can allocate firmware data buffer and pass to driver_data. This will be used for streaming support of driver_data, which allow caller to manage the size and

[PATCHv2 1/2] firmware: Enable pre-allocated buffer support in driver_data

2017-05-20 Thread yi1 . li
From: Yi Li This enables the equivalent feature of the legacy request_firmware_into_buf to driver_data, so caller can allocate and manage the firmware buffer instead of by driver_data class internally. The caller need to setup alloc_buf and alloc_buf_size in the

[PATCHv2 3/3] test: add no_cache to driver_data load tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds a no_cache flag to simple sync and async test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 43 +++-- tools/testing/selftests/firmware/driver_data.sh | 36

[PATCHv2 1/2] firmware: Enable pre-allocated buffer support in driver_data

2017-05-20 Thread yi1 . li
From: Yi Li This enables the equivalent feature of the legacy request_firmware_into_buf to driver_data, so caller can allocate and manage the firmware buffer instead of by driver_data class internally. The caller need to setup alloc_buf and alloc_buf_size in the @driver_data_req_params

[PATCHv2 3/3] test: add no_cache to driver_data load tester

2017-05-20 Thread yi1 . li
From: Yi Li This adds a no_cache flag to simple sync and async test. Signed-off-by: Yi Li --- lib/test_driver_data.c | 43 +++-- tools/testing/selftests/firmware/driver_data.sh | 36 + 2 files changed, 76 insertions(+), 3

[PATCHv2 2/3] iwlwifi: use DRIVER_DATA_REQ_NO_CACHE for driver_data

2017-05-20 Thread yi1 . li
From: Yi Li Set DRIVER_DATA_REQ_NO_CACHE flag to disable driver_data driver caching mechanism, iwlwifi has its own firmware cache management. Signed-off-by: Yi Li --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 ++ 1 file changed, 2

[PATCHv2 2/3] iwlwifi: use DRIVER_DATA_REQ_NO_CACHE for driver_data

2017-05-20 Thread yi1 . li
From: Yi Li Set DRIVER_DATA_REQ_NO_CACHE flag to disable driver_data driver caching mechanism, iwlwifi has its own firmware cache management. Signed-off-by: Yi Li --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-20 Thread yi1 . li
From: Yi Li Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expose DRIVER_DATA_REQ_NO_CACHE flag to public driver_data_req_params structure, so upper drivers can ask driver_data driver to bypass the internal caching

[PATCHv2 1/3] firmware_class: move NO_CACHE from private to driver_data_req_params

2017-05-20 Thread yi1 . li
From: Yi Li This adds DRIVER_DATA_REQ_NO_CACHE flag with .req flag under struct driver_data_req_params. When this flag is set, the driver_data driver will bypass the internal caching mechanism, its used by streaming case and other drivers which implement their own cache

[PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-20 Thread yi1 . li
From: Yi Li Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expose DRIVER_DATA_REQ_NO_CACHE flag to public driver_data_req_params structure, so upper drivers can ask driver_data driver to bypass the internal caching mechanism. This will be

[PATCHv2 1/3] firmware_class: move NO_CACHE from private to driver_data_req_params

2017-05-20 Thread yi1 . li
From: Yi Li This adds DRIVER_DATA_REQ_NO_CACHE flag with .req flag under struct driver_data_req_params. When this flag is set, the driver_data driver will bypass the internal caching mechanism, its used by streaming case and other drivers which implement their own cache thing. Signed-off-by: Yi

[PATCHv1 1/2] firmware: Add streaming support

2017-04-21 Thread yi1 . li
From: Yi Li Load firmware in multiple chucks(4KB) instead of the whole big firmware file at once. The streaming support is added in the driver_data_request_sync API based on Luis R. Rodriguez's 20170329-driver-data-v2-try3 branch. Signed-off-by: Yi Li

[PATCHv1 1/2] firmware: Add streaming support

2017-04-21 Thread yi1 . li
From: Yi Li Load firmware in multiple chucks(4KB) instead of the whole big firmware file at once. The streaming support is added in the driver_data_request_sync API based on Luis R. Rodriguez's 20170329-driver-data-v2-try3 branch. Signed-off-by: Yi Li --- drivers/base/firmware_class.c | 119

[PATCHv1 0/2] Add streaming support for base firmware and fpga-mgr

2017-04-21 Thread yi1 . li
From: Yi Li As the FPGA hardware advances, the bitstream image size grows. It could be an issue for kernel to allocate big buffers to load the whole firmware file. Here is an attempt to load the bitstream file into 4KB buffer and program the FPGA in a streaming mode.

[PATCHv1 0/2] Add streaming support for base firmware and fpga-mgr

2017-04-21 Thread yi1 . li
From: Yi Li As the FPGA hardware advances, the bitstream image size grows. It could be an issue for kernel to allocate big buffers to load the whole firmware file. Here is an attempt to load the bitstream file into 4KB buffer and program the FPGA in a streaming mode. The streaming support is

[PATCHv1 2/2] fpga-mgr: add streaming support

2017-04-21 Thread yi1 . li
From: Yi Li Add fpga_mgr_firmware_stream API to enable streaming/programing FPGA bitstream file from file system to FPGA manager. This code is on top of Luis R. Rodriguez's new driver_data_request_sync API. Signed-off-by: Yi Li ---

[PATCHv1 2/2] fpga-mgr: add streaming support

2017-04-21 Thread yi1 . li
From: Yi Li Add fpga_mgr_firmware_stream API to enable streaming/programing FPGA bitstream file from file system to FPGA manager. This code is on top of Luis R. Rodriguez's new driver_data_request_sync API. Signed-off-by: Yi Li --- drivers/fpga/fpga-mgr.c | 96

[RFC 2/2] fpga manager: Add fpga_mgr_firmware_stream API

2017-03-09 Thread yi1 . li
From: Yi Li Add fpga_mgr_firmware_stream API, which can load and program firmware in trucks to FPGA instead of the whole file. Signed-off-by: Yi Li --- drivers/fpga/fpga-mgr.c | 77 +++

[RFC 2/2] fpga manager: Add fpga_mgr_firmware_stream API

2017-03-09 Thread yi1 . li
From: Yi Li Add fpga_mgr_firmware_stream API, which can load and program firmware in trucks to FPGA instead of the whole file. Signed-off-by: Yi Li --- drivers/fpga/fpga-mgr.c | 77 +++ include/linux/fpga/fpga-mgr.h | 4 +++ 2 files changed, 81

[RFC 1/2] firmware class: Add stream_firmware API.

2017-03-09 Thread yi1 . li
From: Yi Li Add function to load firmware in multiple chucks instead of loading the whole big firmware file at once. Signed-off-by: Yi Li --- drivers/base/firmware_class.c | 128 ++

[RFC 1/2] firmware class: Add stream_firmware API.

2017-03-09 Thread yi1 . li
From: Yi Li Add function to load firmware in multiple chucks instead of loading the whole big firmware file at once. Signed-off-by: Yi Li --- drivers/base/firmware_class.c | 128 ++ include/linux/firmware.h | 2 + 2 files changed, 130

[RFC 0/2] Add streaming API for firmware and FPGA manager

2017-03-09 Thread yi1 . li
From: Yi Li As the FPGA hardware advances, the firmware image size grows (hundres of MBs or more). It could be an issue for kernel to allocate a big buffer to load the whole firmware file. Here is an attempt to read the firmware file into a small buffer and program the

[RFC 0/2] Add streaming API for firmware and FPGA manager

2017-03-09 Thread yi1 . li
From: Yi Li As the FPGA hardware advances, the firmware image size grows (hundres of MBs or more). It could be an issue for kernel to allocate a big buffer to load the whole firmware file. Here is an attempt to read the firmware file into a small buffer and program the FPGA in a loop (or so call