9192c6281358068d6b643a3d63b511be821da867
[platform/kernel/u-boot.git] / arch / powerpc / include / asm / ppc405ez.h
1 /*
2  * (C) Copyright 2010
3  * Stefan Roese, DENX Software Engineering, sr@denx.de.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18  * MA 02111-1307 USA
19  */
20
21 #ifndef _PPC405EZ_H_
22 #define _PPC405EZ_H_
23
24 #define CONFIG_NAND_NDFC
25
26 /* Memory mapped register */
27 #define GPIO0_BASE      0xef600700
28 #define GPIO1_BASE      0xef600800
29
30 /* DCR register */
31 #define OCM0_PLBCR1     0x0020  /* OCM PLB3 Bank 1 Config */
32 #define OCM0_PLBCR2     0x0021  /* OCM PLB3 Bank 2 Config */
33 #define OCM0_PLBBEAR    0x0022  /* OCM PLB3 Bus Error Add */
34 #define OCM0_DSRC1      0x0028  /* OCM D-side Bank 1 Config */
35 #define OCM0_DSRC2      0x0029  /* OCM D-side Bank 2 Config */
36 #define OCM0_ISRC1      0x002A  /* OCM I-side Bank 1Config */
37 #define OCM0_ISRC2      0x002B  /* OCM I-side Bank 2 Config */
38 #define OCM0_DISDPC     0x002C  /* OCM D-/I-side Data Par Chk */
39
40 /* SDR register */
41 #define SDR0_NAND0      0x4000
42 #define SDR0_ULTRA0     0x4040
43 #define SDR0_ULTRA1     0x4050
44 #define SDR0_ICINTSTAT  0x4510
45
46 /* CPR register */
47 #define CPR0_PRIMAD     0x0080
48 #define CPR0_PERD0      0x00e0
49 #define CPR0_PERD1      0x00e1
50 #define CPR0_PERC0      0x0180
51
52 #define MAL_DCR_BASE    0x380
53
54 #define SDR_NAND0_NDEN          0x80000000
55 #define SDR_NAND0_NDBTEN        0x40000000
56 #define SDR_NAND0_NDBADR_MASK   0x30000000
57 #define SDR_NAND0_NDBPG_MASK    0x0f000000
58 #define SDR_NAND0_NDAREN        0x00800000
59 #define SDR_NAND0_NDRBEN        0x00400000
60
61 #define SDR_ULTRA0_NDGPIOBP     0x80000000
62 #define SDR_ULTRA0_CSN_MASK     0x78000000
63 #define SDR_ULTRA0_CSNSEL0      0x40000000
64 #define SDR_ULTRA0_CSNSEL1      0x20000000
65 #define SDR_ULTRA0_CSNSEL2      0x10000000
66 #define SDR_ULTRA0_CSNSEL3      0x08000000
67 #define SDR_ULTRA0_EBCRDYEN     0x04000000
68 #define SDR_ULTRA0_SPISSINEN    0x02000000
69 #define SDR_ULTRA0_NFSRSTEN     0x01000000
70
71 #define SDR_ULTRA1_LEDNENABLE   0x40000000
72
73 #define SDR_ICRX_STAT           0x80000000
74 #define SDR_ICTX0_STAT          0x40000000
75 #define SDR_ICTX1_STAT          0x20000000
76
77 #define CPR_CLKUPD_ENPLLCH_EN   0x40000000 /* Enable CPR PLL Changes */
78 #define CPR_CLKUPD_ENDVCH_EN    0x20000000 /* Enable CPR Sys. Div. Changes */
79 #define CPR_PERD0_SPIDV_MASK    0x000F0000 /* SPI Clock Divider */
80
81 #define PLLC_SRC_MASK           0x20000000 /* PLL feedback source */
82
83 #define PLLD_FBDV_MASK          0x1F000000 /* PLL feedback divider value */
84 #define PLLD_FWDVA_MASK         0x000F0000 /* PLL forward divider A value */
85 #define PLLD_FWDVB_MASK         0x00000700 /* PLL forward divider B value */
86
87 #define PRIMAD_CPUDV_MASK       0x0F000000 /* CPU Clock Divisor Mask */
88 #define PRIMAD_PLBDV_MASK       0x000F0000 /* PLB Clock Divisor Mask */
89 #define PRIMAD_OPBDV_MASK       0x00000F00 /* OPB Clock Divisor Mask */
90 #define PRIMAD_EBCDV_MASK       0x0000000F /* EBC Clock Divisor Mask */
91
92 #define PERD0_PWMDV_MASK        0xFF000000 /* PWM Divider Mask */
93 #define PERD0_SPIDV_MASK        0x000F0000 /* SPI Divider Mask */
94 #define PERD0_U0DV_MASK         0x0000FF00 /* UART 0 Divider Mask */
95 #define PERD0_U1DV_MASK         0x000000FF /* UART 1 Divider Mask */
96
97 #endif /* _PPC405EZ_H_ */