summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/xway_nand.c
Commit message (Collapse)AuthorAgeFilesLines
* mtd: update my email addressJohn Crispin2017-02-081-1/+1
| | | | | | | | | This patch updates my email address as I no longer have access to the old one. Signed-off-by: John Crispin <john@phrozen.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: xway: fix build because of module functionsHauke Mehrtens2017-01-021-4/+1
| | | | | | | | | | Remove the usage of modules functions to make this driver compile again. Otherwise an include of linux/modules.h would be needed. Fixes: 024366750c2e ("mtd: nand: xway: convert to normal platform driver") Cc: <stable@vger.kernel.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: add nandaddr to own structHauke Mehrtens2016-07-111-16/+14
| | | | | | | | Instead of using IO_ADDR_W and IO_ADDR_R use an own pointer to the NAND controller memory area. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: add missing write_buf and read_buf to nand driverHauke Mehrtens2016-07-111-0/+18
| | | | | | | | | This driver needs a special write_buf and read_buf function, because we have to read from a specific address to tell the controller this is a read from the nand controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: extract read and write functionHauke Mehrtens2016-07-111-9/+19
| | | | | | | | Extract the functions to read and write to the register of the NAND flash controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: fix nand lockingJohn Crispin2016-07-111-12/+8
| | | | | | | | | | | The external Bus Unit (EBU) can control different flash devices, but these NAND flash commands have to be atomic and should not be interrupted in between. Lock the EBU from the beginning of the command till the end by moving the lock to the chip select. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: remove manual resetHauke Mehrtens2016-07-111-20/+0
| | | | | | | | | | nand_scan() already resets the NAND flash chip, this driver does not have to call it manually. The xway_reset_chip() functions does the same as the normal NAND reset function. The waiting for the NAND_WAIT_WR_C is done in xway_cmd_ctrl(). Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: Avoid messing up with IO_ADDR_W in ->cmd_ctrl()John Crispin2016-07-111-15/+11
| | | | | | | | | | | | | The ->cmd_ctrl() function is adjusting the ->IO_ADDR_W value depending on the command type each time NAND_CTRL_CHANGE is passed. This is not only useless but can lead to an ->IO_ADDR_W corruption. Get rid of this logic and rely on the NAND_CLE and NAND_ALE flags to deduce the iomem address to write the cmd argument to. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: convert to normal platform driverHauke Mehrtens2016-07-111-36/+80
| | | | | | | | Instead of hacking this into the plat_nand driver just make this a normal nand driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: xway: add some more documentationHauke Mehrtens2016-07-111-6/+15
| | | | | | | | | This adds some register documentation which should make it easier to understand how this controller works. In addition it makes now use of BIT() macro and adds some more defines. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: make use of mtd_to_nand() in NAND driversBoris BREZILLON2015-12-081-2/+2
| | | | | | | | mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all NAND drivers to use it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: plat_nand: use default partition probeBrian Norris2015-05-271-4/+0
| | | | | | | | It's harmless to add 'ofpart' (the only different parser supported in default mtdpart.c) to plat_nand. That let's us kill off one more custom partition prober listing. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: lantiq: Add NAND support on Lantiq XWAY SoC.John Crispin2012-09-291-0/+201
The driver uses plat_nand. As the platform_device is loaded from DT, we need to lookup the node and attach our xway specific "struct platform_nand_data" to it. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
OpenPOWER on IntegriCloud