From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Thu, 10 Sep 2015 22:48:21 +0200 Subject: [U-Boot] [PATCH v3 1/5] spi: cadence_qspi: Ensure spi_calibration is run when sclk change In-Reply-To: <1441861272-2393-1-git-send-email-clsee@altera.com> References: <1441861272-2393-1-git-send-email-clsee@altera.com> Message-ID: <20150910204821.GA17075@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu 2015-09-10 00:01:12, Chin Liang See wrote: > Ensuring spi_calibration is run when there is a change of sclk > frequency. This will ensure the qspi flash access works for high > sclk frequency > > Signed-off-by: Chin Liang See > Cc: Dinh Nguyen > Cc: Dinh Nguyen > Cc: Marek Vasut > Cc: Stefan Roese > Cc: Vikas Manocha > Cc: Jagannadh Teki Acked-by: Pavel Machek > --- a/drivers/spi/cadence_qspi.c > +++ b/drivers/spi/cadence_qspi.c > @@ -37,15 +37,18 @@ static int cadence_spi_write_speed(struct udevice *bus, uint hz) > } > > /* Calibration sequence to determine the read data capture delay register */ > -static int spi_calibration(struct udevice *bus) > +static int spi_calibration(struct udevice *bus, uint hz) I'd do "unsigned int" here, for consistency with > @@ -38,6 +38,7 @@ struct cadence_spi_priv { > int qspi_is_init; > unsigned int qspi_calibrated_hz; > unsigned int qspi_calibrated_cs; > + unsigned int previous_hz; > }; this, but that's nitpicking. Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html