spi: spi-msm-geni: reduce spi bw votes

Currently, the spi driver is voting for a higher
ib value based on spi-max-freq provided by client
and hence causing higher power consumption.

To address this, core2x is reduced to 50MHz.

Change-Id: Icd32d486a5c57d7e1cbc771576ccb049e16d6c7a
Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
This commit is contained in:
Viken Dadhaniya 2023-04-19 14:16:28 +05:30
parent 09f06e1f1e
commit f2fb444aa3
2 changed files with 6 additions and 11 deletions

View File

@ -1247,11 +1247,6 @@ static int spi_geni_prepare_transfer_hardware(struct spi_master *spi)
{
struct spi_geni_master *mas = spi_master_get_devdata(spi);
int ret = 0, count = 0;
u32 max_speed = spi->cur_msg->spi->max_speed_hz;
struct se_geni_rsc *rsc = &mas->spi_rsc;
/* Adjust the IB based on the max speed of the slave in kHz.*/
rsc->ib = (max_speed * DEFAULT_BUS_WIDTH) / 1000;
/*
* Not required for LE as below intializations are specific

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _LINUX_MSM_GENI_SE
@ -393,11 +393,11 @@ if (print) { \
} while (0)
/* In KHz */
#define DEFAULT_SE_CLK 19200
#define I2C_CORE2X_VOTE 19200
#define I3C_CORE2X_VOTE 19200
#define SPI_CORE2X_VOTE 100000
#define UART_CORE2X_VOTE 100000
#define DEFAULT_SE_CLK 19200
#define I2C_CORE2X_VOTE 19200
#define I3C_CORE2X_VOTE 19200
#define SPI_CORE2X_VOTE 50000
#define UART_CORE2X_VOTE 100000
#define UART_CONSOLE_CORE2X_VOTE 19200
#if IS_ENABLED(CONFIG_MSM_GENI_SE)