]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/include/asm/arch-omap3/omap3-regs.h
818214f46688528809540ff205f57293e6785519
[people/ms/u-boot.git] / arch / arm / include / asm / arch-omap3 / omap3-regs.h
1 /*
2 * (c) 2011 Comelit Group SpA, Luca Ceresoli <luca.ceresoli@comelit.it>
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 #ifndef _OMAP3_REGS_H
24 #define _OMAP3_REGS_H
25
26 /*
27 * Register definitions for OMAP3 processors.
28 */
29
30 /*
31 * GPMC_CONFIG1 - GPMC_CONFIG7
32 */
33
34 /* Values for GPMC_CONFIG1 - signal control parameters */
35 #define WRAPBURST (1 << 31)
36 #define READMULTIPLE (1 << 30)
37 #define READTYPE (1 << 29)
38 #define WRITEMULTIPLE (1 << 28)
39 #define WRITETYPE (1 << 27)
40 #define CLKACTIVATIONTIME(x) (((x) & 3) << 25)
41 #define ATTACHEDDEVICEPAGELENGTH(x) (((x) & 3) << 23)
42 #define WAITREADMONITORING (1 << 22)
43 #define WAITWRITEMONITORING (1 << 21)
44 #define WAITMONITORINGTIME(x) (((x) & 3) << 18)
45 #define WAITPINSELECT(x) (((x) & 3) << 16)
46 #define DEVICESIZE(x) (((x) & 3) << 12)
47 #define DEVICESIZE_8BIT DEVICESIZE(0)
48 #define DEVICESIZE_16BIT DEVICESIZE(1)
49 #define DEVICETYPE(x) (((x) & 3) << 10)
50 #define DEVICETYPE_NOR DEVICETYPE(0)
51 #define DEVICETYPE_NAND DEVICETYPE(2)
52 #define MUXADDDATA (1 << 9)
53 #define TIMEPARAGRANULARITY (1 << 4)
54 #define GPMCFCLKDIVIDER(x) (((x) & 3) << 0)
55
56 /* Values for GPMC_CONFIG2 - CS timing */
57 #define CSWROFFTIME(x) (((x) & 0x1f) << 16)
58 #define CSRDOFFTIME(x) (((x) & 0x1f) << 8)
59 #define CSEXTRADELAY (1 << 7)
60 #define CSONTIME(x) (((x) & 0xf) << 0)
61
62 /* Values for GPMC_CONFIG3 - nADV timing */
63 #define ADVWROFFTIME(x) (((x) & 0x1f) << 16)
64 #define ADVRDOFFTIME(x) (((x) & 0x1f) << 8)
65 #define ADVEXTRADELAY (1 << 7)
66 #define ADVONTIME(x) (((x) & 0xf) << 0)
67
68 /* Values for GPMC_CONFIG4 - nWE and nOE timing */
69 #define WEOFFTIME(x) (((x) & 0x1f) << 24)
70 #define WEEXTRADELAY (1 << 23)
71 #define WEONTIME(x) (((x) & 0xf) << 16)
72 #define OEOFFTIME(x) (((x) & 0x1f) << 8)
73 #define OEEXTRADELAY (1 << 7)
74 #define OEONTIME(x) (((x) & 0xf) << 0)
75
76 /* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
77 #define PAGEBURSTACCESSTIME(x) (((x) & 0xf) << 24)
78 #define RDACCESSTIME(x) (((x) & 0x1f) << 16)
79 #define WRCYCLETIME(x) (((x) & 0x1f) << 8)
80 #define RDCYCLETIME(x) (((x) & 0x1f) << 0)
81
82 /* Values for GPMC_CONFIG6 - misc timings */
83 #define WRACCESSTIME(x) (((x) & 0x1f) << 24)
84 #define WRDATAONADMUXBUS(x) (((x) & 0xf) << 16)
85 #define CYCLE2CYCLEDELAY(x) (((x) & 0xf) << 8)
86 #define CYCLE2CYCLESAMECSEN (1 << 7)
87 #define CYCLE2CYCLEDIFFCSEN (1 << 6)
88 #define BUSTURNAROUND(x) (((x) & 0xf) << 0)
89
90 /* Values for GPMC_CONFIG7 - CS address mapping configuration */
91 #define MASKADDRESS(x) (((x) & 0xf) << 8)
92 #define CSVALID (1 << 6)
93 #define BASEADDRESS(x) (((x) & 0x3f) << 0)
94
95 #endif /* _OMAP3_REGS_H */