aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2014-02-11 02:07:41 +0000
committerLuka Perkov <luka@openwrt.org>2014-02-11 02:07:41 +0000
commit3af779eb172b0438f77e8a01a97dd0eb9a146076 (patch)
tree23838dbde109e79f4c4763dbf78a983aeeefafe1 /target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch
parent69d323f23119ce6986c2803f34d95869144a00e6 (diff)
downloadupstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.tar.gz
upstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.tar.bz2
upstream-3af779eb172b0438f77e8a01a97dd0eb9a146076.zip
mvebu: backport mainline patches from kernel 3.12
This is a backport of the patches accepted to the Linux mainline related to mvebu SoC (Armada XP and Armada 370) between Linux v3.11, and Linux v3.12. This work mainly covers: * Ground work for sharing the pxa nand driver(drivers/mtd/nand/pxa3xx_nand.c) between the PXA family,and the Armada family. * Further updates to the mvebu MBus. * Work and ground work for enabling MSI on the Armada family. * some phy / mdio bus initialization related work. * Device tree binding documentation update. Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com> CC: Luka Perkov <luka@openwrt.org> SVN-Revision: 39565
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch')
-rw-r--r--target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch b/target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch
new file mode 100644
index 0000000000..7579c16855
--- /dev/null
+++ b/target/linux/mvebu/patches-3.10/0092-mtd-add-a-helper-to-get-the-supported-features-for-O.patch
@@ -0,0 +1,43 @@
+From aeeb6ea6eb18c46f5776dd068989686686cda359 Mon Sep 17 00:00:00 2001
+From: Huang Shijie <shijie8@gmail.com>
+Date: Fri, 17 May 2013 11:17:28 +0800
+Subject: [PATCH 092/203] mtd: add a helper to get the supported features for
+ ONFI nand
+
+add a helper to get the supported features for ONFI nand.
+Also add the neccessary macros.
+
+Signed-off-by: Huang Shijie <b32955@freescale.com>
+Reviewed-and-tested-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+---
+ include/linux/mtd/nand.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/include/linux/mtd/nand.h
++++ b/include/linux/mtd/nand.h
+@@ -202,6 +202,10 @@ typedef enum {
+ /* Keep gcc happy */
+ struct nand_chip;
+
++/* ONFI features */
++#define ONFI_FEATURE_16_BIT_BUS (1 << 0)
++#define ONFI_FEATURE_EXT_PARAM_PAGE (1 << 7)
++
+ /* ONFI timing mode, used in both asynchronous and synchronous mode */
+ #define ONFI_TIMING_MODE_0 (1 << 0)
+ #define ONFI_TIMING_MODE_1 (1 << 1)
+@@ -754,6 +758,12 @@ struct platform_nand_chip *get_platform_
+ return chip->priv;
+ }
+
++/* return the supported features. */
++static inline int onfi_feature(struct nand_chip *chip)
++{
++ return chip->onfi_version ? le16_to_cpu(chip->onfi_params.features) : 0;
++}
++
+ /* return the supported asynchronous timing mode. */
+ static inline int onfi_get_async_timing_mode(struct nand_chip *chip)
+ {