aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-omap3/omap3-regs.h
blob: 818214f46688528809540ff205f57293e6785519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
 * (c) 2011 Comelit Group SpA, Luca Ceresoli <luca.ceresoli@comelit.it>
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

#ifndef _OMAP3_REGS_H
#define _OMAP3_REGS_H

/*
 * Register definitions for OMAP3 processors.
 */

/*
 * GPMC_CONFIG1 - GPMC_CONFIG7
 */

/* Values for GPMC_CONFIG1 - signal control parameters */
#define WRAPBURST                     (1 << 31)
#define READMULTIPLE                  (1 << 30)
#define READTYPE                      (1 << 29)
#define WRITEMULTIPLE                 (1 << 28)
#define WRITETYPE                     (1 << 27)
#define CLKACTIVATIONTIME(x)          (((x) & 3) << 25)
#define ATTACHEDDEVICEPAGELENGTH(x)   (((x) & 3) << 23)
#define WAITREADMONITORING            (1 << 22)
#define WAITWRITEMONITORING           (1 << 21)
#define WAITMONITORINGTIME(x)         (((x) & 3) << 18)
#define WAITPINSELECT(x)              (((x) & 3) << 16)
#define DEVICESIZE(x)                 (((x) & 3) << 12)
#define DEVICESIZE_8BIT               DEVICESIZE(0)
#define DEVICESIZE_16BIT              DEVICESIZE(1)
#define DEVICETYPE(x)                 (((x) & 3) << 10)
#define DEVICETYPE_NOR                DEVICETYPE(0)
#define DEVICETYPE_NAND               DEVICETYPE(2)
#define MUXADDDATA                    (1 << 9)
#define TIMEPARAGRANULARITY           (1 << 4)
#define GPMCFCLKDIVIDER(x)            (((x) & 3) << 0)

/* Values for GPMC_CONFIG2 - CS timing */
#define CSWROFFTIME(x)   (((x) & 0x1f) << 16)
#define CSRDOFFTIME(x)   (((x) & 0x1f) <<  8)
#define CSEXTRADELAY     (1 << 7)
#define CSONTIME(x)      (((x) &  0xf) <<  0)

/* Values for GPMC_CONFIG3 - nADV timing */
#define ADVWROFFTIME(x)  (((x) & 0x1f) << 16)
#define ADVRDOFFTIME(x)  (((x) & 0x1f) <<  8)
#define ADVEXTRADELAY    (1 << 7)
#define ADVONTIME(x)     (((x) &  0xf) <<  0)

/* Values for GPMC_CONFIG4 - nWE and nOE timing */
#define WEOFFTIME(x)     (((x) & 0x1f) << 24)
#define WEEXTRADELAY     (1 << 23)
#define WEONTIME(x)      (((x) &  0xf) << 16)
#define OEOFFTIME(x)     (((x) & 0x1f) <<  8)
#define OEEXTRADELAY     (1 << 7)
#define OEONTIME(x)      (((x) &  0xf) <<  0)

/* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
#define PAGEBURSTACCESSTIME(x)  (((x) &  0xf) << 24)
#define RDACCESSTIME(x)         (((x) & 0x1f) << 16)
#define WRCYCLETIME(x)          (((x) & 0x1f) <<  8)
#define RDCYCLETIME(x)          (((x) & 0x1f) <<  0)

/* Values for GPMC_CONFIG6 - misc timings */
#define WRACCESSTIME(x)        (((x) & 0x1f) << 24)
#define WRDATAONADMUXBUS(x)    (((x) &  0xf) << 16)
#define CYCLE2CYCLEDELAY(x)    (((x) &  0xf) <<  8)
#define CYCLE2CYCLESAMECSEN    (1 << 7)
#define CYCLE2CYCLEDIFFCSEN    (1 << 6)
#define BUSTURNAROUND(x)       (((x) &  0xf) <<  0)

/* Values for GPMC_CONFIG7 - CS address mapping configuration */
#define MASKADDRESS(x)         (((x) &  0xf) <<  8)
#define CSVALID                (1 << 6)
#define BASEADDRESS(x)         (((x) & 0x3f) <<  0)

#endif /* _OMAP3_REGS_H */