- 07 11月, 2013 37 次提交
-
-
由 Brian Norris 提交于
The FIXME and NOTE have already been fixed (we have FAST_READ support). Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NSourav Poddar <sourav.poddar@ti.com> Acked-by: NMarek Vasut <marex@denx.de>
-
由 Brian Norris 提交于
This patch fixes two memory errors: 1. During a probe failure (in mtd_device_parse_register?) the command buffer would not be freed. 2. The command buffer's size is determined based on the 'fast_read' boolean, but the assignment of fast_read is made after this allocation. Thus, the buffer may be allocated "too small". To fix the first, just switch to the devres version of kzalloc. To fix the second, increase MAX_CMD_SIZE unconditionally. It's not worth saving a byte to fiddle around with the conditions here. This problem was reported by Yuhang Wang a while back. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reported-by: NYuhang Wang <wangyuhang2014@gmail.com> Reviewed-by: NSourav Poddar <sourav.poddar@ti.com> Cc: <stable@vger.kernel.org>
-
由 Huang Shijie 提交于
In the imx6, all the ready/busy pins are binding togeter. So we should always check the ready/busy pin of the chip 0. In the other word, when the CS1 is enabled, we should also check the ready/busy of chip 0; if we check the ready/busy of chip 1, we will get the wrong result. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Huang Shijie 提交于
Some nand chip has two DIEs in a single chip, such as Micron MT29F32G08QAA. Each die has its own chip select pin, so this chip acts as two nand chips. If we only scan one chip, we may find that we only get 2G for this chip, but in actually, this chip's size is 4G. So scan two chips by default. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Huang Shijie 提交于
We only have one DMA channel : the channel 0. Use DMA channel 0 to access all the nand chips. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Huang Shijie 提交于
Decouple the chip select from the DMA channel, we use the DMA channel 0 to accecc all the nand devices. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Prabhakar Kushwaha 提交于
as per controller description, "While programming a NAND flash, status read should never skipped. Because it may happen that a new command is issued to the NAND Flash, even when the device has not yet finished processing the previous request. This may result in unpredictable behaviour." IFC controller never polls for R/B signal after command send. It just return control to software. This behaviour may not occur with NAND flash access. because new commands are sent after polling R/B signal. But it may happen in scenario where GPCM-ASIC and NAND flash device are working simultaneously. Update the controller driver to take care of this requirement Signed-off-by: NPrabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Prabhakar Kushwaha 提交于
Current IFC driver supports till 4K page size NAND flash. Add support of 8K Page size NAND flash - Add nand_ecclayout for 4 bit & 8 bit ecc - Defines constants - also fix ecc.strength for 8bit ecc of 8K page size NAND Signed-off-by: NPrabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel Garcia 提交于
This patch moves the char and block major number definitions to major.h to be with the rest of the major numbers. While doing this, include major.h in the files that need it. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
A new type of partition with magic FCTY was found on Huawei E970: 46 43 54 59 4b 51 37 4e 41 42 31 38 41 32 39 30 |FCTYKQ7NAB18A290| Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rafał Miłecki 提交于
Most of the bcm47xx devices use TRX format for storing kernel and some partition like Squashfs or JFFS2. This is pretty flexible solution, CFE (the bootloader) just writes (and later boots) TRX at some hardcoded place and paritions can vary in the size. However some devices don't use TRX format. Very recently we have discovered ZTE H218N that has kernel and rootfs partitions at some "random" places. This patch allows Linux find a rootfs partition after installing custom image with a CFE bootloader. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Hauke Mehrtens 提交于
Handle return NULL in malloc. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
devm_kzalloc is device managed and simplifies the code. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
module_platform_driver simplifies the code by removing boiler plate. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
module_platform_driver simplifies the code by removing boiler plate. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Some bright specification writers decided to write this in the ONFI spec (from ONFI 3.0, Section 3.1): "The number of blocks and number of pages per block is not required to be a power of two. In the case where one of these values is not a power of two, the corresponding address shall be rounded to an integral number of bits such that it addresses a range up to the subsequent power of two value. The host shall not access upper addresses in a range that is shown as not supported." This breaks every assumption MTD makes about NAND block/chip-size dimensions -- they *must* be a power of two! And of course, an enterprising manufacturer has made use of this lovely freedom. Exhibit A: Micron MT29F32G08CBADAWP "- Plane size: 2 planes x 1064 blocks per plane - Device size: 32Gb: 2128 blockss [sic]" This quickly hits a BUG() in nand_base.c, since the extra dimensions overflow so we think it's a second chip (on my single-chip setup): ONFI param page 0 valid ONFI flash detected NAND device: Manufacturer ID: 0x2c, Chip ID: 0x44 (Micron MT29F32G08CBADAWP), 4256MiB, page size: 8192, OOB size: 744 ------------[ cut here ]------------ kernel BUG at drivers/mtd/nand/nand_base.c:203! Internal error: Oops - BUG: 0 [#1] SMP ARM [... trim ...] [<c02cf3e4>] (nand_select_chip+0x18/0x2c) from [<c02d25c0>] (nand_do_read_ops+0x90/0x424) [<c02d25c0>] (nand_do_read_ops+0x90/0x424) from [<c02d2dd8>] (nand_read+0x54/0x78) [<c02d2dd8>] (nand_read+0x54/0x78) from [<c02ad2c8>] (mtd_read+0x84/0xbc) [<c02ad2c8>] (mtd_read+0x84/0xbc) from [<c02d4b28>] (scan_read.clone.4+0x4c/0x64) [<c02d4b28>] (scan_read.clone.4+0x4c/0x64) from [<c02d4c88>] (search_bbt+0x148/0x290) [<c02d4c88>] (search_bbt+0x148/0x290) from [<c02d4ea4>] (nand_scan_bbt+0xd4/0x5c0) [... trim ...] ---[ end trace 0c9363860d865ff2 ]--- So to fix this, just truncate these dimensions down to the greatest power-of-2 dimension that is less than or equal to the specified dimension. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: <stable@vger.kernel.org>
-
由 Ezequiel Garcia 提交于
This commit replaces the currently hardcoded buffer size, by a dynamic detection scheme. First a small 256 bytes buffer is allocated so the device can be detected (using READID and friends commands). After detection, this buffer is released and a new buffer is allocated to acommodate the page size plus out-of-band size. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel Garcia 提交于
Instead of setting info->dma each time a command is prepared, we can move it after the DMA buffers are allocated. This is more clear and it's the proper place to enable this, given DMA cannot be turned on and off during runtime. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Priyanka Jain 提交于
Micron N25Q512A is a spi flash memory with following features: -64MB size, 1.8V, Mulitple I/O, 4KB Sector erase memory. -Memory is organised as 1024(64KB) main sectors. -Each sector is divided into 256 pages. -Register set/Opcodes are similar to other N25Q family products. Signed-off-by: NPriyanka Jain <Priyanka.Jain@freescale.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Wei Yongjun 提交于
Use free_bch() instead of kfree() to free init_bch() allocated data. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Mike Dunn 提交于
The loop that polls the status register waiting for an operation to complete foolishly bases the timeout simply on the number of loop iterations that have ocurred. When I increased the processor clock speed, timeouts started to appear for long block erasure operations. This patch measures the timeout using jiffies. Signed-off-by: NMike Dunn <mikedunn@newsguy.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
dev_err is preferred to printk. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
devm_kzalloc is device managed and makes code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
module_platform_driver removes boiler plate code and makes it simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
devm_kzalloc is device managed and makes code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel Garcia 提交于
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Sachin Kamat 提交于
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Alexander Sverdlin 提交于
phram was 32-bit limited by design. Machines are growing up, but phram module is still useful. Update it. The patch is bigger than minimum, because simple_strtoul() is obsolete. Tested on MIPS64 and compile-tested for PPC (32 bit). Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nsn.com> Reviewed-by: NJoern Engel <joern@logfs.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 28 10月, 2013 3 次提交
-
-
由 Sachin Kamat 提交于
__initdata should be placed between the variable name and equal sign for the variable to be placed in the intended section. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Flavio Silveira 提交于
This flashchip is used in D-Link DIR-610 A1 router board and maybe several others, yet is not kernel upstream. So add support for it according to datasheet [0], making it easier to support other boards using this flashchip in the future. [0] http://www.esmt.com.tw/DB/manager/upload/F25L32PA.pdfSigned-off-by: NFlavio Silveira <fggs@terra.com.br> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-