dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

3668 Commits

Author SHA1 Message Date
Fabio Estevam 27c84fa584 mtd: nand: Include IMX6 in the list of supported SoCs
Include IMX6 in the list of supported SoCs.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:55:56 +01:00
Alexander Shiyan ce55754c4f mtd: autcpu12-nvram: Convert driver to platform_device
Because we can have a single kernel to support multiple machines, we
need to make loading specific drivers for the target platform only.
For this, driver is converted to the platform driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:55:19 +01:00
Alexander Shiyan d1f55c680e mtd: autcpu12-nvram: Fix compile breakage
Update driver autcpu12-nvram.c so it compiles; map_read32/map_write32
no longer exist in the kernel so the driver is totally broken.
Additionally, map_info name passed to simple_map_init is incorrect.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:54:55 +01:00
Peter Meerwald 4cacbe226f mtd: omap2: fix some typos in comments
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:54:20 +01:00
Brian Norris bf7a01bf79 mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver
The NAND_CHIPOPTIONS_MSK has limited utility and is causing real bugs. It
silently masks off at least one flag that might be set by the driver
(NAND_NO_SUBPAGE_WRITE). This breaks the GPMI NAND driver and possibly
others.

Really, as long as driver writers exercise a small amount of care with
NAND_* options, this mask is not necessary at all; it was only here to
prevent certain options from accidentally being set by the driver. But the
original thought turns out to be a bad idea occasionally. Thus, kill it.

Note, this patch fixes some major gpmi-nand breakage.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Huang Shijie <shijie8@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:54:09 +01:00
Jean-Christophe PLAGNIOL-VILLARD 28446acb1f mtd: atmel nand: fix gpio missing request
without this the gpio will not be muxed as a gpio by the current custom pinmux
or later by the pinctrl

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:53:58 +01:00
Mike Dunn aa6d01fa43 mtd: docg4: fix oob reads
This patch does two closely related things:

(1) Currently the ecc.read_page() method does not fill the nand->oob_poi buffer
with the oob data, but instead reads oob into a local buffer.  Fix this by
filling the oob_poi buffer instead of a local buffer.  The 'oob_required'
argument is quietly ignored; the device must always read oob after the page
data, and it is presumed that there's no harm in filling oob_poi, even when not
explicitly requested.

(2) Always read oob from the device in ecc.read_oob(), instead of copying it
from a local buffer under some circumstances.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:53:46 +01:00
Artem Bityutskiy 036a1ac1f4 mtd: spear_smi: fix compilation warning
drivers/mtd/devices/spear_smi.c: In function 'spear_smi_probe':
drivers/mtd/devices/spear_smi.c:984:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:53:30 +01:00
Julia Lawall b5170978b4 mtd: spear_smi: failure test for null rather than negative integer
dev_get_platdata returns a pointer, so the failure value would be NULL
rather than a negative integer.

The semantic match that finds this problem is: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,e;
statement S1,S2;
@@

*x = dev_get_platdata(...)
... when != x = e
*if (x < 0) S1 else S2
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:53:21 +01:00
Roland Stigge 9c6f62a7ef mtd: lpc32xx_mlc: Make driver independent of AMBA DMA engine driver
This patch makes the MLC NAND driver independent of the single AMBA DMA engine
driver by using the platform data provided dma_filter callback.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:53:08 +01:00
Roland Stigge de20c22d2b mtd: lpc32xx_slc: Make driver independent of AMBA DMA engine driver
This patch makes the SLC NAND driver independent of the single AMBA DMA engine
driver by using the platform data provided dma_filter callback.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:52:45 +01:00
Brian Norris af69dcd386 mtd: nand: rename '_raw' BBT scan functions
None of these scanning functions use MTD_OPS_RAW mode any more, so there's
really nothing 'raw' about them. Rename them to (hopefully) make the code
a little clearer.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:52:04 +01:00
Brian Norris a7e68834fc mtd: nand: use ECC, if present, when scanning OOB
scan_read_raw_oob() is used in only in places where the MTD_OPS_PLACE_OOB mode
is preferable to MTD_OPS_RAW mode, so use MTD_OPS_PLACE_OOB instead.
MTD_OPS_PLACE_OOB provides the same functionality with the potential[1] added
bonus of error correction.

This brings scan_block_full() in line with scan_block_fast() so that they
both read bad block markers with MTD_OPS_PLACE_OOB. This can help in
preventing 0xff markers (in good blocks) from being interpreted as bad
block indicators in the presence of a single bitflip.

Note that ECC error codes (EUCLEAN or EBADMSG) are already silently
ignored in all users of scan_read_raw_oob().

[1] Few  drivers perform proper error correction on OOB data. In those
    cases, the use of MTD_OPS_RAW vs. MTD_OPS_PLACE_OOB is not
    significant.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:51:55 +01:00
Brian Norris 491ed06f33 mtd: nand_bbt: use string library
Some nand_bbt code can be shortened by using memcmp() and memchr_inv().
As an added bonus, there is a possible performance benefit.

Borrowed some code from Akinobu Mita.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:51:13 +01:00
Brian Norris 7b5a2d4097 mtd: nand: remove unused 'int' return codes
The return codes for read_abs_bbts() and search_read_bbts() are always
non-zero, and so don't have much meaning. Just remove them.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:51:00 +01:00
Brian Norris e47f68587b mtd: check for max_bitflips in mtd_read_oob()
mtd_read_oob() has some unexpected similarities to mtd_read(). For
instance, when ops->datbuf != NULL, nand_base.c might return max_bitflips;
however, when ops->datbuf == NULL, nand_base's code potentially could
return -EUCLEAN (no in-tree drivers do this yet). In any case where the
driver might return max_bitflips, we should translate this into an
appropriate return code using the bitflip_threshold.

Essentially, mtd_read_oob() duplicates the logic from mtd_read().

This prevents users of mtd_read_oob() from receiving a positive return
value (i.e., from max_bitflips) and interpreting it as an unknown error.

Artem: amend comments.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:50:50 +01:00
Marek Vasut 8bb8b85f67 mtd: m25p80: Fix the Spansion chip detection
Due to the implementation of the following loop at the end
of jedec_probe():

776         for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
777                 info = (void *)m25p_ids[tmp].driver_data;
778                 if (info->jedec_id == jedec) {
779                         if (info->ext_id != 0 && info->ext_id != ext_jedec)
780                                 continue;
781                         return &m25p_ids[tmp];
782                 }
783         }

In particular line 779 in the above numbering, the chips with ext_id != 0 must
be ordered first in the list of chips (m25p_ids[]).

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:50:22 +01:00
Marek Vasut f728598f8d mtd: m25p80: add support for Spansion s25sl064p chip
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:50:09 +01:00
Huang Shijie ff506172a3 mtd: gpmi: change the code for clocks
The gpmi nand driver may needs several clocks(MX6Q needs five clocks).

In the old clock framework, all these clocks are chained together,
all you need is to manipulate the first clock.

But the kernel uses the common clk framework now, which forces us to
get the clocks one by one. When we use them, we have to enable them
one by one too.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:50:02 +01:00
Bastian Hecht 894824f973 mtd: sh_flctl: Only copy OOB data if it is required
Check the new oob_required flag and only copy the OOB data to the internal
buffer if needed.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:49:38 +01:00
Bastian Hecht d76236f30f mtd: sh_flctl: Use memcpy() instead of using a loop
Elements have been copied "manually" in a loop. Better use memcpy().

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-09-29 14:48:58 +01:00
Linus Torvalds 9c603e53d3 mtdchar: fix offset overflow detection
Sasha Levin has been running trinity in a KVM tools guest, and was able
to trigger the BUG_ON() at arch/x86/mm/pat.c:279 (verifying the range of
the memory type).  The call trace showed that it was mtdchar_mmap() that
created an invalid remap_pfn_range().

The problem is that mtdchar_mmap() does various really odd and subtle
things with the vma page offset etc, and uses the wrong types (and the
wrong overflow) detection for it.

For example, the page offset may well be 32-bit on a 32-bit
architecture, but after shifting it up by PAGE_SHIFT, we need to use a
potentially 64-bit resource_size_t to correctly hold the full value.

Also, we need to check that the vma length plus offset doesn't overflow
before we check that it is smaller than the length of the mtdmap region.

This fixes things up and tries to make the code a bit easier to read.

Reported-and-tested-by: Sasha Levin <levinsasha928@gmail.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Artem Bityutskiy <dedekind1@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-28 12:13:46 -07:00
Prabhakar Kushwaha 10bfa766ef driver/mtd:IFC NAND:Initialise internal SRAM before any write
IFC-1.1.0 uses 28nm techenology for SRAM. This tech has known limitaion for
SRAM i.e. "byte select" is not supported. Hence Read Modify Write is
implemented in IFC for any "system side write" into sram buffer. Reading an
uninitialized memory results in ECC Error from sram wrapper.

Hence we must initialize/prefill SRAM buffer by any data before writing
anything in SRAM from system side. To initialize SRAM user can use "READID"
NAND command with read bytes equal to SRAM size. It will be a one time
activity post boot.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-09-27 07:32:25 -05:00
Brian Norris 55393ba1bd UBI: fix trivial typo 'it' => 'is'
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-26 13:22:50 +03:00
Jiang Lu cf38aca520 UBI: load after mtd device drivers
Use 'late_initcall()' in UBI to make sure it initializes after MTD drivers.

Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-26 13:22:44 +03:00
Olof Johansson e3a66aa33a Merge branch 'multiplatform/platform-data' into next/multiplatform
* multiplatform/platform-data:
  ARM: spear: move platform_data definitions
  ARM: samsung: move platform_data definitions
  ARM: orion: move platform_data definitions
  ARM: nomadik: move platform_data definitions
  ARM: w90x900: move platform_data definitions
  ARM: vt8500: move platform_data definitions
  ARM: tegra: move sdhci platform_data definition
  ARM: sa1100: move platform_data definitions
  ARM: pxa: move platform_data definitions
  ARM: netx: move platform_data definitions
  ARM: msm: move platform_data definitions
  ARM: imx: move platform_data definitions
  ARM: ep93xx: move platform_data definitions
  ARM: davinci: move platform_data definitions
  ARM: at91: move platform_data definitions

Conflicts due to removed files:
	arch/arm/mach-tegra/board-harmony.c
	arch/arm/mach-tegra/board-trimslice.c

Conflicts due to code removal:
	arch/arm/mach-tegra/board-paz00.c

Context conflicts in:
	drivers/mmc/host/sdhci-tegra.c
	drivers/net/irda/pxaficp_ir.c

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-22 01:07:21 -07:00
Olof Johansson ea832c41da Merge branch 'next/dt' into next/multiplatform
* next/dt: (182 commits)
  ARM: tegra: Add Avionic Design Tamonten Evaluation Carrier support
  ARM: tegra: Add Avionic Design Medcom-Wide support
  ARM: tegra: Add Avionic Design Plutux support
  ARM: tegra: Add Avionic Design Tamonten support
  ARM: tegra: dts: Add pwm label
  ARM: dt: tegra: whistler: configure power off
  ARM: mxs: m28evk: Disable OCOTP OUI loading
  ARM: imx6q: use pll2_pfd2_396m as the enfc_sel's parent
  ARM: dts: imx6q-sabrelite: add usbotg pinctrl support
  ARM: dts: imx23-olinuxino: Add USB host support
  ARM: dts: imx6q-sabrelite: add usbmisc device
  ARM: dts: mx23: Add USB resources
  ARM: dts: mxs: Add ethernetX to macX aliases
  ARM: msm: Remove non-DT targets from 8960
  ARM: msm: Add DT support for 8960
  ARM: msm: Move io mapping prototypes to common.h
  ARM: msm: Rename board-msm8x60 to signify its DT only status
  ARM: msm: Make 8660 a DT only target
  ARM: msm: Move 8660 to DT timer
  ARM: msm: Add DT support to msm_timer
  ...
2012-09-20 21:16:43 -07:00
Tony Lindgren e27e35ec73 ARM: OMAP1: Move board-ams-delta.h from plat to mach
This is only used by omap1.

And to fix things properly, this should not be included
from the drivers at all.

Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-20 15:02:19 -07:00
Olof Johansson 2843c7d2c0 Device tree related changes for omaps.
Note that this branch is based on omap-cleanup-sparseirq-for-v3.7
 to avoid merge conflicts with the sparseirq changes for gpio-twl4030
 driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQVlRgAAoJEBvUPslcq6VzbSwP/RNdw33WTv7slY8v2x9C+jfe
 fzpJltqtWf1xLQ5ixAMwzBxc4/I+m/fz3ZhxG15amqD1sQuwDNNVwI6D5F4pIH4K
 ZfyaeA8jteH487f7PxMlurtVYgPRqLrMXBahxKgcM6WwJ0tFspGuXQeKMhjhRnYJ
 4+0GQ/R60UmexyAF4Ish4YfVfe0Iy8deVuGjOO7xIdsKrC1uymXbT7HB0o7Tz4tj
 btsEUXs4UMCh2VoYzqVxaP1uMumOnuVOFOuWjcNOni3TMdjmllPpoApsXE27rNKC
 0D/MzCyutFEO7q7/8TSUs3TOy+my18Z6Fz9hEkw7fUOOXQ3iUDqI79FbvMv9mWe+
 nW2BFZZCeuTqErGNakgluGtasLOfvqOqzSO7U68XGgHp86G42N2EDs4raTDAeKTN
 YXzLSiPYvV5QOUFbP5uagiKFcFUbcfNYZytTPwZ8hBk4hXtDmwqhSEgzxhAKGtgx
 y0ljt3iQNxk3EVhIv7oi0FxCFX2ioikYPTOlHkpvNwkXa7ruvvU1CudIGSdZ/Nn3
 SoEkRDwx6CpA37aAusfWioYKWhrctfDBl9Nt0IXwZy1b0MO1QIUaL0RY3Y5FsES+
 25MP+5Ns6nkmzzTs72Gu+W9bL6E3eHAkAoaDb9JPH2Jix8vXRMgIISyu9Fzze504
 ypeFe5TtLc/uYkviZhi6
 =fzT6
 -----END PGP SIGNATURE-----

Merge tag 'omap-devel-dt-merged-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt

Device tree related changes for omaps.

Note that this branch is based on omap-cleanup-sparseirq-for-v3.7
to avoid merge conflicts with the sparseirq changes for gpio-twl4030
driver.

* tag 'omap-devel-dt-merged-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  arm/dts: Mux uart pins for omap4-sdp
  ARM: OMAP2+: select PINCTRL in Kconfig
  arm/dts: Add pinctrl driver entries for omap2/3/4
  arm/dts: Add omap36xx.dtsi file and rename omap3-beagle to omap3-beagle-xm
  ARM: dts: omap3-overo: Add support for the blue LED
  Documentation: dt: Update the OMAP documentation with Overo/Toby
  ARM: dts: OMAP3: Add support for Gumstix Overo with Tobi expansion board
  ARM: dts: OMAP4: Add reg and interrupts for every nodes
  ARM: dts: AM33XX: Specify reg and interrupt property for all nodes
  ARM: dts: AM33XX: Convert all hex numbers to lower-case
  ARM: dts: omap3-beagle: Enable audio support
  ARM: dts: omap5: Add McPDM and DMIC section to the dtsi file
  ARM: dts: omap5: Add McBSP entries
  ARM: dts: omap4: Add reg-names for McPDM and DMIC
  ARM: dts: omap4: Add McBSP entries
  ARM: dts: omap3: Add McBSP entries
  ARM: dts: omap2420-h4: Include omap2420.dtsi file instead the common omap2
  ARM: dts: omap2: Add McBSP entries for OMAP2420 and OMAP2430 SoC
  ARM: dts: omap3-beagle: Add heartbeat and mmc LEDs support
  ARM: dts: omap3: Add gpio-twl4030 properties for BeagleBoard and omap3-EVM
  ...
2012-09-20 13:22:20 -07:00
Arnd Bergmann 436d42c61c ARM: samsung: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the samsung include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
2012-09-19 17:42:18 +02:00
Arnd Bergmann c02cecb92e ARM: orion: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the orion include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
2012-09-19 17:42:17 +02:00
Arnd Bergmann 2203747c97 ARM: omap: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the omap include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: "Benoît Cousson" <b-cousson@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Jean Pihet <j-pihet@ti.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org
2012-09-19 17:39:52 +02:00
Olof Johansson 8e51036d34 This branch contains changes needed to make omap2+
work properly with sparse IRQ. It also removes
 dependencies to mach/hardware.h. These help moving
 things towards ARM single zImage support.
 
 This branch is based on a commit in tty-next
 branch with omap-devel-gpmc-fixed-for-v3.7 and
 cleanup-omap-tags-for-v3.7 merged in to keep things
 compiling and sort out some merge conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUUgbAAoJEBvUPslcq6VzsEgQANbHSsPDajdFnaCn3goS16M3
 Nwmnvqd3Ay4VqhLpJuiF9SWzPtCno0gu/9caUKhodYDrHDVttdMKQWKLsmkSPFOD
 uHnKToA3y0J5O/KQJB+bubinZvcHNnBwCgP6YFposFwH561aCRhp4DiCIlqAiqlV
 g6jyEtTkOrIyHULokgFSmWrLDcTxvx4lWyZbmeltju4KXzzfPojc6m4daVN9Z3cQ
 VP9+6mLuJcF/aIbdyGnxg7pgsfy6+roHI1+vHfufVEyTt1funm1Mt1Wq+kUFC0XW
 YRQILq82tr3OgvcB3xmXllE3XcklN4Vv922Up0fQ+8OV36jA2q6N5vTsk8fctuD4
 8O+j4kmomCEavj2JEIB5SFfsZ+Cdycx79+1pvOtDSYOM7svFpQs6kdhq+JXGRSql
 W00xgLQj82tmXpaLV36pXPGoc7ZXQolQbc6SYFQn8oHTTvHDdFiQkG5TKafj7r5u
 ayaV/VqytSy+Hiq8XWNpEjfxn467fQ5UmHXQoVAIZnpk323SpPbLQ5aDOMk/9+DT
 u0mDnIP4k6w8ViTnalLPEBOqqpZZo358t+cRD1kD55X4IR2YPSFhrhJTq23Z9Rv3
 EW9ZUQYrK6WDuYO8/4SZ1J/HTx5MFb1Na6dKAXwO3v0S7CBzIbN9gqbU7IxfQ8ZA
 qKT726r923PHKL2x8VZc
 =GLSh
 -----END PGP SIGNATURE-----

Merge tag 'omap-cleanup-sparseirq-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:

This branch contains changes needed to make omap2+
work properly with sparse IRQ. It also removes
dependencies to mach/hardware.h. These help moving
things towards ARM single zImage support.

This branch is based on a commit in tty-next
branch with omap-devel-gpmc-fixed-for-v3.7 and
cleanup-omap-tags-for-v3.7 merged in to keep things
compiling and sort out some merge conflicts.

* tag 'omap-cleanup-sparseirq-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
  ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2
  ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
  ARM: OMAP: Remove unused old gpio-switch.h
  ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
  ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
  ARM: OMAP2+: Prepare for irqs.h removal
  W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h
  Input: omap-keypad: Remove dependencies to mach includes
  ARM: OMAP: Move gpio.h to include/linux/platform_data
  ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
  ARM: OMAP2+: Remove unused nand_irq for GPMC
  ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
  ARM: OMAP1: Define OMAP1_INT_I2C locally
  ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
2012-09-16 20:05:06 -07:00
Olof Johansson e640ca0fcb Remove the ancient omap specific atags that are no longer needed.
At some point we were planning to pass the bootloader information
 with custom atags that did not work out too well.
 
 There's no need for these any longer as the kernel has been booting
 fine without them for quite some time. And Now we have device tree
 support that can be used instead.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQToX6AAoJEBvUPslcq6VznGYP/141pkbT7BL112e8zMQrAWRb
 eKCJKw58J+XJZ4BTOCCqDwcGvKn0ZjRaCx7rtBmQVi1Pc7r4hmbPUwn6GSIMUTKY
 BKaCsfQFs1mS/uXXJcWV2JkXuKxooEsEP8KD7ctO5GgjBgTjPIIa45OG7qZMBqKL
 CYrjGRuaXJqtP9OR7Ad3gcbAkfCaYAIxvi+bb7jHHfYYQKJCLPPWno0aSEMRqvAm
 qZmRzc4CIzfBTxTixOvBsxa2MluViUTwtu+p6hpvhKvVO80QjJCL4kgdWk4hiSSe
 hWxHRsnA+aLX9vyuBwEWzDJ3ty0C3gur+F1bJpwtkQR/YUEmgak+pOQbe5WlA6rr
 9oonRue886c3QjyubY5k9uLWWC/wTnnPmztoGdDiWyDA89dJFjHGvK7tngKL/xz+
 cLhT5pHJnWSPiFlEWQbwU3znaA+rzbVbxwyDdIzl6KWyvq+m4rlCLHfv+StoC/4V
 JakoQTANNv3CIXwDpZiO0Ci4UwPzbr6SnUHCpuBauF4LpTIKUWp3wS/Vbl1rk2nr
 5huY48Dq5+itzFT8AoWMe+efjOI+pkKVOiuvdfMcd7qYKaFjqOCeEDOcFSKm7cq8
 gDDFG4BleDSVE69N+VR83+wZqCNtVEEeJiRWdNXmOE3laYbxfy3lJceZ0nejakLI
 hz+gFKrWiULXmQXkZh/J
 =utuw
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-omap-tags-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:

