- Move oob layout to driver
- make hwecc support nonoptional but selectable by the board.
- let the boards decide which buswidth / ecc type to use. They know
better than the user which gets confused by too many kconfig options.
- Let the boards explicitly register the nand device.
I tried to seperate this further, but failed because of too many dependencies
in the code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The board code or startup script should enable it when
it actually wants to.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Similar to ac2d4d71ba, copy the behaviour
from Linux which does:
cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL);
Notice the third parameter which is simply chip->start. Needed for some
SST-flashes.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Change device parameters so that the memory management is in generic
code. This also removes the need of storing statically initialized
parameters as they are stored in a struct list_head for each device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
While at it remove some unused code and an unbalanced
enable_interrupts().
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Copy the behaviour from Linux which does:
cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL);
...
(Notice the third parameter which is simply chip->start).
Solves erase problems with SST flashes.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
if fec was allocated using malloc. if fec->miiphy->dev->driver != 0
miiphy_probe is not called
Signed-off-by: Jan Weitzel <J.Weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch allows using the i.MX (LCDC) framebuffer driver on boards
using an i.MX21 SoC.
Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For some weird reason this fixes nand boot on i.MX21. Since
interrupts are globally disabled it doesn't hurt on other
SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We do not need to use memcpy32 in read_buf/write_buf because
in these functions we only access SDRAM and not the internal SRAM
buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When reading a page from nand prefetch the next page afterwards to
keep the controller busy. This way we can improve sequential reading
from NAND which is the common case for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The internal SRAM buffer of the i.MX NAND controller does not
allow byte accesses. We use the memcpy32 function to handle this.
If we have assembler optimized string functions we can do better
because they won't do byte accesses when source and target are word
aligned.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>