From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbcAEQMm (ORCPT ); Tue, 5 Jan 2016 11:12:42 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:36923 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbcAEQMj (ORCPT ); Tue, 5 Jan 2016 11:12:39 -0500 Date: Tue, 5 Jan 2016 16:12:31 +0000 From: Mark Brown To: Jisheng Zhang Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20160105161231.GG6588@sirena.org.uk> References: <20151223192338.128e95a4@xhacker> <20151223121512.GV16023@sirena.org.uk> <20151223202952.28be5bab@xhacker> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fCcDWlUEdh43YKr8" Content-Disposition: inline In-Reply-To: <20151223202952.28be5bab@xhacker> X-Cookie: APL hackers do it in the quad. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC] spi: dw: support setting tmode dynamically X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fCcDWlUEdh43YKr8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 23, 2015 at 08:29:52PM +0800, Jisheng Zhang wrote: > On Wed, 23 Dec 2015 12:15:12 +0000 Mark Brown wrote: > > On Wed, Dec 23, 2015 at 07:23:38PM +0800, Jisheng Zhang wrote: > > > Currently the spi-dw tmode is fixed to SPI_TMOD_TR if cs_control is N= ULL, but we > > > need to set it as SPI_TMOD_EPROMREAD to read nor flash, my solution i= s to add and > > > export one functions to set the tmode, then the nor flash driver call= it > > > before reading and set back to SPI_TMOD_TR after done. =20 > > What does this mean - what is TMOD and why do we need to set it to read > > NOR flash? I've no information on this controller... > TMOD is one field of DW_SPI_CTRL0. Its available value could be: > 0: Transmit and Receive > 1: Transmit only > 2: Receive only > 3: EEPROM Read > If the one spi nor flash is connected to the SPI host, so far I can only = succeed > to read the nor flash content after setting the TMOD field as 3. Why? What does this mean in practical terms at the hardware level, what is "EEPROM read"? It sounds like there's some bigger issue here. --fCcDWlUEdh43YKr8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWi+tuAAoJECTWi3JdVIfQBNgH+gJDq1/l0iZhZ+A/xtRiogUg wAWR3LUMThNN4f7LY4o5WG0clp8MRzP3iGRLs9fhd6r+F9w3Uyj0tvw9239GHzxn BVzDV8HtxuysNBSm4WDTW3V2otsMti657NEdCwvAjFEHdPZ1p2uMCe74kh4FCYII X/CvAURcfcJCMjf277uEwN3Bz9I2zxMi1xRDamh83AxpzYxLuyabTraFClIqu8S6 iMO3btPSXVTxKmmAXhsAH2ytS8Uuwie8GZKoO6lv1RZsxojKFNmN1B+aso7tcZc9 KnKYROgx2rEyOJy9EHXOCh16f7SGBe2A8ZsWtHCjn2Ej7PID/bWIN4HsoBVwzP0= =+T3A -----END PGP SIGNATURE----- --fCcDWlUEdh43YKr8--