Wednesday, January 8, 2014

linux.kernel - 26 new messages in 16 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* of: mtd: add NAND timings retrieval support - 4 messages, 1 author
http://groups.google.com/group/linux.kernel/t/6c8df9d9b8b17d2f?hl=en
* mfd: MAX6650/6651 support - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f77c4e32918b37db?hl=en
* xen-netback: TX grant mapping with SKBTX_DEV_ZEROCOPY instead of copy - 2
messages, 2 authors
http://groups.google.com/group/linux.kernel/t/fa3947f0129612f2?hl=en
* ARM: imx: select ARCH_HAS_CPUFREQ for iMX6SL - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f2b17a45c1098340?hl=en
* lib/vsprintf: add %pT[C012] format specifier - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/40f2db64b3df6ee9?hl=en
* Terrible performance of sequential O_DIRECT 4k writes in SAN environment. ~3
times slower then Solars 10 with the same HBA/Storage. - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/c2d4038a5c79058e?hl=en
* drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%
' for u64 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/6fa70b2a1b3cdccd?hl=en
* net: core: explicitly select a txq before doing l2 forwarding - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/e488fba6679952ea?hl=en
* kexec: reuse 1st kernel as kexec/kdump kernel? - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/deb149363fcb0d3c?hl=en
* driver-core: platform: Resolve DT interrupt references late - 2 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/5c02f1b0dea17622?hl=en
* arch: metag: compiler: Are they compiler's issues? - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d071407c79ff584c?hl=en
* ARM: Introduce CPU_METHOD_OF_DECLARE() for cpu hotplug/smp - 2 messages, 1
author
http://groups.google.com/group/linux.kernel/t/1598aa14a12139cd?hl=en
* ACPI: Add ACPI 5.0 Time and Alarm Device driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/09f3287b564cd53c?hl=en
* btrfs: Return EXDEV for cross file system snapshot - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/2188c6d7d67d7778?hl=en
* perf tools: Add support of name_only for print_events_type() function. - 4
messages, 1 author
http://groups.google.com/group/linux.kernel/t/003bb3b209f00698?hl=en
* x86/mm: memblock: switch to use NUMA_NO_NODE - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/2fa5df8602fb9989?hl=en

==============================================================================
TOPIC: of: mtd: add NAND timings retrieval support
http://groups.google.com/group/linux.kernel/t/6c8df9d9b8b17d2f?hl=en
==============================================================================

== 1 of 4 ==
Date: Wed, Jan 8 2014 6:40 am
From: Boris BREZILLON


Add a function to retrieve NAND timings from a given DT node.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
drivers/of/of_mtd.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/of_mtd.h | 9 +++++++++
2 files changed, 56 insertions(+)

diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
index a27ec94..52e07fd 100644
--- a/drivers/of/of_mtd.c
+++ b/drivers/of/of_mtd.c
@@ -83,3 +83,50 @@ bool of_get_nand_on_flash_bbt(struct device_node *np)
return of_property_read_bool(np, "nand-on-flash-bbt");
}
EXPORT_SYMBOL_GPL(of_get_nand_on_flash_bbt);
+
+/**
+ * of_get_nand_timings - Get nand timings for the given device_node
+ * @np: Pointer to the given device_node
+ *
+ * return 0 on success errno other wise
+ */
+int of_get_nand_timings(struct device_node *np, struct nand_timings *timings)
+{
+ memset(timings, 0, sizeof(*timings));
+
+ of_property_read_u32(np, "tCLS-min", &timings->tCLS_min);
+ of_property_read_u32(np, "tCLH-min", &timings->tCLH_min);
+ of_property_read_u32(np, "tCS-min", &timings->tCS_min);
+ of_property_read_u32(np, "tCH-min", &timings->tCH_min);
+ of_property_read_u32(np, "tWP-min", &timings->tWP_min);
+ of_property_read_u32(np, "tALS-min", &timings->tALS_min);
+ of_property_read_u32(np, "tALH-min", &timings->tALH_min);
+ of_property_read_u32(np, "tDS-min", &timings->tDS_min);
+ of_property_read_u32(np, "tDH-min", &timings->tDH_min);
+ of_property_read_u32(np, "tWC-min", &timings->tWC_min);
+ of_property_read_u32(np, "tWH-min", &timings->tWH_min);
+ of_property_read_u32(np, "tR-max", &timings->tR_max);
+ of_property_read_u32(np, "tAR-min", &timings->tAR_min);
+ of_property_read_u32(np, "tCLR-min", &timings->tCLR_min);
+ of_property_read_u32(np, "tRR-min", &timings->tRR_min);
+ of_property_read_u32(np, "tRP-min", &timings->tRP_min);
+ of_property_read_u32(np, "tWB-max", &timings->tWB_max);
+ of_property_read_u32(np, "tRC-min", &timings->tRC_min);
+ of_property_read_u32(np, "tREA-max", &timings->tREA_max);
+ of_property_read_u32(np, "tRHZ-max", &timings->tRHZ_max);
+ of_property_read_u32(np, "tCHZ-max", &timings->tCHZ_max);
+ of_property_read_u32(np, "tRHOH-min", &timings->tRHOH_min);
+ of_property_read_u32(np, "tRLOH-min", &timings->tRLOH_min);
+ of_property_read_u32(np, "tCOH-min", &timings->tCOH_min);
+ of_property_read_u32(np, "tREH-min", &timings->tREH_min);
+ of_property_read_u32(np, "tWHR-min", &timings->tWHR_min);
+ of_property_read_u32(np, "tRHW-min", &timings->tRHW_min);
+ of_property_read_u32(np, "tIR-min", &timings->tIR_min);
+ of_property_read_u32(np, "tCR-min", &timings->tCR_min);
+ of_property_read_u32(np, "tADL-min", &timings->tADL_min);
+ of_property_read_u32(np, "tRST-max", &timings->tRST_max);
+ of_property_read_u32(np, "tWW-min", &timings->tWW_min);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(of_get_nand_timings);
diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h
index 6f10e93..ecedb5f 100644
--- a/include/linux/of_mtd.h
+++ b/include/linux/of_mtd.h
@@ -9,12 +9,15 @@
#ifndef __LINUX_OF_MTD_H
#define __LINUX_OF_NET_H

+#include <linux/mtd/nand.h>
+
#ifdef CONFIG_OF_MTD

#include <linux/of.h>
int of_get_nand_ecc_mode(struct device_node *np);
int of_get_nand_bus_width(struct device_node *np);
bool of_get_nand_on_flash_bbt(struct device_node *np);
+int of_get_nand_timings(struct device_node *np, struct nand_timings *timings);

#else /* CONFIG_OF_MTD */

@@ -33,6 +36,12 @@ static inline bool of_get_nand_on_flash_bbt(struct device_node *np)
return false;
}

+static inline int of_get_nand_timings(struct device_node *np,
+ struct nand_timings *timings)
+{
+ return -ENOSYS;
+}
+

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate