| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2010, Google Inc. |
| 3 * All rights reserved. |
| 4 * |
| 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are |
| 7 * met: |
| 8 * |
| 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. |
| 11 * * Redistributions in binary form must reproduce the above |
| 12 * copyright notice, this list of conditions and the following disclaimer |
| 13 * in the documentation and/or other materials provided with the |
| 14 * distribution. |
| 15 * * Neither the name of Google Inc. nor the names of its |
| 16 * contributors may be used to endorse or promote products derived from |
| 17 * this software without specific prior written permission. |
| 18 * |
| 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 * |
| 31 * Alternatively, this software may be distributed under the terms of the |
| 32 * GNU General Public License ("GPL") version 2 as published by the Free |
| 33 * Software Foundation. |
| 34 */ |
| 35 /* Set clock divisor |
| 36 * 7 bits of D and 1 bit of H |
| 37 * divisor= (DDDDDDD + 1) + (H x 0.5) |
| 38 * clock = original clock / divisor |
| 39 * 6 means /4 */ |
| 40 #define CONFIG_NAND_CLK_DIVISOR_DDDDDDDH 6 |
| 41 |
| 42 #ifdef CONFIG_TEGRA2_NAND_HYNIX_HY27UF4G2B |
| 43 /* For HYNIX HY27UF4G2B |
| 44 * Frequence output of PLLP_OUT0 is set by BOOTROM to 216MHz |
| 45 * to CLK_RST_CONTROLLER_PLLP_BASE_0, |
| 46 * 216MHz / divisor 4 = 54MHZ |
| 47 * 1 clock = 18.5 ns = NAND_CLK_PERIOD |
| 48 * TRP_RESP_CNT=n, max(tRP, tREA)= max(12ns, 20ns)= 20ns for non-EDO mode |
| 49 * bit 31-28=n=1, generated timing= (n+1) * NAND_CLK_PERIOD= (1+1)* 18.5 |
| 50 * TWB_CNT bit 27-24=n, tWB = 100ns = (n+1)* 18.5, so n= 5 (bit 27-24) |
| 51 * similar way for other fields, please refer to reference manual |
| 52 */ |
| 53 /* Value to be set to NAND_TIMING_0 register, address=70008014h */ |
| 54 #define CONFIG_TEGRA2_NAND_TIMING 0x15040001 |
| 55 /* Value to be set to NAND_TIMING2_0 register, address=7000801Ch */ |
| 56 #define CONFIG_TEGRA2_NAND_TIMING2 0x01 |
| 57 #endif |
| OLD | NEW |