nf_2KB.h

Go to the documentation of this file.
00001 /*This file is prepared for Doxygen automatic documentation generation.*/
00013 
00014 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
00015  *
00016  * Redistribution and use in source and binary forms, with or without
00017  * modification, are permitted provided that the following conditions are met:
00018  *
00019  * 1. Redistributions of source code must retain the above copyright notice,
00020  * this list of conditions and the following disclaimer.
00021  *
00022  * 2. Redistributions in binary form must reproduce the above copyright notice,
00023  * this list of conditions and the following disclaimer in the documentation
00024  * and/or other materials provided with the distribution.
00025  *
00026  * 3. The name of Atmel may not be used to endorse or promote products derived
00027  * from this software without specific prior written permission.
00028  *
00029  * 4. This software may only be redistributed and used in connection with an Atmel
00030  * AVR product.
00031  *
00032  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
00033  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00034  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
00035  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00036  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00037  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00038  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00039  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00040  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00041  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00042  */
00043 
00044 #ifndef _NF_2KB_H_
00045 #define _NF_2KB_H_
00046 
00047 #define  NF_TYPE_2KB_KNOWN    FALSE // No static mode define by default
00048 
00051 #define  CONF_2KB_F1_1     0 
00052 #define  CONF_2KB_F1_2     1 
00053 #define  CONF_2KB_F1_3     2 
00054 #define  CONF_2KB_F1_4     3 
00055 #define  CONF_2KB_F1_5     4 
00056 #define  CONF_2KB_F1_6     5 
00057 #define  CONF_2KB_F1_7     6 
00058 #define  CONF_2KB_F1_8     7
00059 #define  CONF_2KB_F2_1     8 
00060 #define  CONF_2KB_F2_2     9 
00061 #define  CONF_2KB_F2_3     10 
00062 #define  CONF_2KB_F2_4     11
00063 #define  CONF_2KB_F2_5     12
00064 #define  CONF_2KB_F3_1     13
00065 #define  CONF_2KB_F3_2     14
00066 #define  CONF_2KB_F3_3     15
00067 #define  CONF_2KB_F3_4     16
00068 #define  CONF_2KB_F4_0     17
00069 #define  CONF_2KB_F4_1     18
00070 
00071 
00072 #if (NF_AUTO_DETECT_2KB==TRUE)
00073 
00074 //**********  LIST USED FOR GENERIC 2KB DRIVER ************
00075 
00078 #  if (!defined _nfc_drv_c_)
00079 extern _CONST_TYPE_   St_nf_conf  nf_list_conf[];
00080 #  else
00081 _CONST_TYPE_   St_nf_conf  nf_list_conf[]=
00082 {
00083   { 1,1,1,1}  // CONF_2KB_F1_1
00084 , { 1,1,1,1}  // CONF_2KB_F1_2
00085 , { 1,1,1,1}  // CONF_2KB_F1_3
00086 , { 1,1,1,0}  // CONF_2KB_F1_4
00087 , { 1,1,1,1}  // CONF_2KB_F1_5
00088 , { 1,1,0,1}  // CONF_2KB_F1_6
00089 , { 1,1,0,1}  // CONF_2KB_F1_7
00090 , { 1,1,1,0}  // CONF_2KB_F1_8
00091 , { 2,1,1,1}  // CONF_2KB_F2_1
00092 , { 2,1,1,1}  // CONF_2KB_F2_2
00093 , { 2,1,1,1}  // CONF_2KB_F2_2
00094 , { 2,1,1,1}  // CONF_2KB_F2_3
00095 , { 4,1,1,1}  // CONF_2KB_F2_4
00096 , { 4,1,1,1}  // CONF_2KB_F2_5
00097 , { 1,2,1,1}  // CONF_2KB_F3_1
00098 , { 1,2,0,1}  // CONF_2KB_F3_2
00099 , { 1,2,0,1}  // CONF_2KB_F3_3
00100 , { 2,2,0,1}  // CONF_2KB_F3_4
00101 , { 0,0,0,1}  // CONF_2KB_F4_0
00102 , { 0,0,0,0}  // CONF_2KB_F4_1
00103 };
00104 #endif
00105 
00106 
00109 #  if (!defined _nfc_drv_c_)
00110 extern _CONST_TYPE_   St_nf_id    nf_list_id[];
00111 #  else
00112 _CONST_TYPE_   St_nf_id    nf_list_id[]=
00113 {
00114 //  Maker         ,ID    ,Conf            // References
00115   { M_ID_HYNIX    ,0xA1  ,CONF_2KB_F1_3 } // HY27SF081G2M
00116 , { M_ID_HYNIX    ,0xAA  ,CONF_2KB_F1_3 } // HY27SG082G2M
00117 , { M_ID_HYNIX    ,0xD3  ,CONF_2KB_F2_5 } // Configuration compatible for all references
00118 //{ M_ID_HYNIX    ,0xD3  ,CONF_2KB_F1_2 } // HY27UH088G2M
00119 //{ M_ID_HYNIX    ,0xD3  ,CONF_2KB_F2_4 } // HY27UH08AG5M, HY27UH08AGDM
00120 , { M_ID_HYNIX    ,0xDA  ,CONF_2KB_F1_3 } // HY27UG082G2M
00121 //{ M_ID_HYNIX    ,0xDA  ,CONF_2KB_F1_2 } // HY27UG084GDM
00122 , { M_ID_HYNIX    ,0xDC  ,CONF_2KB_F2_2 } // Configuration compatible for all references
00123 //{ M_ID_HYNIX    ,0xDC  ,CONF_2KB_F1_2 } // HY27UG084G2M, HY27UH088GDM
00124 //{ M_ID_HYNIX    ,0xDC  ,CONF_2KB_F2_1 } // HY27UF084G2M
00125 , { M_ID_HYNIX    ,0xF1  ,CONF_2KB_F1_4 } // HY27UF081G2M
00126 
00127 , { M_ID_MICRON   ,0xA1  ,CONF_2KB_F1_2 } // MT29F1G08ABAWP
00128 , { M_ID_MICRON   ,0xAA  ,CONF_2KB_F1_2 } // MT29F2G08ABCWG, MT29F2G08ABCWP
00129 , { M_ID_MICRON   ,0xAC  ,CONF_2KB_F2_2 } // MT29F4G08BBCWG
00130 , { M_ID_MICRON   ,0xD3  ,CONF_2KB_F3_1 } // MT29F8G08BAAWP, MT29F16G08FAAWP, MT29F16G08FAAWC
00131 , { M_ID_MICRON   ,0xDA  ,CONF_2KB_F1_1 } // MT29F2G08AABWP, MT29F2G08AACWG, MT29F2G08AACWP
00132 //{ M_ID_MICRON   ,0xDC  ,CONF_2KB_F3_1 } // MT29F4G08AAAWP, MT29F8G08DAAWP, MT29F8G08DAAWC (Not supported in generic driver)
00133 , { M_ID_MICRON   ,0xDC  ,CONF_2KB_F2_1 } // MT29F4G08BABWP, MT29F8G08FABWP
00134 //{ M_ID_MICRON   ,0xDC  ,CONF_2KB_F1_1 } // MT29F4G08BACWG, MT29F8G08FACWG
00135 
00136 //{ M_ID_SAMSUNG  ,0xA1  ,CONF_2KB_F1_5 } // K9F1G08Q0M (Not supported in generic driver)
00137 , { M_ID_SAMSUNG  ,0xA1  ,CONF_2KB_F4_0 } // K9F1G08R0A, K9F1G08Q0A, K9F1G08R0B
00138 //{ M_ID_SAMSUNG  ,0xAA  ,CONF_2KB_F2_2 } // K9K2G08Q0M
00139 , { M_ID_SAMSUNG  ,0xAA  ,CONF_2KB_F4_0 } // K9K2G08R0B
00140 //{ M_ID_SAMSUNG  ,0xAA  ,CONF_2KB_F1_1 } // K9F2G08Q0M
00141 , { M_ID_SAMSUNG  ,0xAC  ,CONF_2KB_F2_2 } // K9K4G08Q0M
00142 , { M_ID_SAMSUNG  ,0xD3  ,CONF_2KB_F3_4 } // K9K8G08U0A, K9K8G08U0M, K9WAG08U1A, K9NBG08U5A
00143 , { M_ID_SAMSUNG  ,0xDA  ,CONF_2KB_F4_0 } // Configuration compatible for all references
00144 //{ M_ID_SAMSUNG  ,0xDA  ,CONF_2KB_F3_3 } // K9F2G08R0A, K9F2G08U0A
00145 //{ M_ID_SAMSUNG  ,0xDA  ,CONF_2KB_F2_2 } // K9K2G08U0M, K9W4G08U1M
00146 //{ M_ID_SAMSUNG  ,0xDA  ,CONF_2KB_F1_2 } // K9F2G08U0M
00147 , { M_ID_SAMSUNG  ,0xDC  ,CONF_2KB_F4_0 } // Configuration compatible for all references
00148 //{ M_ID_SAMSUNG  ,0xDC  ,CONF_2KB_F3_2 } // K9F4G08U0A, K9F4G08U0M, K9K8G08U1A
00149 //{ M_ID_SAMSUNG  ,0xDC  ,CONF_2KB_F2_2 } // K9K4G08U0M, K9W8G08U1M
00150 , { M_ID_SAMSUNG  ,0xF1  ,CONF_2KB_F1_7 } // Configuration compatible for all references
00151 //{ M_ID_SAMSUNG  ,0xF1  ,CONF_2KB_F1_1 } // K9F1G08U0A
00152 //{ M_ID_SAMSUNG  ,0xF1  ,CONF_2KB_F1_2 } // K9F1G08D0M, K9F1G08U0M
00153 //{ M_ID_SAMSUNG  ,0xF1  ,CONF_2KB_F1_6 } // K9F1G08U0B
00154 
00155 , { M_ID_ST       ,0xA1  ,CONF_2KB_F1_8 } // NAND01GR3B2
00156 , { M_ID_ST       ,0xA3  ,CONF_2KB_F2_5 } // NAND08GR3B2
00157 //{ M_ID_ST       ,0xAA  ,CONF_2KB_F1_2 } // NAND02GR3B2_one_die
00158 , { M_ID_ST       ,0xAA  ,CONF_2KB_F2_2 } // NAND02GR3B2_two_die
00159 , { M_ID_ST       ,0xAC  ,CONF_2KB_F2_2 } // NAND04GR3B2
00160 , { M_ID_ST       ,0xD3  ,CONF_2KB_F2_4 } // NAND08GW3B2
00161 //{ M_ID_ST       ,0xDA  ,CONF_2KB_F1_2 } // NAND02GW3B2_one_die
00162 , { M_ID_ST       ,0xDA  ,CONF_2KB_F2_3 } // NAND02GW3B2_two_die
00163 , { M_ID_ST       ,0xDC  ,CONF_2KB_F2_1 } // NAND04GW3B2
00164 , { M_ID_ST       ,0xF1  ,CONF_2KB_F1_8 } // NAND01GW3B2
00165 
00166 , { M_ID_TOSHIBA96,0xF1  ,CONF_2KB_F4_1 } // TC58NVG0S3AFT05
00167 , { M_ID_TOSHIBA  ,0xF1  ,CONF_2KB_F4_1 } // TC58NVG0S3BFTI0
00168 , { M_ID_TOSHIBA  ,0xDA  ,CONF_2KB_F4_1 } // TH58NVG1S3AFT05
00169 };
00170 #  endif // (!defined _nfc_drv_c_)
00171 
00172 
00175 #  if (!defined _nfc_drv_c_)
00176 extern _CONST_TYPE_   St_nf_link_id_block  nf_list_link_id_block[];
00177 #  else
00178 _CONST_TYPE_   St_nf_link_id_block  nf_list_link_id_block[]=
00179 {
00180   { 0xA1 ,1 }
00181 , { 0xF1 ,1 }
00182 , { 0xAA ,2 }
00183 , { 0xDA ,2 }
00184 , { 0xDC ,4 }
00185 , { 0xAC ,4 }
00186 , { 0xD3 ,8 }
00187 , { 0xA3 ,8 }
00188 };
00189 #  endif // (!defined _nfc_drv_c_)
00190 
00191 
00192 #else    // (NF_AUTO_DETECT_2KB==TRUE)
00193 
00194 //**********  LIST USED FOR SINGLE 2KB DRIVER ************
00195 #  undef  NF_DEV_CONF   // In case of define by other listing (e.g. 512B)
00196 
00197 #if    (defined NF_TYPE_HY27SF081G2M)
00198 #  define NF_DEV_MAKER  M_ID_HYNIX
00199 #  define NF_DEV_ID     0xA1
00200 #  define NF_DEV_CONF   CONF_2KB_F1_3
00201                         
00202 #elif  (defined NF_TYPE_HY27UF081G2M)
00203 #  define NF_DEV_MAKER  M_ID_HYNIX
00204 #  define NF_DEV_ID     0xF1
00205 #  define NF_DEV_CONF   CONF_2KB_F1_4
00206                         
00207 #elif  (defined NF_TYPE_HY27SG082G2M)
00208 #  define NF_DEV_MAKER  M_ID_HYNIX
00209 #  define NF_DEV_ID     0xAA
00210 #  define NF_DEV_CONF   CONF_2KB_F1_3
00211                         
00212 #elif  (defined NF_TYPE_HY27UG082G2M)
00213 #  define NF_DEV_MAKER  M_ID_HYNIX
00214 #  define NF_DEV_ID     0xDA
00215 #  define NF_DEV_CONF   CONF_2KB_F1_3
00216                         
00217 #elif  (defined NF_TYPE_HY27UG084GDM)
00218 #  define NF_DEV_MAKER  M_ID_HYNIX
00219 #  define NF_DEV_ID     0xDA
00220 #  define NF_DEV_CONF   CONF_2KB_F1_2
00221                         
00222 #elif  (defined NF_TYPE_HY27UF084G2M)
00223 #  define NF_DEV_MAKER  M_ID_HYNIX
00224 #  define NF_DEV_ID     0xDC
00225 #  define NF_DEV_CONF   CONF_2KB_F2_1
00226                         
00227 #elif  (defined NF_TYPE_HY27UG084G2M) || (defined NF_TYPE_HY27UH088GDM)
00228 #  define NF_DEV_MAKER  M_ID_HYNIX
00229 #  define NF_DEV_ID     0xDC
00230 #  define NF_DEV_CONF   CONF_2KB_F1_2
00231                         
00232 #elif  (defined NF_TYPE_HY27UH08AG5M) || (defined NF_TYPE_HY27UH08AGDM)
00233 #  define NF_DEV_MAKER  M_ID_HYNIX
00234 #  define NF_DEV_ID     0xD3
00235 #  define NF_DEV_CONF   CONF_2KB_F2_4
00236                         
00237 #elif  (defined NF_TYPE_HY27UH088G2M)
00238 #  define NF_DEV_MAKER  M_ID_HYNIX
00239 #  define NF_DEV_ID     0xD3
00240 #  define NF_DEV_CONF   CONF_2KB_F1_2
00241                         
00242 #elif  (defined NF_TYPE_MT29F1G08ABAWP)
00243 #  define NF_DEV_MAKER  M_ID_MICRON
00244 #  define NF_DEV_ID     0xA1
00245 #  define NF_DEV_CONF   CONF_2KB_F1_2
00246                         
00247 #elif  (defined NF_TYPE_MT29F2G08AABWP) || (defined NF_TYPE_MT29F2G08AACWG) || (defined NF_TYPE_MT29F2G08AACWP)
00248 #  define NF_DEV_MAKER  M_ID_MICRON
00249 #  define NF_DEV_ID     0xDA
00250 #  define NF_DEV_CONF   CONF_2KB_F1_1
00251                         
00252 #elif  (defined NF_TYPE_MT29F2G08ABCWG) || (defined NF_TYPE_MT29F2G08ABCWP)
00253 #  define NF_DEV_MAKER  M_ID_MICRON
00254 #  define NF_DEV_ID     0xAA
00255 #  define NF_DEV_CONF   CONF_2KB_F1_2
00256                         
00257 #elif  (defined NF_TYPE_MT29F4G08AAAWP) || (defined NF_TYPE_MT29F8G08DAAWP) || (defined NF_TYPE_MT29F8G08DAAWC)
00258 #  define NF_DEV_MAKER  M_ID_MICRON
00259 #  define NF_DEV_ID     0xDC
00260 #  define NF_DEV_CONF   CONF_2KB_F3_1
00261                         
00262 #elif  (defined NF_TYPE_MT29F4G08BABWP) || (defined NF_TYPE_MT29F8G08FABWP)
00263 #  define NF_DEV_MAKER  M_ID_MICRON
00264 #  define NF_DEV_ID     0xDC
00265 #  define NF_DEV_CONF   CONF_2KB_F2_1
00266                         
00267 #elif  (defined NF_TYPE_MT29F4G08BBCWG)
00268 #  define NF_DEV_MAKER  M_ID_MICRON
00269 #  define NF_DEV_ID     0xAC
00270 #  define NF_DEV_CONF   CONF_2KB_F2_2
00271                         
00272 #elif  (defined NF_TYPE_MT29F4G08BACWG) || (defined NF_TYPE_MT29F8G08FACWG)
00273 #  define NF_DEV_MAKER  M_ID_MICRON
00274 #  define NF_DEV_ID     0xDC
00275 #  define NF_DEV_CONF   CONF_2KB_F1_1
00276                         
00277 #elif  (defined NF_TYPE_MT29F8G08BAAWP) || (defined NF_TYPE_MT29F16G08FAAWP) || (defined NF_TYPE_MT29F16G08FAAWC)
00278 #  define NF_DEV_MAKER  M_ID_MICRON
00279 #  define NF_DEV_ID     0xD3
00280 #  define NF_DEV_CONF   CONF_2KB_F3_1
00281                         
00282 #elif  (defined NF_TYPE_K9F1G08R0A) || (defined NF_TYPE_K9F1G08Q0A) || (defined NF_TYPE_K9F1G08R0B)
00283 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00284 #  define NF_DEV_ID     0xA1
00285 #  define NF_DEV_CONF   CONF_2KB_F4_0
00286                         
00287 #elif  (defined NF_TYPE_K9F1G08U0A)
00288 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00289 #  define NF_DEV_ID     0xF1
00290 #  define NF_DEV_CONF   CONF_2KB_F1_1
00291 
00292 #elif  (defined NF_TYPE_K9F1G08D0M) || (defined NF_TYPE_K9F1G08U0M)
00293 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00294 #  define NF_DEV_ID     0xF1
00295 #  define NF_DEV_CONF   CONF_2KB_F1_2
00296 
00297 #elif  (defined NF_TYPE_K9F1G08Q0M)
00298 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00299 #  define NF_DEV_ID     0xA1
00300 #  define NF_DEV_CONF   CONF_2KB_F1_5
00301                         
00302 #elif  (defined NF_TYPE_K9F1G08U0B)
00303 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00304 #  define NF_DEV_ID     0xF1
00305 #  define NF_DEV_CONF   CONF_2KB_F1_6
00306                         
00307 #elif  (defined NF_TYPE_K9F2G08R0A) || (defined NF_TYPE_K9F2G08U0A)
00308 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00309 #  define NF_DEV_ID     0xDA
00310 #  define NF_DEV_CONF   CONF_2KB_F3_3
00311                         
00312 #elif  (defined NF_TYPE_K9K2G08Q0M)
00313 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00314 #  define NF_DEV_ID     0xAA
00315 #  define NF_DEV_CONF   CONF_2KB_F2_2
00316                         
00317 #elif  (defined NF_TYPE_K9K2G08U0M) || (defined NF_TYPE_K9W4G08U1M)
00318 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00319 #  define NF_DEV_ID     0xDA
00320 #  define NF_DEV_CONF   CONF_2KB_F2_2
00321                         
00322 #elif  (defined NF_TYPE_K9K2G08R0B)
00323 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00324 #  define NF_DEV_ID     0xAA
00325 #  define NF_DEV_CONF   CONF_2KB_F4_0
00326                         
00327 #elif  (defined NF_TYPE_K9F2G08Q0M)
00328 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00329 #  define NF_DEV_ID     0xAA
00330 #  define NF_DEV_CONF   CONF_2KB_F1_1
00331                         
00332 #elif  (defined NF_TYPE_K9F2G08U0M)
00333 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00334 #  define NF_DEV_ID     0xDA
00335 #  define NF_DEV_CONF   CONF_2KB_F1_2
00336                         
00337 #elif  (defined NF_TYPE_K9F4G08U0A) || (defined NF_TYPE_K9F4G08U0M) || (defined NF_TYPE_K9K8G08U1A)
00338 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00339 #  define NF_DEV_ID     0xDC
00340 #  define NF_DEV_CONF   CONF_2KB_F3_2
00341                         
00342 #elif  (defined NF_TYPE_K9K4G08Q0M)
00343 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00344 #  define NF_DEV_ID     0xAC
00345 #  define NF_DEV_CONF   CONF_2KB_F2_2
00346                         
00347 #elif  (defined NF_TYPE_K9K4G08U0M) || (defined NF_TYPE_K9W8G08U1M)
00348 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00349 #  define NF_DEV_ID     0xDC
00350 #  define NF_DEV_CONF   CONF_2KB_F2_2
00351                         
00352 #elif  (defined NF_TYPE_K9K8G08U0A) || (defined NF_TYPE_K9K8G08U0M) || (defined NF_TYPE_K9WAG08U1A) || (defined NF_TYPE_K9NBG08U5A)
00353 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00354 #  define NF_DEV_ID     0xD3
00355 #  define NF_DEV_CONF   CONF_2KB_F3_4
00356                         
00357 #elif  (defined NF_TYPE_NAND01GR3B2)
00358 #  define NF_DEV_MAKER  M_ID_ST
00359 #  define NF_DEV_ID     0xA1
00360 #  define NF_DEV_CONF   CONF_2KB_F1_8
00361                         
00362 #elif  (defined NF_TYPE_NAND01GW3B2)
00363 #  define NF_DEV_MAKER  M_ID_ST
00364 #  define NF_DEV_ID     0xF1
00365 #  define NF_DEV_CONF   CONF_2KB_F1_8
00366                         
00367 #elif  (defined NF_TYPE_NAND02GR3B2_two_die)
00368 #  define NF_DEV_MAKER  M_ID_ST
00369 #  define NF_DEV_ID     0xAA
00370 #  define NF_DEV_CONF   CONF_2KB_F2_2
00371                         
00372 #elif  (defined NF_TYPE_NAND02GW3B2_two_die)
00373 #  define NF_DEV_MAKER  M_ID_ST
00374 #  define NF_DEV_ID     0xDA
00375 #  define NF_DEV_CONF   CONF_2KB_F2_3
00376                         
00377 #elif  (defined NF_TYPE_NAND02GW3B2_one_die)
00378 #  define NF_DEV_MAKER  M_ID_ST
00379 #  define NF_DEV_ID     0xDA
00380 #  define NF_DEV_CONF   CONF_2KB_F1_2
00381                         
00382 #elif  (defined NF_TYPE_NAND02GR3B2_one_die)
00383 #  define NF_DEV_MAKER  M_ID_ST
00384 #  define NF_DEV_ID     0xAA
00385 #  define NF_DEV_CONF   CONF_2KB_F1_2
00386                         
00387 #elif  (defined NF_TYPE_NAND04GW3B2)
00388 #  define NF_DEV_MAKER  M_ID_ST
00389 #  define NF_DEV_ID     0xDC
00390 #  define NF_DEV_CONF   CONF_2KB_F2_1
00391                         
00392 #elif  (defined NF_TYPE_NAND04GR3B2)
00393 #  define NF_DEV_MAKER  M_ID_ST
00394 #  define NF_DEV_ID     0xAC
00395 #  define NF_DEV_CONF   CONF_2KB_F2_2
00396                         
00397 #elif  (defined NF_TYPE_NAND08GR3B2)
00398 #  define NF_DEV_MAKER  M_ID_ST
00399 #  define NF_DEV_ID     0xA3
00400 #  define NF_DEV_CONF   CONF_2KB_F2_5
00401                         
00402 #elif  (defined NF_TYPE_NAND08GW3B2)
00403 #  define NF_DEV_MAKER  M_ID_ST
00404 #  define NF_DEV_ID     0xD3
00405 #  define NF_DEV_CONF   CONF_2KB_F2_4
00406                         
00407 #elif  (defined NF_TYPE_TC58NVG0S3AFT05)
00408 #  define NF_DEV_MAKER  M_ID_TOSHIBA96
00409 #  define NF_DEV_ID     0xF1
00410 #  define NF_DEV_CONF   CONF_2KB_F4_1
00411 
00412 #elif  (defined NF_TYPE_TC58NVG0S3BFTI0)
00413 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00414 #  define NF_DEV_ID     0xF1
00415 #  define NF_DEV_CONF   CONF_2KB_F4_1
00416                         
00417 #elif  (defined NF_TYPE_TH58NVG1S3AFT05)
00418 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00419 #  define NF_DEV_ID     0xDA
00420 #  define NF_DEV_CONF   CONF_2KB_F4_1
00421 
00422 #endif
00423 
00424 
00425 #if (defined NF_DEV_CONF)
00426 
00427 #  undef  NF_TYPE_2KB_KNOWN
00428 #  define NF_TYPE_2KB_KNOWN  TRUE     // A static mode define
00429 
00430    // Determination of number of block
00431 #  if   (NF_DEV_ID == 0xA1)
00432 #     define   NF_N_ZONES       1
00433 #  elif (NF_DEV_ID == 0xF1)
00434 #     define   NF_N_ZONES       1
00435 #  elif (NF_DEV_ID == 0xAA)
00436 #     define   NF_N_ZONES       2
00437 #  elif (NF_DEV_ID == 0xDA)
00438 #     define   NF_N_ZONES       2
00439 #  elif (NF_DEV_ID == 0xDC)
00440 #     define   NF_N_ZONES       4
00441 #  elif (NF_DEV_ID == 0xAC)     
00442 #     define   NF_N_ZONES       4
00443 #  elif (NF_DEV_ID == 0xD3)
00444 #     define   NF_N_ZONES       8
00445 #  elif (NF_DEV_ID == 0xA3)
00446 #     define   NF_N_ZONES       8
00447 #  else
00448 #     error    BAD DEVICE ID of reference in nf_2KB.h
00449 #  endif
00450 
00451 #  define   NF_N_BLOCKS          (NF_N_ZONES*1024L)
00452 
00453    // Determination of number of row cycles
00454 #  if   (NF_N_ZONES == 1)
00455 #     define   NF_N_ROW_CYCLES   2
00456 #  else
00457 #     define   NF_N_ROW_CYCLES   3
00458 #  endif
00459 
00460    // Select configuration
00461 /*
00462 #  define NF_COPYBACK_CONT       // 0 = copy back not supported, N = number of    CONTINUE subdivision contraint on copyback
00463 #  define NF_COPYBACK_DISCONT    // 0 = copy back not supported, N = number of DISCONTINUE subdivision contraint on copyback
00464 #  define NF_CACHE_PROGRAM       // 1 = cache program supported, 0 = not supported
00465 #  define NF_CE_TOGGLE           // 1 = CE toggle supported, 0 = not supported - CE must be always LOW
00466 #  define NF_TIMING_READ         // mode 1: 1 cycle high, 1 cycle low for read cycle
00467                                  // mode 0: 1.5 cycle high, 0.5 cycle low for read cycle
00468 #  define CLK_DFC_NFC            // Freq max supported,  CLK_DFC_NFC_xxMHz
00469 */
00470 #  if    (NF_DEV_CONF == CONF_2KB_F1_1)
00471 #     define NF_COPYBACK_CONT    1
00472 #     define NF_COPYBACK_DISCONT 1
00473 #     define NF_CACHE_PROGRAM    1
00474 #     define NF_CE_TOGGLE        1
00475 #     define NF_TIMING_READ      1
00476 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00477 #  elif  (NF_DEV_CONF == CONF_2KB_F1_2)
00478 #     define NF_COPYBACK_CONT    1
00479 #     define NF_COPYBACK_DISCONT 1
00480 #     define NF_CACHE_PROGRAM    1
00481 #     define NF_CE_TOGGLE        1
00482 #     define NF_TIMING_READ      1
00483 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00484 #  elif  (NF_DEV_CONF == CONF_2KB_F1_3)
00485 #     define NF_COPYBACK_CONT    1
00486 #     define NF_COPYBACK_DISCONT 1
00487 #     define NF_CACHE_PROGRAM    1
00488 #     define NF_CE_TOGGLE        1
00489 #     define NF_TIMING_READ      1
00490 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00491 #  elif  (NF_DEV_CONF == CONF_2KB_F1_4)
00492 #     define NF_COPYBACK_CONT    1
00493 #     define NF_COPYBACK_DISCONT 1
00494 #     define NF_CACHE_PROGRAM    1
00495 #     define NF_CE_TOGGLE        0
00496 #     define NF_TIMING_READ      1
00497 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00498 #  elif  (NF_DEV_CONF == CONF_2KB_F1_5)
00499 #     define NF_COPYBACK_CONT    1
00500 #     define NF_COPYBACK_DISCONT 1
00501 #     define NF_CACHE_PROGRAM    1
00502 #     define NF_CE_TOGGLE        1
00503 #     define NF_TIMING_READ      0
00504 #     define CLK_DFC_NFC         CLK_DFC_NFC_16MHz
00505 #  elif  (NF_DEV_CONF == CONF_2KB_F1_6)
00506 #     define NF_COPYBACK_CONT    1
00507 #     define NF_COPYBACK_DISCONT 1
00508 #     define NF_CACHE_PROGRAM    0
00509 #     define NF_CE_TOGGLE        1
00510 #     define NF_TIMING_READ      1
00511 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00512 #  elif  (NF_DEV_CONF == CONF_2KB_F1_8)
00513 #     define NF_COPYBACK_CONT    1
00514 #     define NF_COPYBACK_DISCONT 1
00515 #     define NF_CACHE_PROGRAM    1
00516 #     define NF_CE_TOGGLE        0
00517 #     define NF_TIMING_READ      1
00518 #     define CLK_DFC_NFC         CLK_DFC_NFC_16MHz
00519 #  elif  (NF_DEV_CONF == CONF_2KB_F3_1)
00520 #     define NF_COPYBACK_CONT    1
00521 #     define NF_COPYBACK_DISCONT 2
00522 #     define NF_CACHE_PROGRAM    1
00523 #     define NF_CE_TOGGLE        1
00524 #     define NF_TIMING_READ      1
00525 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00526 #  elif  (NF_DEV_CONF == CONF_2KB_F3_2)
00527 #     define NF_COPYBACK_CONT    1
00528 #     define NF_COPYBACK_DISCONT 2
00529 #     define NF_CACHE_PROGRAM    0
00530 #     define NF_CE_TOGGLE        1
00531 #     define NF_TIMING_READ      1
00532 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00533 #  elif  (NF_DEV_CONF == CONF_2KB_F3_3)
00534 #     define NF_COPYBACK_CONT    1
00535 #     define NF_COPYBACK_DISCONT 2
00536 #     define NF_CACHE_PROGRAM    0
00537 #     define NF_CE_TOGGLE        1
00538 #     define NF_TIMING_READ      1
00539 #     define CLK_DFC_NFC         CLK_DFC_NFC_40MHz
00540 #  elif  (NF_DEV_CONF == CONF_2KB_F2_1)
00541 #     define NF_COPYBACK_CONT    2
00542 #     define NF_COPYBACK_DISCONT 1
00543 #     define NF_CACHE_PROGRAM    1
00544 #     define NF_CE_TOGGLE        1
00545 #     define NF_TIMING_READ      1
00546 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00547 #  elif  (NF_DEV_CONF == CONF_2KB_F2_2)
00548 #     define NF_COPYBACK_CONT    2
00549 #     define NF_COPYBACK_DISCONT 1
00550 #     define NF_CACHE_PROGRAM    1
00551 #     define NF_CE_TOGGLE        1
00552 #     define NF_TIMING_READ      1
00553 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00554 #  elif  (NF_DEV_CONF == CONF_2KB_F2_3)
00555 #     define NF_COPYBACK_CONT    2
00556 #     define NF_COPYBACK_DISCONT 1
00557 #     define NF_CACHE_PROGRAM    1
00558 #     define NF_CE_TOGGLE        1
00559 #     define NF_TIMING_READ      0
00560 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00561 #  elif  (NF_DEV_CONF == CONF_2KB_F3_4)
00562 #     define NF_COPYBACK_CONT    2
00563 #     define NF_COPYBACK_DISCONT 2
00564 #     define NF_CACHE_PROGRAM    0
00565 #     define NF_CE_TOGGLE        1
00566 #     define NF_TIMING_READ      1
00567 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00568 #  elif  (NF_DEV_CONF == CONF_2KB_F2_4)
00569 #     define NF_COPYBACK_CONT    4
00570 #     define NF_COPYBACK_DISCONT 1
00571 #     define NF_CACHE_PROGRAM    1
00572 #     define NF_CE_TOGGLE        1
00573 #     define NF_TIMING_READ      1
00574 #     define CLK_DFC_NFC         CLK_DFC_NFC_60MHz
00575 #  elif  (NF_DEV_CONF == CONF_2KB_F2_5)
00576 #     define NF_COPYBACK_CONT    4
00577 #     define NF_COPYBACK_DISCONT 1
00578 #     define NF_CACHE_PROGRAM    1
00579 #     define NF_CE_TOGGLE        1
00580 #     define NF_TIMING_READ      1
00581 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00582 #  elif  (NF_DEV_CONF == CONF_2KB_F4_0)
00583 #     define NF_COPYBACK_CONT    0
00584 #     define NF_COPYBACK_DISCONT 0
00585 #     define NF_CACHE_PROGRAM    0
00586 #     define NF_CE_TOGGLE        1
00587 #     define NF_TIMING_READ      1
00588 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00589 #  elif  (NF_DEV_CONF == CONF_2KB_F4_1)
00590 #     define NF_COPYBACK_CONT    0
00591 #     define NF_COPYBACK_DISCONT 0
00592 #     define NF_CACHE_PROGRAM    0
00593 #     define NF_CE_TOGGLE        0
00594 #     define NF_TIMING_READ      0
00595 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00596 #  endif   // (defined CONF_2KB_X)
00597 
00598 #endif   // (defined NF_DEV_CONF) = static mode
00599 
00600 #endif   // (NF_AUTO_DETECT_2KB==TRUE)
00601 
00602 
00603 #if ((NF_AUTO_DETECT_2KB == TRUE) || (NF_TYPE_2KB_KNOWN == TRUE))
00604 //**** HERE A 2KB driver with 64pages by block is used in generic or single mode ****
00605 #  define NF_SHIFT_PAGE_BYTE          11  // (1<<n) size of page  (2KB), unit in bytes
00606 #  define NF_SHIFT_BLOCK_PAGE          6  // (1<<n) size of block (64p), unit in pages
00607 #endif
00608 
00609 #endif   // _NF_2KB_H_

Generated on Wed Sep 23 09:17:02 2009 for ATMEL by  doxygen 1.5.3