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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sourav Poddar Subject: Re: SPI: DUAL/QUAD support Date: Fri, 5 Jul 2013 14:38:36 +0530 Message-ID: <51D68D14.7090606@ti.com> References: <20130704130017.GA25997@sig21.net> <20130704154927.GE27646@sirena.org.uk> <51D67851.8020402@ti.com> <51D689F3.3070605@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-mtd , Johannes Stezenbach , Mark Brown , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Thomas.Betker-Bf/A/FSCP0w3s4ca2cGeAgC/G2K4zDHf@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: yuhang wang Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org 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. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev From mboxrd@z Thu Jan 1 00:00:00 1970 From: sourav.poddar@ti.com (Sourav Poddar) Date: Fri, 5 Jul 2013 14:38:36 +0530 Subject: SPI: DUAL/QUAD support In-Reply-To: References: <20130704130017.GA25997@sig21.net> <20130704154927.GE27646@sirena.org.uk> <51D67851.8020402@ti.com> <51D689F3.3070605@ti.com> Message-ID: <51D68D14.7090606@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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.