From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51D69197.7060802@ti.com> Date: Fri, 5 Jul 2013 14:57:51 +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> <51D68D14.7090606@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:47 PM, yuhang wang wrote: > 2013/7/5 Sourav Poddar: >> 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. > Perhaps I did not said it clearly. Your flash supports quad and you > set it into quad > mode. But how can your controller driver notice that. In other word, > In which way > provide this information from flash to spi controller. Perhaps, I understood you initial patch wrong. :( Yes, this is little confusing, and I am trying to figure out that. As of now, I have tested it with some extern variable, though we need to see how it can be done cleanly. I am trying to see if your patch can be used in some way now.