| 
									
										
										
										
											2007-07-09 22:06:53 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  *  Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License version 2 as | 
					
						
							|  |  |  |  * published by the Free Software Foundation. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef __ASM_ARCH_MXC_IO_H__
 | 
					
						
							|  |  |  | #define __ASM_ARCH_MXC_IO_H__
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-28 10:59:08 +01:00
										 |  |  | /* Allow IO space to be anywhere in the memory */ | 
					
						
							| 
									
										
										
										
											2007-07-09 22:06:53 +01:00
										 |  |  | #define IO_SPACE_LIMIT 0xffffffff
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-10-15 09:50:23 +02:00
										 |  |  | #ifdef CONFIG_ARCH_MX3
 | 
					
						
							|  |  |  | #define __arch_ioremap __mx3_ioremap
 | 
					
						
							|  |  |  | #define __arch_iounmap __iounmap
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static inline void __iomem * | 
					
						
							|  |  |  | __mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (mtype == MT_DEVICE) { | 
					
						
							|  |  |  | 		/* Access all peripherals below 0x80000000 as nonshared device
 | 
					
						
							|  |  |  | 		 * but leave l2cc alone. | 
					
						
							|  |  |  | 		 */ | 
					
						
							| 
									
										
										
										
											2008-12-18 11:51:57 +01:00
										 |  |  | 		if ((phys_addr < 0x80000000) && ((phys_addr < 0x30000000) || | 
					
						
							|  |  |  | 			(phys_addr >= 0x30000000 + SZ_1M))) | 
					
						
							| 
									
										
										
										
											2008-10-15 09:50:23 +02:00
										 |  |  | 			mtype = MT_DEVICE_NONSHARED; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	return __arm_ioremap(phys_addr, size, mtype); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-28 10:59:08 +01:00
										 |  |  | /* io address mapping macro */ | 
					
						
							| 
									
										
										
										
											2008-11-30 11:45:54 +00:00
										 |  |  | #define __io(a)		__typesafe_io(a)
 | 
					
						
							| 
									
										
										
										
											2007-07-09 22:06:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-30 11:45:54 +00:00
										 |  |  | #define __mem_pci(a)	(a)
 | 
					
						
							| 
									
										
										
										
											2007-07-09 22:06:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #endif
 |