From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51D68D14.7090606@ti.com> Date: Fri, 5 Jul 2013 14:38:36 +0530 From: Sourav Poddar MIME-Version: 1.0 To: yuhang wang Subject: Re: SPI: DUAL/QUAD support References: <20130704130017.GA25997@sig21.net> <20130704154927.GE27646@sirena.org.uk> <51D67851.8020402@ti.com> <51D689F3.3070605@ti.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-mtd , Johannes Stezenbach , Grant Likely , Mark Brown , linux-mtd@lists.infradead.org, Thomas.Betker@rohde-schwarz.com, spi-devel-general@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 05 July 2013 02:37 PM, yuhang wang wrote: >> if (!quad_mode) >> dra7xxx_writel(qspi, qspi->cmd | QSPI_RD_SNGL, >> QSPI_SPI_CMD_REG); >> else >> dra7xxx_writel(qspi, qspi->cmd | QSPI_RD_QUAD, >> QSPI_SPI_CMD_REG); >> ....... >> } > So what do you based on to set variable quad_mode. Best way should be to check for flash device id and manufacture data. Based on which you can decide whether your flash supports quad bits or not.