]> git.sur5r.net Git - u-boot/blob - include/asm-arm/arch-arm1136/mem.h
* Patches by Richard Woodruff, 01 Oct 2004:
[u-boot] / include / asm-arm / arch-arm1136 / mem.h
1 /*
2  * (C) Copyright 2004
3  * Texas Instruments, <www.ti.com>
4  * Richard Woodruff <r-woodruff2@ti.com>
5  *
6  * See file CREDITS for list of people who contributed to this
7  * project.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of
12  * the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22  * MA 02111-1307 USA
23  */
24
25 #ifndef _OMAP24XX_MEM_H_
26 #define _OMAP24XX_MEM_H_
27
28 #define SDRC_CS0_OSET    0x0
29 #define SDRC_CS1_OSET    0x30  /* mirror CS1 regs appear offset 0x30 from CS0 */
30
31 #ifndef __ASSEMBLY__
32 /* struct's for holding data tables for current boards, they are getting used
33    early in init when NO global access are there */
34 struct sdrc_data_s {
35         u32    sdrc_sharing;
36         u32    sdrc_mdcfg_0;
37         u32    sdrc_actim_ctrla_0;
38         u32    sdrc_actim_ctrlb_0;
39         u32    sdrc_rfr_ctrl;
40         u32    sdrc_mr_0;
41         u32    sdrc_dlla_ctrl;
42         u32    sdrc_dllb_ctrl;
43 } /*__attribute__ ((packed))*/;
44 typedef struct sdrc_data_s sdrc_data_t;
45 #endif
46
47 /* Slower full frequency range default timings for x32 operation*/
48 #define H4_2420_SDRC_SHARING               0x00000100
49 #define H4_2420_SDRC_MDCFG_0               0x01702011
50 #define H4_2420_SDRC_ACTIM_CTRLA_0         0x9bead909
51 #define H4_2420_SDRC_ACTIM_CTRLB_0         0x00000014
52 #define H4_2420_SDRC_RFR_CTRL_ES1          0x00002401
53 #define H4_2420_SDRC_RFR_CTRL              0x0002da01
54 #define H4_2420_SDRC_MR_0                  0x00000032
55 #define H4_2420_SDRC_DLLA_CTRL             0x00007307
56 #define H4_2420_SDRC_DLLB_CTRL             0x00007307
57
58 #define H4_2422_SDRC_SHARING               0x00004b00
59 #define H4_2422_SDRC_MDCFG_0               0x00801011
60 #define H4_2422_SDRC_ACTIM_CTRLA_0         0x9BEAD909
61 #define H4_2422_SDRC_ACTIM_CTRLB_0         0x00000020
62 #define H4_2422_SDRC_RFR_CTRL_ES1          0x00002401
63 #define H4_2422_SDRC_RFR_CTRL              0x0002da03
64 #define H4_2422_SDRC_MR_0                  0x00000032
65 #define H4_2422_SDRC_DLLA_CTRL             0x00007307
66 #define H4_2422_SDRC_DLLB_CTRL             0x00007307
67
68 #define H4_2420_COMBO_MDCFG_0              0x00801011
69
70 /* optimized timings */
71 #define H4_2420_SDRC_ACTIM_CTRLA_0_100MHz  0x5A59B485
72 #define H4_2420_SDRC_ACTIM_CTRLB_0_100MHz  0x0000000e
73
74
75 #ifdef PRCM_CONFIG_II        /* L3 at 100MHz */
76 #define H4_24XX_GPMC_CONFIG1_0   0x3
77 #define H4_24XX_GPMC_CONFIG2_0   0x001f1f01
78 #define H4_24XX_GPMC_CONFIG3_0   0x00030301
79 #define H4_24XX_GPMC_CONFIG4_0   0x0C030C03
80 #define H4_24XX_GPMC_CONFIG5_0   0x01131F1F
81 #define H4_24XX_GPMC_CONFIG7_0   (0x00000C40|(H4_CS0_BASE >> 24))
82
83 #define H4_24XX_GPMC_CONFIG1_1   0x00011000
84 #define H4_24XX_GPMC_CONFIG2_1   0x001F1F00
85 #define H4_24XX_GPMC_CONFIG3_1   0x00080802
86 #define H4_24XX_GPMC_CONFIG4_1   0x1C091C09
87 #define H4_24XX_GPMC_CONFIG5_1   0x031A1F1F
88 #define H4_24XX_GPMC_CONFIG6_1   0x000003C2
89 #define H4_24XX_GPMC_CONFIG7_1   (0x00000F40|(H4_CS1_BASE >> 24))
90 #endif
91
92 #ifdef PRCM_CONFIG_III  /* L3 at 133MHz */
93 #define H4_24XX_GPMC_CONFIG1_0   0x3
94 #define H4_24XX_GPMC_CONFIG2_0   0x001f1f01
95 #define H4_24XX_GPMC_CONFIG3_0   0x001F1F00
96 #define H4_24XX_GPMC_CONFIG4_0   0x16061606
97 #define H4_24XX_GPMC_CONFIG5_0   0x01131F1F
98 #define H4_24XX_GPMC_CONFIG7_0   (0x00000C40|(H4_CS0_BASE >> 24))
99
100 #define H4_24XX_GPMC_CONFIG1_1   0x00011000
101 #define H4_24XX_GPMC_CONFIG2_1   0x001f1f01
102 #define H4_24XX_GPMC_CONFIG3_1   0x001F1F00
103 #define H4_24XX_GPMC_CONFIG4_1   0x1A061A06
104 #define H4_24XX_GPMC_CONFIG5_1   0x041F1F1F
105 #define H4_24XX_GPMC_CONFIG6_1   0x000004C4
106 #define H4_24XX_GPMC_CONFIG7_1   (0x00000F40|(H4_CS1_BASE >> 24))
107 #endif
108
109 #ifdef CONFIG_APTIX /* SDRC-SDR for Aptix x16 */
110 #define VAL_H4_SDRC_SHARING_16   0x00002400  /* No-Tristate, 16bit on D31-D16, CS1=dont care */
111 #define VAL_H4_SDRC_SHARING      0x00000100
112 #define VAL_H4_SDRC_MCFG_0_16    0x00901000  /* SDR-SDRAM,External,x16 bit */
113 #define VAL_H4_SDRC_MCFG_0       0x01702011
114 #define VAL_H4_SDRC_MR_0         0x00000029  /* Burst=2, Serial Mode, CAS 3*/
115 #define VAL_H4_SDRC_RFR_CTRL_0   0x00001703  /* refresh time */
116 #define VAL_H4_SDRC_DCDL2_CTRL   0x5A59B485
117 #endif
118
119 #endif