From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Mon, 11 May 2015 11:56:16 +0200 Subject: [U-Boot] [PATCHv3] mtd: sf: Add CONFIG_SPI_N25Q256A_RESET for software-reset In-Reply-To: References: <20150510175346.GB28291@amd> <201505110948.55136.marex@denx.de> <20150511082912.GB5127@amd> <20150511083938.GD5127@amd> <20150511085052.GA13234@amd> Message-ID: <20150511095616.GA26595@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 Mon 2015-05-11 14:35:36, Jagan Teki wrote: > On 11 May 2015 at 14:20, Pavel Machek wrote: > > On Mon 2015-05-11 14:14:32, Jagan Teki wrote: > >> On 11 May 2015 at 14:09, Pavel Machek wrote: > >> > On Mon 2015-05-11 14:03:06, Jagan Teki wrote: > >> >> On 11 May 2015 at 13:59, Pavel Machek wrote: > >> >> > On Mon 2015-05-11 13:35:04, Jagan Teki wrote: > >> >> >> On 11 May 2015 at 13:18, Marek Vasut wrote: > >> >> >> > On Sunday, May 10, 2015 at 07:53:46 PM, Pavel Machek wrote: > >> >> >> > > >> >> >> > [...] > >> >> >> > > >> >> >> >> > As per my early comments on this thread, I'm not happy with this approach > >> >> >> >> > of being added flash specific in generic code by simply added like this. > >> >> >> >> > > >> >> >> >> > I encounter similar issue before and I simply reverted [1] > >> >> >> >> > http://git.denx.de/?p=u-boot.git;a=commit;h=122d805fd4bd478bb83536348291d > >> >> >> >> > 34ae648364b > >> >> >> >> > > >> >> >> >> > Please think in a different perceptive like adding any flags to specific > >> >> >> >> > vendor with specific part, but that also require proper tested. > >> >> >> >> > >> >> >> >> Ok, could you explain how you'd like to have it solved? Should we just > >> >> >> >> call spi_flash_cmd() from socfpga-specific code? > >> >> >> >> > >> >> >> >> But I'm pretty sure similar issue will be encountered on different > >> >> >> >> boards, so it would be good to have it in shared place. Do you want me > >> >> >> >> to create sf_probe_micron and move it there? > >> >> >> > > >> >> >> > I'd just add a flag into the SPI NOR table and in the code, I'd check > >> >> >> > if the flag is set and if so, trigger the Micron-specific code. That > >> >> >> > ought to be simple and it doesn't introduce any new config options. > >> >> >> > >> >> >> Ok, solutions - what about Linux same issue or this requirement should be only > >> >> >> for u-boot or bootloaders? > >> >> > > >> >> > Linux probably has same issue. > >> >> > >> >> Please check the same. > >> >> > >> >> > > >> >> > Do you like Marek's "add a flag to table" proposal? > >> >> > >> >> Please send the patch to both the ML's. > >> > > >> > Which mailing lists do you mean? > >> > >> I meant to say if something is not working with Linux as well, send the same > >> patch to both U-Boot and Linux. > > > > Linux already handles it, see drivers/mtd/spi-nor/spi-nor.c, functions > > spi_nor_scan and set_4byte. > > Seems like nothing much doing in micron side > switch (JEDEC_MFR(info)) { > case CFI_MFR_ST: /* Micron, actually */ > /* Some Micron need WREN command; all will accept it */ > need_wren = true; Umm. Take a closer look. There's no break, so it continues below. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html