aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_mtd.h
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2014-02-24 17:24:48 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-03-11 01:42:28 -0400
commit6d9434ebb76157071164b32ad03fbed165c74382 (patch)
treeb457ad39dbac4a9b3a33ab0e1e48e461b4a57a9c /include/linux/of_mtd.h
parent4b78fc42f3e3f07687dc27efc1153d29e360afa1 (diff)
of_mtd: Add helpers to get ECC strength and ECC step size
This commit adds simple helpers to obtain the devicetree properties that specify the ECC strength and ECC step size to use on a given NAND controller. Acked-by: Boris BREZILLON <b.brezillon.dev@gmail.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include/linux/of_mtd.h')
-rw-r--r--include/linux/of_mtd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h
index cb32d9c1e8dc..e266caa36402 100644
--- a/include/linux/of_mtd.h
+++ b/include/linux/of_mtd.h
@@ -13,6 +13,8 @@
13 13
14#include <linux/of.h> 14#include <linux/of.h>
15int of_get_nand_ecc_mode(struct device_node *np); 15int of_get_nand_ecc_mode(struct device_node *np);
16int of_get_nand_ecc_step_size(struct device_node *np);
17int of_get_nand_ecc_strength(struct device_node *np);
16int of_get_nand_bus_width(struct device_node *np); 18int of_get_nand_bus_width(struct device_node *np);
17bool of_get_nand_on_flash_bbt(struct device_node *np); 19bool of_get_nand_on_flash_bbt(struct device_node *np);
18 20
@@ -23,6 +25,16 @@ static inline int of_get_nand_ecc_mode(struct device_node *np)
23 return -ENOSYS; 25 return -ENOSYS;
24} 26}
25 27
28static inline int of_get_nand_ecc_step_size(struct device_node *np)
29{
30 return -ENOSYS;
31}
32
33static inline int of_get_nand_ecc_strength(struct device_node *np)
34{
35 return -ENOSYS;
36}
37
26static inline int of_get_nand_bus_width(struct device_node *np) 38static inline int of_get_nand_bus_width(struct device_node *np)
27{ 39{
28 return -ENOSYS; 40 return -ENOSYS;