]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/barco/speed.h
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / barco / speed.h
1 /********************************************************************
2  *
3  * Unless otherwise specified, Copyright (C) 2004-2005 Barco Control Rooms
4  *
5  * $Source$
6  * $Revision$
7  * $Author$
8  * $Date$
9  *
10  * Last ChangeLog Entry
11  * $Log$
12  * Revision 1.1.5.1  2011-02-28 14:41:59  lothar
13  * imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
14  *
15  * Revision 1.2  2005/02/21 12:48:58  mleeman
16  * update of copyright years (feedback wd)
17  *
18  * Revision 1.1  2005/02/14 09:23:46  mleeman
19  * - moved 'barcohydra' directory to a more generic barco; since we will be
20  *   supporting and adding multiple boards
21  *
22  * Revision 1.2  2005/02/09 12:56:23  mleeman
23  * add generic header to track changes in sources
24  *
25  *
26  *******************************************************************/
27
28 /*
29  * (C) Copyright 2000
30  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
31  *
32  * See file CREDITS for list of people who contributed to this
33  * project.
34  *
35  * This program is free software; you can redistribute it and/or
36  * modify it under the terms of the GNU General Public License as
37  * published by the Free Software Foundation; either version 2 of
38  * the License, or (at your option) any later version.
39  *
40  * This program is distributed in the hope that it will be useful,
41  * but WITHOUT ANY WARRANTY; without even the implied warranty of
42  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43  * GNU General Public License for more details.
44  *
45  * You should have received a copy of the GNU General Public License
46  * along with this program; if not, write to the Free Software
47  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
48  * MA 02111-1307 USA
49  */
50
51 /*-----------------------------------------------------------------------
52  * Timer value for timer 2, ICLK = 10
53  *
54  * SPEED_FCOUNT2 =  GCLK / (16 * (TIMER_TMR_PS + 1))
55  * SPEED_TMR3_PS = (GCLK / (16 * SPEED_FCOUNT3)) - 1
56  *
57  * SPEED_FCOUNT2        timer 2 counting frequency
58  * GCLK                 CPU clock
59  * SPEED_TMR2_PS        prescaler
60  */
61 #define SPEED_TMR2_PS   (250 - 1)       /* divide by 250        */
62
63 /*-----------------------------------------------------------------------
64  * Timer value for PIT
65  *
66  * PIT_TIME = SPEED_PITC / PITRTCLK
67  * PITRTCLK = 8192
68  */
69 #define SPEED_PITC      (82 << 16)      /* start counting from 82       */
70
71 /*
72  * The new value for PTA is calculated from
73  *
74  *      PTA = (gclk * Trefresh) / (2 ^ (2 * DFBRG) * PTP * NCS)
75  *
76  * gclk         CPU clock (not bus clock !)
77  * Trefresh     Refresh cycle * 4 (four word bursts used)
78  * DFBRG        For normal mode (no clock reduction) always 0
79  * PTP          Prescaler (already adjusted for no. of banks and 4K / 8K refresh)
80  * NCS          Number of SDRAM banks (chip selects) on this UPM.
81  */