Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hardware.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 ST-Ericsson.
3  *
4  * U8500 hardware definitions
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2. This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 #ifndef __MACH_HARDWARE_H
11 #define __MACH_HARDWARE_H
12 
13 /*
14  * Macros to get at IO space when running virtually
15  * We dont map all the peripherals, let ioremap do
16  * this for us. We map only very basic peripherals here.
17  */
18 #define U8500_IO_VIRTUAL 0xf0000000
19 #define U8500_IO_PHYSICAL 0xa0000000
20 /* This is where we map in the ROM to check ASIC IDs */
21 #define UX500_VIRT_ROM 0xf0000000
22 
23 /* This macro is used in assembly, so no cast */
24 #define IO_ADDRESS(x) \
25  (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
26 
27 /* typesafe io address */
28 #define __io_address(n) IOMEM(IO_ADDRESS(n))
29 
30 /* Used by some plat-nomadik code */
31 #define io_p2v(n) __io_address(n)
32 
33 #include <mach/db8500-regs.h>
34 
35 #define MSP_TX_RX_REG_OFFSET 0
36 #define CRYP1_RX_REG_OFFSET 0x10
37 #define CRYP1_TX_REG_OFFSET 0x8
38 #define HASH1_TX_REG_OFFSET 0x4
39 
40 #ifndef __ASSEMBLY__
41 
42 #include <mach/id.h>
43 extern void __iomem *_PRCMU_BASE;
44 
45 #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
46 
47 #endif /* __ASSEMBLY__ */
48 #endif /* __MACH_HARDWARE_H */