source: rtems/c/src/lib/libcpu/arm/at91rm9200/include/at91rm9200_mem.h @ cfaa366

4.115
Last change on this file since cfaa366 was cfaa366, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 17:55:58

General - Remove extraneous blank line in license message

Many files had an extra blank line in the license text
found in the file header. This patch removes that line.

The script that did this also turned off execute permission
when it was turned on incorrectly.

  • Property mode set to 100644
File size: 6.4 KB
Line 
1/*
2 * AT91RM9200 Memory Controller definitions
3 *
4 * Copyright (c) 2002 by Cogent Computer Systems
5 * Written by Mike Kelly <mike@cogcomp.com>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13#ifndef AT91RM9200_MEM_H
14#define AT91RM9200_MEM_H
15
16/**********************************************************************
17 *       External Bus Interface Unit
18 **********************************************************************/
19#define EBI_CSA             0x00    /* Chip Select Assignment Register */
20#define EBI_CFGR            0x04    /* Configuration Register */
21
22/* Bit Defines */
23/* EBI_CSA - Chip Select Assignment Register */
24#define EBI_CSA_CS4_CF        BIT4    /* 1 = CS4-6 are assigned to Compact Flash, 0 = Chip Selects */
25#define EBI_CSA_CS3_SMM       BIT3    /* 1 = CS3 is assigned to SmartMedia, 0 = Chip Select */
26#define EBI_CSA_CS1_SDRAM     BIT1    /* 1 = CS1 is assigned to SDRAM, 0 = Chip Select */
27#define EBI_CSA_CS0_BF        BIT0    /* 1 = CS0 is assigned to Burst Flash, 0 = Chip Select */
28
29/* EBI_CFGR     - Configuration Register */
30#define EBI_CFGR_DBPU         BIT0    /* 1 = Disable D0-15 pullups         */
31
32/***************************************************************************
33 * Static Memory Interface Unit
34 ***************************************************************************/
35#define SMC_CSR0            0x00    /* Chip Select Register 0  */
36#define SMC_CSR1            0x04    /* Chip Select Register 1  */
37#define SMC_CSR2            0x08    /* Chip Select Register 2  */
38#define SMC_CSR3            0x0C    /* Chip Select Register 3  */
39#define SMC_CSR4            0x10    /* Chip Select Register 4  */
40#define SMC_CSR5            0x14    /* Chip Select Register 5  */
41#define SMC_CSR6            0x18    /* Chip Select Register 6  */
42#define SMC_CSR7            0x1C    /* Chip Select Register 7  */
43
44/* Bit Defines */
45/* SMC_CSR0 -7 - Chip Selects 0 - 7 Register */
46#define SMC_CSR_RWHOLD(_x_)        ((_x_ & 0x3) << 28)     /* Hold CS after R/W strobes */
47#define SMC_CSR_RWSETUP(_x_)    ((_x_ & 0x3) << 24)     /* Setup CS before R/W strobes */
48#define SMC_CSR_ACSS_0        (0 << 16)           /* Setup/Hold Address 0 clocks before/after CS */
49#define SMC_CSR_ACSS_1        (1 << 16)           /* Setup/Hold Address 1 clock before/after CS */
50#define SMC_CSR_ACSS_2        (2 << 16)           /* Setup/Hold Address 2 clocks before/after CS */
51#define SMC_CSR_ACSS_3        (3 << 16)           /* Setup/Hold Address 3 clocks before/after CS */
52#define SMC_CSR_DRP_NORMAL    0                 /* 0 = normal read protocol */
53#define SMC_CSR_DRP_EARLY     BIT15          /* 1 = early read protocol */
54#define SMC_CSR_DBW_16        (1 << 13)           /* CS DataBus Width = 16-Bits */
55#define SMC_CSR_DBW_8         (2 << 13)           /* CS DataBus Width = 8 Bits */
56#define SMC_CSR_BAT_16_1      0                 /* Single 16-Bit device (when DBW is 16) */
57#define SMC_CSR_BAT_16_2      BIT12          /* Dual 8-Bit devices (when DBW is 16) */
58#define SMC_CSR_TDF(_x_)      ((_x_ & 0xf) << 8)    /* Intercycle Data Float Time */
59#define SMC_CSR_WSEN          BIT7           /* 1 = wait states are enabled */
60#define SMC_CSR_NWS(_x_)      ((_x_ & 0x7f) << 0)     /* Wait States + 1 */
61
62/* ***************************************************************************** */
63/* SDRAM Memory Interface Unit */
64/* ***************************************************************************** */
65#define SDRC_MR             0x00       /* Mode Register */
66#define SDRC_TR             0x04       /* Refresh Timer Register */
67#define SDRC_CR             0x08       /* Configuration Register */
68#define SDRC_SRR            0x0C       /* Self Refresh Register */
69#define SDRC_LPR            0x10       /* Low Power Register */
70#define SDRC_IER            0x14       /* Interrupt Enable Register */
71#define SDRC_IDR            0x18       /* Interrupt Disable Register */
72#define SDRC_IMR            0x1C       /* Interrupt Mask Register */
73#define SDRC_ISR            0x20       /* Interrupt Status Register */
74
75/* Bit Defines */
76/* SDRC_MR - Mode Register */
77#define SDRC_MR_DBW_16        BIT4       /* 1 = SDRAM is 16-bits wide, 0 = 32-bits */
78#define SDRC_MR_NORM          (0 << 0)   /* Normal Mode - All accesses to SDRAM are decoded normally */
79#define SDRC_MR_NOP         (1 << 0)   /* NOP Command is sent to SDRAM */
80#define SDRC_MR_PRE         (2 << 0)   /* Precharge All Command is sent to SDRAM */
81#define SDRC_MR_MRS         (3 << 0)   /* Mode Register Set Command is sent to SDRAM */
82#define SDRC_MR_REF         (4 << 0)   /* Refresh Command is sent to SDRAM */
83
84/* SDRC_TR - Refresh Timer Register */
85#define SDRC_TR_COUNT(_x_)    ((_x_ & 0xfff) << 0)
86
87/* SDRC_CR - Configuration Register */
88#define SDRC_CR_TXSR(_x_)     ((_x_ & 0xf) << 27)     /* CKE to ACT Time */
89#define SDRC_CR_TRAS(_x_)     ((_x_ & 0xf) << 23)     /* ACT to PRE Time */
90#define SDRC_CR_TRCD(_x_)     ((_x_ & 0xf) << 19)     /* RAS to CAS Time */
91#define SDRC_CR_TRP(_x_)      ((_x_ & 0xf) << 15)     /* PRE to ACT Time */
92#define SDRC_CR_TRC(_x_)      ((_x_ & 0xf) << 11)     /* REF to ACT Time */
93#define SDRC_CR_TWR(_x_)      ((_x_ & 0xf) << 7)      /* Write Recovery Time */
94#define SDRC_CR_CAS_2         (2 << 5)   /* Cas Delay = 2, this is the only supported value */
95#define SDRC_CR_NB_2          0        /* 2 Banks per device */
96#define SDRC_CR_NB_4          BIT4       /* 4 Banks per device */
97#define SDRC_CR_NR_11         (0 << 2)   /* Number of rows = 11 */
98#define SDRC_CR_NR_12         (1 << 2)   /* Number of rows = 12 */
99#define SDRC_CR_NR_13         (2 << 2)   /* Number of rows = 13 */
100#define SDRC_CR_NC_8          (0 << 0)   /* Number of columns = 8 */
101#define SDRC_CR_NC_9          (1 << 0)   /* Number of columns = 9 */
102#define SDRC_CR_NC_10         (2 << 0)   /* Number of columns = 10 */
103#define SDRC_CR_NC_11         (3 << 0)   /* Number of columns = 11 */
104
105/* SDRC_SRR - Self Refresh Register */
106#define SDRC_SRR_SRCB         BIT0       /* 1 = Enter Self Refresh */
107
108/* SDRC_LPR - Low Power Register */
109#define SDRC_LPR_LPCB         BIT0       /* 1 = De-assert CKE between accesses */
110
111/* SDRC_IER - Interrupt Enable Register */
112/* SDRC_IDR - Interrupt Disable Register */
113/* SDRC_ISR - Interrupt Mask Register */
114/* SDRC_IMR - Interrupt Mask Register */
115#define SDRC_INT_RES          BIT0       /* Refresh Error Status */
116
117#endif
Note: See TracBrowser for help on using the repository browser.