| 
									
										
										
										
											2009-11-28 08:10:40 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (C) 2009 ST-Ericsson. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * U8500 hardware definitions | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is licensed under  the terms of the GNU General Public | 
					
						
							|  |  |  |  * License version 2. This program is licensed "as is" without any | 
					
						
							|  |  |  |  * warranty of any kind, whether express or implied. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #ifndef __MACH_HARDWARE_H
 | 
					
						
							|  |  |  | #define __MACH_HARDWARE_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 11:41:09 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Macros to get at IO space when running virtually | 
					
						
							| 
									
										
										
										
											2009-11-28 08:10:40 +01:00
										 |  |  |  * We dont map all the peripherals, let ioremap do | 
					
						
							|  |  |  |  * this for us. We map only very basic peripherals here. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define U8500_IO_VIRTUAL	0xf0000000
 | 
					
						
							|  |  |  | #define U8500_IO_PHYSICAL	0xa0000000
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 11:41:09 +01:00
										 |  |  | /* This macro is used in assembly, so no cast */ | 
					
						
							| 
									
										
										
										
											2009-11-28 08:10:40 +01:00
										 |  |  | #define IO_ADDRESS(x)           \
 | 
					
						
							|  |  |  | 	(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* typesafe io address */ | 
					
						
							|  |  |  | #define __io_address(n)		__io(IO_ADDRESS(n))
 | 
					
						
							| 
									
										
										
										
											2011-12-15 11:41:09 +01:00
										 |  |  | /* Used by some plat-nomadik code */ | 
					
						
							| 
									
										
										
										
											2010-03-03 04:54:37 +01:00
										 |  |  | #define io_p2v(n)		__io_address(n)
 | 
					
						
							| 
									
										
										
										
											2009-11-28 08:10:40 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-03 07:34:53 +01:00
										 |  |  | #include <mach/db8500-regs.h>
 | 
					
						
							|  |  |  | #include <mach/db5500-regs.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-01 05:05:56 +01:00
										 |  |  | #ifndef __ASSEMBLY__
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-08 11:07:59 +05:30
										 |  |  | #include <mach/id.h>
 | 
					
						
							| 
									
										
										
										
											2011-03-29 16:53:29 +02:00
										 |  |  | extern void __iomem *_PRCMU_BASE; | 
					
						
							| 
									
										
										
										
											2010-05-03 08:46:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-08 11:07:55 +05:30
										 |  |  | #define ARRAY_AND_SIZE(x)	(x), ARRAY_SIZE(x)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-15 11:41:09 +01:00
										 |  |  | #endif				/* __ASSEMBLY__ */
 | 
					
						
							| 
									
										
										
										
											2009-11-28 08:10:40 +01:00
										 |  |  | #endif				/* __MACH_HARDWARE_H */
 |