2 * NAND Flash Controller Device Driver
3 * Copyright (c) 2009, Intel Corporation and its suppliers.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
27 #define PACKED_GNU __attribute__ ((packed))
31 #include <linux/semaphore.h>
32 #include <linux/string.h> /* for strcpy(), stricmp(), etc */
33 #include <linux/mm.h> /* for kmalloc(), kfree() */
34 #include <linux/vmalloc.h>
35 #include <linux/module.h>
36 #include <linux/moduleparam.h>
37 #include <linux/init.h>
39 #include <linux/kernel.h> /* printk() */
40 #include <linux/fs.h> /* everything... */
41 #include <linux/errno.h> /* error codes */
42 #include <linux/types.h> /* size_t */
43 #include <linux/genhd.h>
44 #include <linux/blkdev.h>
45 #include <linux/hdreg.h>
46 #include <linux/pci.h>
51 #define NAND_DBG_WARN 1
52 #define NAND_DBG_DEBUG 2
53 #define NAND_DBG_TRACE 3
55 extern int nand_debug_level
;
58 #define nand_dbg_print(level, args...) \
60 if (level <= nand_debug_level) \
61 printk(KERN_ALERT args); \
64 #define nand_dbg_print(level, args...)
67 #ifdef SUPPORT_BIG_ENDIAN
68 #define INVERTUINT16(w) ((u16)(((u16)(w)) << 8) | \
71 #define INVERTUINT32(dw) (((u32)(dw) << 24) | \
72 (((u32)(dw) << 8) & 0x00ff0000) | \
73 (((u32)(dw) >> 8) & 0x0000ff00) | \
76 #define INVERTUINT16(w) w
77 #define INVERTUINT32(dw) dw
80 extern int GLOB_Calc_Used_Bits(u32 n
);
81 extern u64
GLOB_u64_Div(u64 addr
, u32 divisor
);
82 extern u64
GLOB_u64_Remainder(u64 addr
, u32 divisor_type
);
83 extern int register_spectra_ftl(void);
85 #endif /* _FFSPORT_ */
This page took 0.035301 seconds and 5 git commands to generate.