9
0
Fork 0
Commit Graph

32 Commits

Author SHA1 Message Date
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
Sascha Hauer 9749c2f16f Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/at91sam9x5ek_defconfig
2012-11-16 14:02:32 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Sascha Hauer 0b15ebf165 mtd nand i.MX: fix compilation for unsupported SoC
Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:56 +02:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02: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
Sascha Hauer a4c8692240 ARM i.MX: Enable clocks in common place
On i.MX we enable all necessary clocks during startup of the clock
controller driver, so we do not need the register hacking in the drivers
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +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
Eric Bénard 632c457950 nand_imx: update to support onfi & 4k flashs
- add CMD_PARAM and read_param to get the ONFI structure
- fix OOB size for flash with 224 OOB on i.MX51/3
- add the same ecc layout as the one in the kernel for
  4k page flashs

Tested on an i.MX53.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:58:54 +02:00
Antony Pavlov f9b932fed9 fix typo funtion -> function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 22:00:54 +02:00
Robert Jarzmik 88ce7ef769 drivers/mtd: transfer NAND notions to MTD core
Change NAND_WRITE into MTD_WRITE.
Change "page_shift" references in the core, which are purely
NAND, into mtd->writesize which is MTD generic.
Rename all "info" (struct mtd_info) into "mtd".

Also provide a parameter to add_mtd_device() so that legacy
nand devices still appear as nand<N>.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Sascha Hauer 64c1007a69 mtd nand i.MX: Add i.MX53 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-13 17:27:19 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer 0972e837c3 i.MX NAND: pass second base address as resource
The nand controller on i.MX51/53 uses two base addresses. Instead
of hardcode the second address use the new shiny resources two specify
it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-21 09:59:36 +02:00
Sascha Hauer 8c53235dd0 nand i.MX: convert to struct resource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-19 00:12:49 +08:00
Sascha Hauer 691dd27f7a Merge branch 'next' 2011-04-04 14:53:08 +02:00
Baruch Siach 79c78016c1 mtd/nand_imx: fix read past buffer end
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-18 08:30:05 +01:00
Baruch Siach 4b4958dbb7 mtd/nand_imx: add support for page size of 4k
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-18 08:29:31 +01:00
Sascha Hauer 5fb8333d34 ARM i.MX: cleanup boot modes
The i.MX Processors support two different boot modes, the internal
boot mode and the external boot mode. Traditionally the external
NAND boot mode is handled in drivers/mtd/nand and the internal
boot mode is handled in arch/arm/mach-imx. This patch consolidates
the handling of both boot modes in arch/arm/mach-imx so that
the user does not have to look in the mtd kconfig section for
booting from NAND. Also, selecting between internal and external
boot mode now is a clear choice.
The external NAND boot mode has been independent of the mtd nand
driver, but as the code was contained in the NAND driver it was
not possible to support booting from NAND without a mtd nand driver.
This is changed with this patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-03 16:15:57 +01:00
Sascha Hauer ce15c024c1 imx nand: Add v3 (i.MX51) support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:02 +01:00
Sascha Hauer 691bff0062 imx nand: introduce overwritable check_int function
needed for v3 support later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:02 +01:00
Sascha Hauer 5fcca46544 imx nand: move initialization to preset function
This has two purposes. First we need to factor out initialization
to be able to do something different on v3 type controllers,
second with this patch we are independent of preinitialized register
values.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:02 +01:00
Sascha Hauer da1ad19c4c mxc_nand: fix correct_data function
The v2 controller has a totally different mechanism to check
whether the data we read had ecc errors or not. Implement this.
The mechanism in the v2 controller happens to be identical to
the v3 controller.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:02 +01:00
Sascha Hauer 87ccd2d109 imx nand: add V1_V2 namespace to registers
This prepares the driver for v3 support. The v3 controller
has a completely different register layout, so add a V1_V2_
namespace to the register defines to avoid confusion with
the v3 regs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:02 +01:00
Sascha Hauer 22180f96b1 imx nand: do not read-modify-write SPAS register
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:01 +01:00
Sascha Hauer a0fc5252a7 imx_nand: make some internally used functions overwriteable
This patch prepares the driver to add v3 controller support
later. The v3 controller is basically the same controller as v1
and v2, but with a completely different register layout.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:01 +01:00
Sascha Hauer 2cb2a68b92 imx nand: remove unnecessary register write
NFC_SP_EN is cleared in probe and never set again, so we do not
need to clear it in other functions again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:01 +01:00
Sascha Hauer bb81ff75d4 imx_nand: rework get_dev_status
We save/restore the value in the buffer anyway, so it makes
no difference whether we use main_area0 or main_area1. So,
we can use main_area0 and remove main_area1 from the driver
which is otherwise unused. Also, clean up the comments in
get_dev_status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:01 +01:00
Sascha Hauer dd62a0c2d1 imx_nand: remove 0xe00 offset from registers
Add the offset to the register base instead. This is done
in preparation for v3 controller support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-12 08:08:01 +01:00
Sascha Hauer fe02628658 i.MX nand: optimize nand boot code for size
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-22 19:30:25 +02:00
Sascha Hauer 139ec08127 Merge branch 'next' 2010-08-03 09:31:38 +02:00
Sascha Hauer b332d8565d move drivers/nand to drivers/mtd/nand
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:01 +02:00