Remove the ancient omap specific atags that are no longer needed.

At some point we were planning to pass the bootloader information
with custom atags that did not work out too well.

There's no need for these any longer as the kernel has been booting
fine without them for quite some time. And Now we have device tree
support that can be used instead.

* tag 'cleanup-omap-tags-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: remove plat/board.h file
  ARM: OMAP: move debug_card_init() function
  ARM: OMAP1: move lcd pdata out of arch/arm/*
  ARM: OMAP1: move omap1_bl pdata out of arch/arm/*
  ARM: OMAP: remove the omap custom tags
  ARM: OMAP1: remove the crystal type tag parsing
  ARM: OMAP: remove the sti console workaround
  ARM: OMAP: omap3evm: cleanup revision bits
  ARM: OMAP: cleanup struct omap_board_config_kernel
  + sync to 3.6-rc5
2012-09-16 19:28:42 -07:00
Olof Johansson 5ec8d8c96e Changes for GPMC (General Purpose Memory Controller) that take it
closer for being just a regular device driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUQu9AAoJEBvUPslcq6Vz8AQQALVhM5PoomGlr4OkTFEc7+xy
 9r1W9NMbD0EX91o5SrdOCSvEaGSV3eKpe2nNGWXNhDwrpDz/Zeci2Ga/ADJdIx+h
 OxbMtx4o9hakSKJAgQAtnc8Ay9Ao5zYcDfMv2kVi8/iQ+CpVnzhZT9HN4rFv0eQF
 +7xhWlni10iqGyAEKVO1FajNZMO7qYdwXNq1XeuDNV3dFV/vOoaCVQbcH/+dyaRQ
 Wqq8BtYuZ3ELu2GiM7rJJMVu/c7AimHjmsXvO4nJ3fkD+izPaqHroNZFyNtHIv0k
 Hc6iWuxN9KnbKXv0Yioc78jDUxumUBToMfniBB9f7S69uKFBFB7FZQjxxje2KTZ8
 HWgUOHWPW3jKM24xfaZhtWtn+swSkSJcZB2DC4shK/nHF2WHH1zaWNVF6NOE/uk0
 nC3cGNOnsSw+jTbl0/CtxBOnpA8RCV3yeW+Fg+iH8v310yrZChtBh6e3ptlHoYl9
 2vZ4xEO2LRBa9MIq5RyLoei+omJFkiugkp75Ln3UrwjbfQyiH0HTWoI9nzkI8HF3
 CiyA7k6aDQ+Qp82L5WEvAh04Z8af2BZSDp6TlC4yEgBXV9Y4ssF8rhHvqBIzv1hC
 d6ohUGdwYQcVfL8xbVUwcbUaTvJcqmxNy20vkhEdqdYMrLWnjy09Nxbl8EJxe6Hh
 zvILFXH7sTIjXBGN3RlN
 =A43b
 -----END PGP SIGNATURE-----

Merge tag 'omap-devel-gpmc-fixed-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:

Changes for GPMC (General Purpose Memory Controller) that take it
closer for being just a regular device driver.

* tag 'omap-devel-gpmc-fixed-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  mtd: nand: omap2: use gpmc provided irqs
  ARM: OMAP2+: gpmc-nand: Modify Interrupt handling
  ARM: OMAP2+: gpmc: Modify interrupt handling
  mtd: onenand: omap2: obtain memory from resource
  mtd: nand: omap2: obtain memory from resource
  ARM: OMAP2+: gpmc-onenand: provide memory as resource
  ARM: OMAP2+: gpmc-nand: update resource with memory
  mtd: nand: omap2: handle nand on gpmc
  ARM: OMAP2+: gpmc-nand: update gpmc-nand regs
  ARM: OMAP2+: gpmc: update nand register helper
2012-09-16 19:27:20 -07:00
Olof Johansson 2e6185f1fe ARM: tegra: i2c driver enhancements mostly related to clocking
This branch contains a number of fixes and cleanups to the Tegra I2C
 driver related to clocks. These are based on the common clock conversion
 in order to avoid duplicating the clock driver changes before and after
 the conversion. Finally, a bug-fix related to I2C_M_NOSTART is included.
 
 This branch is based on previous pull request tegra-for-3.7-common-clk.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQU4B/AAoJEMzrak5tbycx+3gQALBx5JjQ+k16znW4iTSJKtWr
 3wm5npiu9mk60b1vk5n0jRWpF532gkghdLDYs5AcXDxBhC6hq+LvHUXiEEY7oEya
 bsIuYMw0WKGrRXEGBvxDaOJ69XCyMOpaDCS9mQyy/iT40eskYBykvSsdDMP86LxS
 GS/Dk+Vj59A2wWXBV0IrS9PbS1tHp7W8yxrKw0yUF8vZk5wFFga9LnDp8xUOqSrE
 3kBygS2TtrMuIu85ZkO3n/I62xkAQih9KU1WvKLciw5mAKxWsNVMGA59CyY4Qu7Q
 0Dr+TIrelbJYBagmSnAciEnegNbxNVYOoKja/dWNs+hZPDO/YVz55vrLecD2sEHe
 /jlo0c2GfS10SakrTnzFdWMfmcEHpDLMnPaBmCluh9ivBQ/wKsqrJQIMQV8tUU50
 +0vBfx5/aXfrUrzQNLSZncW2MvywFuM5Rt5ODKziNTunnbSTYnbNby07SJLGllVf
 OlCWdpS5agkbio/50BiunnMwBkDmmCrga2gVdMbBOx5hiktMDHW7rWe6q9XqY7yW
 3fYaaSmsS3WpIVRSqkL3kd2BY4hEoG5Mk0G+/a/kF9DOb9BQSu4HxEC6U1+Jy+Dy
 ewvAZPsYnUiI+kq2RdqJN8QDv8CKbySM3iUNG55/JUkQNC8rcoBC0OVh6XAM5fXd
 QVPCiYngnSE5LS0CTCC+
 =6+9B
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.7-drivers-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers

From Stephen Warren:

ARM: tegra: i2c driver enhancements mostly related to clocking

This branch contains a number of fixes and cleanups to the Tegra I2C
driver related to clocks. These are based on the common clock conversion
in order to avoid duplicating the clock driver changes before and after
the conversion. Finally, a bug-fix related to I2C_M_NOSTART is included.

This branch is based on previous pull request tegra-for-3.7-common-clk.

* tag 'tegra-for-3.7-drivers-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  i2c: tegra: dynamically control fast clk
  i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20
  ARM: tegra: clock: remove unused clock entry for i2c
  ARM: tegra: clock: add connection name in i2c clock entry
  i2c: tegra: pass proper name for getting clock
  ARM: tegra: clock: add i2c fast clock entry in clock table
  ARM: Tegra: Add smp_twd clock for Tegra20
  ARM: tegra: cpu-tegra: explicitly manage re-parenting
  ARM: tegra: fix overflow in tegra20_pll_clk_round_rate()
  ARM: tegra: Fix data type for io address
  ARM: tegra: remove tegra_timer from tegra_list_clks
  ARM: tegra30: clocks: fix the wrong tegra_audio_sync_clk_ops name
  ARM: tegra: clocks: separate tegra_clk_32k_ops from Tegra20 and Tegra30
  ARM: tegra: Remove duplicate code
  ARM: tegra: Port tegra to generic clock framework
  ARM: tegra: Add clk_tegra structure and helper functions
  ARM: tegra: Rename tegra20 clock file
  ARM: tegra20: Separate out clk ops and clk data
  ARM: tegra30: Separate out clk ops and clk data
  ARM: tegra: fix U16 divider range check
  ...
  + sync to v3.6-rc4

Resolved remove/modify conflict in arch/arm/mach-sa1100/leds-hackkit.c
caused by the sync with v3.6-rc4.

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-16 18:31:37 -07:00
Arnd Bergmann db298da2c3 ARM: nomadik: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the nomadik include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: STEricsson <STEricsson_nomadik_linux@list.st.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andreas Westin <andreas.westin@stericsson.com>
2012-09-14 11:19:00 +02:00
Arnd Bergmann 293b2da1b6 ARM: pxa: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the pxa include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Paul Parsons <lost.distance@yahoo.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-By: Stefan Schmidt <stefan@openezx.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: Harald Welte <laforge@openezx.org>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Tomas Cech <sleep_walker@suse.cz>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Dan Williams <djbw@fb.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: openezx-devel@lists.openezx.org
2012-09-14 11:18:10 +02:00
Arnd Bergmann 82906b13a6 ARM: imx: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the imx include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Sascha Hauer <kernel@pengutronix.de>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Dan Williams <djbw@fb.com>
Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2012-09-14 11:17:21 +02:00
Arnd Bergmann ec2a0833e5 ARM: davinci: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the davinci include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: "Ben Dooks" <ben-linux@fluff.org>
Cc: "Wolfram Sang" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Liam Girdwood <lrg@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com
2012-09-14 11:16:54 +02:00
Tony Lindgren 7d7e1eba7e ARM: OMAP2+: Prepare for irqs.h removal
As the interrupts should only be defined in the platform_data, and
eventually coming from device tree, there's no need to define them
in header files.

Let's remove the hardcoded references to irqs.h and fix up the includes
so we don't rely on headers included in irqs.h. Note that we're
defining OMAP_INTC_START as 0 to the interrupts. This will be needed
when we enable SPARSE_IRQ. For some drivers we need to add
#include <plat/cpu.h> for now until these drivers are fixed to
remove cpu_is_omapxxxx() usage.

While at it, sort som of the includes the standard way, and add
the trailing commas where they are missing in the related data
structures.

Note that for drivers/staging/tidspbridge we just define things
locally.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:30 -07:00
Tony Lindgren 4b25408f1f ARM: OMAP: Move gpio.h to include/linux/platform_data
This way we can remove includes of plat/gpio.h which won't work
with the single zImage support.

Note that we also remove the cpu_class_is_omap2() check
in gpio-omap.c as the drivers should not call it as we need to
make it local to arch/arm/mach-omap2 for single zImage support.

While at it, arrange the related includes in the standard way.

Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-mtd@lists.infradead.org
Cc: alsa-devel@alsa-project.org
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:30 -07:00
Tony Lindgren a1e01703ba Changes for GPMC (General Purpose Memory Controller) that take it
closer for being just a regular device driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUQu9AAoJEBvUPslcq6Vz8AQQALVhM5PoomGlr4OkTFEc7+xy
 9r1W9NMbD0EX91o5SrdOCSvEaGSV3eKpe2nNGWXNhDwrpDz/Zeci2Ga/ADJdIx+h
 OxbMtx4o9hakSKJAgQAtnc8Ay9Ao5zYcDfMv2kVi8/iQ+CpVnzhZT9HN4rFv0eQF
 +7xhWlni10iqGyAEKVO1FajNZMO7qYdwXNq1XeuDNV3dFV/vOoaCVQbcH/+dyaRQ
 Wqq8BtYuZ3ELu2GiM7rJJMVu/c7AimHjmsXvO4nJ3fkD+izPaqHroNZFyNtHIv0k
 Hc6iWuxN9KnbKXv0Yioc78jDUxumUBToMfniBB9f7S69uKFBFB7FZQjxxje2KTZ8
 HWgUOHWPW3jKM24xfaZhtWtn+swSkSJcZB2DC4shK/nHF2WHH1zaWNVF6NOE/uk0
 nC3cGNOnsSw+jTbl0/CtxBOnpA8RCV3yeW+Fg+iH8v310yrZChtBh6e3ptlHoYl9
 2vZ4xEO2LRBa9MIq5RyLoei+omJFkiugkp75Ln3UrwjbfQyiH0HTWoI9nzkI8HF3
 CiyA7k6aDQ+Qp82L5WEvAh04Z8af2BZSDp6TlC4yEgBXV9Y4ssF8rhHvqBIzv1hC
 d6ohUGdwYQcVfL8xbVUwcbUaTvJcqmxNy20vkhEdqdYMrLWnjy09Nxbl8EJxe6Hh
 zvILFXH7sTIjXBGN3RlN
 =A43b
 -----END PGP SIGNATURE-----
mergetag object cf3a6ec2c0
 type commit
 tag cleanup-omap-tags-for-v3.7
 tagger Tony Lindgren <tony@atomide.com> 1347323254 -0700
 
 Remove the ancient omap specific atags that are no longer needed.
 
 At some point we were planning to pass the bootloader information
 with custom atags that did not work out too well.
 
 There's no need for these any longer as the kernel has been booting
 fine without them for quite some time. And Now we have device tree
 support that can be used instead.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQToX6AAoJEBvUPslcq6VznGYP/141pkbT7BL112e8zMQrAWRb
 eKCJKw58J+XJZ4BTOCCqDwcGvKn0ZjRaCx7rtBmQVi1Pc7r4hmbPUwn6GSIMUTKY
 BKaCsfQFs1mS/uXXJcWV2JkXuKxooEsEP8KD7ctO5GgjBgTjPIIa45OG7qZMBqKL
 CYrjGRuaXJqtP9OR7Ad3gcbAkfCaYAIxvi+bb7jHHfYYQKJCLPPWno0aSEMRqvAm
 qZmRzc4CIzfBTxTixOvBsxa2MluViUTwtu+p6hpvhKvVO80QjJCL4kgdWk4hiSSe
 hWxHRsnA+aLX9vyuBwEWzDJ3ty0C3gur+F1bJpwtkQR/YUEmgak+pOQbe5WlA6rr
 9oonRue886c3QjyubY5k9uLWWC/wTnnPmztoGdDiWyDA89dJFjHGvK7tngKL/xz+
 cLhT5pHJnWSPiFlEWQbwU3znaA+rzbVbxwyDdIzl6KWyvq+m4rlCLHfv+StoC/4V
 JakoQTANNv3CIXwDpZiO0Ci4UwPzbr6SnUHCpuBauF4LpTIKUWp3wS/Vbl1rk2nr
 5huY48Dq5+itzFT8AoWMe+efjOI+pkKVOiuvdfMcd7qYKaFjqOCeEDOcFSKm7cq8
 gDDFG4BleDSVE69N+VR83+wZqCNtVEEeJiRWdNXmOE3laYbxfy3lJceZ0nejakLI
 hz+gFKrWiULXmQXkZh/J
 =utuw
 -----END PGP SIGNATURE-----

Merge tags 'omap-devel-gpmc-fixed-for-v3.7' and 'cleanup-omap-tags-for-v3.7' into cleanup-sparseirq

Changes for GPMC (General Purpose Memory Controller) that take it
closer for being just a regular device driver.

Remove the ancient omap specific atags that are no longer needed.

At some point we were planning to pass the bootloader information
with custom atags that did not work out too well.

There's no need for these any longer as the kernel has been booting
fine without them for quite some time. And Now we have device tree
support that can be used instead.
2012-09-12 18:05:19 -07:00
Igor Grinberg cf3a6ec2c0 ARM: OMAP: remove plat/board.h file
plat/board.h file is now empty - remove it.

Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-10 16:39:21 -07:00
Olof Johansson 1875962377 Merge branch 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
* 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs'
  + sync to 3.6-rc3
2012-09-05 15:35:48 -07:00
Arnd Bergmann 3fbb96d275 Merge branch 'cleanup/io-pci' into next/cleanup
The io-pci series has gained a merge to resolve a nontrivial
conflict.

* cleanup/io-pci:
  ARM: Fix ioremap() of address zero

Also includes an update to Linux 3.6-rc3

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-09-04 15:07:35 +02:00
Artem Bityutskiy 78b495c39a UBI: fix a horrible memory deallocation bug
UBI was mistakingly using 'kfree()' instead of 'kmem_cache_free()' when
freeing "attach eraseblock" structures in vtbl.c. Thankfully, this happened
only when we were doing auto-format, so many systems were unaffected. However,
there are still many users affected.

It is strange, but the system did not crash and nothing bad happened when
the SLUB memory allocator was used. However, in case of SLOB we observed an
crash right away.

This problem was introduced in 2.6.39 by commit
"6c1e875 UBI: add slab cache for ubi_scan_leb objects"

A note for stable trees:
  Because variable were renamed, this won't cleanly apply to older kernels.
  Changing names like this should help:
	1. ai -> si
	2. aeb_slab_cache -> seb_slab_cache
	3. new_aeb -> new_seb

Reported-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@vger.kernel.org [v2.6.39+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:40:26 +03:00
Artem Bityutskiy 719bb84017 UBI: print less
UBI currently prints a lot of information when it mounts a volume, which
bothers some people. Make it less chatty - print only important information
by default.

Get rid of 'dbg_msg()' macro completely.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:02 +03:00
Artem Bityutskiy e28453bbb7 UBI: use pr_ helper instead of printk
Use 'pr_err()' instead of 'printk(KERN_ERR', etc.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:02 +03:00
Artem Bityutskiy 049333cecb UBI: comply with coding style
Join all the split printk lines in order to stop checkpatch complaining.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Matthieu CASTET 193819cf2e UBI: erase free PEB with bitflip in EC header
Without this patch, these PEB are not scrubbed until we put data in them.
Bitflip can accumulate latter and we can loose the EC header (but VID header
should be intact and allow to recover data).

Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Artem Bityutskiy abb3e01103 UBI: fix autoresize handling in R/O mode
Currently UBI fails in autoresize when it is in R/O mode (e.g., because the
underlying MTD device is R/O). This patch fixes the issue - we just skip
autoresize and print a warning.

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud db7e21c21f UBI: add max_beb_per1024 to attach ioctl
This patch provides a possibility to set the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device using
the UBI_IOCATT ioctl.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud edac493dfb UBI: allow specifying bad PEBs limit using module parameter
This patch provides the possibility to adjust the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device.

The majority of NAND devices have their max_beb_per1024 equal to 20, but
sometimes it's more.
Now, we can adjust that via a kernel parameter:
ubi.mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]]

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud d2f588f934 UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
max_beb_per1024 shouldn't be negative, and a 0 value will be treated as
the default value. For the upper bound, 768/1024 should be enough.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud 256334c319 UBI: prepare for max_beb_per1024 module parameter addition
This patch prepare the way for the addition of max_beb_per1024 module
parameter.  There's no functional change.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud 5993f9b738 UBI: introduce MTD_PARAM_MAX_COUNT
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:01 +03:00
Richard Genoud 95e6fb027e UBI: separate bad_peb_limit in a function
No functional changes here, just to prepare for next patch.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:00 +03:00
Richard Genoud ba4087e956 UBI: use the whole MTD device size to get bad_peb_limit
On NAND flash devices, UBI reserves some physical erase blocks (PEB) for
bad block handling. Today, the number of reserved PEB can only be set as a
percentage of the total number of PEB in each MTD partition. For example, for a
NAND flash with 128KiB PEB, 2 MTD partition of 20MiB (mtd0) and 100MiB (mtd1)
and 2% reserved PEB:
 - the UBI device on mtd0 will have 2 PEB reserved
 - the UBI device on mtd1 will have 16 PEB reserved

The problem with this behaviour is that NAND flash manufacturers give a
minimum number of valid block (NVB) during the endurance life of the
device, e.g.:

Parameter             Symbol    Min    Max    Unit      Notes
--------------------------------------------------------------
Valid block number     NVB     1004    1024   Blocks     1

From this number we can deduce the maximum number of bad PEB that a device will
contain during its endurance life: a 128MiB NAND flash (1024 PEB) will not have
less than 20 bad blocks during the flash endurance life.

But the manufacturer doesn't tell where those bad block will appear. He doesn't
say either if they will be equally disposed on the whole device (and I'm pretty
sure they won't). So, according to the datasheets, we should reserve the
maximum number of bad PEB for each UBI device (worst case scenario: 20 bad
blocks appears on the smallest MTD partition).

So this patch make UBI use the whole MTD device size to calculate the maximum
bad expected eraseblocks.

The Kconfig option is in per1024 blocks, thus it can have a default value of 20
which is *very* common for NAND devices.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:39:00 +03:00
Richard Genoud 62082e56cb mtd: mtdparts: introduce mtd_get_device_size
'mtd_get_device_size()' returns the size of the whole MTD device, that is the
mtd_info master size. This will be used by UBI to calculate the maximum number
of bad blocks (MBB) on a MTD device.

Artem: amended the patch a bit.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:38:58 +03:00
Richard Genoud 5dee4674c8 mtd: mark mtd_is_partition argument as constant
'struct mtd_info' is not modified by 'mtd_is_partition()' so it can be marked
as "const".

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:38:58 +03:00
Shmulik Ladkani 1b2a579061 UBI: kill CONFIG_MTD_UBI_BEB_RESERVE
CONFIG_MTD_UBI_BEB_RESERVE and MIN_RESEVED_PEBS are no longer used,
since the amount of reserved eraseblocks for bad PEB handling is now
derived from 'ubi->bad_peb_limit' (ubi's maximum expected bad
eraseblocks).

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-09-04 09:38:58 +03:00
Shmulik Ladkani 37f758a036 UBI: limit amount of reserved eraseblocks for bad PEB handling
The existing mechanism of reserving PEBs for bad PEB handling has two
flaws:
- It is calculated as a percentage of good PEBs instead of total PEBs.
- There's no limit on the amount of PEBs UBI reserves for future bad
  eraseblock handling.

This patch changes the mechanism to overcome these flaws.

The desired level of PEBs reserved for bad PEB handling (beb_rsvd_level)
is set to the maximum expected bad eraseblocks (bad_peb_limit) minus the
existing number of bad eraseblocks (bad_peb_count).

The actual amount of PEBs reserved for bad PEB handling is usually set
to the desired level (but in some circumstances may be lower than the
desired level, e.g. when attaching to a device that has too few
available PEBs to satisfy the desired level).

In the case where the device has too many bad PEBs (above the expected
limit), then the desired level, and the actual amount of PEBs reserved
are set to zero. No PEBs will be set aside for future bad eraseblock
handling - even if some PEBs are made available (e.g. by shrinking a
volume).
If another PEB goes bad, and there are available PEBs, then the
eraseblock will be marked bad (consuming one available PEB). But if
there are no available PEBs, ubi will go into readonly mode.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
2012-09-04 09:38:58 +03:00
Shmulik Ladkani 8beeb3bb9d UBI: introduce new bad PEB limit
Introduce 'ubi->bad_peb_limit', which specifies an upper limit of PEBs
UBI expects to go bad.  Currently, it is initialized to a fixed percentage
of total PEBs in the UBI device (configurable via CONFIG_MTD_UBI_BEB_LIMIT).

The 'bad_peb_limit' is intended to be used for calculating the amount of PEBs
UBI needs to reserve for bad eraseblock handling.

Artem: minor amendments.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-09-04 09:38:58 +03:00
Artem Bityutskiy 183ae6cf8b UBI: print PID in debug messages
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:38:57 +03:00
Artem Bityutskiy 5739dd7213 UBI: print image sequence number as unsigned integer
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-09-04 09:38:57 +03:00
Afzal Mohammed 5c4684557b mtd: nand: omap2: use gpmc provided irqs
GPMC platform initialization provides it's clients
with interrupts that can be used through struct
resource. Make use of it for irq mode functionality.

Also now write protect disable is done by GPMC,
hence remove it.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
[tony@atomide.com: updated to fix new warnings introduced]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 12:53:24 -07:00
Afzal Mohammed d65ccb6da6 mtd: onenand: omap2: obtain memory from resource
gpmc initialization for onenand done by platform code now provides
onenand address space as memory resource. Hence remove usage of
gpmc_cs_request in onenand driver and obtain memory details from
resource structure.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 12:53:23 -07:00
Afzal Mohammed 9c4c2f8b91 mtd: nand: omap2: obtain memory from resource
gpmc initialization done by platform code now updates struct resource
with the address space alloted for nand. Use this interface to obtain
memory rather than relying on platform data field - phys_base.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 12:53:23 -07:00
Afzal Mohammed 65b97cf6b8 mtd: nand: omap2: handle nand on gpmc
GPMC platform initialization has been modified to fill NAND
platform data with GPMC NAND register details. As these
registers are accessible in NAND driver itself, configure
NAND in GPMC by itself.

Modified prefetch and ecc functions are logically same as
the corresponding exported symbols from GPMC code.

Note: Verfying that other CS have not yet enabled for
prefetch & ecc has to be incorporated. Currently this
causes no issues as there are no boards that use NAND
on multiple CS. With ongoing GPMC driver migration,
perhaps it would be better to consider NAND connected
on multiple CS as a single peripheral using multiple CS.
This would make handling multiple CS issues easier.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 12:53:22 -07:00
David Woodhouse 2361f738b6 Linux 3.6-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQLWtvAAoJEHm+PkMAQRiG/DYH+wd0FqfEuYkYk4KPyAPuhKpX
 zX7HYfLvyJE/ZYIdrhjq1E6Xm2KNr7gtX7/Rdzi2W38M9sjbYzwG1UGIw51qnxWy
 yZJH9BGkfyQgQPeuDGohfB6DkDy2JWr2eqMDvakjOwgBsIzji0PQD/f3UvndhtUa
 c+tTj/kjavHE1Yr2Wy6OnRZz3Uc0hIMn/Q0JqtbCs3LUgEV1KA4OEAe56XNz4Ku4
 WE+FFaGFPvtriQsQON+ohPS5IC8jzQGK/0vbrJ4lWjFnZy4gvZXnborTOwD0WSQG
 fbsNuxp1AaM2/pqfMwXm1w0ADvwOITHNiwwXf9id6DoK81QwTFpUdvKpn6yB6gQ=
 =rurr
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux

Having missed the merge window, update to 3.6-rc2 to avoid conflicts with
new patches.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-08-22 12:55:43 +01:00
Tejun Heo 43829731dd workqueue: deprecate flush[_delayed]_work_sync()
flush[_delayed]_work_sync() are now spurious.  Mark them deprecated
and convert all users to flush[_delayed]_work().

If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant and the regular flushes guarantee that the work item is
not pending or running on any CPU on return, so there's no reason to
use the sync flushes at all and they're going away.

This patch doesn't make any functional difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mattia Dongili <malattia@linux.it>
Cc: Kent Yoder <key@linux.vnet.ibm.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Avi Kivity <avi@redhat.com>
2012-08-20 14:51:24 -07:00
Haojian Zhuang 6e308f87c8 mtd: nand: append missing parameter and value
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-08-20 13:51:55 +08:00
Daniel Mack 1e7ba630d4 MTD: pxa3xx-nand: add devicetree bindings
This patch contains a hack to get the DMA resources of the device when
probed from a devicetree node. This can be removed once a generic DMA
controller framework lands.

A mtd_part_parser_data is passed mtd_device_parse_register which
contains a reference to the device node, so MTD partitions can be
added as children.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2012-08-16 16:14:24 +08:00
Arnd Bergmann e05dd97c5c Merge tag 'at91-for-next-soc' of git://github.com/at91linux/linux-at91 into at91/mci
AT91 SoC related code modifications: a cleanup in defconfigs and
a one liner in a board file.
The most important is the move to atmel-mci driver in AT91 SoC & boards.
The old at91_mci (marked as deprecated) will be removed in 3.7. So all
platform data for this old driver are erased and replace by information
needed by atmel-mci driver.

* tag 'at91-for-next-soc' of git://github.com/at91linux/linux-at91:
  ARM: at91: add atmel-mci support for chips and boards which can use it
  ARM: at91/defconfig: change the MCI driver to use in defconfigs
  ARM: at91: set i2c_board_info.type to "ds1339" directly
  ARM: at91/defconfig: Remove unaffected config option

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-13 17:09:38 +02:00
Arnd Bergmann a4c75ba85c Merge branch 'testing/bcmring' into next/cleanups
This attempts to get the bcmring platform better in line with the
other platforms. Moving the header files below mach/ helps with
the future reorganization for multiplatform kernels, and using
MMIO accessors is generally the right thing.

* testing/bcmring:
  ARM: bcmring: use proper MMIO accessors
  ARM: bcmring: remove include/csp/ subdir
  ARM: bcmring: move cfg_global header to mach/

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-13 17:01:31 +02:00
Linus Torvalds 88de3d0d71 arm-soc: bug fixes for v3.6-rc2
These are a bunch of bug fixes that came in after the merge window and
 one update for the MAINTAINERS file. The largest part of the fixes
 are patches that address bugs found by building all the ARM defconfig
 files. There are a lot more warnings that we have patches for, but
 the others are either still under discussion or are harmless and
 do not cause actual problems besides making the build slightly noisy.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAUCVTDGCrR//JCVInAQI9sg//cLUFER/nOXKWgbsaopP3+XeeShPvLitR
 RP+IMy90hHfiaat9PKRhY5tA74uPbD4Eywc/kUcMtAE/9cu1ATdfickbpk2fCGcm
 73cuGegj51RgrUh5Yj03viIKWOESjVFdBVQnAmoguy6R+H98qQ0tj/hDYfAwbt01
 87GW11WW+l3uNHqMza16I7PLz0vx8NO8MLLPMeCzvHBSOC/FN/vxX/bS2DWkgv2d
 u3TG+nYW73F6GQ4dKpGNa7oAHfY8WgOafHtkwCbKrd0CbILm78wP8c10FGz03bgE
 3oPxwy7bw1LVBZR7fQZGzu3J4yQP7bfZQrYtYi/WiriRi2bA6CX3BlMFu9Hxewoh
 hXKo9VwwUlj6yWKJ191sakUilz+JKIDDnkesMu6deTY4XqUyuBm31QAX/yqnZ0Hv
 B8wnD36zOnH2Ymyos2p9NF1K1GxgJfjAb2wQzeu8+5pKE+Aj+xhajmqcSDVmO78T
 3k2SUtBpRFjfa1BE0hUjLL68abX3wx72Nlk8NT7VTpqqGlN6cv3DDDHw0SU+vD5g
 onaT/VR/px7HzJTRhVTwsAZzjSynH8v15Y0vjUfALGIApqTKqeL87vWGxY4fC6Iu
 sKANgSWOtx7xqMepmEyMBNN/yblBGn+nFMA00K6xd9cw1Kmmp4g7qppXumt4l5FI
 q174LxG/tiI=
 =TmsX
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc bug fixes from Arnd Bergmann:
 "These are a bunch of bug fixes that came in after the merge window and
  one update for the MAINTAINERS file.

  The largest part of the fixes are patches that address bugs found by
  building all the ARM defconfig files.  There are a lot more warnings
  that we have patches for, but the others are either still under
  discussion or are harmless and do not cause actual problems besides
  making the build slightly noisy."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
  ARM: davinci: remove broken ntosd2_init_i2c
  ARM: s3c24xx: enable CONFIG_BUG for tct_hammer
  omap-rng: fix use of SIMPLE_DEV_PM_OPS
  spi/s3c64xx: improve error handling
  mtd/omap2: fix dmaengine_slave_config error handling
  gpio: em: do not discard em_gio_irq_domain_cleanup
  ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
  ARM: imx: gpmi-nand depends on mxs-dma
  ARM: integrator: include <linux/export.h>
  ARM: s3c24xx: use new PWM driver
  ARM: sa1100: include linux/io.h in hackkit leds code
  Input: eeti_ts: pass gpio value instead of IRQ
  ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  ARM: tegra: more regulator fixes for Harmony
  usb/ohci-omap: remove unused variable
  mfd/asic3: fix asic3_mfd_probe return value
  ARM: kirkwood: fix typo in Makefile.boot
  i.MX27: Fix emma-prp and csi clocks.
  ARM: integrator: use clk_prepare_enable() for timer
  MAINTAINERS: update entry for Linus Walleij
  ...
2012-08-12 21:31:44 +03:00
Arnd Bergmann b64456a4fc Merge branch 'testing/new-warnings' into fixes
These patches all fix bugs that were newly introduced in v3.6-rc1
and found because they cause a gcc warning with one of the ARM
defconfigs. Most of them are harmless, but since we're trying
to get rid of all warnings eventually, we can start with the ones
that were not there before.

* testing/new-warnings:
  omap-rng: fix use of SIMPLE_DEV_PM_OPS
  spi/s3c64xx: improve error handling
  mtd/omap2: fix dmaengine_slave_config error handling
  gpio: em: do not discard em_gio_irq_domain_cleanup
  ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
  usb/ohci-omap: remove unused variable
  mfd/asic3: fix asic3_mfd_probe return value

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-10 12:28:57 +02:00
Arnd Bergmann d680e2c11e mtd/omap2: fix dmaengine_slave_config error handling
The newly added dmaengine support in the omap2 nand driver
potentially causes an undefined return value from the
omap_nand_probe function when dmaengine_slave_config
reports an error. Let's handle this by returning the
same error back to the caller.

Without this patch, building omap2plus_defconfig results in:

drivers/mtd/nand/omap2.c: In function 'omap_nand_probe':
drivers/mtd/nand/omap2.c:1154:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Grazvydas Ignotas <notasas@gmail.com>
2012-08-10 12:27:46 +02:00
Arnd Bergmann a33493775d ARM: imx: gpmi-nand depends on mxs-dma
It is not currently possible to build the gpmi-nand driver without
also building the mxs-dma driver. Clarify this Kconfig and enable
both in the defconfig file so we can build it again with both enabled.

drivers/built-in.o: In function `gpmi_dma_filter':
clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
2012-08-09 15:16:44 +02:00
Linus Torvalds 587a9e1f95 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
  m68k/apollo: Rename "timer" to "apollo_timer"
  zorro: Remove unused zorro_bus.devices
  m68k: Remove never used asm/shm.h
  m68k/sun3: Remove unselectable code in prom_init()
  m68k: Use asm-generic version of <asm/sections.h>
  m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
  mtd/uclinux: Use generic __bss_stop instead of _ebss
  m68knommu: Allow ColdFire CPUs to use unaligned accesses
  m68k: Remove five unused headers
  m68k: CPU32 does not support unaligned accesses
  m68k: Introduce config option CPU_HAS_NO_UNALIGNED
  m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64
  m68k: Move CPU_HAS_* config options
  m68k: Remove duplicate FPU config option
  m68knommu: Clean up printing of sections
  m68k: Use asm-generic version of <asm/types.h>
  m68k: Use Kbuild logic to import asm-generic headers
2012-08-03 10:52:41 -07:00
Linus Torvalds a6dc77254b Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM DMA engine updates from Russell King:
 "This looks scary at first glance, but what it is is:
   - a rework of the sa11x0 DMA engine driver merged during the previous
     cycle, to extract a common set of helper functions for DMA engine
     implementations.
   - conversion of amba-pl08x.c to use these helper functions.
   - addition of OMAP DMA engine driver (using these helper functions),
     and conversion of some of the OMAP DMA users to use DMA engine.

  Nothing in the helper functions is ARM specific, so I hope that other
  implementations can consolidate some of their code by making use of
  these helpers.

  This has been sitting in linux-next most of the merge cycle, and has
  been tested by several OMAP folk.  I've tested it on sa11x0 platforms,
  and given it my best shot on my broken platforms which have the
  amba-pl08x controller.

  The last point is the addition to feature-removal-schedule.txt, which
  will have a merge conflict.  Between myself and TI, we're planning to
  remove the old TI DMA implementation next year."

Fix up trivial add/add conflicts in Documentation/feature-removal-schedule.txt
and drivers/dma/{Kconfig,Makefile}

* 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm: (53 commits)
  ARM: 7481/1: OMAP2+: omap2plus_defconfig: enable OMAP DMA engine
  ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel request fails
  Add feature removal of old OMAP private DMA implementation
  mtd: omap2: remove private DMA API implementation
  mtd: omap2: add DMA engine support
  spi: omap2-mcspi: remove private DMA API implementation
  spi: omap2-mcspi: add DMA engine support
  ARM: omap: remove mmc platform data dma_mask and initialization
  mmc: omap: remove private DMA API implementation
  mmc: omap: add DMA engine support
  mmc: omap_hsmmc: remove private DMA API implementation
  mmc: omap_hsmmc: add DMA engine support
  dmaengine: omap: add support for cyclic DMA
  dmaengine: omap: add support for setting fi
  dmaengine: omap: add support for returning residue in tx_state method
  dmaengine: add OMAP DMA engine driver
  dmaengine: sa11x0-dma: add cyclic DMA support
  dmaengine: sa11x0-dma: fix DMA residue support
  dmaengine: PL08x: ensure all descriptors are freed when channel is released
  dmaengine: PL08x: get rid of write only pool_ctr and free_txd locking
  ...
2012-08-01 16:41:07 -07:00
Russell King 2df41d0533 mtd: omap2: remove private DMA API implementation
Remove the private DMA API implementation from nand/omap2.c
making it use entirely the DMA engine API.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-31 12:06:25 +01:00
Russell King 763e735910 mtd: omap2: add DMA engine support
Add DMA engine support to the OMAP2 NAND driver.  This supplements the
private DMA API implementation contained within this driver, and the
driver can be independently switched at build time between using DMA
engine and the private DMA API.

Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-07-31 12:06:24 +01:00
Linus Torvalds 287dc4b764 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
 "More hardware support across the field including a bunch of device
  drivers.  The highlight however really are further steps towards
  device tree.

  This has been sitting in -next for ages.  All MIPS _defconfigs have
  been tested to boot or where I don't have hardware available, to at
  least build fine."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (77 commits)
  MIPS: Loongson 1B: Add defconfig
  MIPS: Loongson 1B: Add board support
  MIPS: Netlogic: early console fix
  MIPS: Netlogic: Fix indentation of smpboot.S
  MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
  MIPS: Netlogic: Remove unused pcibios_fixups
  MIPS: Netlogic: Add XLP SoC devices in FDT
  MIPS: Netlogic: Add IRQ mappings for more devices
  MIPS: Netlogic: USB support for XLP
  MIPS: Netlogic: XLP PCIe controller support.
  MIPS: Netlogic: Platform changes for XLR/XLS I2C
  MIPS: Netlogic: Platform NAND/NOR flash support
  MIPS: Netlogic: Platform changes for XLS USB
  MIPS: Netlogic: Remove NETLOGIC_ prefix
  MIPS: Netlogic: SMP wakeup code update
  MIPS: Netlogic: Update comments in smpboot.S
  MIPS: BCM63XX: Add 96328avng reference board
  MIPS: Expose PCIe drivers for MIPS
  MIPS: BCM63XX: Add PCIe Support for BCM6328
  MIPS: BCM63XX: Move the PCI initialization into its own function
  ...
2012-07-30 11:45:52 -07:00
Arnd Bergmann c1f9c4227c Merge branch 'v3.5-rc7-fixes' of git://github.com/lunn/linux into fixes
From Andrew Lunn <andrew@lunn.ch>:

* 'v3.5-rc7-fixes' of git://github.com/lunn/linux:
  ARM: Kirkwood: Replace mrvl with marvell
  ARM: Orion: fix driver probe error handling with respect to clk
  ARM: Dove: Fixup ge00 initialisation
  ARM: Kirkwood: Fix PHY disable clk problems
  ARM: Kirkwood: Ensure runit clock always ticks.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-07-25 21:37:09 +02:00
Andrew Lunn 778435045a ARM: Kirkwood: Replace mrvl with marvell
It has been decided to use marvell, not mrvl, in the compatibility
property. Search & replace.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2012-07-25 17:06:23 +02:00
Simon Baatz baffab28b1 ARM: Orion: fix driver probe error handling with respect to clk
The clk patches added code to get and enable clocks in the
respective driver probe functions.  If the probe function failed
for some reason after enabling the clock, the clock was not
disabled again in many cases.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Andrew Lumm <andrew@lunn.ch>
2012-07-25 17:06:21 +02:00
Linus Torvalds ce447f34a7 Change the default amount of eraseblocks which UBI reserves for bad block
handling from 1% to 2%, because 1% does not meet most modern flashes
 requirements. 1% was good enough in the past for old high-quality SLCs, but
 nowadays 2% is much more appropriate.
 
 Other changes are clean-ups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQDQZtAAoJECmIfjd9wqK05okP/0Ww75PeBBZ/ceJIqono73xu
 N0VM/SLYjHzHJPBa9r4SUtAVVecIwzJG43YcJ67hzAKa1xdpsEa3NA6FnDf4tkOF
 JRUefBip3e4tIfBEE2yvcmKeFzA7ZA8JbJkJTFf95LfpvngQIaZD7q1Hf2c5KcCq
 Cqw2GZg3U5FvwmPkT7C1A71WI5i1vGeNhcFGhlQnvfqRECOM2wFbX3U2ZG/Ram21
 4x3l7wKTlV8d1m3vQbt4ghWJ3JOZXTMuEHyHMOt74Vn9PYSqyzsa4sfFwDs7ysm6
 1OetOyyNb/4Vob77Aj7wyimmyMzaZdnbwXdAGBO4kBdULXBzhElVugY15pWcnSlx
 iDKF0rWBNPemvmij/uM0om4OYZhH+Pw39CfGaKvmEeGxdkhR5HD/f4IxF3f9XeUG
 zddZm0s2kRsjuFbNFABQQVph6/0iIe1evBkO86EVHlQk7k3CkDzEdLSJqUwV6PYj
 eCn6jiRRrsy/NnfRpfy8kB3rCFwRaOQtVHubSQIzX1AOSSQ1XSgloYbuMLp5odVp
 FZK6O8/zvVAMzc8kpPSJ0ETj0ks/0A5roZ7zz07pP/6HQUJBXrDm2kh3MAxzYwZY
 P7uaADSlHhwAN4CQh+I0t7nrj+5HrjhDlmk5YS2W3jB8VpYNQhlZ/StEzwdSnNZt
 iF4cdVBTvP8YrTl3O3Z7
 =uSFe
 -----END PGP SIGNATURE-----

Merge tag 'upstream-3.6-rc1' of git://git.infradead.org/linux-ubi

Pull UBI changes from Artem Bityutskiy:
 "Change the default amount of eraseblocks which UBI reserves for bad
  block handling from 1% to 2%, because 1% does not meet most modern
  flash requirements.  1% was good enough in the past for old
  high-quality SLCs, but nowadays 2% is much more appropriate.:

Other changes are clean-ups.

* tag 'upstream-3.6-rc1' of git://git.infradead.org/linux-ubi:
  UBI: harmonize the update of ubi->beb_rsvd_pebs
  UBI: trivial: fix comment of ubi_calculate_reserved function
  UBI: fix spelling of detach in debug output
  UBI: Change the default percentage of reserved PEB
2012-07-23 15:53:06 -07:00
Maarten ter Huurne 1471d41a5b MTD: NAND: JZ4740: Multi-bank support with autodetection
The platform data can now specify which external memory banks to probe
for NAND chips, and in which order. Banks that contain a NAND are used
and the other banks are freed.

Squashed version of development done in jz-2.6.38 branch.
Original patch by Lars-Peter Clausen with some bug fixes from me.
Thanks to Paul Cercueil for the initial autodetection patch.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3560/
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-07-23 13:56:20 +01:00
Shmulik Ladkani 87e773c95e UBI: harmonize the update of ubi->beb_rsvd_pebs
Currently, there are several locations where an attempt to reserve more
PEBs for bad PEB handling is made, with the same code being duplicated.

Harmonize it by introducing 'ubi_update_reserved()'.

Also, improve the debug message issued, making it more descriptive.

Artem: amended the patch a little.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-07-18 14:30:34 +03:00
Shmulik Ladkani 5c669a5bd8 UBI: trivial: fix comment of ubi_calculate_reserved function
The function name within the comment was not aligned with the actual
function name.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-07-18 13:33:03 +03:00
Peter Meerwald 2ce7be1b77 UBI: fix spelling of detach in debug output
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-07-18 10:13:41 +03:00
Richard Genoud 54de1f1c44 UBI: Change the default percentage of reserved PEB
The actual value (1%) is too low for actual NAND devices, a huge
majority of device has 2% maximum bad blocks (SLC or MLC).
(Actually it's 20 blocks on a 1024 blocks device, 40/2048...)

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
2012-07-18 10:13:41 +03:00
Knut Wohlrab 4800399e33 mtd: m25p80: Add support for serial flash STM/Micron N25Q032
Signed-off-by: Knut Wohlrab <knut.wohlrab@de.bosch.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-17 14:49:55 +01:00
Huang Shijie e0dd89c56e mtd: gpmi: update the bitflip_threshold
The origin code misses to update the bitflip_threshold when
we have already get the right ecc_strength.

The patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-17 14:48:09 +01:00
Huang Shijie c50c69402a mtd: gpmi: add on-flash BBT support for gpmi nand
add the on flash bbt support for gpmi nand driver.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-16 21:46:46 +01:00
Huang Shijie 44ed0ffdbc mtd: fix typo in comment
fix the comment for nand_bbt.c

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-16 21:45:05 +01:00
Huang Shijie 11041ae65a mtd: use MTD_OPS_PLACE_OOB macro consistently
Use the MTD_OPS_PLACE_OOB to replace the hard code "0".
Make the code more readable.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-16 21:43:17 +01:00
Gerlando Falauto 4209628843 mtd: cfi_cmdset_0002: Micron M29EW bugfixes as per TN-13-07
Fix the following issues with Micron's (formerly Numonyx)
M29EW NOR flash chips, as documented on TN-13-07:
- Correcting Erase Suspend Hang Ups (page 20)
- Resolving the Delay After Resume Issue (page 22)

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-16 21:37:15 +01:00
Fabio Estevam 4d363b5518 mtd: mxc_nand: Select the driver via ARCH_MXC
With device tree support in place, we should not use IMX_HAVE_PLATFORM_MXC_NAND
as a dependency for selecting the mxc_nand driver.

Use ARCH_MXC symbol instead, so that the driver can be even selected when a single device-tree
machine is selected.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-16 21:34:37 +01:00
David Howells 9249e17fe0 VFS: Pass mount flags to sget()
Pass mount flags to sget() so that it can use them in initialising a new
superblock before the set function is called.  They could also be passed to the
compare function.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-07-14 16:38:34 +04:00
Linus Torvalds 36ec9fbfe7 Late MTD fixes for 3.5:
- fix 'sparse warning fix' regression which totally breaks MXC NAND
  - fix GPMI NAND regression when used with UBI
  - update/correct sysfs documentation for new 'bitflip_threshold' field
  - fix nandsim build failure
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk/+eiEACgkQdwG7hYl686NzvwCglK7p8xzqxwIUx/kCWlGqPZFr
 3CsAoKf9EplTp2PvTbgyEn8+Zg+pgP/Z
 =YwDa
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd

Pull late MTD fixes from David Woodhouse:
 - fix 'sparse warning fix' regression which totally breaks MXC NAND
 - fix GPMI NAND regression when used with UBI
 - update/correct sysfs documentation for new 'bitflip_threshold' field
 - fix nandsim build failure

* tag 'for-linus-20120712' of git://git.infradead.org/linux-mtd:
  mtd: nandsim: don't open code a do_div helper
  mtd: ABI documentation: clarification of bitflip_threshold
  mtd: gpmi-nand: fix read page when reading to vmalloced area
  mtd: mxc_nand: use 32bit copy functions
2012-07-13 09:56:26 -07:00
Roland Stigge 79f9df7c00 mtd: lpc32xx_mlc: Adjust to pl08x DMA interface changes
This patch adjusts the LPC32xx MLC NAND driver to the new pl08x DMA interface,
fixing the compile error resulting from changed pl08x structures.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-By: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-13 16:27:34 +01:00
Roland Stigge 314a15664e mtd: lpc32xx_slc: Adjust to pl08x DMA interface changes
This patch adjusts the LPC32xx SLC NAND driver to the new pl08x DMA interface,
fixing the compile error resulting from changed pl08x structures.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-By: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-13 16:27:24 +01:00
Linus Torvalds af9b9a53fa Two MTD fixes for 3.5:
- Fix a logic error in OLPC CAFÉ NAND ready() function.
 - Fix regression due to bitflip handling changes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk/265wACgkQdwG7hYl686MWGgCfdnxPKE/cJnjVm5wxlp+hTBLv
 tbsAn3hpmrXhZNYNhQ+U34RDpw8V7SYc
 =IEqd
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd

Pull two MTD fixes from David Woodhouse:
 - Fix a logic error in OLPC CAFÉ NAND ready() function.
 - Fix regression due to bitflip handling changes.

* tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd:
  mtd: cafe_nand: fix an & vs | mistake
  mtd: nand: initialize bitflip_threshold prior to BBT scanning
2012-07-06 10:34:48 -07:00
Vipin Kumar 2c99b8bfb2 mtd: spear_smi: handle return value of timeouts properly
Handle timouts in general and return value of
'wait_event_interruptible_timeout' in particular, to capture all
conditions.

'wait_event_interruptible_timeout' returns either of the following three
values :-
   * 0               - time out occurred.
   * negative
      * -ERESTARTSYS - return because of a signal
      * other        - for a real error
   * positive        - time remaining

Fix particularly 'ERESTARTSYS' condition which is not properly handled
by the smi driver at a couple of places leading to an erroneous
situation.

Signed-off-by: Antonio BORNEO <antonio.borneo@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:27:48 +01:00
Shiraz Hashim 4dc48c37d1 mtd: spear_smi: clear status register on init
It was observed that sometimes smi returned errors while resume from
suspend.

For safety reasons clear status register for any errors during init. In
absence of it smi can return failures during command transmissions.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:27:38 +01:00
Viresh Kumar 770daa4337 mtd: spear_smi: Move suspend/resume to follow dev_pm_ops
Use dev_pm_ops to support PM specific callbacks.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:27:26 +01:00
Roland Stigge 70f7cb78ec mtd: add LPC32xx MLC NAND driver
This patch adds a driver for the MLC NAND controller of the LPC32xx SoC.

[dwmw2: 21st century pedantry]

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:27:04 +01:00
Roland Stigge d5842ab730 mtd: lpc32xx_slc: Make probe() return -EPROBE_DEFER if necessary
Via of_get_named_gpio(), wp_gpio can become -EPROBE_DEFER which now makes
probe() return -EPROBE_DEFER as well to wait until the gpio controller is
probed before trying to probe lpc32xx_slc again.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:25:25 +01:00
Roland Stigge 21535ab39a mtd: lpc32xx_slc: Use of_get_named_gpio()
This patch makes the lpc32xx_slc driver use of_get_named_gpio() instead of
of_get_named_gpio_flags() whose flags are discarded anyway.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:25:16 +01:00
Alexandre Pereira da Silva df63fe7657 mtd: lpc32xx_slc: Make wp gpio optional
This patch supports missing wp gpio.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-07-06 18:24:56 +01:00
Josh Wu 1c7b874d33 mtd: at91: atmel_nand: add Programmable Multibit ECC controller support
The Programmable Multibit ECC (PMECC) controller is a programmable binary
BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. This controller
can be used to support both SLC and MLC NAND Flash devices. It supports to
generate ECC to correct 2, 4, 8, 12 or 24 bits of error per sector of data.

To use PMECC in this driver, the user needs to set the address and size of
PMECC, PMECC error location controllers and ROM. And also needs to pass the
correction capability, the sector size and ROM lookup table offsets via dt.

This driver has been tested on AT91SAM9X5-EK and AT91SAM9N12-EK with JFFS2,
YAFFS2, UBIFS and mtd-utils.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:23:25 +01:00
Josh Wu a41b51a1f7 mtd: at91: add dt parameters for Atmel PMECC
Add DT support for PMECC parameters.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:21:09 +01:00
Paul Gortmaker fae255253b mtd: delete SBC82xx/SBC8560 MTD mapping support
The SBC8260 support was dropped back when we moved from ppc to
powerpc.  We are now also dropping the support for the EOL SBC8560,
so we can also delete this mapping support, as they were the only
users of it.

Artem: also remove the symbol from the Makefile.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:20:38 +01:00
Marek Vasut b8c2d652f4 mtd: fix bogus inequation
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:55 +01:00
Brian Norris 718894ad94 mtd: nand_bbt: refactor check_pattern_no_oob()
This function only returns 0 or -1, so make that clear.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:08 +01:00
Brian Norris 9fd6b37a08 mtd: nand: rename "no_bbt" descriptors to "no_oob"
These descriptors are for BBT's that don't use OOB; the "no_bbt" name doesn't
really make sense.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:08 +01:00
Richard Genoud 947c9adb42 mtd: nand: remove stale config options
The commit bf4289cba0 removed the use of
CONFIG_MTD_NAND_ATMEL_ECC_NONE and CONFIG_MTD_NAND_ATMEL_ECC_HW but the
Kconfig file was forgotten.

This patch remove those inoperative options.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:08 +01:00
Brian Norris 9d9a881162 mtd: nand: change "AMD" manuf. ID to "AMD/Spansion"
This manufacturer ID is used under the name Spansion.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:08 +01:00
Paul Bolle 2e61c3a577 mtd: chips: reorganize Kconfig help on swapping
The Kconfig help on "Flash cmd/query data swapping" still mentions
LART_ENDIAN_BYTE. That option used to be relevant for setting
CONFIG_MTD_CFI_LART_BIT_SWAP. That option and macro got both removed in
v2.4.11-pre4. So, although LART endianness sounds intriguing, that part
of the help text can be removed.

And, while we're touching this choice, move the help text up one level.
Currently it's available under the "NO" option, while it's relevant for
all three options.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Chunhe Lan a5b2d76d72 mtd: m25p80: Add support for Atmel at45db081d
Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Roland Stigge 2944a44da0 mtd: add LPC32xx SLC NAND driver
This patch adds support for the SLC NAND controller inside the LPC32xx SoC.

[dwmw2: 21st century pedantry]

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Josh Wu fdbad98dff mtd: nand: teach write_page and write_page_raw return an error code
There is an implemention of hardware ECC write page function which may return an
error indication.
For instance, using Atmel HW PMECC to write one page into a nand flash, the hardware
engine will compute the BCH ecc code for this page. so we need read a the
status register to theck whether the ecc code is generated.
But we cannot assume the status register always can be ready, for example,
incorrect hardware configuration or hardware issue, in such case we need
write_page() to return a error code.

Since the definition of 'write_page' function in struct nand_ecc_ctrl is 'void'.
So this patch will:
  1. add return 'int' value for 'write_page' function.
  2. to be consitent, add return 'int' value for 'write_page_raw' fuctions too.
  3. add code to test the return value, and if negative, indicate an
  error happend when write page with ECC.
  4. fix the compile warning in all impacted nand flash driver.

Note: I couldn't compile-test all of these easily, as some had ARCH dependencies.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Josh Wu 3dfe41a4c7 mtd: at91: extract hw ecc initialization to one function
This patch moves hw ecc initialization code to one function.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Alexandre Pereira da Silva 95c1b0ce2a mtd: m25p80: Add support for n25q064
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:07 +01:00
Alexandre Pereira da Silva 943b35a6da mtd: m25p80: Add support for m25pe20
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:06 +01:00
Shmulik Ladkani 7bb9c75436 mtd: nand: Use the mirror BBT descriptor when reading its version
The code responsible for reading the version of the mirror bbt was
incorrectly using the descriptor of the main bbt.

Pass the mirror bbt descriptor to 'scan_read_raw' when reading the
version of the mirror bbt.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: stable@vger.kernel.org [v2.6.37+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:06 +01:00
Sascha Hauer 71718a8edf mtd: mxc_nand: add i.MX53 support
The only relevant change between i.MX51 and i.MX53 is that
a bitfield is shifted one bit to the left.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:06 +01:00
Sascha Hauer 71885b650a mtd: mxc_nand: swap iomem resource order
The i.MX v3 nand controller (i.MX5) needs two memory resources.
Traditionally we have the AXI resource first. For sorting in this
driver into the devicetree it feels much more natural to have the
IP resource first. This patch swaps the ordering of these two
resources.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:06 +01:00
Sascha Hauer e4a09cbf2d mtd: mxc_nand: Use managed resources
To make the error path simpler and to make subsequent patches
easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:05 +01:00
Scott Wood 874d72c4fe mtd: elbc nand: use drvdata to only remove the relevant chip
Previously the remove method was looping and removing all chips,
which is obviously not the right thing to do — left over from when
the driver was organized differently and that was the remove method for
the entire controller.  This would result in bad things happening if
you have more than one NAND chip, and remove the module.

This also fixes priv->dev to properly point to the chip's device rather than
the controller's.  Until now priv->dev was only used for error/debug prints
(and it's an improvement there), so this shouldn't break anything.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:05 +01:00
ing. Federico Fuga 9d6367f4f7 mtd: add JEDEC ID for w25q32dw to chip table
Adds JEDEC ID for the 1.8V version of WinBond w25q32.

Signed-off-by: Federico Fuga <fuga@studiofuga.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:05 +01:00
Fabio Estevam 3d059693f6 nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare
Prepare the clock before enabling it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:05 +01:00
Brian Norris 1696e6bc2a mtd: nand: kill NAND_NO_READRDY
According to its documentation, the NAND_NO_READRDY option is always used
when autoincrement is not supported. Autoincrement support was recently
dropped, so we can drop this options as well (defaulting to "no read ready
check").

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:05 +01:00
Brian Norris b1ccfab31a mtd: nand: add Eon Silicon Solutions manufacturer ID
Eon's new NAND flash: EN27LN1G08.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:04 +01:00
Artem Bityutskiy bfea1d4ee5 mtd: tests: use random32 instead of home-brewed generator
This is a clean-up patch which removes the own pseudo-random numbers generator
from the speed- and stress-tests and makes them use the 'random32()' generator
instead.

[dwmw2: Merge later fix for negative offsets]

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:04 +01:00
Bastian Hecht 3166df0d04 mtd: sh_flctl: Use user oob data in hardware ECC mode
In hardware ecc mode, the flctl now writes and reads the oob data
provided by the user. Additionally the ECC is now returned in normal
page reads, not only when using the explicit NAND_CMD_READOOB command.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:04 +01:00
Bastian Hecht 6667a6d58e mtd: sh_flctl: Restructure the hardware ECC handling
There are multiple reasons for a rewrite:
 - a race exists: when _4ECCEND is set, _4ECCFA may become true too
   meanwhile, which is lost and a non-correctable error is treated as
   correctable.
 - the ECC statistics don't get properly propagated to the base code.
 - empty pages would get marked as corrupted

The rewrite resolves the issues and I hope it gives a more explicit
code flow structure.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:04 +01:00
Bastian Hecht 623c55caa3 mtd: sh_flctl: Group sector accesses into a single transfer
When we use hardware ecc, the flctl is run in so-called "sector access
mode". We can bundle 4 sector accesses when using 2KiB page sizes to read
a whole page at once and speed up things.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:04 +01:00
Bastian Hecht 50ed399cc3 mtd: sh_flctl: Simplify the hardware ecc page read/write
As the equation mtd->writesize == eccsteps * eccsize holds, we can
simplify the code. The second loop of the 1st hunk is never entered,
so we delete it.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:03 +01:00
Bastian Hecht ef4ce0bcb3 mtd: sh_flctl: Fix hardware ECC behaviour
The flctl uses 10 bytes ECC data for every 512 bytes sector. This patch
makes the controller write all 40 bytes instead of 10 bytes only.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:03 +01:00
Bastian Hecht aa32d1f060 mtd: sh_flctl: Use different OOB layout
The flctl hardware has changed and a new OOB layout must be adapted for
2KiB page size NAND chips when using hardware ECC.
The related bit fields ECCPOS[0-2] are gone — the bits are marked as
reserved now in the datasheet. As there are no official users of the
hardware ECC so far, they are completely removed.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:03 +01:00
Bastian Hecht 3c7ea4eccf mtd: sh_flctl: Add support for error IRQ
When the data transfer between the controller and the NAND chip fails,
we now get notified.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:03 +01:00
Bastian Hecht cb54751d7a mtd: sh_flctl: Add missing iounmap()
Add the unmapping for the error case and for the driver removal.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:03 +01:00
Brian Norris 271b874ba1 mtd: nand: gpmi: need to use {read,write}_oob_raw
This patch is simply an added warning in the comments. Ideally, this patch
need not be merged, but rather, a developer will write a proper solution
that can use the ecc.read_oob_raw and ecc.write_oob_raw interfaces.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:02 +01:00
Brian Norris b9bc815c2c mtd: cafe_nand: spelling mistake
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:02 +01:00
Brian Norris 9cb93fbb5e mtd: mtdoops: refactor loop
We can clean up the loop logic a bit, here. This refactoring was enabled
in part by:

 Commit bb4a09866 [mtdoops: clean-up new MTD API usage]

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:17:02 +01:00
Brian Norris d2d48480d1 mtd: move mtd_read_oob() definition out of mtd.h
mtd_read_oob() will be expanded a little, so don't leave it in the header
as a static inline function.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 18:16:24 +01:00
Herton Ronaldo Krzesinski 596fd46268 mtd: nandsim: don't open code a do_div helper
We don't need to open code the divide function, just use div_u64 that
already exists and do the same job. While this is a straightforward
clean up, there is more to that, the real motivation for this.

While building on a cross compiling environment in armel, using gcc
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), I was getting the following build
error:

ERROR: "__aeabi_uldivmod" [drivers/mtd/nand/nandsim.ko] undefined!

After investigating with objdump and hand built assembly version
generated with the compiler, I narrowed __aeabi_uldivmod as being
generated from the divide function. When nandsim.c is built with
-fno-inline-functions-called-once, that happens when
CONFIG_DEBUG_SECTION_MISMATCH is enabled, the do_div optimization in
arch/arm/include/asm/div64.h doesn't work as expected with the open
coded divide function: even if the do_div we are using doesn't have a
constant divisor, the compiler still includes the else parts of the
optimized do_div macro, and translates the divisions there to use
__aeabi_uldivmod, instead of only calling __do_div_asm -> __do_div64 and
optimizing/removing everything else out.

So to reproduce, gcc 4.6 plus CONFIG_DEBUG_SECTION_MISMATCH=y and
CONFIG_MTD_NAND_NANDSIM=m should do it, building on armel.

After this change, the compiler does the intended thing even with
-fno-inline-functions-called-once, and optimizes out as expected the
constant handling in the optimized do_div on arm. As this also avoids a
build issue, I'm marking for Stable, as I think is applicable for this
case.

Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Cc: stable@vger.kernel.org
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 16:59:33 +01:00
Sascha Hauer 6023813a2d mtd: gpmi-nand: fix read page when reading to vmalloced area
The gpmi-nand driver uses virt_addr_valid() to check whether a buffer
is suitable for dma. If it's not, a driver allocated buffer is used
instead. Then after a page read the driver allocated buffer must be
copied to the user supplied buffer. This does not happen since commit
7725cc8593.

This patch fixes the issue. The bug is encountered with UBI which uses a
vmalloced buffer for the volume table.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: snijsure@grid-net.com
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 15:06:23 +01:00
Sascha Hauer 096bcc231f mtd: mxc_nand: use 32bit copy functions
The following commit changes the function used to copy from/to
the hardware buffer to memcpy_[from|to]io. This does not work
since the hardware cannot handle the byte accesses used by these
functions. Instead of reverting this patch introduce 32bit
correspondents of these functions.

| commit 5775ba36ea9c760c2d7e697dac04f2f7fc95aa62
| Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| Date:   Tue Apr 24 10:05:22 2012 +0200
|
|    mtd: mxc_nand: fix several sparse warnings about incorrect address space
|
|     Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|     Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 15:06:18 +01:00
Dan Carpenter 48f8b64129 mtd: cafe_nand: fix an & vs | mistake
The intent here was clearly to set result to true if the 0x40000000 flag
was set.  But instead there was a | vs & typo and we always set result
to true.

Artem: check the spec at
wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
and this fix looks correct.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-07-06 14:27:13 +01:00
Richard Genoud b4084bcf5a ARM: at91/defconfig: Remove unaffected config option
The commit bf4289cba0 removed the use of
CONFIG_MTD_NAND_ATMEL_ECC_NONE and CONFIG_MTD_NAND_ATMEL_ECC_HW but the
Kconfig file was forgotten.

This patch remove those inoperative options.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2012-07-02 16:17:47 +02:00
Linus Torvalds 9a7c6b73c4 Fix the debugfs regression - we never enable it because incorrect
'IS_ENABLED()' macro usage: should be 'IS_ENABLED(CONFIG_DEBUG_FS)',
 but we had 'IS_ENABLED(DEBUG_FS)'. Also fix incorrect assertion.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP7Hx+AAoJECmIfjd9wqK04FEP/3NC0qMlleuEcHv9AFwOJ1PB
 rn1PDjz6kuEjZ1/xhGFoboBOUj577qyzIP6IvG7MqSH66Yc8gBF+sPbKWWglx7wB
 i2y7/Fi4lHM3w59GfvnOhdI7McklhPyl3R183MZ3EBJk4V0LPi2rXsl7G5puLNgG
 XkJuOjXLXZPgyeMR+DlBsoaaxBMihnh/pdpUAyLER1cQdzQwCzba82tNrMgnCp7i
 TIFTPtn+LmEQyHcqXx5ub/FV6BiEUXIJbkKlp5Ajqyh/olSNtGdCHRrP5MXpU2kI
 DmtyMvp+3PBHxrUYQjXT6uerL9uXhIUyRv49qO0tS68fUg44JCFflmPkoV9qEvvl
 ADbOqklx1DWdVCiZdhXWe1GFhf6U+TOoUyeiIzGIy0fIIlycNl915F4LzxVUqQKm
 yoqouEvzqd1LIAsopakF2DDIKoK6ViWmHBkuN04B+u+iab4DC4aX3vgxq+Ie8mqA
 0QNIamovk/2MR2665XhbARu0yDSEmGZvD6dkuSAgXIxjw7tdvvlY7pkSouWTOSR0
 fbqPrhgbRON+mT4Fcrb5dMq+PAiOTw5kp7az90+U6i1oLm5TY8CaHt3UvmdspOM/
 UeHRhLR8o/RhfnvnexiOxIWtQGCX+CCuePe9oN/fQabj9dfvKI1iR+zoyheFLwiT
 HxaU6I7oVYQVkeifNJVV
 =iZTv
 -----END PGP SIGNATURE-----

Merge tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs

Pull ubi/ubifs fixes from Artem Bityutskiy:
 "Fix the debugfs regression - we never enable it because incorrect
  'IS_ENABLED()' macro usage: should be 'IS_ENABLED(CONFIG_DEBUG_FS)',
  but we had 'IS_ENABLED(DEBUG_FS)'.  Also fix incorrect assertion."

* tag 'upstream-3.5-rc5' of git://git.infradead.org/linux-ubifs:
  UBI: correct usage of IS_ENABLED()
  UBIFS: correct usage of IS_ENABLED()
  UBIFS: fix assertion
2012-06-28 11:41:43 -07:00
Brian Norris 903e0e4ef9 UBI: correct usage of IS_ENABLED()
Commit "e9b4cf2 UBI: fix debugfs-less systems support" fixed one
regression but introduced a different regression - the debugfs is now always
compiled out. Root cause: IS_ENABLED() arguments should be used with the
CONFIG_* prefix.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-06-27 14:22:15 +03:00
Geert Uytterhoeven 363737d664 mtd/uclinux: Use generic __bss_stop instead of _ebss
The standard (see BSS_SECTION() in <asm-generic/vmlinux.lds.h> and
<asm-generic/sections.h>) symbol for the end of BSS is __bss_stop.
This allows to remove all local declarations that have been added to
several architectures just to please CONFIG_MTD_UCLINUX.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Greg Ungerer <gerg@uclinux.org>
2012-06-27 09:59:43 +02:00
Kay Sievers e2ae715d66 kmsg - kmsg_dump() use iterator to receive log buffer content
Provide an iterator to receive the log buffer content, and convert all
kmsg_dump() users to it.

The structured data in the kmsg buffer now contains binary data, which
should no longer be copied verbatim to the kmsg_dump() users.

The iterator should provide reliable access to the buffer data, and also
supports proper log line-aware chunking of data while iterating.

Signed-off-by: Kay Sievers <kay@vrfy.org>
Tested-by: Tony Luck <tony.luck@intel.com>
Reported-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Tested-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:53:59 -07:00
Shmulik Ladkani ea3b2ea24e mtd: nand: initialize bitflip_threshold prior to BBT scanning
As of edbc454 [mtd: driver _read() returns max_bitflips; mtd_read()
returns -EUCLEAN], 'mtd->bitflip_threshold' must be set for mtd devices
having ECC, prior any 'mtd_read()' call.
Otherwise, 'mtd_read()' will falsely return -EUCLEAN.

Normally, 'mtd->bitflip_threshold' is initialized when the MTD is added.

However, this is too late for NAND MTDs, as 'scan_bbt()' is invoked
prior the existing initialization of 'mtd->bitflip_threshold'.

This is a problem since 'scan_bbt()' calls 'mtd_read()', in the case
of a flash-based bad block table.
It resulted in a falsely reported bitflips indication during BBT read,
which lead to constant scrubbing of the flash BBT blocks.

Initialize 'mtd->bitflip_threshold' to its default value (if not already
set by the driver), prior to invocation of 'scan_bbt()'.

Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-06-09 12:02:04 +01:00
Artem Bityutskiy 12027f1b3f UBI: correct ubi_wl_flush locking
Commit "62f38455 UBI: modify ubi_wl_flush function to clear work queue for a lnum"
takes the 'work_sem' semaphore in write mode for the entire loop, which is not
very good because it will block other workers for potentially long time. We do
not need to have it in write mode - read mode is enough, and we do not need to
hole it over the entire loop. So this patch turns changes the locking: takes
'work_sem' in read mode and pushes it down to the loop.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-06-07 15:22:21 +03:00
Artem Bityutskiy e9b4cf2094 UBI: fix debugfs-less systems support
Commit "aa44d1d UBI: remove Kconfig debugging option" broke UBI and it
refuses to initialize if debugfs (CONFIG_DEBUG_FS) is disabled. I incorrectly
assumed that debugfs files creation function will return success if debugfs
is disabled, but they actually return -ENODEV. This patch fixes the issue.

Reported-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tested-by: Paul Parsons <lost.distance@yahoo.com>
2012-06-07 10:43:54 +03:00
Linus Torvalds f5e7e844a5 - More robust parsing especially of xattr data in JFFS2
- Updates to mxc_nand and gpmi drivers to support new boards and device tree
  - Improve consistency of information about ECC strength in NAND devices
  - Clean up partition handling of plat_nand
  - Support NAND drivers without dedicated access to OOB area
  - BCH hardware ECC support for OMAP
  - Other fixes and cleanups, and a few new device IDs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk/JG1wACgkQdwG7hYl686M80wCglN4kutx20j+KJWuZofkr9Hog
 weEAoI4jrqEWEdW9EcT2CIWQw7eG+1v+
 =7tdo
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd

Pull mtd update from David Woodhouse:
 - More robust parsing especially of xattr data in JFFS2
 - Updates to mxc_nand and gpmi drivers to support new boards and device tree
 - Improve consistency of information about ECC strength in NAND devices
 - Clean up partition handling of plat_nand
 - Support NAND drivers without dedicated access to OOB area
 - BCH hardware ECC support for OMAP
 - Other fixes and cleanups, and a few new device IDs

Fixed trivial conflict in drivers/mtd/nand/gpmi-nand/gpmi-nand.c due to
added include files next to each other.

* tag 'for-linus-3.5-20120601' of git://git.infradead.org/linux-mtd: (75 commits)
  mtd: mxc_nand: move ecc strengh setup before nand_scan_tail
  mtd: block2mtd: fix recursive call of mtd_writev
  mtd: gpmi-nand: define ecc.strength
  mtd: of_parts: fix breakage in Kconfig
  mtd: nand: fix scan_read_raw_oob
  mtd: docg3 fix in-middle of blocks reads
  mtd: cfi_cmdset_0002: Slight cleanup of fixup messages
  mtd: add fixup for S29NS512P NOR flash.
  jffs2: allow to complete xattr integrity check on first GC scan
  jffs2: allow to discriminate between recoverable and non-recoverable errors
  mtd: nand: omap: add support for hardware BCH ecc
  ARM: OMAP3: gpmc: add BCH ecc api and modes
  mtd: nand: check the return code of 'read_oob/read_oob_raw'
  mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw'
  mtd: m25p80: Add support for Winbond W25Q80BW
  jffs2: get rid of jffs2_sync_super
  jffs2: remove unnecessary GC pass on sync
  jffs2: remove unnecessary GC pass on umount
  jffs2: remove lock_super
  mtd: gpmi: add gpmi support for mx6q
  ...
2012-06-01 16:55:42 -07:00
Sascha Hauer 4a43faf54e mtd: mxc_nand: move ecc strengh setup before nand_scan_tail
Since commit 6a918bade9, the mxc_nand driver
fails with:

Driver must set ecc.strength when using hardware ECC

This is because nand_scan_tail checks for correct ecc strength
settings, so we must set them up before nand_scan_tail.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable@vger.kernel.org [3.4+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-06-01 20:23:29 +01:00
Gabor Juhos 2e24e32e27 mtd: block2mtd: fix recursive call of mtd_writev
The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.

This is caused by 1dbebd3256
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: stable@kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-06-01 20:23:19 +01:00
Marek Vasut 5636ce0f07 mtd: gpmi-nand: define ecc.strength
Fix an issue which was introduced by the recent addition of ecc.strength.

The ecc.strength wasn't set in gpmi-nand, resulting in the following crash:
[    2.550000] kernel BUG at drivers/mtd/nand/nand_base.c:3347!
...
[    2.550000] [<c020841c>] (nand_scan_tail+0x328/0x650) from [<c02f68e0>] (gpmi_nand_probe+0x43c/0x5a4)
[    2.550000] [<c02f68e0>] (gpmi_nand_probe+0x43c/0x5a4) from [<c01f6618>] (platform_drv_probe+0x14/0x18)
[    2.550000] [<c01f6618>] (platform_drv_probe+0x14/0x18) from [<c01f55b0>] (driver_probe_device+0x74/0x1fc)
[    2.550000] [<c01f55b0>] (driver_probe_device+0x74/0x1fc) from [<c01f57cc>] (__driver_attach+0x94/0x98)
[    2.550000] [<c01f57cc>] (__driver_attach+0x94/0x98) from [<c01f3d40>] (bus_for_each_dev+0x50/0x80)
[    2.550000] [<c01f3d40>] (bus_for_each_dev+0x50/0x80) from [<c01f4e18>] (bus_add_driver+0x188/0x25c)
[    2.550000] [<c01f4e18>] (bus_add_driver+0x188/0x25c) from [<c01f5a70>] (driver_register+0x78/0x138)
[    2.550000] [<c01f5a70>] (driver_register+0x78/0x138) from [<c043dc7c>] (gpmi_nand_init+0xc/0x30)
[    2.550000] [<c043dc7c>] (gpmi_nand_init+0xc/0x30) from [<c0008824>] (do_one_initcall+0x108/0x17c)
[    2.550000] [<c0008824>] (do_one_initcall+0x108/0x17c) from [<c042a8b8>] (kernel_init+0xfc/0x1bc)
[    2.550000] [<c042a8b8>] (kernel_init+0xfc/0x1bc) from [<c000fab4>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-06-01 20:22:21 +01:00
Frank Svendsboe 2e929d001e mtd: of_parts: fix breakage in Kconfig
MTD_OF_PARTS and the default setting is not working due to using 'Y'
instead of 'y', introduced in commit
d6137badef. This made our board, and
possibly other boards using DTS defined partitions and not having
CONFIG_MTD_OF_PARTS=y defined in the defconfig, fail to mount root.

Signed-off-by: Frank Svendsboe <frank.svendsboe@gmail.com>
Cc: stable@kernel.org [3.2+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-06-01 20:06:59 +01:00
Linus Torvalds 7e5b2db77b Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
 "The whole series has been sitting in -next for quite a while with no
  complaints.  The last change to the series was before the weekend the
  removal of an SPI patch which Grant - even though previously acked by
  himself - appeared to raise objections.  So I removed it until the
  situation is clarified.  Other than that all the patches have the acks
  from their respective maintainers, all MIPS and x86 defconfigs are
  building fine and I'm not aware of any problems introduced by this
  series.

  Among the key features for this patch series is a sizable patchset for
  Lantiq which among other things introduces support for Lantiq's
  flagship product, the FALCON SOC.  It also means that the opensource
  developers behind this patchset have overtaken Lantiq's competing
  inhouse development team that was working behind closed doors.

  Less noteworthy the ath79 patchset which adds support for a few more
  chip variants, cleanups and fixes.  Finally the usual dose of tweaking
  of generic code."

Fix up trivial conflicts in arch/mips/lantiq/xway/gpio_{ebu,stp}.c where
printk spelling fixes clashed with file move and eventual removal of the
printk.

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (81 commits)
  MIPS: lantiq: remove orphaned code
  MIPS: Remove all -Wall and almost all -Werror usage from arch/mips.
  MIPS: lantiq: implement support for FALCON soc
  MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
  MTD: MIPS: lantiq: implement OF support
  watchdog: MIPS: lantiq: implement OF support and minor fixes
  SERIAL: MIPS: lantiq: implement OF support
  GPIO: MIPS: lantiq: convert gpio-stp-xway to OF
  GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio
  GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder
  MIPS: pci: convert lantiq driver to OF
  MIPS: lantiq: convert dma to platform driver
  MIPS: lantiq: implement support for clkdev api
  MIPS: lantiq: drop ltq_gpio_request() and gpio_to_irq()
  OF: MIPS: lantiq: implement irq_domain support
  OF: MIPS: lantiq: implement OF support
  MIPS: lantiq: drop mips_machine support
  OF: PCI: const usage needed by MIPS
  MIPS: Cavium: Remove smp_reserve_lock.
  MIPS: Move cache setup to setup_arch().
  ...
2012-05-29 18:27:19 -07:00
Dmitry Maluka 34a5704d91 mtd: nand: fix scan_read_raw_oob
It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which
should cause wrong functioning of NAND_BBT_SCANALLPAGES option.

Artem: the patch did not apply and I had to amend it a bit.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org
2012-05-29 11:14:58 +03:00
Robert Jarzmik 52c2d9aad4 mtd: docg3 fix in-middle of blocks reads
Corner case reads do not work, and return false data and
ECC. This case is typically seen in a ubifs usage, with a
read of type:
 - docg3 docg3: doc_read_oob(from=14882415, mode=1,
 data=(c30eca40:12), oob=(  (null):0))

This results in the following reads:
 - docg3 docg3: doc_read_data_area(buf=  (null), len=111)
 - docg3 docg3: doc_read_data_area(buf=c30eca40, len=12)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=389)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=0)
 - docg3 docg3: doc_read_data_area(buf=  (null), len=16)

If we suppose that the pages content is :
 - bytes 0 .. 111   : 0x0a
 - bytes 112 .. 255 : 0x0f
Then the returned bytes will be :
 - 111 times 0x0a (correct)
 - 0x0a 2 times and 0x0f 10 times (incorrect, should be
 0x0a,0x0f)
 - 0x0f 389 times (correct)
 - nothing
 - correct OOB

The reason seams that the first 111 bytes read ends between
the 2 docg3 planes, and that the first following read (in
the 12 bytes sequence, read of 16 bit word) returns the byte
of the rightmost plane duplicated in high and lower byte of
the word.

Fix this behaviour by ensuring that if the previous read
ended up in-between the 2 planes, there will be a first 1
byte read to get back to the beginning of leftmost plane.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-29 11:14:51 +03:00
Linus Torvalds 2795343705 arm-soc: clock driver changes
The new clock subsystem was merged in linux-3.4 without any users, this
 now moves the first three platforms over to it: imx, mxs and spear.
 
 The series also contains the changes for the clock subsystem itself,
 since Mike preferred to have it together with the platforms that require
 these changes, in order to avoid interdependencies and conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuexPAAoJEIwa5zzehBx3YBsP/0nFhXjb5t1PdLfFzGKtcZVB
 j4zXWXMHQ1fA7wIfEpZF3Nnco6MQkufF5wJPoPdn1+wmkzCn3D6IwNVWVtW4U5i9
 VGyShSbgusAAYXUe/9yYj8eN+bbRQSvdN4eWYWU6+rRXShGZ5dZZmp+IPNl54dnW
 6F8uCnHX0cnIMCpGqV+41zZgZ/4wL2k9gdqu0LO6pi07o4tGd0Z4gcySgUFAnn1R
 kofNHueYIP4UgOg8DREoBzVKlpRqMou3S2kSZUfMeb3Q9ryF7UIvaGqIILyi7PKL
 kWd3nptg0EPavfL21SwXHiGpnDpB/Gj/F70kcPLus5RYujB24C9bvBmc26z68NZx
 Sz9mbElkkIU5duZsl1nxBWJ8IZ/tSWdtmC2xQMznmV7gHyGgVwr4j47f4Uv5sBvM
 14JHDO7mqN6E6FnTFZu/oPAN5pDjgL+TVNK5BU6Wkq0zitrA6eyKDqCvBCqkO6Nn
 tNzOuyRDzMOwM7HzqXhxqtzJWXylO1Mldc4bM8X4Cocf4pnLna/X6uP6dgE6A+JY
 azVYx4I/0NdEPerDTzIcEhBDgZeBVROhUQr+kHxc4rf6WzUUbu/wEo1UKXWV66oW
 1jb1yAFFWqYjkQuQc2PD4JSx35sFJaoSaoneRtmzBzRDfzSr5KjKj1E0e1skyMFq
 7ZVLCqZD0cB9DhmMDkWP
 =rwFF
 -----END PGP SIGNATURE-----

Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc clock driver changes from Olof Johansson:
 "The new clock subsystem was merged in linux-3.4 without any users,
  this now moves the first three platforms over to it: imx, mxs and
  spear.

  The series also contains the changes for the clock subsystem itself,
  since Mike preferred to have it together with the platforms that
  require these changes, in order to avoid interdependencies and
  conflicts."

Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).

* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  SPEAr: Update defconfigs
  SPEAr: Add SMI NOR partition info in dts files
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock
  SPEAr: Add DT bindings for SPEAr's timer
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ...
2012-05-26 12:42:29 -07:00
Linus Torvalds 6133308ad1 UBIFS:
* Always support xattrs    (remove the Kconfig option)
    * Always support debugging (remove the Kconfig option)
    * A fix for a memory leak on error path
    * A number of clean-ups
 UBI:
    * Always support debugging (remove the Kconfig option)
    * Remove "data type" hint support
    * Huge amount of renames to prepare for the fastmap wor
    * A lot of clean-ups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuzTxAAoJECmIfjd9wqK0D/AP/iNOnYWnYZmmO18jDM48kKt/
 Jp7VTAE0l7DBUDxtiIthq4c7YxIE1o1bN9gMmvzZibvwIrZcoAOnQpeL96s1Bc9J
 t0aGm8ONvrtuyFeyxPC0aplWgqWQ49qDLGV/lIVJ+BSGmXMeU4giUIXqbsjyCPR4
 YVJJw6rLTC10EhuAUs99keJxxuN5ZMrCB8y47fD+bkalVxgqNh9JNkKabyjevt5C
 AERVWnP20hnEcwnbQWMHueGWiaqFeesTytNOy6heRi0uL3bNy5nrol7AFXKqnDc9
 OpSkApH6SCO3C8X/bIep2bL9kKiW1LpClxgDIF6p7lj2t2ToPn6PZJbP60zSHQPb
 0bgy1SzHccF3ihIMgCdOXYZ5EomBgKZyDyU6Ec+gAttE00ZbIigNmjFmukwMhO89
 I0bGvjQdKFAFSzo+ffm8xNfYjmmNfB+edLkPaVttjMWAbQ4V831ZPDT07Q11W4TQ
 2p2NDKTps3etbtkemZ/Cm1jeEWI3KuogrFhyDhpcgXc7pxlJbvMg+tt22FusoQ8T
 VPGGT+WhmXfF0ZG/gurI69k8opj4BUhm4EfGL6pGEoUMe1nGp2pSUNv5Kwby1wau
 1wElJt2qO9xdjJ4QlLc+Ux1vm8rCS1iQst9plUX1BZt2bKja7tZaW7uu4hGKqe5u
 UwrosuYcmS1Ei1Rs7Sqz
 =+6Qi
 -----END PGP SIGNATURE-----

Merge tag 'upstream-3.5-rc1' of git://git.infradead.org/linux-ubifs

Pull UBI and UBIFS updates from Artem Bityutskiy:

UBIFS:
   * Always support xattrs    (remove the Kconfig option)
   * Always support debugging (remove the Kconfig option)
   * A fix for a memory leak on error path
   * A number of clean-ups
UBI:
   * Always support debugging (remove the Kconfig option)
   * Remove "data type" hint support
   * Huge amount of renames to prepare for the fastmap wor
   * A lot of clean-ups

* tag 'upstream-3.5-rc1' of git://git.infradead.org/linux-ubifs: (54 commits)
  UBI: modify ubi_wl_flush function to clear work queue for a lnum
  UBI: introduce UBI_ALL constant
  UBI: add lnum and vol_id to struct ubi_work
  UBI: add volume id struct ubi_ainf_peb
  UBI: add in hex the value for UBI_INTERNAL_VOL_START to comment
  UBI: rename scan.c to attach.c
  UBI: remove scan.h
  UBI: rename UBI_SCAN_UNKNOWN_EC
  UBI: move and rename attach_by_scanning
  UBI: rename _init_scan functions
  UBI: amend comments after all the renamings
  UBI: rename ubi_scan_leb_slab
  UBI: rename ubi_scan_move_to_list
  UBI: rename ubi_scan_destroy_ai
  UBI: rename ubi_scan_get_free_peb
  UBI: rename ubi_scan_rm_volume
  UBI: rename ubi_scan_find_av
  UBI: rename ubi_scan_add_used
  UBI: remove unused function
  UBI: make ubi_scan_erase_peb static and rename
  ...
2012-05-22 19:30:27 -07:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Linus Torvalds f6a26ae769 arm-soc: board specific changes
While we generally attempt to get rid of board specific files and replace
 them with device tree based descriptions, a lot of platforms have not
 come that far:
 
 In shmobile, we add two new board files because their recently started
 effort to add DT support has not proceeded enough to use it for all of
 the important hardware.
 
 In Kirkwood, we are adding support for new boards with a combination of
 DT and board file contents in multiple cases.
 
 pxa/mmp and imx are extending support for existing board files but not
 adding new ones.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPueuIAAoJEIwa5zzehBx3VvAP/32RkCrrLCQoibsczjwDPQir
 ryyT/lom005tlkXFOz9SFirlyNAn0kpDuj0xZ/HL2KgZ0FPlG0OUSRBJJvLZF2vT
 qlhf3PqnM1d2Ui6+/QdU/EJyzNkMAtajgTSvp4zDZayoNomO/VTZhW0feRYChUIl
 bJx7hnFA9VXnkhORzh9+HhKwVcdhU2R1/LMDUlYxKNnFdF0/kFgw4Gkj4MnmFlyy
 NpeLP4H95SeFhKPvmXB/2lZroaRn6wCxhPhUCHShxsH3YFy0J7zaEnmHMFSOX24n
 ++6fyb0mqiJtZPwJVbF+snb/5hP4epbmkrU5+mqtDdK8HHowAsV0ScKki0wGGmka
 Im5ryCMB+NZOD57XGajkpeQGZT+m0S8NilsZ5dy75o7el7WxnMLuUMyjlIbtnfet
 3KRF22XnsyPuvldoej/RM1Eiz86qUFl3LPO63cYT+/c9aSw0+luMp+JZp+iOcAr3
 xqyiciwOTu6CIP+DnYV72CuFa2IvLA06Eb3pgtpRUwATzS9weQ33X4Q80RaUVKxX
 VfXxCcDFl7dfGwqO6HujbxI6oHmEmvBEF9eGmFW2ocVrKnWUmjlC6y9tQxfReQDV
 SZkXKEkWPo/MLFl/AM+hTjGyu88ofOG4Vos0t3YmVyTuXekpPFb2DbPCvwnFdv8N
 kX/bfsxWPBDl3EdCQU8y
 =wkmj
 -----END PGP SIGNATURE-----

Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc board specific changes from Olof Johansson:
 "While we generally attempt to get rid of board specific files and
  replace them with device tree based descriptions, a lot of platforms
  have not come that far:

  In shmobile, we add two new board files because their recently started
  effort to add DT support has not proceeded enough to use it for all of
  the important hardware.

  In Kirkwood, we are adding support for new boards with a combination
  of DT and board file contents in multiple cases.

  pxa/mmp and imx are extending support for existing board files but not
  adding new ones."

Fix up trivial conflicts in arch/arm/mach-{mmp/ttc_dkb.c,shmobile/{Kconfig,Makefile}}

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (94 commits)
  ARM: shmobile: fix smp build
  ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using devicetree
  kirkwood: Add iconnect support
  orion/kirkwood: create a generic function for gpio led blinking
  kirkwood/orion: fix orion_gpio_set_blink
  ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt
  kirkwood: Allow nand to be configured via. devicetree
  mtd: Add orion_nand devicetree bindings
  ARM: kirkwood: Basic support for DNS-320 and DNS-325
  ARM: mach-shmobile: Use DT_MACHINE for armadillo 800 eva
  ARM: mach-shmobile: Use DT_MACHINE for KZM9G
  ARM: pxa: hx4700: Add Synaptics NavPoint touchpad
  ARM: pxa: Use REGULATOR_SUPPLY macro
  ARM: mach-shmobile: kzm9g: enable SMP boot
  ARM: mach-shmobile: kzm9g: defconfig update
  ARM: mach-shmobile: kzm9g: add PCF8757 gpio-key
  ARM: mach-shmobile: kzm9g: add SDHI support
  ARM: mach-shmobile: kzm9g: add MMCIF support
  ARM: mach-shmobile: kzm9g: correct screen direction
  ARM: mach-shmobile: sh73a0.h: add GPIO_NR
  ...
2012-05-22 13:32:53 -07:00
Linus Torvalds 813a95e5b4 arm-soc: soc-specific pinctrl changes
With this, five platforms are moving to the relatively new pinctrl
 subsystem for their pin management, replacing the older soc specific
 in-kernel interfaces with common code.
 
 There is quite a bit of net addition of code for each platform being
 added to the pinctrl subsystem. but the payback comes later when adding
 new boards can be done by only providing new device trees instead.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuw1/AAoJEIwa5zzehBx3wbsP/RFCYzMVyz85BNLQuRyY9eO2
 GCRWd0Vvy3fIfypiPdHdhkq6nIU/JnxgsfBbKX9FvWqvxXi96Ojh13KSIhSI1rQ9
 t14VyuwUXaS3leeCyKxhNF1vRscz2iyEGXJqp+XEN4ckf2nrQCpKBiY5Eg9sH6/J
 fvYgSBY9Lf9nFAn+/wqSKIfdvw7H0NXwUdsLvNU0uCwvrSG929bTxx2AnHX00TdJ
 qf4XLhmatMg1uwdUgL/99ZxxgHlj6o55u7S6aRhUWXNXCimV6uEZ1F35ET37b+x3
 YUltBCIaXjFR7iwNHmkkl42d8uyfkBznB555sY5qS3G/uF5Ma1R5I7fv8EIEy+2w
 bVHsva4lj1yFazic6m8yKTET4i8n6OPiKVNqGnDsp2yb6WzOGSliKdr0Jlo1oNG2
 gS69LcDZxCkXrqEq0Ht8uUoCo9TWei+qhJ6ZOJ1Z3+9ZyFq1iRTKgPVxyA5VaHaB
 wwBbqKrohAwuExY8/gkAj6SYqBOF3l/J8QSB2JjXyj4trLC5UMq+l3L4cIWyMRPc
 fil83hV6460CiIBoKcsnV9hDUS0oh74mv52zHo0Xj73qABqZ4dcrpHVayWjtMtpl
 Z+tUpvD1rMQ+E0gdXDrwMrwILVyCDsBvpFKF4avnujDJ4WmyywtKZ+xvnpMd73VZ
 YrI/+XQsMT8ZfVkkj54D
 =HIfz
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm soc-specific pinctrl changes from Olof Johansson:
 "With this, five platforms are moving to the relatively new pinctrl
  subsystem for their pin management, replacing the older soc specific
  in-kernel interfaces with common code.

  There is quite a bit of net addition of code for each platform being
  added to the pinctrl subsystem.  But the payback comes later when
  adding new boards can be done by only providing new device trees
  instead."

Fix up trivial conflicts in arch/arm/mach-ux500/{Makefile,board-mop500.c}

* tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (61 commits)
  mtd: nand: gpmi: fix compile error caused by pinctrl call
  ARM: PRIMA2: select PINCTRL and PINCTRL_SIRF in Kconfig
  ARM: nomadik: enable PINCTRL_NOMADIK where needed
  ARM: mxs: enable pinctrl support
  video: mxsfb: adopt pinctrl support
  ASoC: mxs-saif: adopt pinctrl support
  i2c: mxs: adopt pinctrl support
  mtd: nand: gpmi: adopt pinctrl support
  mmc: mxs-mmc: adopt pinctrl support
  serial: mxs-auart: adopt pinctrl support
  serial: amba-pl011: adopt pinctrl support
  spi/imx: adopt pinctrl support
  i2c: imx: adopt pinctrl support
  can: flexcan: adopt pinctrl support
  net: fec: adopt pinctrl support
  ARM: ux500: switch MSP to using pinctrl for pins
  ARM: ux500: alter MSP registration to return a device pointer
  ARM: ux500: switch to using pinctrl for uart0
  ARM: ux500: delete custom pin control system
  ARM: ux500: switch over to Nomadik pinctrl driver
  ...
2012-05-22 09:39:42 -07:00
Linus Torvalds 9bc747bea5 arm-soc: First batch of cleanups
These cleanups are basically all over the place. The idea is to collect
 changes with minimal impact but large number of changes so we can avoid
 them from distracting in the diffstat in the other series.
 
 A significant number of lines get removed here, in particular because
 the ixp2000 and ixp23xx platforms get removed. These have never been
 extremely popular and have fallen into disuse over time with no active
 maintainer taking care of them. The u5500 soc never made it into a
 product, so we are removing it from the ux500 platform.
 
 Many good cleanups also went into the at91 and omap platforms, as has
 been the case for a number of releases.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuemiAAoJEIwa5zzehBx3L9oQAKiu0bsCiT6BM3VC5VGpluk7
 YVLH/fkYGdSUTeGrpjeaoxxZnN5M1CLwErg3DxWcyYidy0zfmqitC8t2KQxZMxuf
 bt+hn4flpFnXMNm31B9xBCXOOVAvteZHYS35FdSKGyWo5Kz2WKM8ZrrihkAA7jVi
 U75x4+shFPtIhLNg2sJg4e/9D1T14ypElB7W989NzxMtco5fbukVd6vDBHPlFDG3
 RVI2z2MbWUj3HVmdoyB+09ekruys0MQsbPOGo8D4aeJicrli/JBtL1r1w6ZZ6I8v
 Pe0+CbgemMWS69I37Zuxt35Bejpdofa8nKhT1jBrH4uHYxroKkhhx+VMTtuCcFVw
 Q2DhbbHImiW3598c0jkGi7Gk+TalTxkStMQiO3bqYAHApftdqFUgkpFSnOC/Jxgj
 Y6nUmd+GVPS+r0dDwZg4z5/AnUQd6t8Azp784muPDDxgTV1ZfdaC0LlLjdWesvMO
 x+PQib/U7NdxN5lifV6xCXpPoCQsgshrOkVUQiKVHmzaghm9MXgB8qrzXdTz3dLL
 XtR3+1KmSDTfHPSlTq/9vIN4RJtsKUnDWzNViTElEql36KzT7l5mJnBe6CJWirJh
 7JNyH0p6XDZfc2q7LgdiSU0dv/j9LzBaYUukQCyUI3Tk+5zKgAdKbYNJpRcfPuoO
 BK6OKbjCAoAHL+/nDU2s
 =Hcjs
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull first batch of arm-soc cleanups from Olof Johansson:
 "These cleanups are basically all over the place.  The idea is to
  collect changes with minimal impact but large number of changes so we
  can avoid them from distracting in the diffstat in the other series.

  A significant number of lines get removed here, in particular because
  the ixp2000 and ixp23xx platforms get removed.  These have never been
  extremely popular and have fallen into disuse over time with no active
  maintainer taking care of them.  The u5500 soc never made it into a
  product, so we are removing it from the ux500 platform.

  Many good cleanups also went into the at91 and omap platforms, as has
  been the case for a number of releases."

Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx}

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits)
  ARM: clps711x: Cleanup IRQ handling
  ARM clps711x: Removed unused header mach/time.h
  ARM: clps711x: Added note about support EP731x CPU to Kconfig
  ARM: clps711x: Added missing register definitions
  ARM: clps711x: Used own subarch directory for store header file
  Dove: Fix Section mismatch warnings
  ARM: orion5x: ts78xx debugging changes
  ARM: orion5x: remove PM dependency from ts78xx
  ARM: orion5x: ts78xx fix NAND resource off by one
  ARM: orion5x: ts78xx whitespace cleanups
  Orion5x: Fix Section mismatch warnings
  Orion5x: Fix warning: struct pci_dev declared inside paramter list
  ARM: clps711x: Combine header files into one for clps711x-targets
  ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c
  ARM: S3C24XX: Use common macro to define resources on mach-osiris.c
  ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable
  ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c
  ARM: S5PV210: Use common macro to define resources on dev-audio.c
  ARM: S5PC100: Use common macro to define resources on dev-audio.c
  ARM: S5P64X0: Use common macro to define resources on dev-audio.c
  ...
2012-05-22 09:23:24 -07:00
John Crispin fa09eded0e MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
When running on a FALC-ON SoC, we need to check the bootstrap options to see
if NOR is available.

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3815/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-21 14:31:55 +01:00
John Crispin 02fa961fbf MTD: MIPS: lantiq: implement OF support
Adds bindings for OF and make use of module_platform_driver for lantiq
based socs.

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: linux-mtd@lists.infradead.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3811/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-21 14:31:55 +01:00
Joel Reardon 62f384552b UBI: modify ubi_wl_flush function to clear work queue for a lnum
This patch modifies ubi_wl_flush to force the erasure of
particular volume id / logical eraseblock number pairs. Previous functionality
is preserved when passing UBI_ALL for both values. The locations where ubi_wl_flush
were called are appropriately changed: ubi_leb_erase only flushes for the
erased LEB, and ubi_create_volume forces only flushing for its volume id.
External code can call this new feature via the new function ubi_flush() added
to kapi.c, which simply passes through to ubi_wl_flush().

This was tested by disabling the call to do_work in ubi thread, which results
in the work queue remaining unless explicitly called to remove. UBIFS was
changed to call ubifs_leb_change 50 times for four different LEBs. Then the
new function was called to clear the queue: passing wrong volume ids / lnum,
correct ones, and finally UBI_ALL for both to ensure it was finally all
cleard. The work queue was dumped each time and the selective removal
of the particular LEB numbers was observed. Extra checks were enabled and
ubifs's integck was also run. Finally, the drive was repeatedly filled and
emptied to ensure that the queue was cleared normally.

Artem: amended the patch.

Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-21 11:34:41 +03:00
Artem Bityutskiy 05a3cb7dce UBI: introduce UBI_ALL constant
Joel will use it in his 'ubi_flush()' extention to specify all eraseblocks.
Also amend the comment for UBI_UNKNOWN - it is used beyond attaching info
structure now.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-21 11:34:41 +03:00
Joel Reardon d36e59e69b UBI: add lnum and vol_id to struct ubi_work
This is part of a multipart patch to allow UBI to force the erasure of
particular logical eraseblock numbers. In this patch, the volume id and LEB
number are added to ubi_work data structure, and both are also passed as a
parameter to schedule erase to set it appropriately. Whenever ubi_wl_put_peb
is called, the lnum is also passed to be forwarded to schedule erase. Later,
a new ubi_sync_lnum will be added to execute immediately all work related to
that lnum.

This was tested by outputting the vol_id and lnum during the schedule of
erasure. The ubi thread was disabled and two ubifs drives on separate
partitions repeated changed a small number of LEBs. The ubi module was readded,
and all the erased LEBs, corresponding to the volumes, were added to the
schedule erase queue.

Artem: minor tweaks

Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-21 11:34:41 +03:00
Joel Reardon 6dd3bc7e60 UBI: add volume id struct ubi_ainf_peb
This patch adds the volume id to struct ubi_ainf_peb when scanning the LEBs at
startup. PEBs now added to the erase queue will know their original LEB number
and volume id, if available, and will be -1 otherwise (for instance, if the VID
header is unreadable).

This was tested by creating an ubi device with 3 volumes and disabiling the
ubi_thread's do_work functionality. The different ubi volumes were formatted
to ubifs and had files created and erased.  The ubi modules was reloaded and
the list of LEB's added to the erased list was outputted, confirming the
volume ids and LEB numbers were appropriate.

Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-21 11:34:41 +03:00
Joel Reardon 5cc09420e2 UBI: add in hex the value for UBI_INTERNAL_VOL_START to comment
Explicitly provide the first internal volume ID value in the comment for
UBI_INTERNAL_VOL_START. This allows developers who, when adding features
related to volume ids and observe unexpected very large volume ids, to grep
for the observed value in the source code and find out immediately that it is
expected behaviour.

Signed-off-by: Joel Reardon <reardonj@inf.ethz.ch>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 21:30:45 +03:00
Artem Bityutskiy ae4a8104e3 UBI: rename scan.c to attach.c
Finally, rename the scan.c file. Now adding fastmap support won't look that
hacky anymore.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 21:01:28 +03:00
Artem Bityutskiy 0479ab48bb UBI: remove scan.h
This file is small and it does not make sense to have it separate from where
everything else lives, so merge it with ubi.h.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 21:01:28 +03:00
Artem Bityutskiy 9c47fb2fbe UBI: rename UBI_SCAN_UNKNOWN_EC
Rename the constant to UBI_UNKNOWN, for the same reason that we are going
to add nother attaching method and re-use the same data structures, so the
"SCAN" in the name becomes incorrect. I've also removed the "_EC" part because
Joel is going to use this constant for other fields in the attaching info data
structures.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 21:01:28 +03:00
Artem Bityutskiy 47e1ec70b2 UBI: move and rename attach_by_scanning
Rename the 'attach_by_scanning()' function to 'ubi_attach()' and move it to
scan.c. Richard will plug his fastmap stuff there.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:04 +03:00
Artem Bityutskiy 41e0cd9d4e UBI: rename _init_scan functions
We have a couple of initialization funcntionsn left which have "_scan" suffic -
rename them:

ubi_eba_init_scan() -> ubi_eba_init()
ubi_wl_init_scan() -> ubi_wl_init()

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:04 +03:00
Artem Bityutskiy fbd0107f4d UBI: amend comments after all the renamings
This patch amends commentaries in scan.[ch] to match the new logic. Reminder -
we did the restructuring to prepare the code for adding the fastmap. This patch
also renames a couple of functions - it was too difficult to separate out that
change and I decided that it is not too bad to have it in the same patch with
commentaries changes.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:04 +03:00
Artem Bityutskiy 1fc2e3e59d UBI: rename ubi_scan_leb_slab
The old name is not logical anymore - rename it to 'aeb_slab_cache'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy 0bae2887a7 UBI: rename ubi_scan_move_to_list
The old name is not logical anymore - rename it to 'ubi_move_aeb_to_list()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy 66a2af3824 UBI: rename ubi_scan_destroy_ai
The old name is not logical anymore - rename it to 'ubi_destroy_ai()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy c87fbd7deb UBI: rename ubi_scan_get_free_peb
The old name is not logical anymore - rename it to 'ubi_early_get_peb()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy d717dc2f85 UBI: rename ubi_scan_rm_volume
The old name is not logical anymore - rename it to 'ubi_remove_av()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy dcd85fdd10 UBI: rename ubi_scan_find_av
The old name is not logical anymore - rename it to 'ubi_find_av()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:03 +03:00
Artem Bityutskiy 3561188ac2 UBI: rename ubi_scan_add_used
The old name is not logical anymore - rename it to 'ubi_add_to_av()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy ee663d9292 UBI: remove unused function
The 'ubi_scan_find_aeb()' function is unused and thus can be removed.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy 13d33dad35 UBI: make ubi_scan_erase_peb static and rename
The 'ubi_scan_erase_peb()' is used only in scan.c so can be static. Also
re-name it to 'early_erase_peb()' because we tend to use "ubi_" prefix only for
non-static fuction and also because the new name is better.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy 517af48c05 UBI: rename sv to av
After re-naming the 'struct ubi_scan_volume' we should adjust all variables
named 'sv' to something else, because 'sv' stands for "scanning volume".
Let's rename it to 'av' which stands for "attaching volume" which is
a bit more consistent and has the same length, which makes re-naming easy.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy a4e6042f1d UBI: rename si to ai
After re-naming the 'struct ubi_scan_info' we should adjust all variables
named 'si' to something else, because 'si' stands for "scanning info".
Let's rename it to 'ai' which stands for "attaching info" which is
a bit more consistent and has the same length, which makes re-naming easy.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy 2c5ec5ce66 UBI: rename seb to aeb
After re-naming the 'struct ubi_scan_leb' we should adjust all variables
named 'seb' to something else, because 'seb' stands for "scanning eraseblock".
Let's rename it to 'aeb' which stands for "attaching eraseblock" which is
a bit more consistend and has the same length.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:02 +03:00
Artem Bityutskiy 55e93e55aa UBI: amend comments after renaming in scan.c
Now some commentaries are out-of-date, after we re-named the data
structures - amend them.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:01 +03:00
Artem Bityutskiy afc15a814b UBI: rename struct ubi_scan_info
Rename 'struct ubi_scan_info' to 'struct ubi_attach_info'. This is part
of the code re-structuring I am trying to do in order to add fastmap
in a more logical way. Fastmap can share a lot with scanning, including
the attach-time data structures, which all now have "scan" word in the
name. Let's get rid of this word.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:01 +03:00
Artem Bityutskiy cb28a9322d UBI: rename struct ubi_scan_volume
Rename 'struct ubi_scan_volume' to 'struct ubi_ainf_volume'. This is part
of the code re-structuring I am trying to do in order to add fastmap
in a more logical way. Fastmap can share a lot with scanning, including
the attach-time data structures, which all now have "scan" word in the
name. Let's get rid of this word and use "ainf" instead which stands
for "attach information". It has the same length as "scan" so re-naming
is trivial.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:01 +03:00
Artem Bityutskiy 227423d241 UBI: rename struct ubi_scan_leb
Rename 'struct ubi_scan_leb' to 'struct ubi_ainf_leb'. This is part
of the code re-structuring I am trying to do in order to add fastmap
in a more logical way. Fastmap can share a lot with scanning, including
the attach-time data structures, which all now have "scan" word in the
name. Let's get rid of this word and use "ainf" instead which stands
for "attach information". It has the same length as "scan" so re-naming
is trivial.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:26:01 +03:00
Artem Bityutskiy 97d6104bac UBI: rename few functions for consistency
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:01 +03:00
Artem Bityutskiy e2986827d5 UBI: get rid of dbg_err
This patch removes the 'dbg_err()' macro and we now use 'ubi_err' instead.
The idea of 'dbg_err()' was to compile out some error message to make the
binary a bit smaller - but I think it was a bad idea.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy 7bf523ae25 UBI: more of clean-up terminology for self-checks
We have the "sefl-check" feature in UBI, but for historical reasons many
corresponding functions and commentaries in the code use term "paranoid check"
instead. Let's clean this up and use "self-check" everywhere.

This patch renames functions, amends messages and kills several redundant
debugging messages.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy 8056eb4ac4 UBI: clean-up terminology for self-checks in io.c
We have the "sefl-check" feature in UBI, but for historical reasons many
corresponding functions and commentaries in the code use term "paranoid check"
instead. Let's clean this up and use "self-check" everywhere.

This patch renames functions, amends comments and messages. It touches only the
io.c file.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy aa44d1d35f UBI: remove Kconfig debugging option
This patch kills the UBI debugging Kconfig option completely and makes all the
debugging stuff to be always compiled-in. It was pain in the neck to maintain
this useless option because all users I am aware of have debugging enabled
anyway - how else will you diagnose errors otherwise?

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy 718c00bb8f UBI: rename ubi_dbg_dump_mkvol_req
I am going to remove the "UBI debugging" compilation option and make the
debugging stuff to be always compiled it. This patch is a preparation
which renames 'ubi_dbg_dump_mkvol_req()' to 'ubi_dump_mkvol_req()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy b989bd4c57 UBI: rename ubi_dbg_dump_seb
I am going to remove the "UBI debugging" compilation option and make the
debugging stuff to be always compiled it. This patch is a preparation
which renames 'ubi_dbg_dump_seb()' to 'ubi_dump_seb()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:26:00 +03:00
Artem Bityutskiy 614c74a75c UBI: rename ubi_dbg_dump_sv
I am going to remove the "UBI debugging" compilation option and make the
debugging stuff to be always compiled it. This patch is a preparation
which renames 'ubi_dbg_dump_sv()' to 'ubi_dump_sv()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:59 +03:00
Artem Bityutskiy 1f021e1de5 UBI: rename ubi_dbg_dump_vtbl_record
I am going to remove the "UBI debugging" compilation option and make the
debugging stuff to be always compiled it. This patch is a preparation
which renames 'ubi_dbg_dump_vtbl_record()' to 'ubi_dump_vtbl_record()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:59 +03:00
Artem Bityutskiy 766381f049 UBI: rename ubi_dbg_dump_vol_info
I am going to remove the "UBI debugging" compilation option and make the
debugging stuff to be always compiled it. This patch is a preparation
which renames 'ubi_dbg_dump_vol_info()' to 'ubi_dump_vol_info()'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:59 +03:00
Artem Bityutskiy 4415626732 UBI: amend commentaries WRT dtype
Richard removed the "dtype" hint, but few commentaries were left and this patch
removes them. I've also added a better description about the "dtype" field in
the ubi-user.h for people who may ever wonder what was that dtype thing about.

This patch also adds an important note that it is better to use value "3" for
the "dtype" field.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:59 +03:00
Richard Weinberger b36a261e8c UBI: Kill data type hint
We do not need this feature and to our shame it even was not working
and there was a bug found very recently.
	-- Artem Bityutskiy

Without the data type hint UBI2 (fastmap) will be easier to implement.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:59 +03:00
Richard Weinberger 0964f6a27b UBI: remove superfluous "!!" operation
!!(x < y) and (x < y) are identical expressions.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:58 +03:00
Artem Bityutskiy f01e2d1654 UBI: always warn if case of I/O errors
Currently UBI silently retries I/O operation in case of errors. This patch
makes it emit a warning before retrying. This should allow users notice issues
earlier.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:58 +03:00
Artem Bityutskiy a904e3f1de UBI: always dump VID and EC headers in case of errors
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to
link as few as possible when debugging is disabled, but the downside is
that most people produce bug reports which are difficult to understand.

Always dump the VID and EC headers' contents in case of errors when it
is helpful.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2012-05-20 20:25:58 +03:00
Artem Bityutskiy ef7088e7f8 UBI: always dump flash contents in case of errors
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to
link as few as possible when debugging is disabled, but the downside is
that most people produce bug reports which are difficult to understand.

Always dump the flash contents in case of errors, not only when debugging is
enabled.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:25:58 +03:00
Artem Bityutskiy 25886a368d UBI: always dump the stack on error
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to
link as few as possible when debugging is disabled, but the downside is
that most people produce bug reports which are difficult to understand.

This patch weeds out the 'ubi_dbg_dump_stack()' function and turns it
into 'dump_stack()' - it is always useful to have stack dump in case of
an error.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
2012-05-20 20:25:58 +03:00
Shawn Guo 3e48b1baa0 mtd: nand: gpmi: fix compile error caused by pinctrl call
Fix following compile error caused by commit 39febc0 (mtd: nand: gpmi:
adopt pinctrl support).

  CC      drivers/mtd/nand/gpmi-nand/gpmi-nand.o
drivers/mtd/nand/gpmi-nand/gpmi-nand.c: In function ‘acquire_resources’:
drivers/mtd/nand/gpmi-nand/gpmi-nand.c:499:45: error: ‘pdev’ undeclared (first use in this function)

Reported-by: Subodh Nijsure <snijsure@grid-net.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-19 07:59:11 -07:00
Arnd Bergmann 3c0dec5f58 Merge branch 'clk-next' of git://git.linaro.org/people/mturquette/linux into next/clock
* 'clk-next' of git://git.linaro.org/people/mturquette/linux:
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ARM: Orion: SDIO: Add support for clk.
  ARM: Orion: NAND: Add support for clk, if there is one.
  ARM: Orion: EHCI: Add support for enabling clocks
  ARM: Orion: SATA: Add per channel clk/clkdev support.
  ARM: Orion: UART: Get the clock rate via clk_get_rate().
  ARM: Orion: WDT: Add clk/clkdev support
  ARM: Orion: Eth: Add clk/clkdev support.
  ARM: Orion: SPI: Add clk/clkdev support.
  ARM: Orion: Add clocks using the generic clk infrastructure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-16 16:35:25 +02:00
Jamie Lentin a0fabf722c mtd: Add orion_nand devicetree bindings
Allow a NAND chip using the orion_nand driver to be described using devicetree.

Changes since last submission (V4) [Addressing comments by]:-
* WARN when bank-width is out of range [Andrew Lunn]

Changes since last submission (V3):-
* Document all parameters [Grant Likely]
* Convert bank-width to be in bytes
* Add explicit defaults for cle, ale and bank-width

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-15 02:29:11 +00:00
Arnd Bergmann 4f5a9fd341 Merge branch 'imx/pinctrl' into imx/clock
Conflicts:
	drivers/mmc/host/sdhci-esdhc-imx.c
	drivers/net/ethernet/freescale/fec.c
	drivers/spi/spi-imx.c
	drivers/tty/serial/imx.c

This resolves dependencies between the pinctrl and clock changes
in imx.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-14 15:30:52 +02:00
David Woodhouse 5df41de587 mtd: cfi_cmdset_0002: Slight cleanup of fixup messages
These should be semicolons, not commas.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:34:36 -05:00
Javier Martin 43dc03c7ba mtd: add fixup for S29NS512P NOR flash.
Spansion S29NS512P flash uses a 16bit transfer to report number
of sectors instead of two 8bit accesses as CFI specifies.

Artem: remove warning message which said that we are applying the
fixup - no need to scary the user unnecessarily.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:33:05 -05:00
Ivan Djelic 0e618ef0a6 mtd: nand: omap: add support for hardware BCH ecc
Two modes are supported: 4-bit and 8-bit error correction.
Note that 4-bit mode is only confirmed to work on OMAP3630 ES 1.x,
x >= 1. The OMAP3 GPMC hardware BCH engine computes remainder
polynomials, it does not provide automatic error location and
correction: this step is implemented using the BCH library.

This implementation only protects page data, there is no support
for protecting user-defined spare area bytes (this could be added
with few modifications); therefore, it cannot be used with YAFFS2
or other similar filesystems that depend on oob storage.

Before being stored to nand flash, hardware BCH ecc is adjusted
so that an erased page has a valid ecc; thus allowing correction of
bitflips in blank pages (also common on 4-bit devices).

BCH correction mode is selected at runtime by setting platform data
parameter 'ecc_opt' to value OMAP_ECC_BCH4_CODE_HW or
OMAP_ECC_BCH8_CODE_HW.

This code has been tested with mtd test modules, UBI and UBIFS on a
BeagleBoard revC3 (OMAP3530 ES3.0 + Micron NAND 256MiB 1,8V 16-bit).

Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:25:51 -05:00
Shmulik Ladkani 1951f2f710 mtd: nand: check the return code of 'read_oob/read_oob_raw'
Apparently, there is an implementor of 'read_oob' which may return an
error inidication (e.g. docg4_read_oob may return -EIO).

Test the return value of 'read_oob/read_oob_raw', and if negative,
propagate the error, so it's returned by the '_read_oob' interface.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:25:00 -05:00
Shmulik Ladkani 5c2ffb11d4 mtd: nand: remove 'sndcmd' parameter of 'read_oob/read_oob_raw'
As of [mtd: nand: remove autoincrement 'sndcmd' code], the
NAND_CMD_READ0 command is issued unconditionally.

Thus, read_oob/read_oob_raw's 'sndcmd' argument is no longer needed, as
well as their return code.

Remove the 'sndcmd' parameter, and set the return code to 0.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:24:40 -05:00
Thomas Abraham 4fba37aec7 mtd: m25p80: Add support for Winbond W25Q80BW
Winbond W25Q80BW is a 8Mbit serial flash memory device.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:24:26 -05:00
Huang Shijie 9013bb40ae mtd: gpmi: add gpmi support for mx6q
add gpmi support for mx6q.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:22:29 -05:00
Huang Shijie e10db1f00a mtd: gpmi: add device tree support to gpmi-nand
This patch just adds the DT support to gpmi-nand.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:22:19 -05:00
Brian Norris 279f08d4ef mtd: nand: utilize oob_required parameter
Don't read/write OOB if the caller doesn't require it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:21:57 -05:00
Brian Norris 7725cc8593 mtd: gpmi-nand: utilize oob_requested parameter
Don't read OOB if the caller didn't request it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:21:52 -05:00
Brian Norris a6976cdfe6 mtd: IFC NAND: utilize oob_required parameter
Don't read OOB if the caller doesn't require it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:21:48 -05:00
Brian Norris d112dc7fa6 mtd: eLBC NAND: utilize oob_required parameter
Don't read OOB if the caller doesn't require it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:21:39 -05:00
Brian Norris e47f3db458 mtd: nand: pass proper 'oob_required' parameter
We now have an interface for notifying the nand_ecc_ctrl functions when OOB
data must be returned to the upper layers and when it may be left untouched.
This patch fills in the 'oob_required' parameter properly from
nand_do_{read,write}_ops. When utilized properly in the lower layers, this
parameter can improve performance and/or reduce complexity for NAND HW and SW
that can simply avoid transferring the OOB data.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:21:35 -05:00
Brian Norris 1fbb938dff mtd: nand: add 'oob_required' argument to NAND {read,write}_page interfaces
New NAND controllers can perform read/write via HW engines which don't expose
OOB data in their DMA mode. To reflect this, we should rework the nand_chip /
nand_ecc_ctrl interfaces that assume that drivers will always read/write OOB
data in the nand_chip.oob_poi buffer. A better interface includes a boolean
argument that explicitly tells the callee when OOB data is requested by the
calling layer (for reading/writing to/from nand_chip.oob_poi).

This patch adds the 'oob_required' parameter to each relevant {read,write}_page
interface; all 'oob_required' parameters are left unused for now. The next
patch will set the parameter properly in the nand_base.c callers, and follow-up
patches will make use of 'oob_required' in some of the callee functions.

Note that currently, there is no harm in ignoring the 'oob_required' parameter
and *always* utilizing nand_chip.oob_poi, but there can be
performance/complexity/design benefits from avoiding filling oob_poi in the
common case. I will try to implement this for some drivers which can be ported
easily.

Note: I couldn't compile-test all of these easily, as some had ARCH
dependencies.

[dwmw2: Merge later 1/0 vs. true/false cleanup]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Jiandong Zheng <jdzheng@broadcom.com>
Acked-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:20:00 -05:00
John Crispin b4f7aa84d6 mtd: add read_byte support to plat_nand
Lantiq SoCs have a External Bus Unit (EBU) that is used to attach MTD media.
As we need to co-exist with PCI on the same bus, certain swapping settings must
be applied. Similar to the NOR map driver we need to apply a fix to make NAND
work. The easiest way is to use byte reads.

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>
2012-05-13 23:16:53 -05:00
John Crispin a4f203512b OF: MTD: make plat_nand loadable from DT
This patch sets the of_match_table field inside plat_nand's platform_driver.
We also add a struct mtd_part_parser_data pointer to make sure of_part parsing
works.

If an arch wants to support plat_nand via DT it needs to setup the
platform_nand_data and hook it into the platform_device.

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>
2012-05-13 23:16:35 -05:00
John Crispin bb08bc1086 mtd: add m25p80 id for mx25l2005a
Add the id and sector mappings for mx25l2005a flash chips.

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>
2012-05-13 23:15:57 -05:00
Marek Vasut 5ca11ca7ad mtd: m25p80: add support for Everspin MR25H256 MRAM chip
This chip isn't JEDEC-compatible.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:15:48 -05:00
Brian Norris 1826dbcceb mtd: nand: kill NAND_NO_AUTOINCR option
No drivers use auto-increment NAND, so kill the NO_AUTOINCR option entirely.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:15:38 -05:00
Brian Norris c00a0991d1 mtd: nand: remove autoincrement 'sndcmd' code
The NAND_NO_AUTOINCR option is always set, so we will kill the option and make
"no autoincrement" the default behavior for nand_base.c. Thus, we should remove
the code which decides whether or not to send the NAND_CMD_READ0 command.
Instead, we unconditionally send the command.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:15:16 -05:00
Brian Norris 831d316b8b mtd: nandsim: remove autoincrement code
The NAND layer always has NAND_NO_AUTOINCR set, so we will never utilize the
AUTOINCR code in nandsim. We will be removing the NAND_NO_AUTOINCR option soon,
and so kill this code as well.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:15:10 -05:00
Mike Dunn edbc4540e0 mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN
The drivers' _read() method, absent an error, returns a non-negative integer
indicating the maximum number of bit errors that were corrected in any one
region comprising an ecc step.  MTD returns -EUCLEAN if this is >=
bitflip_threshold, 0 otherwise.  If bitflip_threshold is zero, the comparison is
not made since these devices lack ECC and always return zero in the non-error
case (thanks Brian)¹.  Note that this is a subtle change to the driver
interface.

This and the preceding patches in this set were tested with ubi on top of the
nandsim and docg4 devices, running the ubi test io_basic from mtd-utils.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-March/040468.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:14:23 -05:00
Mike Dunn e2788c98b9 mtd: nand: add sanity check of ecc strength to nand_scan_tail()
This patch adds sanity checks that ensure that drivers for controllers with
hardware ECC set the 'strength' element in struct nand_ecc_ctrl.  Also stylistic
changes to the line that calculates strength for software ECC.

This v2 simplifies the check.  Thanks Brian!¹

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-April/040890.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:12:41 -05:00
Mike Dunn 3f91e94f7f mtd: nand: read_page() returns max_bitflips
The ecc.read_page() method for nand drivers is changed to return the maximum
number of bitflips that were corrected on any one region covering an ecc step,
This patch doesn't change what the nand code returns to mtd.

This v2 includes the change to the fsl_ifc_nand driver requested by Scott¹.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-April/040883.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by (freescale changes): Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:12:06 -05:00
Mike Dunn d062d4ede8 mtd: bitflip_threshold added to mtd_info and sysfs
An element 'bitflip_threshold' is added to struct mtd_info, and also exposed as
a read/write variable in sysfs.  This will be used to determine whether or not
mtd_read() returns -EUCLEAN or 0 (absent a hard error).  If the driver leaves it
as zero, mtd will set it to a default value of ecc_strength.

This v2 adds the line that propagates bitflip_threshold from the master to the
partitions - thanks Ivan¹.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-April/040900.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:11:39 -05:00
Mike Dunn a9b672e82b mtd: expose ecc_strength through sysfs
ecc_strength element of struct mtd_info is exposed as a read-only variable in
sysfs.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:10:45 -05:00
Mike Dunn 44df4d11b8 mtd: nand: fix incorrect ecc strength values
This fixes a couple of ecc strength values for which I earlier made conservative
guesses, but whose correct values were later determined¹ (thanks Ivan).  Also
sets strength for fsl_ifc_nand, which was merged to mainline after the original
patch that set the strength for all drivers.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-March/040325.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:10:28 -05:00
Mike Dunn 86c2072be6 mtd: ecc_strength is at ecc step granularity
ecc_strength element of mtd_info will be the strength of one ecc step, not of
the entire writesize, as was previously planned.  This is the appropriate way
because, as was pointed out¹, bit errors in excess of the strength of one
step can cause a hard error if they all occur within the same ecc region.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-March/040313.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:09:58 -05:00
Bastian Hecht 09cbe581e3 mtd: nand: Add a NAND_CMD_STATUS when using write verification
To make sure the NAND chip is properly programmed we need a status
command before each page write. When CONFIG_MTD_NAND_VERIFY_WRITE=y this
assumption is broken when writing multiple pages consecutively. This
patch fixes this.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:09:36 -05:00
Peter Meerwald 8abc0d4a11 mtd: cmdlinepart: fix commentary
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:03:36 -05:00
Uwe Kleine-König 4b6f05e14d mtd: mxc_nand: fix several sparse warnings about incorrect address space
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:03:31 -05:00
Uwe Kleine-König 6436356ba1 mtd: mxc_nand: implement device tree probing
This is tested on i.MX27.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:03:08 -05:00
Uwe Kleine-König f48d0f9aa9 mtd: mxc_nand: put several more fields into devtype_data
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:03:02 -05:00
Uwe Kleine-König 69d023be00 mtd: mxc_nand: put callback for data correction into devtype struct
This gets rid of one more nfc_is_vX().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:02:55 -05:00
Uwe Kleine-König 5e05a2d695 mtd: mxc_nand: split chip_select function and put it into devtype struct
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:02:37 -05:00
Uwe Kleine-König 6dcdf99dfa mtd: mxc_nand: put ecc layout into devtype structs
This commit makes problems on v1 and v2 regarding 4KiBpages more obvious.
As I don't have a 4KiB flash handy I just keep the status quo.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:02:08 -05:00
Uwe Kleine-König 6d38af255a mtd: mxc_nand: split some functions to get rid of more nfc_is_vX()
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:01:50 -05:00
Uwe Kleine-König e4303b25f4 mtd: mxc_nand: move function pointers to a per-SOC struct
This prepares switching to platform ids and of-tree probing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:01:39 -05:00
Uwe Kleine-König 8556958af4 mtd: mxc_nand: use a flag to detect if the mx21 quirk is necessary
This gets rid of several instances of cpu_is_mx21() in the driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 23:01:17 -05:00
Uwe Kleine-König 8d1fd16df9 mtd: mxc_nand: set owner field to prevent module unloading when in use
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:57:02 -05:00
Ryosuke Saito 39a5d0b93c mtd: block2mtd: page_read() never returns NULL
page_read() never returns NULL, so we can remove the NULL check here.

Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:56:52 -05:00
Jonas Gorski 5329d67cc3 mtd: bcm63xxpart: handle Broadcom partition order
The original Broadcom partition order has the root fs in front of the
kernel, which resulted in miscalculated partition sizes.
Detect when such an image is on the flash and also reorder the partitions
accordingly.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:55:03 -05:00
Ivan Djelic a9c465f07c mtd: nand: omap: fix race condition in omap_wait()
If a context switch occurs in function omap_wait() just before the
while loop is entered, then upon return from context switch the
timeout may already have elapsed: in that case, status is never
read from NAND device, and omap_wait() returns an error.
This failure has been experimentally observed during stress tests.

This patch ensures a NAND status read is always performed before
returning, as in the generic nand_wait() function.

Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:54:00 -05:00
Viresh Kumar e25da1c07d mtd: fsmc_nand: Add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:53:28 -05:00
Viresh Kumar c0010eb5c9 mtd: spear_smi: Add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:53:24 -05:00
Randy Dunlap 47d0505bdb mtd: fix scb2_flash build when PCI is not enabled
scb2_flash.c is a PCI driver, but its build fails when CONFIG_PCI
is not enabled, so make it depend on PCI.

drivers/mtd/maps/scb2_flash.c:237:1: warning: data definition has no type or storage class
drivers/mtd/maps/scb2_flash.c:237:1: warning: type defaults to 'int' in declaration of 'module_pci_driver'
drivers/mtd/maps/scb2_flash.c:237:1: warning: parameter names (without types) in function declaration

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:52:16 -05:00
Grazvydas Ignotas d7efe2281d mtd: omap2: fix resource leak in prefetch-busy path
If prefetch engine is busy, current code "forgets" to call
dma_unmap_single(), which results in a deadlock later, so add it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:52:10 -05:00
Huang Shijie 886bd33da7 mtd: print out the page size and oob size after parsing out the nand
Some not-supported nand chips may pass the current parsing code,
and get the wrong page size and oob size. Sometimes, it's hard to notice
that you get the wrong values, because there is no warning or error.

So it's useful to print out the page size and oob size in the end of
the parsing function. We can check these values with the datasheet of the nand
chip as soon as possible.

Artem: amend the print a bit

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:35 -05:00
Prabhakar Kushwaha 59fdd5b96a mtd: IFC NAND: Add support of ONFI NAND flash
- Fix NAND_CMD_READID command for ONFI detect.
  - Add NAND_CMD_PARAM command to read the ONFI parameter page.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:33 -05:00
Jim Cromie 287558fe0e mtd: lpddr: replace open-coded ARRAY_SIZE with macro
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:31 -05:00
Axel Lin 4d16cd6587 mtd: use module_pci_driver
This patch converts the drivers in drivers/mtd/* to use module_pci_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:19 -05:00
Huang Shijie 4aa6ae3ecc mtd: gpmi: do not include the mxs.h
The mxs.h does not exit in the mx6q.
So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:17 -05:00
Uwe Kleine-König 6d56b9d658 mtd: mark const init data with __initconst instead of __initdata
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

	error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:12 -05:00
H Hartley Sweeten f2e5a24480 mtd: plat_nand: Add default partition parser to driver
Use cmdlinepart as the default partition parser and allow the arch setup code
to still use their own partition parsers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-13 22:47:04 -05:00
Linus Torvalds 9ff00d58a9 Three fixes for 3.4:
- Fix a lock ordering deadlock in JFFS2
  - Fix an oops in the dataflash driver, triggered by a dummy call to test
    whether it has OTP functionality.
  - Fix request_mem_region() failure on amsdelta NAND driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk+vekgACgkQdwG7hYl686N8bQCfdizsFrliKbDW20R/pO66NoAV
 aloAn0ln+mwe3rIdNt8qKynW8e8dbudF
 =R7XS
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-3.4-20120513' of git://git.infradead.org/linux-mtd

Pull three MTD fixes from David Woodhouse:
 - Fix a lock ordering deadlock in JFFS2
 - Fix an oops in the dataflash driver, triggered by a dummy call to test
   whether it has OTP functionality.
 - Fix request_mem_region() failure on amsdelta NAND driver.

* tag 'for-linus-3.4-20120513' of git://git.infradead.org/linux-mtd:
  mtd: ams-delta: fix request_mem_region() failure
  jffs2: Fix lock acquisition order bug in gc path
  mtd: fix oops in dataflash driver
2012-05-13 11:33:09 -07:00
Shawn Guo 39febc018b mtd: nand: gpmi: adopt pinctrl support
Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-05-12 09:43:16 +08:00
Alexander Shiyan 304b2c684e ARM: clps711x: Using a single definition for the PHYS and VIRT registers offset
Using a single definition for the physical and virtual address register for all
variants boards clps711x. This patch also includes the use of a single function
clps_read/write in some units.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-11 16:18:01 +02:00
Andrew Lunn 9c2bd504b5 ARM: Orion: NAND: Add support for clk, if there is one.
Not all orion platforms can gate the clock, but if it does exist,
enable/disable it as appropriate.

v2: Fix the name of the clkdev entry.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-05-08 16:33:59 -07:00
Janusz Krzysztofik b027274d2e mtd: ams-delta: fix request_mem_region() failure
A call to request_mem_region() has been introduced in the omap-gpio
driver recently (commit 96751fcbe5,
"gpio/omap: Use devm_ API and add request_mem_region"). This change
prevented the Amstrad Delta NAND driver, which was doing the same in
order to take control over OMAP MPU I/O lines that the NAND device hangs
off, from loading successfully.

The I/O lines and corresponding registers used by the NAND driver are a
subset of those used for the GPIO function. Then, to avoid run time
collisions, all MPUIO GPIO lines should be marked as requested while
initializing the NAND driver, and vice versa, a single MPUIO GPIO line
already requested before the NAND driver initialization is attempted
should prevent the NAND device from being started successfully.

There is another driver, omap-keypad, which also manipulates MPUIO
registers, but has never been calling request_mem_region() on startup,
so it's not affected by the change in the gpio-omap and works correctly.
It uses the depreciated omap_read/write functions for accessing MPUIO
registers. Unlike the NAND driver, these I/O lines and registers are
separate from those used by the GPIO driver. However, both register sets
are non-contiguous and overlapping, so it would be impractical to
request the two sets separately, one from the gpio-omap, the other form
the omap-keypad driver.

In order to solve all these issues correctly, a solution first suggested
by Artem Bityutskiy, then closer specified by Tony Lindgren while they
commented the initial version of this fix, should be implemented. The
gpio-omap driver should export a few functions which would allow the
other two drivers to access MPUIO registers in a safe manner instead of
trying to manage them in parallel to the GPIO driver.  However, such a
big change, affecting 3 drivers all together, is not suitable for the rc
cycle, and should be prepared for the merge window.  Then, an
alternative solution is proposed as a regression fix.

For the ams-delta NAND driver to initialize correctly in coexistence
with the changed GPIO driver, drop the request_mem_region() call from
the former, especially as this call is going to be removed while the
long-term solution is implemented.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-08 16:24:33 -05:00
Will Newton 7a84477c4a mtd: fix oops in dataflash driver
I'm seeing an oops in mtd_dataflash.c with Linux 3.3. What appears to
be happening is that otp_select_filemode calls mtd_read_fact_prot_reg
with -1 for offset and length and a NULL buffer to test if OTP
operations are supported. This finds its way down to otp_read in
mtd_dataflash.c and causes an oops when memcpying the returned data
into the NULL buf.

None of the checks in otp_read catches the negative length and offset.
Changing the length of the dummy read to 0 prevents the oops.

Cc: stable@kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-05-07 20:29:50 +01:00
Arnd Bergmann 878040ef83 ARM: bcmring: use proper MMIO accessors
A lot of code in bcmring just dereferences pointers to MMIO
locations, which is not safe. This annotates the pointers
correctly using __iomem and uses readl/write to access them.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-02 16:21:47 +00:00
Arnd Bergmann 651ef18db9 ARM: bcmring: move cfg_global header to mach/
Platforms should not have header files outside of include/mach,
and bcmring is the only one that has one just under include/,
so move that away.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-02 16:21:47 +00:00
Linus Torvalds acdf2fc860 Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine/amba-pl08x : reset phychan_hold on terminate all
  dma: pl330: fix a couple of compilation warnings
  dma/ste_dma40: fix erroneous comparison
  dma/ste_dma40: explicitly include regulator consumer header
  dma40: Improve the logic of stopping logical chan
  dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
  dma: mxs-dma: enable channel in device_issue_pending call
  dmaengine: imx-dma: dont complete descriptor for cyclic dma
2012-04-26 15:33:36 -07:00
Sascha Hauer 97c3213fd9 mtd mxc_nand: prepare/unprepare clock
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-25 17:03:39 +02:00
Shawn Guo d04525ed03 dma: mxs-dma: enable channel in device_issue_pending call
Enable channel in device_issue_pending call, so that the order between
cookie assignment and channel enabling can be ensured naturally.

It fixes the mxs gpmi-nand breakage which is caused by the incorrect
order of cookie assigning and channel enabling.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Huang Shijie <b32955@freescale.com>
Tested-by <samgandhi9@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-04-20 15:35:58 +05:30
Al Viro c65390f4dd fix breakage in mtdchar_open(), sanitize failure exits
simple_release_fs() should be only done on failure there.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-09 01:38:55 -04:00
Jiri Kosina e75d660672 Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.

Conflicts:
	drivers/net/ethernet/realtek/r8169.c
2012-04-08 21:48:52 +02:00
Octavian Moraru 86d2f6fbb9 mtg: docg3: fix comment errors
occured  ==> occurred
successfull  ==> successful
adressing  ==> addressing

Signed-off-by: Octavian Moraru <octmoraru@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-04-05 17:19:22 -07:00
Linus Torvalds 5d32c88f0b Merge branch 'akpm' (Andrew's patch-bomb)
Merge batch of fixes from Andrew Morton:
 "The simple_open() cleanup was held back while I wanted for laggards to
  merge things.

  I still need to send a few checkpoint/restore patches.  I've been
  wobbly about merging them because I'm wobbly about the overall
  prospects for success of the project.  But after speaking with Pavel
  at the LSF conference, it sounds like they're further toward
  completion than I feared - apparently davem is at the "has stopped
  complaining" stage regarding the net changes.  So I need to go back
  and re-review those patchs and their (lengthy) discussion."

* emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches)
  memcg swap: use mem_cgroup_uncharge_swap fix
  backlight: add driver for DA9052/53 PMIC v1
  C6X: use set_current_blocked() and block_sigmask()
  MAINTAINERS: add entry for sparse checker
  MAINTAINERS: fix REMOTEPROC F: typo
  alpha: use set_current_blocked() and block_sigmask()
  simple_open: automatically convert to simple_open()
  scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
  libfs: add simple_open()
  hugetlbfs: remove unregister_filesystem() when initializing module
  drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
  fs/xattr.c:setxattr(): improve handling of allocation failures
  fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
  fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
  sysrq: use SEND_SIG_FORCED instead of force_sig()
  proc: fix mount -t proc -o AAA
2012-04-05 15:30:34 -07:00
Stephen Boyd 234e340582 simple_open: automatically convert to simple_open()
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-05 15:25:50 -07:00
Linus Torvalds 8bb1f22952 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second try at vfs part d#2 from Al Viro:
 "Miklos' first series (with do_lookup() rewrite split into edible
  chunks) + assorted bits and pieces.

  The 'untangling of do_lookup()' series is is a splitup of what used to
  be a monolithic patch from Miklos, so this series is basically "how do
  I convince myself that his patch is correct (or find a hole in it)".
  No holes found and I like the resulting cleanup, so in it went..."

Changes from try 1: Fix a boot problem with selinux, and commit messages
prettied up a bit.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (24 commits)
  vfs: fix out-of-date dentry_unhash() comment
  vfs: split __lookup_hash
  untangling do_lookup() - take __lookup_hash()-calling case out of line.
  untangling do_lookup() - switch to calling __lookup_hash()
  untangling do_lookup() - merge d_alloc_and_lookup() callers
  untangling do_lookup() - merge failure exits in !dentry case
  untangling do_lookup() - massage !dentry case towards __lookup_hash()
  untangling do_lookup() - get rid of need_reval in !dentry case
  untangling do_lookup() - eliminate a loop.
  untangling do_lookup() - expand the area under ->i_mutex
  untangling do_lookup() - isolate !dentry stuff from the rest of it.
  vfs: move MAY_EXEC check from __lookup_hash()
  vfs: don't revalidate just looked up dentry
  vfs: fix d_need_lookup/d_revalidate order in do_lookup
  ext3: move headers to fs/ext3/
  migrate ext2_fs.h guts to fs/ext2/ext2.h
  new helper: ext2_image_size()
  get rid of pointless includes of ext2_fs.h
  ext2: No longer export ext2_fs.h to user space
  mtdchar: kill persistently held vfsmount
  ...
2012-03-31 13:42:57 -07:00
Al Viro 00292bbf76 mtdchar: kill persistently held vfsmount
... and mtdchar_notifier along with it; just have ->drop_inode() that
will unconditionally get evict them instead of dances on mtd device
removal and use simple_pin_fs() instead of kern_mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-03-31 16:03:15 -04:00
Linus Torvalds 623ff7739e MTD merge for 3.4
Artem's cleanup of the MTD API continues apace.
 Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst others.
 More work on DiskOnChip G3, new driver for DiskOnChip G4.
 Clean up debug/warning printks in JFFS2 to use pr_<level>.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAk92K6UACgkQdwG7hYl686NrMACfWQJRWasR78MWKfkT2vWZwTFJ
 X5AAoKiSYO2pfo5gWJGOAahNC1zUqMX0
 =i3Vb
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6

Pull MTD changes from David Woodhouse:
 - Artem's cleanup of the MTD API continues apace.
 - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
   others.
 - More work on DiskOnChip G3, new driver for DiskOnChip G4.
 - Clean up debug/warning printks in JFFS2 to use pr_<level>.

Fix up various trivial conflicts, largely due to changes in calling
conventions for things like dmaengine_prep_slave_sg() (new inline
wrapper to hide new parameter, clashing with rewrite of previously last
parameter that used to be an 'append' flag, and is now a bitmap of
'unsigned long flags').

(Also some header file fallout - like so many merges this merge window -
and silly conflicts with sparse fixes)

* tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
  mtd: docg3 add protection against concurrency
  mtd: docg3 refactor cascade floors structure
  mtd: docg3 increase write/erase timeout
  mtd: docg3 fix inbound calculations
  mtd: nand: gpmi: fix function annotations
  mtd: phram: fix section mismatch for phram_setup
  mtd: unify initialization of erase_info->fail_addr
  mtd: support ONFI multi lun NAND
  mtd: sm_ftl: fix typo in major number.
  mtd: add device-tree support to spear_smi
  mtd: spear_smi: Remove default partition information from driver
  mtd: Add device-tree support to fsmc_nand
  mtd: fix section mismatch for doc_probe_device
  mtd: nand/fsmc: Remove sparse warnings and errors
  mtd: nand/fsmc: Add DMA support
  mtd: nand/fsmc: Access the NAND device word by word whenever possible
  mtd: nand/fsmc: Use dev_err to report error scenario
  mtd: nand/fsmc: Use devm routines
  mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
  mtd: fsmc_nand: add pm callbacks to support hibernation
  ...
2012-03-30 17:31:56 -07:00
Linus Torvalds ef08e78268 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine update from Vinod Koul:
 "This includes the cookie cleanup by Russell, the addition of context
  parameter for dmaengine APIs, more arm dmaengine driver cleanup by
  moving code to dmaengine, this time for imx by Javier and pl330 by
  Boojin along with the usual driver fixes."

Fix up some fairly trivial conflicts with various other cleanups.

* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
  dmaengine: imx: fix the build failure on x86_64
  dmaengine: i.MX: Fix merge of cookie branch.
  dmaengine: i.MX: Add support for interleaved transfers.
  dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
  dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
  dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
  dmaengine: imx-dma: remove internal structure.
  dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
  dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
  dmaengine: imx-dma: remove sg member from internal structure.
  dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
  dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
  dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
  dmaengine: imx-dma: remove dma_mode member of internal structure.
  dmaengine: imx-dma: remove data member from internal structure.
  dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
  dmaengine: at_hdmac: add slave config operation
  dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
  dmaengine/dma_slave: introduce inline wrappers
  dma: imx-sdma: Treat firmware messages as warnings instead of erros
  ...
2012-03-29 15:34:57 -07:00