bif: qpnp-bsi: eliminate redundant RBL1 command during register read
When performing a BIF slave register read of a single register
there is no need to specify a burst read length of 1. All reads
are assumed to be of length 1 unless specified otherwise.
Therefore, remove the redundant RBL1 BIF bus command.
Change-Id: I000637a4bec5f6d2c9b48fa848c63779745b662a
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/bif/qpnp-bsi.c b/drivers/bif/qpnp-bsi.c
index 2fc0f4f..78cbc12 100644
--- a/drivers/bif/qpnp-bsi.c
+++ b/drivers/bif/qpnp-bsi.c
@@ -826,10 +826,10 @@
/*
* Send burst read length bus commands according to the following:
*
- * 256 --> RBL0
- * 0-255 = 16 * y + x --> RBEy and RBLx
- * RBE0 does not need to be sent
- * RBL0 does not need to be sent
+ * 1 --> No RBE or RBL
+ * 2 - 15 = x --> RBLx
+ * 16 - 255 = 16 * y + x --> RBEy and RBLx (RBL0 not sent)
+ * 256 --> RBL0
*/
if (burst_len == 256) {
rc = qpnp_bsi_issue_transaction(chip, BIF_TRANS_BC,
@@ -851,7 +851,7 @@
return rc;
}
- if (burst_len % 16) {
+ if (burst_len % 16 && burst_len > 1) {
rc = qpnp_bsi_issue_transaction(chip, BIF_TRANS_BC,
BIF_CMD_RBL + (burst_len % 16));
if (rc)