2 * Copyright (C) 2014 Free Electrons
4 * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/kernel.h>
12 #include <linux/err.h>
13 #include <linux/export.h>
14 #include <linux/mtd/nand.h>
16 static const struct nand_sdr_timings onfi_sdr_timings
[] = {
45 .tRST_max
= 250000000000ULL,
83 .tRST_max
= 500000000,
108 .tFEAT_max
= 1000000,
119 .tRST_max
= 500000000,
145 .tFEAT_max
= 1000000,
157 .tRST_max
= 500000000,
182 .tFEAT_max
= 1000000,
194 .tRST_max
= 500000000,
219 .tFEAT_max
= 1000000,
231 .tRST_max
= 500000000,
242 * onfi_async_timing_mode_to_sdr_timings - [NAND Interface] Retrieve NAND
243 * timings according to the given ONFI timing mode
244 * @mode: ONFI timing mode
246 const struct nand_sdr_timings
*onfi_async_timing_mode_to_sdr_timings(int mode
)
248 if (mode
< 0 || mode
>= ARRAY_SIZE(onfi_sdr_timings
))
249 return ERR_PTR(-EINVAL
);
251 return &onfi_sdr_timings
[mode
];
253 EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings
);