9
0
Fork 0
Commit Graph

20 Commits

Author SHA1 Message Date
Sascha Hauer 0f15dee78f mtd: nand: mxs-nand: Add i.MX6 support
The i.MX6 uses the same GPMI NAND controller as i.MX23/28 do. This adds
i.MX6 support to the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer a4f58f5665 mtd: nand: gpmi: cleanup includes
remove unused includes and use <io.h> instead of <asm/io.h>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer 12d2062d5c mtd: nand: gpmi: replace MXS_BCH_BASE with driver resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer 13968e43b7 mtd: nand: gpmi: use io_base instead of MXS_GPMI_BASE
we have io_base, so use it instead of hardcoded base
address.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer 5cd4fd8fba dma: apbh: Turn into a driver
This converts the apbh driver into a real driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer 3d75e777af dma: apbh-dma: move header file to common location
As the apbh dma engine is also found on i.MX6 move the header file
out of MXS specific directories.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer ca13a84ac2 ARM: MXS: introduce stmp device support
MXS specific devices have some common infrastructure in the kernel
known as STMP devices. We have the same in barebox, but with a
mxs_ prefix instead of a stmp_ prefix. As some STMP devices are
also found on i.MX6 move the common infrastructure out of MXS
specific files and use the stmp_ prefix.

This is done in preparation for i.MX6 NAND support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer 66891566cc mtd: nand: update to v3.11-rc1
This updates the NAND stuff to Linux-3.11-rc1. It is synchronized
as best as we can get:

- locks removed
- The splitting in different files we had to better support different
  features has been dropped. Instead this is now done mostly with the
  use of __maybe_unused

Some barebox adjustments are forward ported, like:

- Allow partial page writes
- Optionally allow to erase bad blocks
- check for all_ff before writing a page

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer d155610821 mtd: introduce ecc strength
This introduces the ecc stength fields in the structures and fills
them in, but leaves them unused right now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:14:08 +02:00
Sascha Hauer 8dbf2821e9 mtd: rename MTD_OOB_* to MTD_OPS_*
To sync with the Linux kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:13:49 +02:00
Sascha Hauer 779caca4e6 mtd: gpmi-nand: switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:56 +02:00
Sascha Hauer 5b85daacc6 mtd: nand: register nand flashes with nand specific function
This allows us to have some NAND specific stuff during registration,
like for example adding NAND specific device parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:00 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Wolfram Sang d723373013 nand: mxs: NO_SUBPAGE_WRITE flag was overwritten
It is not the chip, but this controller which cannot do subpage writes.
So, make sure we add the flag at the proper place, so it doesn't get
overwritten by flash detection anymore.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:27:22 +01:00
Wolfram Sang 97110094e3 mtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problems
It could happen (1 out of 100 times) that NAND did not start up
correctly after warm rebooting, so barebox could not find its
environment or DMA timed out due to a stalled BCH. When resetting BCH
together with GPMI, the issue could not be observed anymore. We probably
need the consistent state already before sending commands to NAND.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 08:43:01 +01:00
Sascha Hauer 3ff1015d24 Merge branch 'for-next/mxs' 2012-11-16 14:02:36 +01:00
Wolfram Sang 300c2d3fb3 mtd: nand: mxs: check for errors when resetting ip core
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-31 08:36:51 +01:00
Jean-Christophe PLAGNIOL-VILLARD 006538e7c2 mtd: add parent support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:16:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Wolfram Sang eb76c8e827 mtd nand: add mxs-nand driver
Based on the U-Boot version. Changed to kernel style register layout, added
MX23 support (WIP!), made MMU aware and adapted to barebox.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-06-30 12:53:36 +02:00