- 18 7月, 2018 23 次提交
-
-
由 Masahiro Yamada 提交于
Commit 30f9f2fb ("mtd: denali: add a DT driver") supported the clock enablement, but did not document it in the DT binding. In addition to the existing clock, this commit adds more clocks based on the IP specification. According to the Denali User's Guide, this IP needs three clocks: - clk: controller core clock - clk_x: bus interface clock - ecc_clk: clock at which ECC circuitry is run The driver should accept the current single clock for the backward compatibility, but the DT binding should represent the real hardware, and future platforms must follow this. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Masahiro Yamada 提交于
The probe function references &pdev->dev many times, and I will add more soon. Add 'dev' as a shorthand. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NRichard Weinberger <richard@nod.at> Tested-by: NRichard Weinberger <richard@nod.at> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Martin Kaiser 提交于
Using the sysfs unbind, bind nodes, mxcnd_probe and mxcnd_probe_dt can potentially be called at any time. After the __init functions are cleaned, mxcnd_probe_dt is no longer available. Calling it anyway causes a crash. mxcnd_probe used to be marked as __init, this was removed years ago. Remove the __init qualifier from from mxcnd_probe_dt as well. Fixes: 06f25510 ("mtd: remove use of __devinit") Signed-off-by: NMartin Kaiser <martin@kaiser.cx> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Miquel Raynal 提交于
MX35LF2GE4AB is almost identical to MX35LF1GE4AB except it has 2 times more eraseblocks per LUN and exposes 2 planes instead of 1. Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
-
由 Boris Brezillon 提交于
Add minimal support for the MX35LF1GE4AB SPI NAND chip. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Frieder Schrempf 提交于
Add support for the W25M02GV chip. Signed-off-by: NFrieder Schrempf <frieder.schrempf@exceet.de> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Peter Pan 提交于
Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more devices afterwards. Signed-off-by: NPeter Pan <peterpandong@micron.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Boris Brezillon 提交于
Add bindings for SPI NAND chips. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Peter Pan 提交于
Add a SPI NAND framework based on the generic NAND framework and the spi-mem infrastructure. In its current state, this framework supports the following features: - single/dual/quad IO modes - on-die ECC Signed-off-by: NPeter Pan <peterpandong@micron.com> Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Function nand_ecc_choose_conf() will be help for all the cases, so other helper functions can be made static. nand_check_ecc_caps(): Invoke nand_ecc_choose_conf() with both chip->ecc.size and chip->ecc.strength value set. nand_maximize_ecc(): Invoke nand_ecc_choose_conf() with NAND_ECC_MAXIMIZE flag. nand_match_ecc_req(): Invoke nand_ecc_choose_conf() with either chip->ecc.size or chip->ecc.strength value set and without NAND_ECC_MAXIMIZE flag. CC: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Make separate function to perform raw read for one codeword and call this function multiple times for each codeword in case of raw page read. This separate function will help in subsequent patches related with erased codeword bitflip detection. It will decrease throughput for raw page read. Raw page read is used for debug purpose so it won't affect normal flash operations. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Currently there is no error checking for raw read. For raw reads, there won’t be any ECC failure but the operational failures are possible, so schedule the NAND_FLASH_STATUS read after each codeword. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Fix value returned by ->read_page_raw() to be the actual operation status, instead of always 0. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
QCOM NAND controller layout protects available OOB data bytes with ECC also so when ecc->write_oob() is being called then it can't update just OOB bytes. Currently, it first reads the last codeword which includes old OOB bytes. Then it updates the old OOB bytes with new ones and then again writes the codeword back. The reading codeword is unnecessary since user is responsible to have these bytes cleared to 0xFF. This patch removes the read part and updates the OOB bytes with data area padded with OxFF. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
read_page and read_oob both calls the read_page_ecc function. The QCOM NAND controller protect the OOB available bytes with ECC so read errors should be checked for read_oob also. This patch moves the error checking code inside read_page_ecc so caller does not have to check explicitly for read errors. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
parse_read_errors can be called with only oob_buf in which case data_buf will be NULL. If data_buf is NULL, then don’t treat this page as completely erased in case of ECC uncorrectable error for RS ECC. For BCH ECC, the controller itself tells regarding erased page in status register. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Following is the flow in the HW if controller tries to read erased page: 1. First ECC uncorrectable error will be generated from ECC engine since ECC engine first calculates the ECC with all 0xff and match the calculated ECC with ECC code in OOB (which is again all 0xff). 2. After getting ECC error, erased CW detection logic will be applied which is different for BCH and RS ECC a. For BCH, HW checks if all the bytes in page are 0xff and then it updates the status in separate register NAND_ERASED_CW_DETECT_STATUS. b. For RS ECC, the HW reports the same error when reading an erased CW, but it notifies that it is an erased CW by placing special characters at certain offsets in the buffer. So the erased CW detect status should be checked only if ECC engine generated the uncorrectable error. Currently for all other operational errors also (like TIMEOUT, MPU errors, etc.), the erased CW detect logic is being applied so fix this and return EIO for other operational errors. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
The BAM has 3 channels - tx, rx and command. command channel is used for register read/writes, tx channel for data writes and rx channel for data reads. Currently, the driver assumes the transfer completion once it gets all the command descriptors completed. Sometimes, there is race condition between data channel (tx/rx) and command channel completion. In these cases, the data present in buffer is not valid during small window between command descriptor completion and data descriptor completion. This patch generates NAND transfer completion when both (Data and Command) DMA channels have completed all its DMA descriptors. It assigns completion callback in last DMA descriptors of that channel and wait for completion. Fixes: 8d6b6d7e ("mtd: nand: qcom: support for command descriptor formation") Cc: stable@vger.kernel.org Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Currently the driver uses the ECC strength specified in DT. The QPIC/EBI2 NAND supports 4 or 8-bit ECC correction. The same kind of board can have different NAND parts so use the ECC strength from device parameters if it is not specified in DT. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
QCOM NAND controller supports only one step size (512) so nand-ecc-step-size DT property is redundant. This property can be removed and ecc step size can be assigned with 512 value. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
1. If nand-ecc-strength specified in DT, then controller will use this ECC strength otherwise ECC strength will be calculated according to chip requirement and available OOB size. 2. QCOM NAND controller supports only one step size (512 bytes) but nand-ecc-step-size is required property in DT. This DT property can be removed and ecc step size can be assigned in driver with 512 bytes value. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
Use the NAND core helper function nand_ecc_choose_conf to tune the ECC parameters instead of the function locally defined. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Abhishek Sahu 提交于
commit 2c8f8afa ("mtd: nand: add generic helpers to check, match, maximize ECC settings") provides generic helpers which drivers can use for setting up ECC parameters. Since same board can have different ECC strength nand chips so following is the logic for setting up ECC strength and ECC step size, which can be used by most of the drivers. 1. If both ECC step size and ECC strength are already set (usually by DT) then just check whether this setting is supported by NAND controller. 2. If NAND_ECC_MAXIMIZE is set, then select maximum ECC strength supported by NAND controller. 3. Otherwise, try to match the ECC step size and ECC strength closest to the chip's requirement. If available OOB size can't fit the chip requirement then select maximum ECC strength which can be fit with available OOB size. This patch introduces nand_ecc_choose_conf function which calls the required helper functions for the above logic. The drivers can use this single function instead of calling the 3 helper functions individually. Signed-off-by: NAbhishek Sahu <absahu@codeaurora.org> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
- 02 7月, 2018 17 次提交
-
-
由 Chris Packham 提交于
Some Micron NAND chips (MT29F1G08ABAFAWP-ITE:F) report 00 00 for the revision number field of the ONFI parameter page. Rather than rejecting these outright assume ONFI version 1.0 if the revision number is 00 00. Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Chris Packham 提交于
Add defines for the ONFI version bits and use them in nand_flash_detect_onfi(). Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Chris Packham 提交于
This is called after the ONFI parameter page checksum is verified and allows us to override the contents of the parameter page. Suggested-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Chris Packham 提交于
>From the controllers point of view this is the same as no or software only ECC. Signed-off-by: NChris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Stefan Agner 提交于
Add support for the NAND flash controller found on NVIDIA Tegra 2 SoCs. This implementation does not make use of the command queue feature. Regular operations using ->exec_op() use PIO mode for data transfers. Raw, ECC and OOB read/writes make use of the DMA mode for data transfer. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NDmitry Osipenko <digetx@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Stefan Agner 提交于
This adds the devicetree binding for the Tegra 2 NAND flash controller. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Stefan Agner 提交于
Allow to define a NAND chip as a boot device. This can be helpful for the selection of the ECC algorithm and strength in case the boot ROM supports only a subset of controller provided options. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Stefan Agner 提交于
Add Reed-Solomon (RS) to the enumeration of ECC algorithms. Signed-off-by: NStefan Agner <stefan@agner.ch> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Martin Blumenstingl 提交于
The datasheet of the H27UCG8T2BTR states that this chip has a page size of "16,384 + 1,280(Spare) bytes". The description of the "4th Byte of Device Identifier Description" indicates that bits 6, 3 and 2 are encoding the "Redundant Area Size / 8KB", where 640 bytes is a value of 0x6 (110 in binary notation). hynix_nand_extract_oobsize decodes an OOB size of 640 bytes for this chip. Kernel boot log extract before this patch: nand: Could not find valid ONFI parameter page; aborting nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde nand: Hynix NAND 8GiB 3,3V 8-bit nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 640 However, based on the description in the datasheet we need to multiply the OOB size with 2, because it's "640 spare bytes per 8192 bytes page size" and this NAND chip has a page size of 16384 (= 2 * 8192). After this patch the kernel boot log reports: nand: Could not find valid ONFI parameter page; aborting nand: device found, Manufacturer ID: 0xad, Chip ID: 0xde nand: Hynix NAND 8GiB 3,3V 8-bit nand: 8192 MiB, MLC, erase size: 4096 KiB, page size: 16384, OOB size: 1280 Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Boris Brezillon 提交于
Even if we can't update ecc_stats.corrected with an accurate value we should at least increase the number of bitflips so that MTD users can know that there was some bitflips. Just add chip->ecc.strength to mtd->ecc_stats.corrected which should account for the worst case situation. Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Peter Rosin 提交于
On a sama5d31 with a Full-HD dual LVDS panel (132MHz pixel clock) NAND flash accesses have a tendency to cause display disturbances. Add a module param to disable DMA from the NAND controller, since that fixes the display problem for me. Signed-off-by: NPeter Rosin <peda@axentia.se> Reviewed-by: NBoris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
-
由 Linus Torvalds 提交于
-
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux由 Linus Torvalds 提交于
Pull btrfs fixes from David Sterba: "We have a few regression fixes for qgroup rescan status tracking and the vm_fault_t conversion that mixed up the error values" * tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix mount failure when qgroup rescan is in progress Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
-
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs由 Linus Torvalds 提交于
Pull vfs fix from Al Viro: "Followup to procfs-seq_file series this window" This fixes a memory leak by making sure that proc seq files release any private data on close. The 'proc_seq_open' has to be properly paired with 'proc_seq_release' that releases the extra private data. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: proc: add proc_seq_release
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging由 Linus Torvalds 提交于
Pull staging/IIO fixes from Greg KH: "Here are a few small staging and IIO driver fixes for 4.18-rc3. Nothing major or big, all just fixes for reported problems since 4.18-rc1. All of these have been in linux-next this week with no reported problems" * tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ion: Return an ERR_PTR in ion_map_kernel staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write() iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines iio: buffer: fix the function signature to match implementation iio: mma8452: Fix ignoring MMA8452_INT_DRDY iio: tsl2x7x/tsl2772: avoid potential division by zero iio: pressure: bmp280: fix relative humidity unit
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty由 Linus Torvalds 提交于
Pull tty/serial fixes from Greg KH: "Here are five fixes for the tty core and some serial drivers. The tty core ones fix some security and other issues reported by the syzbot that I have taken too long in responding to (sorry Tetsuo!). The 8350 serial driver fix resolves an issue of devices that used to work properly stopping working as they shouldn't have been added to a blacklist. All of these have been in linux-next for a few days with no reported issues" * tag 'tty-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: prevent leaking uninitialized data to userspace via /dev/vcs* serdev: fix memleak on module unload serial: 8250_pci: Remove stalled entries in blacklist n_tty: Access echo_* variables carefully. n_tty: Fix stall at n_tty_receive_char_special().
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb由 Linus Torvalds 提交于
Pull USB fixes from Greg KH: "Here is a number of USB gadget and other driver fixes for 4.18-rc3. There's a bunch of them here, most of them being gadget driver and xhci host controller fixes for reported issues (as normal), but there are also some new device ids, and some fixes for the typec code. There is an acpi core patch in here that was acked by the acpi maintainer as it is needed for the typec fixes in order to properly solve a problem in that driver. All of these have been in linux-next this week with no reported issues" * tag 'usb-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits) usb: chipidea: host: fix disconnection detect issue usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered typec: tcpm: Fix a msecs vs jiffies bug NFC: pn533: Fix wrong GFP flag usage usb: cdc_acm: Add quirk for Uniden UBC125 scanner staging/typec: fix tcpci_rt1711h build errors usb: typec: ucsi: Fix for incorrect status data issue usb: typec: ucsi: acpi: Workaround for cache mode issue acpi: Add helper for deactivating memory region usb: xhci: increase CRS timeout value usb: xhci: tegra: fix runtime PM error handling usb: xhci: remove the code build warning xhci: Fix kernel oops in trace_xhci_free_virt_device xhci: Fix perceived dead host due to runtime suspend race with event handler dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation usb: gadget: dwc2: fix memory leak in gadget_init() usb: gadget: composite: fix delayed_status race condition when set_interface usb: dwc2: fix isoc split in transfer with no data usb: dwc2: alloc dma aligned buffer for isoc split in usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub ...
-