- Nov 07, 2013
-
-
Ezequiel Garcia authored
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:
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by:
Daniel Mack <zonque@gmail.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Ezequiel Garcia authored
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:
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by:
Daniel Mack <zonque@gmail.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Priyanka Jain authored
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:
Priyanka Jain <Priyanka.Jain@freescale.com> Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Wei Yongjun authored
Use free_bch() instead of kfree() to free init_bch() allocated data. Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by:
Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Mike Dunn authored
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:
Mike Dunn <mikedunn@newsguy.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
dev_err is preferred to printk. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
devm_kzalloc is device managed and makes code simpler. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
module_platform_driver removes boiler plate code and makes it simpler. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
devm_kzalloc is device managed and makes code simpler. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
Driver core will set the driver data to NULL upon detach or probe failure. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Ezequiel Garcia authored
Signed-off-by:
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Sachin Kamat authored
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Jingoo Han authored
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:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Jingoo Han authored
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:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Jingoo Han authored
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:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Jingoo Han authored
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:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Alexander Sverdlin authored
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:
Alexander Sverdlin <alexander.sverdlin@nsn.com> Reviewed-by:
Joern Engel <joern@logfs.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
- Oct 28, 2013
-
-
Sachin Kamat authored
__initdata should be placed between the variable name and equal sign for the variable to be placed in the intended section. Signed-off-by:
Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Flavio Silveira authored
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.pdf Signed-off-by:
Flavio Silveira <fggs@terra.com.br> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Jingoo Han authored
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:
Jingoo Han <jg1.han@samsung.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
Current code sets the mtd->type with MTD_NANDFLASH for both SLC and MLC. So the jffs2 may supports the MLC nand, but in actually, the jffs2 should not support the MLC. This patch uses the nand_is_slc() to check the nand cell type, and set the mtd->type with the right nand type. After this patch, the jffs2 only supports the SLC nand. The side-effect of this patch: Before this patch, the ioctl(MEMGETINFO) can only return with the MTD_NANDFLASH; but after this patch, the ioctl(MEMGETINFO) will return with the MTD_NANDFLASH for SLC, and MTD_MLCNANDFLASH for MLC. So the user applictions(such as mtd-utils) should also changes a little for this. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
We should not support the MLC nand for jffs2. So if the nand type is MLC, we quit immediatly. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
The current mtd_type_show() misses the MTD_MLCNANDFLASH case. This patch adds the case for it, and also updates the ABI. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
The helper is for user applications, and it is just a copy of the kernel helper: mtd_type_is_nand(); Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
This helper detects that whether the mtd's type is nand type. Now, it's clear that the MTD_NANDFLASH stands for SLC nand only. So use the mtd_type_is_nand() to replace the old check method to do the nand type (include the SLC and MLC) check. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
In current code, the MTD_NANDFLASH is used to represent both the SLC and MLC. It is confusing to us. By adding an explicit comment about these two macros, this patch makes it clear that: MTD_NANDFLASH : stands for SLC NAND, MTD_MLCNANDFLASH : stands for MLC NAND (including TLC). Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
When we use the ECC info which is get from the nand chip's datasheet, we may have some freed oob area now. This patch rewrites the gpmi_ecc_write_oob() to implement the ecc.write_oob(). We also update the comment for gpmi_hw_ecclayout. Yes! We can support the JFFS2 for the SLC nand now. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
Print out the cell information for nand chip. (Since the message is too long, this patch also splits the log with two separate pr_info()) Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
The current code does not set the SLC/MLC information for onfi nand. (This makes that the kernel treats all the onfi nand as SLC nand.) This patch fills the cell information for ONFI nands. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
The legacy ID NAND are all SLC. This patch sets 1 to the @bits_per_cell for the legacy ID NAND, which means they are all SLC. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
The @cellinfo fields contains unused information, such as write caching, internal chip numbering, etc. But we only use it to check the SLC or MLC. This patch tries to make it more clear and simple, renames the @cellinfo to @bits_per_cell. In order to avoiding the bisect issue, this patch also does the following changes: (0) add a macro NAND_CI_CELLTYPE_SHIFT to avoid the hardcode. (1) add a helper to parse out the cell type : nand_get_bits_per_cell() (2) parse out the cell type for extended-ID chips and the full-id nand chips. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Huang Shijie authored
Add a helper to check if a nand chip is SLC or MLC. This helper makes the code more readable. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
If the ONFI extended parameter page gives codeword_size == 0, the extended ECC information is corrupt and should not be used. Currently, we (correctly) avoid using the information, but we don't report the error to the caller, so the caller doesn't know that we didn't initialize ecc_strength_ds and ecc_step_ds. Now the caller can warn the user that it does not have sufficient information. This also removes the false and useless "ONFI extended param page detected" debug message (it was printed even on the aforementioned corruption, and for the success case, we don't really want a print). Signed-off-by:
Brian Norris <computersforpeace@gmail.com> Acked-by:
Huang Shijie <b32955@freescale.com>
-
Josh Wu authored
Since ecc_{strength,step}_ds is introduced in nand_chip structure for minimum ecc requirements. So we can use them directly and remove our own get_onfi_ecc_param function. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Josh Wu authored
This patch also add a const keyword for the of_device_id of nfc. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Acked-by:
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-
Josh Wu authored
Since the of specific code are declared in <linux/of_mtd.h> regardless of CONFIG_OF. Remove the #if defined(CONFIG_OF) guard and use an IS_ENABLED(CONFIG_OF) instead. Thanks to Ezequiel Garcia's for this protype. Signed-off-by:
Josh Wu <josh.wu@atmel.com> Acked-by:
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by:
Brian Norris <computersforpeace@gmail.com>
-