- 19 11月, 2016 7 次提交
-
-
由 Masahiro Yamada 提交于
Use the managed variant instead of request_irq() and free_irq(). Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
The denali->blksperchip is set, but not referenced any more. The denali->totalblks is used only for calculating denali->blksperchip. Both of them are unneeded. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
As far as I understood from the Kconfig menu deleted by commit be7f39c5 ("Staging: delete spectra driver"), the "Spectra" is specific to Intel Moorestown Platform. The Denali NAND controller IP is used for various SoCs such as Altera SOCFPGA, Socionext UniPhier, etc. The platform specific strings are not preferred in this driver. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
The denali->fwblks is set by detect_partition_feature(), but it is not referenced from anywhere. That means the struct member fwblks and the whole of detect_partition_feature() are unneeded. The comment block implies this function is only for Intel platforms. I found drivers/staging/spectra used to exist, but it was deleted by commit be7f39c5 ("Staging: delete spectra driver") 5 years ago. So, I guess nobody would need this function any more. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
The interrupt handler is setup in denali_init(), not in denali_drv_init(). This comment is false. Such a comment adds no value, so just delete it instead of move. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
The struct member "idx" was used as an index for debug_array long ago, but the DEBUG_DENALI feature was removed by commit 7cfffac0 ("nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk"). Since then, this has been only initialized, but never referenced. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Masahiro Yamada 提交于
The driver calls devm_kzalloc()/devm_kfree() to allocate/free memory. They are declared in <linux/device.h>, not in <linux/slab.h>. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 06 5月, 2016 1 次提交
-
-
由 Boris Brezillon 提交于
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
- 19 12月, 2015 2 次提交
-
-
由 Boris BREZILLON 提交于
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 12 12月, 2015 1 次提交
-
-
由 Boris BREZILLON 提交于
Unregister the NAND device from the NAND subsystem when removing a denali NAND controller, otherwise the MTD attached to the NAND device is still exposed by the MTD layer, and accesses to this device will likely crash the system. Fixes: 2a0a288e ("mtd: denali: split the generic driver and PCI layer") Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 14 10月, 2015 2 次提交
-
-
由 Boris BREZILLON 提交于
The ->read_xxx() methods are all passed the page number the NAND controller is supposed to read, but ->write_xxx() do not have such a parameter. This is a problem if we want to properly implement data scrambling/randomization in order to mitigate MLC sensibility to repeated pattern: to prevent bitflips in adjacent pages in the same block we need to avoid repeating the same pattern at the same offset in those pages, hence the randomizer/scrambler engine need to be passed the page value in order to adapt its seed accordingly. Moreover, adding the page parameter to the ->write_xxx() methods add some consistency to the current API. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> CC: Josh Wu <josh.wu@atmel.com> CC: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> CC: Maxime Ripard <maxime.ripard@free-electrons.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: Huang Shijie <shijie.huang@arm.com> CC: Stefan Agner <stefan@agner.ch> CC: devel@driverdev.osuosl.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Frans Klaver 提交于
Owner is automatically set by mtdcore. Make use of that. Signed-off-by: NFrans Klaver <fransklaver@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 30 9月, 2015 2 次提交
-
-
由 Graham Moore 提交于
Read Denali hardware revision number and use it to calculate max_banks, The encoding of max_banks changed in Denali revision 5.1. Signed-off-by: NGraham Moore <grmoore@opensource.altera.com> [Brian: parentheses around macro arg] Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Enrico Jorns 提交于
A read id operation followed by 0x00 reads the device ID while a read id operation followed by 0x20 reads the possible ONFI identifier. As the READID function did not propagate the second id parameter but had a hard-coded call for 0x90 0x00, reading the ONFI identifier was not possible and thus chips werde not detected (tested with MT29F8G08ABABAWP) Signed-off-by: NEnrico Jorns <ejo@pengutronix.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 31 3月, 2015 1 次提交
-
-
由 Graham Moore 提交于
The Denali Controller IP does not support sub-page writes. Signed-off-by: NGraham Moore <grmoore@opensource.altera.com> Signed-off-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 12 3月, 2015 1 次提交
-
-
由 Brian Norris 提交于
TclsRising is always 1. Caught by Coverity. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
-
- 06 2月, 2015 1 次提交
-
-
由 Masahiro Yamada 提交于
This driver uses NAND_ECC_HW_SYNDROME mode. The nand_scan_tail() function would not complain about missing ecc->calculate, ecc->correct, ecc->hwctl handlers. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 13 1月, 2015 1 次提交
-
-
由 Graham Moore 提交于
commit 3157d1ed ("mtd: denali: remove unnecessary casts") introduced an error by using a wrong bitmask. A uint16_t cast was replaced with & 0xff, should be & 0xffff. Signed-off-by: NGraham Moore <grmoore@opensource.altera.com> Signed-off-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 20 9月, 2014 3 次提交
-
-
由 Masahiro Yamada 提交于
- Fix indents - Do not break a line unless it is longer than 80 columns - Do not insert a whitespace before ';' - Use whitespaces around operators - Use braces for a "else" block where the "if" block uses ones. Besides, eliminate all the warnings reported by checkpatch.pl: - WARNING: quoted string split across lines - WARNING: else is not generally useful after a break or return - WARNING: Missing a blank line after declarations - WARNING: Avoid line continuations in quoted strings Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Masahiro Yamada 提交于
We should use parentheses only when they are necessary or they really improve the readability. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
The variable "irq_status" in denali_read_page_raw() is set, but not used. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 16 9月, 2014 5 次提交
-
-
由 Masahiro Yamada 提交于
The variable "retry" in wait_for_irq() is set, but not used. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Masahiro Yamada 提交于
We should rathar use "int" type for loop iterators. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Masahiro Yamada 提交于
Useless casts result in unreadable source code. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Masahiro Yamada 提交于
All of these variables are initialized to zero and then set to a different value below. Zero-initializing is redundant. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Masahiro Yamada 提交于
We should use /* * Blah Blah ... * ... */ for multi-line comment blocks. In addition, refactor some comments where it seems reasonable and remove some comments where the code is clear enough such as: /* clear interrupts */ clear_interrupts(denali); Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 20 8月, 2014 2 次提交
-
-
由 Brian Norris 提交于
The condition "if (irq_status == 0)" already ensures that one half of the ternary ?: is dead. I think this should probably actually be a FAIL, not a PASS. Caught by Coverity. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Jamie Iles <jamie@jamieiles.com>
-
由 Masahiro Yamada 提交于
MAP10 command with '0x2000' data sets up a read-ahead/write access. Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 15 7月, 2014 1 次提交
-
-
由 grmoore@altera.com 提交于
The Denali NAND driver reads only 5 bytes of ID, but some Hynix and Samsung have size parameters in the 6th byte. As a result, the page and oob size for a Hynix H27UAG8T2B were calculated incorrectly and the driver failed to load. The solution is to read 8 bytes of ID, as expected by the NAND framework. Signed-off-by: NGraham Moore <grmoore@altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 10 5月, 2014 1 次提交
-
-
由 Brian Norris 提交于
The nand_chip::erase_cmd callback previously served a dual purpose; for one, it allowed a per-flash-chip override, so that AG-AND devices could use a different erase command than other NAND. These AND devices were dropped in commit 14c65786 (mtd: nand: remove AG-AND support). On the other hand, some drivers (denali and doc-g4) need to use this sort of callback to implement controller-specific erase operations. To make the latter operation easier for some drivers (e.g., ST's new BCH NAND driver), it helps if the command dispatch and wait functions can be lumped together, rather than called separately. This patch does two things: 1. Pull the call to chip->waitfunc() into chip->erase_cmd(), and return the status from this callback 2. Rename erase_cmd() to just erase(), since this callback does a little more than just send a command Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NLee Jones <lee.jones@linaro.org>
-
- 12 1月, 2014 1 次提交
-
-
由 Huang Shijie 提交于
This patch kills the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE by the following way: 1.) change the @buf field of nand_buf{} from an array to a pointer. also remove the DENALI_BUF_SIZE macro. 2.) Before we call the nand_scan_ident, we allocate a temporary buffer whose size is PAGE_SIZE. 3.) After we finish the nand_scan_ident, we have already getten the page size and oob size. We will allocate the right buffer size again. Signed-off-by: NHuang Shijie <shijie8@gmail.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 04 1月, 2014 1 次提交
-
-
由 Rashika Kheria 提交于
This patch marks the function is_erased() as static in denali.c because it is not used outside this file. This patch elimiates the following warning in nand/denali.c: drivers/mtd/nand/denali.c:900:6: warning: no previous prototype for ‘is_erased’ [-Wmissing-prototypes] Signed-off-by: NRashika Kheria <rashika.kheria@gmail.com> Reviewed-by: NJosh Triplett <josh@joshtriplett.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 28 10月, 2013 2 次提交
-
-
由 Huang Shijie 提交于
Add a helper to check if a nand chip is SLC or MLC. This helper makes the code more readable. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
It's only used in this file. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 31 8月, 2013 1 次提交
-
-
由 Akinobu Mita 提交于
Use NAND_CI_CELLTYPE_MSK to extract the cell type from nand_chip.cellinfo instead of hardcoded constant. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: Artem Bityutskiy <dedekind1@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 15 11月, 2012 1 次提交
-
-
由 Dinh Nguyen 提交于
The Denali controller can also be found in SoC devices attached to a simple bus. Move the PCI specific parts into denali_pci so that we can add a denali_dt that uses the same driver but for a device tree driver instead of a PCI based device. Signed-off-by: NJamie Iles <jamie@jamieiles.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
- 07 7月, 2012 1 次提交
-
-
由 Josh Wu 提交于
There is an implemention of hardware ECC write page function which may return an error indication. For instance, using Atmel HW PMECC to write one page into a nand flash, the hardware engine will compute the BCH ecc code for this page. so we need read a the status register to theck whether the ecc code is generated. But we cannot assume the status register always can be ready, for example, incorrect hardware configuration or hardware issue, in such case we need write_page() to return a error code. Since the definition of 'write_page' function in struct nand_ecc_ctrl is 'void'. So this patch will: 1. add return 'int' value for 'write_page' function. 2. to be consitent, add return 'int' value for 'write_page_raw' fuctions too. 3. add code to test the return value, and if negative, indicate an error happend when write page with ECC. 4. fix the compile warning in all impacted nand flash driver. Note: I couldn't compile-test all of these easily, as some had ARCH dependencies. Signed-off-by: NJosh Wu <josh.wu@atmel.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 14 5月, 2012 2 次提交
-
-
由 Shmulik Ladkani 提交于
As of [mtd: nand: remove autoincrement 'sndcmd' code], the NAND_CMD_READ0 command is issued unconditionally. Thus, read_oob/read_oob_raw's 'sndcmd' argument is no longer needed, as well as their return code. Remove the 'sndcmd' parameter, and set the return code to 0. Signed-off-by: NShmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Brian Norris 提交于
New NAND controllers can perform read/write via HW engines which don't expose OOB data in their DMA mode. To reflect this, we should rework the nand_chip / nand_ecc_ctrl interfaces that assume that drivers will always read/write OOB data in the nand_chip.oob_poi buffer. A better interface includes a boolean argument that explicitly tells the callee when OOB data is requested by the calling layer (for reading/writing to/from nand_chip.oob_poi). This patch adds the 'oob_required' parameter to each relevant {read,write}_page interface; all 'oob_required' parameters are left unused for now. The next patch will set the parameter properly in the nand_base.c callers, and follow-up patches will make use of 'oob_required' in some of the callee functions. Note that currently, there is no harm in ignoring the 'oob_required' parameter and *always* utilizing nand_chip.oob_poi, but there can be performance/complexity/design benefits from avoiding filling oob_poi in the common case. I will try to implement this for some drivers which can be ported easily. Note: I couldn't compile-test all of these easily, as some had ARCH dependencies. [dwmw2: Merge later 1/0 vs. true/false cleanup] Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NShmulik Ladkani <shmulik.ladkani@gmail.com> Acked-by: NJiandong Zheng <jdzheng@broadcom.com> Acked-by: NMike Dunn <mikedunn@newsguy.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-