aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/files/drivers/mtd/nand
Commit message (Collapse)AuthorAgeFilesLines
* kernel: Update kernel 4.19 to version 4.19.131Hauke Mehrtens2020-07-042-14/+8
| | | | | | | | | | | | | Fixes: - CVE-2020-10757 The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was backported which needed some adaptations to other code. Run tested: ath79 Build tested: ath79 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: add Mikrotik rb4xx series driversChristopher Hill2020-06-151-0/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds 3 Mikrotik rb4xx series drivers as follows: rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device that interfaces between the SoC SPI bus and its two children below. rb4xx-gpio: This is the GPIO expander. rb4xx-nand: This is the NAND driver. The history of this code comes in three phases. 1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx drivers upstream. See https://lore.kernel.org/patchwork/patch/940880/. Module-author: Gabor Juhos <juhosg@openwrt.org> Module-author: Imre Kaloz <kaloz@openwrt.org> Module-author: Bert Vermeulen <bert@biot.com> 2. Next several ar71xx patches were applied bringing the code current. commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> commit af79fdbe4af32a287798b579141204bda056b8aa commit 889272d92db689fd9c910243635e44c9d8323095 commit e21cb649a235180563363b8af5ba8296b9ac0baa commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f Signed-off-by: Felix Fietkau <nbd@nbd.name> 3. Finally a heavy refactor to split the driver into the three new subsystems, and updated to work with the device tree configuration, plus updates and review feedback incorporated Reviewed-by: Thibaut VARĂˆNE <hacks@slashdirt.org> Signed-off-by: Christopher Hill <ch6574@gmail.com>
* ath79: fix missing return statement in ar934x_nandDavid Bauer2020-03-221-4/+12
| | | | | | | | | | | The reset assert and deassert methods currently miss a return value, leading to a compilation warning. Return the return-value of reset_control_assert and reset_control_deassert to fix these warnings. Suggested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix NAND driver compilation for kernel 5.4David Bauer2020-03-221-5/+122
| | | | | | | | | | | | | | | This fixes the compilation of the AR934x NAND controller driver for kernel 5.4 while leaving it untouched for kernel 4.19. This change is currently not run-tested, as i do not have such a device at hand. CC: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> CC: André Valentin <avalentin@marcant.net> CC: WeiDong Jia <jwdsccd@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net> Tested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
* ath79: add AR934x NAND Flash Controller driverMichal Cieslakiewicz2019-10-201-0/+1481
This patch contains updated driver for Atheros NAND Flash Controller written originally by Gabor Juhos for ar71xx (aka 'ar934x-nfc'). ath79 version has adapted to work with kernel 4.19 and Device Tree. It has also been renamed to 'ar934x-nand' to avoid confusion with Near-Field Communication technology. Controller is present on Atheros AR934x SoCs and required for accessing internal flash storage on routers like Netgear WNDR4300. This port preserves all NAND programming code while moving platform configuration to Device Tree and replacing some kernel functions marked for retirement by 4.19. Suitable definition is included in 'ar934x.dtsi' ('nand@1b000200' section). Most important changes to ar71xx version are: * old kernel sections of code removed * 'bool swap_dma' provided by platform data is now set by boolean DT property 'qca,nand-swap-dma' * board-supplied (mach-*.c code) platform data removed - its elements become either unused, redundant or replaced by DT methods (like reset) * IRQ is reserved by devm_request_irq() so free_irq() is not needed anymore * calls to deprecated nand_scan_ident() + nand_scan_tail() function pair replaced by using recommended nand_scan() with attach_chip() callback * ECC is set to hardware by default, can be overriden by standard DT 'nand-ecc-*' properties (software Hamming or BCH are other options) This driver has been successfully tested on Netgear WNDR4300 running experimental ath79 OpenWrt master branch. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> [add reset control] Signed-off-by: David Bauer <mail@david-bauer.net>