All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
To: <u-boot@lists.denx.de>
Cc: <jagan@amarulasolutions.com>, <michal.simek@amd.com>,
	<git@xilinx.com>, "T Karthik Reddy" <t.karthik.reddy@xilinx.com>,
	Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Subject: [PATCH 5/5] spi: cadence-qspi: Fix programming ospi flash speed
Date: Thu, 12 May 2022 04:05:35 -0600	[thread overview]
Message-ID: <20220512100535.16364-6-ashok.reddy.soma@xilinx.com> (raw)
In-Reply-To: <20220512100535.16364-1-ashok.reddy.soma@xilinx.com>

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

When the requested flash speed is 0, the baudrate division for the
requested speed causing drop in the performance. So set the ospi flash
to operate at max frequency when requested speed is zero.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
---

 drivers/spi/cadence_qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 5fb4d2ff03..907f5dadc4 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -151,7 +151,7 @@ static int cadence_spi_set_speed(struct udevice *bus, uint hz)
 	struct cadence_spi_priv *priv = dev_get_priv(bus);
 	int err;
 
-	if (hz > plat->max_hz)
+	if (!hz || hz > plat->max_hz)
 		hz = plat->max_hz;
 
 	/* Disable QSPI */
-- 
2.17.1


  parent reply	other threads:[~2022-05-12 10:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 10:05 [PATCH 0/5] Add support for versal specific cadence ospi driver Ashok Reddy Soma
2022-05-12 10:05 ` [PATCH 1/5] spi: cadence-qspi: move cadence qspi macros to header file Ashok Reddy Soma
2022-05-12 10:05 ` [PATCH 2/5] arm64: versal: Add versal specific cadence ospi driver Ashok Reddy Soma
2022-05-12 10:05 ` [PATCH 3/5] spi: cadence-qspi: reset qspi flash for versal platform Ashok Reddy Soma
2022-05-12 10:05 ` [PATCH 4/5] spi: cadence_qspi: Enable apb linear mode for apb read & write operations Ashok Reddy Soma
2022-05-12 10:05 ` Ashok Reddy Soma [this message]
2022-05-24  7:23 ` [PATCH 0/5] Add support for versal specific cadence ospi driver Michal Simek
2022-07-04 13:42 ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512100535.16364-6-ashok.reddy.soma@xilinx.com \
    --to=ashok.reddy.soma@xilinx.com \
    --cc=git@xilinx.com \
    --cc=jagan@amarulasolutions.com \
    --cc=michal.simek@amd.com \
    --cc=t.karthik.reddy@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.