~ubuntu-branches/ubuntu/vivid/linux-fsl-imx51/vivid

« back to all changes in this revision

Viewing changes to drivers/mtd/nand/gpmi/nand_device_info.h

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Bryan Wu, Heiko Carstens, Kay Sievers, Upstream Kernel Changes
  • Date: 2010-01-27 10:30:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100127103045-ocbuz94jsh104pgx
Tags: 2.6.31-603.5
[ Bryan Wu ]

* [Config] Enable devtmpfs for fsl-imx51 kernel
  - LP: #512321
* SAUCE: IMX51: only export NEON flag to userspace on Freescale iMX51
  rev3.x or later silicon
  - LP: #507416

[ Heiko Carstens ]

* (pre-stable) driver-core: fix devtmpfs crash on s390
  - LP: #512370

[ Kay Sievers ]

* (pre-stable) Driver-Core: devtmpfs - set root directory mode to 0755
  - LP: #512370

[ Upstream Kernel Changes ]

* ENGR00119069 V4L2 capture: Do not change current crop setting for tvin.
* ENGR00118830 Update NAND driver scan scheme to support new nand type
* ENGR00118946 imx23: enable wake up from USB 5V
* ENGR00119150 Bluetooth: Handsfree audio has noise
* ENGR00118610 MX23: Add double buffering for PXP
* ENGR00118872 Write bootstream to kernel by kobs with BCH ECC
* ENGR00119199: ipu: add clock nodes for pixel clocks
* ENGR00119202: Fix DVFS-PER related bugs.
* ENGR00119203 MX23: Correct VDDD value for CPU frequency 360 MHz
* ENGR00119004 v4l2 output: fix kernel dump
* ENGR00119242 Add wait timeout support to void dead loop in NAND driver
* ENGR00119263: MX51 : Fix pll_set_rate function
* ENGR00119075 fix iMX23 USB initialization cause wrong power status
* ENGR00118892 MX23: iMX233 disable lcd clock when LCD off
* ENGR00119063 MX23: fix system halt rather than reboot when watchdog
  timeout
* ENGR00119324 Put GPMI NAND flash scan scheme code to the common NAND
  directory
* ENGR00114151 800x600-16@60 video not play correctly
* ENGR00119275 ipuv3: dmfc size control
* ENGR00119443 [MX23_BSP] GPMI driver computes wrong block size for
  K9GAG08U0D
* ENGR00119136 ipuv3: support 720p for ipu lib
* ENGR00119274 TVE: HDTV can not work
* ENGR00119104 MX23 ALSA: Resolve the problem of record from line-in
* ENGR00119081 V4l2 capture:Support NV12 output pixel format for still
  capture
* ENGR00119179 TVE: fix system hang for tvout
* ENGR00119070 IPUv3 FB:Support DP local alpha in pixel
* ENGR00119432 MX35 system can't re-boot up when SD/MMC boot is used.
* ENGR00119296 Fix iMX23 display abnormal when change frequency
* ENGR00119484 Update NFC INT wait timeout value to 1s
* ENGR00119504 MX25: Change nand partition for bootloader to 3M byte
* ENGR00119532 MX35: Change nand partition for bootloader to 3M bytes
* ENGR00119305 imx23: fix ethernet standby issue
* ENGR00115370 ipuv3: add display control
* ENGR00119531 ipuv3: dmfc setting restore during resume
* Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
  - LP: #512321

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
3
 
 */
4
 
 
5
 
/*
6
 
 * The code contained herein is licensed under the GNU General Public
7
 
 * License. You may obtain a copy of the GNU General Public License
8
 
 * Version 2 or later at the following locations:
9
 
 *
10
 
 * http://www.opensource.org/licenses/gpl-license.html
11
 
 * http://www.gnu.org/copyleft/gpl.html
12
 
 */
13
 
#ifndef __DRIVERS_NAND_DEVICE_INFO_H
14
 
#define __DRIVERS_NAND_DEVICE_INFO_H
15
 
 
16
 
 /*
17
 
  * The number of ID bytes to read from the NAND Flash device and hand over to
18
 
  * the identification system.
19
 
  */
20
 
 
21
 
#define NAND_DEVICE_ID_BYTE_COUNT  (6)
22
 
 
23
 
 /*
24
 
  * The number of ID bytes to read from the NAND Flash device and hand over to
25
 
  * the identification system.
26
 
  */
27
 
 
28
 
enum nand_device_cell_technology {
29
 
        NAND_DEVICE_CELL_TECH_SLC = 0,
30
 
        NAND_DEVICE_CELL_TECH_MLC = 1,
31
 
};
32
 
 
33
 
