- 02 12月, 2015 3 次提交
-
-
由 Brian Norris 提交于
It's "ADL" ("ALE to data loading" time) not "ALD". Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Boris BREZILLON 提交于
src_ssync_features field is only 1 byte large, and the 4th reserved area is actually 8 bytes large. Fixes: d1e1f4e4 ("mtd: nand: add support for reading ONFI parameters from NAND device") Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ricardo Ribalda 提交于
The error message was: m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 0, 0 The new error message: m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 00, 00 Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 01 12月, 2015 6 次提交
-
-
由 Julia Lawall 提交于
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Julia Lawall 提交于
This patch addresses two related memory management issues in the probe function: 1. for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> 2. The devm_kzalloc'd data is not used if brcmnand_init_cs fails. Free it immediately, using devm_kfree in this case, instead of waiting for the remove function. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Simon Arlott 提交于
If an error occurs in flash above 4GB in PIO mode then the EXT_ADDR registers will be set to the location of the error and never cleared. Reset them to 0 before reading. Signed-off-by: NSimon Arlott <simon@fire.lp0.eu> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Arnd Bergmann 提交于
The linux/mtd/map.h header file is included by a couple of platform specific files that are built even when CONFIG_MTD is disabled, and we always get warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" in that case. This adds an #ifdef around the pointless warning, as everything is really fine when we don't build the drivers anyway. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Arnd Bergmann 提交于
MTD allows compile-time configuration of the possible CFI geometry settings that are allowed by the kernel, but that includes a couple of invalid configurations, where no bank width or no interleave setting is allowed. These are then caught with a compile-time warning: include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. include/linux/mtd/map.h:145:2: warning: #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" This is a bit annoying for randconfig tests, and can be avoided if we change the Kconfig logic to always select the simplest configuration when no other one is enabled. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
So far struct spi_nor was using just a pointer to struct mtd_info so it wasn't needed to have it fully defined there. After recent change we embed whole struct so we need to include a proper header. Fixes: 19763671 ("mtd: spi-nor: embed struct mtd_info within struct spi_nor") Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 21 11月, 2015 2 次提交
-
-
由 Bayi Cheng 提交于
Add spi nor flash driver for mediatek controller Signed-off-by: NBayi Cheng <bayi.cheng@mediatek.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 LABBE Corentin 提交于
All atmel_nand_caps are never modified, consitify them. Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 20 11月, 2015 12 次提交
-
-
由 Brian Norris 提交于
Most parsers can be handled with our new boilerplate-reducing macro. There are a few that can't be (cmdlineparts and ofpart). Also kill off the owner assignments, since register_mtd_parser() now takes care of that. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
This can help eliminate some boilerplate by generating the module_init() and module_exit() functions, and by automatically assigning the module owner. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Pull the supported chip names from drivers/mtd/devices/m25p80.c and stop pointing readers to Linux code. Also (although I see this habit repeated throughout the Documentation/devicetree/bindings/ tree), stop using the title "driver" in this file, when we're trying explicitly to describe hardware, not software. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: <devicetree@vger.kernel.org> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com>
-
由 Brian Norris 提交于
I overlooked a few comments in commit 8947e396 ("Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor""). Fix these up now. Suggested-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com>
-
由 Brian Norris 提交于
Commit 43163022 ("mtd: m25p80: allow arbitrary OF matching for "jedec,spi-nor"") moved the "jedec,spi-nor" handling from the spi_device_id table to the of_match_table, to better handle matching complex device tree compatible strings. With that patch, device tree support works as expected when m25p80.c is built into the kernel. However, that commit ignored the fact that: (1) (non-DT) platform devices might want to use the "spi-nor" string for matching with this driver, rather than picking an arbitrary one like "m25p80" (2) the core SPI uevent/modalias code doesn't yet support kernel module autoloading via of_match_table strings; so for DT-based devices, it will only report (part of) the first compatible string used Problem (1) has been reported previously, and I forgot to patch it up afterward. Problem (2) was noticed recently here: http://lists.infradead.org/pipermail/linux-mtd/2015-October/062369.html https://lkml.org/lkml/2015/11/12/574 Specifically, this patch fixes m25p80.ko module autoloading for cases like this: flash@xxx { compatible = "jedec,spi-nor"; ... }; because modalias of "spi:spi-nor" (the only module loading info provided by the SPI core for this device) will now be listed as an alias in m25p80.ko. Notably, it does *not* help cases like this: flash@xxx { compatible = "vendor,shiny-new-device", "jedec,spi-nor"; ... }; unless we also list "shiny-new-device" in m25p_ids[]. There has been discussion on future work for this issue here: https://lkml.org/lkml/2015/11/12/574 Cc: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com>
-
由 Andreas Fenkart 提交于
according datasheet both chips can erase 4kByte sectors individually Signed-off-by: NAndreas Fenkart <andreas.fenkart@dev.digitalstrom.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Just use the spi-nor default instead. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Some spi-nor drivers perform sector erase by duplicating their write_reg() command. Let's not require that the driver fill this out, and provide a default instead. Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() has been introduced to hide accesses to mtd->priv. All NAND controller drivers should use it instead of directly accessing the ->priv field. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
In case other subsystems want to merge in this helper for use in their drivers, let's bring in that development separately from the rest of MTD -next development. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
Some drivers are retrieving the nand_chip pointer using the container_of macro on a struct wrapping both the nand_chip and the mtd_info struct while the standard way of retrieving this pointer is through mtd->priv. Provide an helper to do that. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
The ->priv field of the mtd_info object attached to a nand_chip device should point to the nand_chip device. The pxa and cafe drivers are assigning this field their own private structure, which works fine as long as the nand_chip field is the first one in the driver private struct but seems a bit fragile. Fix that by setting mtd->priv to point the nand_chip field and assigning chip->priv to the private structure head. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 19 11月, 2015 3 次提交
-
-
由 Brian Norris 提交于
AFAIR this driver was never tested with subpage read support, and this code is currently unused because we don't set the NAND_SUBPAGE_READ flag. It can be resurrected if someone tests it properly. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NRay Jui <rjui@broadcom.com>
-
由 Brian Norris 提交于
The read_byte() handling for accessing the flash cache has some awkward swapping being done in the read_byte() function. Let's just make this a byte array, and do the swapping with the word-level macros during the initial buffer copy. This is just a refactoring patch, with no (intended) functional change. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Clay McClure <clay@daemons.net> Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: <bcm-kernel-feedback-list@broadcom.com> Tested-by: NClay McClure <clay@daemons.net>
-
由 Brian Norris 提交于
It is theoretically possible to probe this driver without a matching device tree, so let's guard against this. Also, use the of_device_get_match_data() helper to make this a bit simpler. Coverity complained about this one. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NHan xu <han.xu@freescale.com>
-
- 18 11月, 2015 2 次提交
-
-
由 Wang YanQing 提交于
This patch correct some representation errors, add a little clarification in some places, and fix indentation problems for pseudo code. It also delete one more white space for one place. Signed-off-by: NWang YanQing <udknight@gmail.com> [Brian: a few tweaks] Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
Doing a bit-or operation with zero is pointless. Remove this unneeded bit-or. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 17 11月, 2015 11 次提交
-
-
由 Brian Norris 提交于
As Cyrille noted [1], this line is wrong. [1] http://lists.infradead.org/pipermail/linux-mtd/2015-September/061725.htmlSigned-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>
-
由 Nicolas Pitre 提交于
do_div() is meant to be used with an unsigned dividend. Signed-off-by: NNicolas Pitre <nico@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
The NAND clock can be disabled on suspend and enabled on resume. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
This macro is not used anymore, so it's just dead code. Remove it. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
Currently, the driver is trying to detect the presence of a chip by issuing a RESET command before nand_scan_ident. This seems completely redundant, and is also a layering violation as nand_scan_ident is in charge of device detection. This commit removes the RESET command use, and moves the initial timing configuration to pxa3xx_nand_config_ident. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
This commit simplifies the initial configuration performed by pxa3xx_nand_scan. No functionality change is intended. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
The Data Flash Control Register (NDCR) contains two types of parameters: those that are needed for device identification, and those that can only be set after device identification. Therefore, the driver can't set them all at once and instead needs to configure the first group before nand_scan_ident() and the second group later. Let's split pxa3xx_nand_config in two halves, and set the parameters that depend on the device geometry once this is known. Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel García 提交于
The chunk size represents the size of the data chunks, which is used by the controllers that allow to split transfered data. However, the initial chunk size is used in a non-splitted way, during device identification. Therefore, it must be large enough for all the NAND commands issued during device identification. This includes NAND_CMD_PARAM which was recently changed to transfer up to 2048 bytes (for the redundant parameter pages). Thus, the initial chunk size should be 2048 as well. On Armada 370/XP platforms (NFCv2) booted without the keep-config devicetree property, this commit fixes a timeout on the NAND_CMD_PARAM command: [..] pxa3xx-nand f10d0000.nand: This platform can't do DMA on this device pxa3xx-nand f10d0000.nand: Wait time out!!! nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x38 nand: Micron MT29F8G08ABABAWP nand: 1024 MiB, SLC, erase size: 512 KiB, page size: 4096, OOB size: 224 Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
We need to be able to build the jz4740_nand driver. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
If multiple NAND chips are registered to the same controller, then when rebooting the system, the first one will grab the controller lock, while the second will wait forever for the first one to release it. i.e., a classic deadlock. This problem was solved for a similar case (suspend/resume) back in commit 6b0d9a84 ("mtd: nand: fix multi-chip suspend problem"), and the shutdown state really isn't much different for us, so rather than adding a new special case to nand_get_device(), we can just overload the FL_PM_SUSPENDED state. Now, multiple chips can "get" the same controller lock (preventing further I/O), while we still allow other chips to pass through nand_shutdown(). Original report: http://thread.gmane.org/gmane.linux.drivers.mtd/59726 http://lists.infradead.org/pipermail/linux-mtd/2015-July/059992.html Fixes: 72ea4036 ("mtd: nand: added nand_shutdown") Reported-by: NAndrew E. Mileski <andrewm@isoar.ca> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: Andrew E. Mileski <andrewm@isoar.ca> Acked-by: NScott Branden <sbranden@broadcom.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
Fallout from commit 832f5dac ("MIPS: Remove all the uses of custom gpio.h") We see errors like this: drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_detect_bank': drivers/mtd/nand/jz4740_nand.c:340:9: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function) drivers/mtd/nand/jz4740_nand.c:340:9: note: each undeclared identifier is reported only once for each function it appears in drivers/mtd/nand/jz4740_nand.c:359:2: error: implicit declaration of function 'jz_gpio_set_function' [-Werror=implicit-function-declaration] drivers/mtd/nand/jz4740_nand.c:359:29: error: 'JZ_GPIO_FUNC_MEM_CS0' undeclared (first use in this function) drivers/mtd/nand/jz4740_nand.c:399:29: error: 'JZ_GPIO_FUNC_NONE' undeclared (first use in this function) drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_probe': drivers/mtd/nand/jz4740_nand.c:528:13: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function) drivers/mtd/nand/jz4740_nand.c: In function 'jz_nand_remove': drivers/mtd/nand/jz4740_nand.c:555:14: error: 'JZ_GPIO_MEM_CS0' undeclared (first use in this function) Patched similarly to: https://patchwork.linux-mips.org/patch/11089/ Fixes: 832f5dac ("MIPS: Remove all the uses of custom gpio.h") Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 16 11月, 2015 1 次提交
-
-
由 Brian Norris 提交于
Sync up with the upstream development. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-