- 07 Nov, 2013 13 commits
-
-
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>
-
- 27 Oct, 2013 27 commits
-
-
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.pdfSigned-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>
-
Paul Bolle authored
Nothing calls omap2_onenand_rephase(). And __adjust_timing() is only called by omap2_onenand_rephase(). Remove these two unused functions. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
The ONFI detection routine is too verbose in some cases and not verbose enough in others. This patch refactors it to print only when there are significant warnings/errors. Probing in 16-bit mode: It is unnecessary to print until after the READID (address 20h) command. READID *has* to work properly in whatever bus width configuration we are in, or else no identification mode works. So we can silence some useless warnings on systems which come up in 16-bit mode and do not even respond with an O-N-F-I string. Valid parameter page: Nobody needs to see this. Do we inform the user every time other hardware responds properly? Instead, add an error message if *no* uncorrupted parameter pages are found. ONFI ECC: Most drivers don't yet use the reported minimum ECC values, so it shouldn't yet be a fatal condition if the extended parameter page is incorrect. But we should at least give a warning for the corner cases that we don't expect. ONFI flash detected: Nobody needs to see this. This is the expected case, that we detect ONFI properly, or else it wasn't ONFI-compliant and is detected by some other routine. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Huang Shijie <b32955@freescale.com> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
-
Brian Norris authored
do_xxlock() is only used locally. This silences a sparse warning: drivers/mtd/lpddr/lpddr_cmds.c:706:5: warning: no previous prototype for 'do_xxlock' [-Wmissing-prototypes] Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
These variable assignments are never used (the variables are either never used or are overwritten before use). This resolves some compiler warnings like the following: drivers/mtd/onenand/onenand_base.c: In function 'flexonenand_get_boundary': drivers/mtd/onenand/onenand_base.c:3532:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] drivers/mtd/onenand/onenand_base.c: In function 'onenand_probe': drivers/mtd/onenand/onenand_base.c:3838:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable] Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Kyungmin Park <kyungmin.park@samsung.com>
-
Brian Norris authored
This field is never used, except to print it out. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
The mtd_block_isbad() interface already checks for this. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
It's only used in this file. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
Brian Norris authored
struct dataflash's 'partition' field is unused. Just remove it. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: David Brownell <david-b@pacbell.net>
-