/**
34
 
 * struct nand_device_info - Information about a single NAND Flash device.
35
 
 *
36
 
 * This structure contains all the *essential* information about a NAND Flash
37
 
 * device, derived from the device's data sheet. For each manufacturer, we have
38
 
 * an array of these structures.
39
 
 *
40
 
 * @end_of_table:              If true, marks the end of a table of device
41
 
 *                             information.
42
 
 * @manufacturer_code:         The manufacturer code (1st ID byte) reported by
43
 
 *                             the device.
44
 
 * @device_code:               The device code (2nd ID byte) reported by the
45
 
 *                             device.
46
 
 * @cell_technology:           The storage cell technology.
47
 
 * @chip_size_in_bytes:        The total size of the storage behind a single
48
 
 *                             chip select, in bytes. Notice that this is *not*
49
 
 *                             necessarily the total size of the storage in a
50
 
 *                             *package*, which may contain several chips.
51
 
 * @block_size_in_pages:       The number of pages in a block.
52
 
 * @page_total_size_in_bytes:  The total size of a page, in bytes, including
53
 
 *                             both the data and the OOB.
54
 
 * @ecc_strength_in_bits:      The strength of the ECC called for by the
55
 
 *                             manufacturer, in number of correctable bits.
56
 
 * @ecc_size_in_bytes:         The size of the data block over which the
57
 
 *                             manufacturer calls for the given ECC algorithm
58
 
 *                             and strength.
59
 
 * @data_setup_in_ns:          The data setup time, in nanoseconds. Usually the
60
 
 *                             maximum of tDS and tWP. A negative value
61
 
 *                             indicates this characteristic isn't known.
62
 
 * @data_hold_in_ns:           The data hold time, in nanoseconds. Usually the
63
 
 *                             maximum of tDH, tWH and tREH. A negative value
64
 
 *                             indicates this characteristic isn't known.
65
 
 * @address_setup_in_ns:       The address setup time, in nanoseconds. Usually
66
 
 *                             the maximum of tCLS, tCS and tALS. A negative
67
 
 *                             value indicates this characteristic isn't known.
68
 
 * @gpmi_sample_delay_in_ns:   A GPMI-specific timing parameter. A negative
69
 
 *                             value indicates this characteristic isn't known.
70
 
 * @tREA_in_ns:                tREA, in nanoseconds, from the data sheet. A
71
 
 *                             negative value indicates this characteristic
72
 
 *                             isn't known.
73
 
 * @tRLOH_in_ns:               tRLOH, in nanoseconds, from the data sheet. A
74
 
 *                             negative value indicates this characteristic
75
 
 *                             isn't known.
76
 
 * @tRHOH_in_ns:               tRHOH, in nanoseconds, from the data sheet. A
77
 
 *                             negative value indicates this characteristic
78
 
 *                             isn't known.
79
 
 */
80
 
 
81
 
struct nand_device_info {
82
 
 
83
 
        /* End of table marker */
84
 
 
85
 
        bool      end_of_table;
86
 
 
87
 
        /* Manufacturer and Device codes */
88
 
 
89
 
        uint8_t   manufacturer_code;
90
 
        uint8_t   device_code;
91
 
 
92
 
        /* Technology */
93
 
 
94
 
        enum nand_device_cell_technology  cell_technology;
95
 
 
96
 
        /* Geometry */
97
 
 
98
 
        uint64_t  chip_size_in_bytes;
99
 
        uint32_t  block_size_in_pages;
100
 
        uint16_t  page_total_size_in_bytes;
101
 
 
102
 
        /* ECC */
103
 
 
104
 
        uint8_t   ecc_strength_in_bits;
105
 
        uint16_t  ecc_size_in_bytes;
106
 
 
107
 
        /* Timing */
108
 
 
109
 
        int8_t    data_setup_in_ns;
110
 
        int8_t    data_hold_in_ns;
111
 
        int8_t    address_setup_in_ns;
112
 
        int8_t    gpmi_sample_delay_in_ns;
113
 
        int8_t    tREA_in_ns;
114
 
        int8_t    tRLOH_in_ns;
115
 
        int8_t    tRHOH_in_ns;
116
 
 
117
 
        /* Description */
118
 
 
119
 
        const char  *description;
120
 
 
121
 
};
122
 
 
123
 
/**
124
 
 * nand_device_get_info - Get info about a device based on ID bytes.
125
 
 *
126
 
 * @id_bytes:  An array of NAND_DEVICE_ID_BYTE_COUNT ID bytes retrieved from the
127
 
 *             NAND Flash device.
128
 
 */
129
 
 
130
 
struct nand_device_info *nand_device_get_info(const uint8_t id_bytes[]);
131
 
 
132
 
/**
133
 
 * nand_device_print_info - Prints information about a NAND Flash device.
134
 
 *
135
 
 * @info  A pointer to a NAND Flash device information structure.
136
 
 */
137
 
 
138
 
void nand_device_print_info(struct nand_device_info *info);
139
 
 
140
 
#endif