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
|
|
|
|
|
|
2011-04-02 00:15:49 +02:00
|
|
|
#define __arch_ioremap __imx_ioremap
|
2008-10-15 09:50:23 +02:00
|
|
|
#define __arch_iounmap __iounmap
|
|
|
|
|
|
2011-04-02 00:15:49 +02:00
|
|
|
#define addr_in_module(addr, mod) \
|
|
|
|
|
((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
|
|
|
|
|
|
2011-09-28 17:16:07 +08:00
|
|
|
extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
|
|
|
|
|
|
2008-10-15 09:50:23 +02:00
|
|
|
static inline void __iomem *
|
2011-04-02 00:15:49 +02:00
|
|
|
__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
|
2008-10-15 09:50:23 +02:00
|
|
|
{
|
2011-09-28 17:16:07 +08:00
|
|
|
if (imx_ioremap != NULL)
|
|
|
|
|
return imx_ioremap(phys_addr, size, mtype);
|
|
|
|
|
else
|
|
|
|
|
return __arm_ioremap(phys_addr, size, mtype);
|
2008-10-15 09:50:23 +02:00
|
|
|
}
|
|
|
|
|
|
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
|