Message ID | 20240315165231.31090-1-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [4.19.y-cip] memory: renesas-rpc-if: Clear HS bit during hardware initialization | expand |
Hi! > From: Cong Dang <cong.dang.xn@renesas.com> > > commit 5192481f908e576be42bd39ec12979b79e11f7e0 upstream. > > According to the datasheet, HS bit should be specified to 1 when using > DMA transfer. As DMA transfer is not supported, it should be cleared to > 0. > > Previously, the driver relied on the HS bit being cleared by prior > firmware but this is not always the case. > > Fix this by ensuring the bit is cleared during hardware > initialization. Patch looks ok to me, I can apply it if it passes testing and if there are no other comments. Best regards, Pavel
Hi! > commit 5192481f908e576be42bd39ec12979b79e11f7e0 upstream. > > According to the datasheet, HS bit should be specified to 1 when using > DMA transfer. As DMA transfer is not supported, it should be cleared to > 0. > > Previously, the driver relied on the HS bit being cleared by prior > firmware but this is not always the case. > > Fix this by ensuring the bit is cleared during hardware > initialization. Thank you, applied. Best regards, Pavel
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 5d4d00d07d4f0..21e55c903285e 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -300,6 +300,9 @@ void rpcif_hw_init(struct rpcif *rpc, bool hyperflash) regmap_write(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_STRTIM(7) | RPCIF_PHYCNT_PHYMEM(hyperflash ? 3 : 0) | 0x260); + /* DMA Transfer is not supported */ + regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_HS, 0); + /* * NOTE: The 0x1511144 are undocumented bits, but they must be set * for RPCIF_PHYOFFSET1.