From 4e0522f3d0c685a75bcbb0007403ab24c8079da2 Mon Sep 17 00:00:00 2001 From: haojl2 Date: Mon, 17 Jun 2019 18:23:06 +0800 Subject: [PATCH] himax_v2_mmi: Enlarge SPI transfer size. Enlarge size, use DMA to translate. This can speed up FW download. Change-Id: I1aabea23ba8f64c7227d78525720b0e4e180bc12 Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1372032 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- .../touchscreen/himax_v2_mmi/himax_ic_incell_core.c | 11 +++-------- .../touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) mode change 100644 => 100755 drivers/input/touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c diff --git a/drivers/input/touchscreen/himax_v2_mmi/himax_ic_incell_core.c b/drivers/input/touchscreen/himax_v2_mmi/himax_ic_incell_core.c index a27573bdd528..c44e13f81cb3 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/himax_ic_incell_core.c +++ b/drivers/input/touchscreen/himax_v2_mmi/himax_ic_incell_core.c @@ -35,12 +35,7 @@ EXPORT_SYMBOL(pzf_op); void (*himax_mcu_cmd_struct_free)(void); static uint8_t *g_internal_buffer; -#define HX_SPI_6125_MAX_WRITE_SZ (16-4) -#define __MTK_SPI__ -#ifdef HX_SPI_MTK_MAX_WRITE_SZ -#undef HX_SPI_MTK_MAX_WRITE_SZ -#define HX_SPI_MTK_MAX_WRITE_SZ (16-4) -#endif +#define HX_SPI_6125_MAX_WRITE_SZ (4096-4) #ifdef CORE_IC /* IC side start*/ @@ -2457,8 +2452,8 @@ void himax_mcu_clean_sram_0f(uint8_t *addr, int write_len, int type) else max_bus_size = write_len; #else - if (total_size > 4096) - max_bus_size = 4096; + if (total_size > HX_SPI_6125_MAX_WRITE_SZ - 4) + max_bus_size = HX_SPI_6125_MAX_WRITE_SZ - 4; #endif total_size_temp = write_len; diff --git a/drivers/input/touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c b/drivers/input/touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c old mode 100644 new mode 100755 index 9411b71da0b6..24b3dad9167c --- a/drivers/input/touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c +++ b/drivers/input/touchscreen/himax_v2_mmi/himax_platform_QCT_SPI.c @@ -21,7 +21,7 @@ int irq_enable_count; EXPORT_SYMBOL(irq_enable_count); struct spi_device *spi; -#define PACKET_MAX_SZ (256 + 2) +#define PACKET_MAX_SZ (4096 + 2) static uint8_t *gBuffer; int himax_dev_set(struct himax_ts_data *ts)