- 09 2月, 2017 1 次提交
-
-
由 Nobuhiro Iwamatsu 提交于
Trivial typo fix in comment. Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 27 11月, 2016 4 次提交
-
-
由 LABBE Corentin 提交于
All fsl_qspi_devtype_data structures are never modified. This patch constify them. Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: NHan Xu <han.xu@nxp.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 IWAMOTO Masahiko 提交于
Add Everspin mr25h40 512KB MRAM to the list of supported chips. Signed-off-by: NMasahiko Iwamoto <iwamoto@allied-telesis.co.jp> Reviewed-by: NJagan Teki <jagan@openedev.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Moritz Fischer 提交于
This commit adds support in the spi-nor driver for the N25Q016A, a 16Mbit SPI NOR flash from Micron. Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Jagan Teki <jteki@openedev.com> Signed-off-by: NMoritz Fischer <moritz.fischer@ettus.com> Reviewed-by: NJagan Teki <jteki@openedev.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Jagan Teki 提交于
Add Atmel at25df321 spi-nor flash to the list of spi_nor_ids. Cc: Brian Norris <computersforpeace@gmail.com> Cc: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: NJagan Teki <jteki@openedev.com> Acked-by: NWenyou Yang <wenyou.yang@atmel.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
- 26 11月, 2016 4 次提交
-
-
由 Dan Carpenter 提交于
We return success or possibly uninitialized values on these error paths instead of proper error codes. Fixes: 14062341 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMarek Vasut <marex@denx.de> Reviewed-by: NMoritz Fischer <moritz.fischer@ettus.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Dan Carpenter 提交于
There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the > should be >=. Fixes: 14062341 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMarek Vasut <marex@denx.de> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Sean Nyekjaer 提交于
Signed-off-by: NSean Nyekjaer <sean.nyekjaer@prevas.dk> Reviewed-by: NJagan Teki <jagan@openedev.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Heiner Kallweit 提交于
The Spansion S25FL128S also supports dual read mode. In addition remove flag SECT_4K. 4K erases are supported, but not uniformly. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NJagan Teki <jteki@openedev.com> Acked-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
- 23 11月, 2016 2 次提交
-
-
由 Joël Esponde 提交于
With the S25FL127S nor flash part, each writing to the configuration register takes hundreds of ms. During that time, no more accesses to the flash should be done (even reads). This commit adds a wait loop after the register writing until the flash finishes its work. This issue could make rootfs mounting fail when the latter was done too much closely to this quad enable bit setting step. And in this case, a driver as UBIFS may try to recover the filesystem and may broke it completely. Signed-off-by: NJoël Esponde <joel.esponde@honeywell.com> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Ash Benz 提交于
Signed-off-by: NAsh Benz <ash.benz@bk.ru> Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
-
- 20 7月, 2016 2 次提交
-
-
由 Brian Norris 提交于
This controller driver is used only on ARM but is mostly written portably so it can build on other arch'es. Unfortunately, at least x86 doesn't provibe readsl()/writesl() accessors. We could possibly fix this issue in the future by using io{read,write}32_rep() instead, but let's just drop the architectures we aren't using for now. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Wei Yongjun 提交于
Remove duplicated include. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 19 7月, 2016 1 次提交
-
-
由 Graham Moore 提交于
Add support for the Cadence QSPI controller. This controller is present in the Altera SoCFPGA SoCs and this driver has been tested on the Cyclone V SoC. Signed-off-by: NGraham Moore <grmoore@opensource.altera.com> Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Alan Tull <atull@opensource.altera.com> Cc: Brian Norris <computersforpeace@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Graham Moore <grmoore@opensource.altera.com> Cc: Vignesh R <vigneshr@ti.com> Cc: Yves Vandervennet <yvanderv@opensource.altera.com> Cc: devicetree@vger.kernel.org Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 16 7月, 2016 1 次提交
-
-
由 Cyrille Pitchen 提交于
This driver add support to the new Atmel QSPI controller embedded into sama5d2x SoCs. It expects a NOR memory to be connected to the QSPI controller. Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 14 7月, 2016 3 次提交
-
-
由 Jiancheng Xue 提交于
Add hisilicon spi-nor flash controller driver Signed-off-by: NBinquan Peng <pengbinquan@hisilicon.com> Signed-off-by: NJiancheng Xue <xuejiancheng@hisilicon.com> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: NJagan Teki <jteki@openedev.com> Reviewed-by: NCyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Gigadevice flash support BP{0,1,2,3,4} bits, where BP3 means the same as the existing supported TB (Top/Bottom), and BP4 means the same as the not-yet-supported 4K bit used on other flash (e.g., Winbond). Let's support lock/unlock with the same feature flags as w25q32dw/w25q64dw. Tested on gd25lq64c, but I checked datasheets for the other 3, to make sure. While I was at it, I noticed that these all support dual and quad as well. I noted them, but can't test them at the moment, since my test system only supports standard 1x SPI. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 P L Sai Krishna 提交于
Add Micron (n25q00a) 1Gbit NOR Flash in the list of supported devices. This part is different from n25q00 in Memory Type. Memory Type for n25q00 - BAh Memory Type for n25q00a - BBh Signed-off-by: NP L Sai Krishna <lakshmis@xilinx.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 10 7月, 2016 1 次提交
-
-
由 Brian Norris 提交于
In stm_unlock(), the test to determine whether we've fully unlocked the flash checks for the lock length to be equal to the flash size. That is a typo/think-o -- the condition actually means the flash is completely *locked.* We should be using the inverse condition -- that the lock length is 0 (i.e., no protection). The result of this bug is that we never actually turn off the Status Register Write Disable bit, even if the flash is completely unlocked. Now we can. Fixes: 47b8edbf ("mtd: spi-nor: disallow further writes to SR if WP# is low") Reported-by: NGiorgio <giorgio.nicole@arcor.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
- 02 6月, 2016 8 次提交
-
-
由 Michal Suchanek 提交于
mtdblock and ubi do not handle the situation when read returns less data than requested. Loop in spi-nor until buffer is filled or an error is returned. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NMichal Suchanek <hramrach@gmail.com> Tested-by: NMichal Suchanek <hramrach@gmail.com>
-
由 Michal Suchanek 提交于
The spi-nor write loop assumes that what is passed to the hardware driver write() is what gets written. When write() writes less than page size at once data is dropped on the floor. Check the amount of data writen and exit if it does not match requested amount. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NMichal Suchanek <hramrach@gmail.com> Tested-by: NMichal Suchanek <hramrach@gmail.com>
-
由 Michal Suchanek 提交于
Do not pass retlen to hardware driver read/write functions. Update it in spi-nor generic driver instead. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NMichal Suchanek <hramrach@gmail.com> Tested-by: NMichal Suchanek <hramrach@gmail.com>
-
由 Michal Suchanek 提交于
SPI NOR hardware drivers now return useful value from their write functions so check them. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NMichal Suchanek <hramrach@gmail.com> Tested-by: NMichal Suchanek <hramrach@gmail.com>
-
由 Brian Norris 提交于
Add checking of SPI transfer errors and return them from read/write functions. Also return the amount of data transferred. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Add checking of SPI transfer errors and return them from read/write functions. Also return the amount of data transferred. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Michal Suchanek 提交于
Return amount of data read/written or error as read(2)/write(2) does. Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Michal Suchanek 提交于
Change the return value of spi-nor device read and write methods to allow returning amount of data transferred and errors as read(2)/write(2) does. Also, start handling positive returns in spi_nor_read(), since we want to convert drivers to start returning the read-length both via *retlen and the return code. (We don't need to do the same transition process for spi_nor_write(), since ->write() didn't used to have a return code at all.) Signed-off-by: NMichal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: NMichal Suchanek <hramrach@gmail.com> Tested-by: NMichal Suchanek <hramrach@gmail.com>
-
- 11 5月, 2016 1 次提交
-
-
由 Brian Norris 提交于
Also note the GigaDevice JEDEC ID. No write-protect support yet, since this flash uses a different status register layout. Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NMarek Vasut <marex@denx.de>
-
- 08 3月, 2016 11 次提交
-
-
由 Brian Norris 提交于
These are recent Winbond models that are known to have lock/unlock support via writing the Status Register, and that also support the TB (Top/Bottom) protection bit. Tested on w25q32dw. [Note on style: these entries are getting pretty long lines, so I picked a style that seems reasonable for splitting up the flags separate from the other mostly-similar fields.] Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
Some flash support a bit in the status register that inverts protection so that it applies to the bottom of the flash, not the top. This yields additions to the protection range table, as noted in the comments. Because this feature is not universal to all flash that support lock/unlock, control it via a new flag. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
We can't determine this purely by manufacturer type (see commit 67b9bcd3 ("mtd: spi-nor: fix Spansion regressions (aliased with Winbond)")), and it's not autodetectable by anything like SFDP. So make a new flag for it. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
It's a little easier to read and make sure there are no collisions (IMO). Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
Locking the flash is most useful if it provides real hardware security. Otherwise, it's little more than a software permission bit. A reasonable use case that provides real HW security might be like follows: (1) hardware WP# is deasserted (2) program flash (3) flash range is protected via status register (4) hardware WP# is asserted (5) flash protection range can no longer be changed, until WP# is deasserted In this way, flash protection is co-owned by hardware and software. Now, one would expect to be able to perform step (3) with ioctl(MEMLOCK), except that the spi-nor driver does not set the Status Register Protect bit (a.k.a. Status Register Write Disable (SRWD)), so even though the range is now locked, it does not satisfy step (5) -- it can still be changed by a call to ioctl(MEMUNLOCK). So, let's enable status register protection after the first lock command, and disable protection only when the flash is fully unlocked. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
There are a few different corner cases to the current logic that seem undesirable: * mtd_lock() with offs==0 trips a bounds issue on ofs - mtd->erasesize < 0 * mtd_unlock() on the middle of a flash that is already unlocked will return -EINVAL * probably other corner cases So, let's stop doing "smart" checks like "check the block below us", let's just do the following: (a) pass only non-negative offsets/lengths to stm_is_locked_sr() (b) add a similar stm_is_unlocked_sr() function, so we can check if the *entire* range is unlocked (and not just whether some part of it is unlocked) Then armed with (b), we can make lock() and unlock() much more symmetric: (c) short-circuit the procedure if there is no work to be done, and (d) check the entire range above/below This also aligns well with the structure needed for proper TB (Top/Bottom) support. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
If, for instance, the entire flash is already unlocked and I try to mtd_unlock() the entire device, I don't expect to see an EINVAL error. It should just silently succeed. Ditto for mtd_lock(). Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Brian Norris 提交于
Fixup a piece leftover by commit 32321e95 ("mtd: spi-nor: wait until lock/unlock operations are ready"). That commit made us wait for the WIP bit to settle after lock/unlock operations, but it missed the open-coded "unlock" that happens at probe() time. We should probably have this code utilize the unlock() routines in the future, to avoid duplication, but unfortunately, flash which need to be unlocked don't all have a proper ->flash_unlock() callback. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Stas Sergeev <stsp@users.sourceforge.net> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
由 Yao Yuan 提交于
LS1043a and LS2080A in the Layerscape family also support Freescale Quad SPI, make Quad SPI selectable for these hardwares. Signed-off-by: NYuan Yao <yao.yuan@nxp.com> Acked-by: NHan xu <han.xu@nxp.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Yao Yuan 提交于
LS1021a also support Freescale Quad SPI controller. Add fsl-quadspi support for ls1021a chip and make SPI_FSL_QUADSPI selectable for LS1021A SOC hardwares. Signed-off-by: NYuan Yao <yao.yuan@nxp.com> Acked-by: NHan xu <han.xu@freescale.com> Acked-by: NHan xu <han.xu@nxp.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Yao Yuan 提交于
Add R/W functions for big- or little-endian registers: The qSPI controller's endian is independent of the CPU core's endian. So far, the qSPI have two versions for big-endian and little-endian. Signed-off-by: NYuan Yao <yao.yuan@nxp.com> Acked-by: NHan xu <han.xu@freescale.com> Acked-by: NHan xu <han.xu@nxp.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 05 3月, 2016 1 次提交
-
-
由 Ezequiel García 提交于
Micron n25q128axx support subsector (4K) erase so let's update the flags. Tested on n25q128a13. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-