summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-npcm-fiu.c
diff options
context:
space:
mode:
authorTomer Maimon <tmaimon77@gmail.com>2022-07-18 11:11:44 +0300
committerMark Brown <broonie@kernel.org>2022-07-20 16:55:24 +0100
commit7c3193f7890a03fc1b5b979f3f8dc8750ef47b13 (patch)
tree1ae8032b927b5e4044c6d11ab35542c227fd94ed /drivers/spi/spi-npcm-fiu.c
parenta3fd35be0eda760610a63e179ad860189b890f0b (diff)
downloadlwn-7c3193f7890a03fc1b5b979f3f8dc8750ef47b13.tar.gz
lwn-7c3193f7890a03fc1b5b979f3f8dc8750ef47b13.zip
spi: npcm-fiu: Modify direct read dummy configuration
Modify NPCM BMC FIU direct read dummy configuration that according spi-mem direct read function. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Link: https://lore.kernel.org/r/20220718081146.256070-2-tmaimon77@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-npcm-fiu.c')
-rw-r--r--drivers/spi/spi-npcm-fiu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-npcm-fiu.c b/drivers/spi/spi-npcm-fiu.c
index ba67dbed9fb8..d5b4fe7b9b62 100644
--- a/drivers/spi/spi-npcm-fiu.c
+++ b/drivers/spi/spi-npcm-fiu.c
@@ -252,8 +252,7 @@ static void npcm_fiu_set_drd(struct npcm_fiu_spi *fiu,
fiu->drd_op.addr.buswidth = op->addr.buswidth;
regmap_update_bits(fiu->regmap, NPCM_FIU_DRD_CFG,
NPCM_FIU_DRD_CFG_DBW,
- ((op->dummy.nbytes * ilog2(op->addr.buswidth)) / BITS_PER_BYTE)
- << NPCM_FIU_DRD_DBW_SHIFT);
+ op->dummy.nbytes << NPCM_FIU_DRD_DBW_SHIFT);
fiu->drd_op.dummy.nbytes = op->dummy.nbytes;
regmap_update_bits(fiu->regmap, NPCM_FIU_DRD_CFG,
NPCM_FIU_DRD_CFG_RDCMD, op->cmd.opcode);