]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/asm-arm/arch-mx23/mx23.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / asm-arm / arch-mx23 / mx23.h
1 /*
2  * Copyright (C) 2008 Embedded Alley Solutions Inc.
3  *
4  * (C) Copyright 2009-2010 Freescale Semiconductor, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 #ifndef MX23_H
21 #define MX23_H
22
23 /*
24  * Most of 378x SoC registers are associated with four addresses
25  * used for different operations - read/write, set, clear and toggle bits.
26  *
27  * Some of registers do not implement such feature and, thus, should be
28  * accessed/manipulated via single address in common way.
29  */
30 #define REG_RD(x)       (*(volatile unsigned int *)(x))
31 #define REG_WR(x, v)    ((*(volatile unsigned int *)(x)) = (v))
32 #define REG_SET(x, v)   ((*(volatile unsigned int *)((x) + 0x04)) = (v))
33 #define REG_CLR(x, v)   ((*(volatile unsigned int *)((x) + 0x08)) = (v))
34 #define REG_TOG(x, v)   ((*(volatile unsigned int *)((x) + 0x0c)) = (v))
35
36 #define MX23_OCRAM_BASE 0x00000000
37 #define MX23_SDRAM_BASE 0x40000000
38 #define MX23_REGS_BASE  0x80000000
39
40 #endif /* STMP378X_H */