2007-07-10 05:06:53 +08: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 17:59:08 +08:00
|
|
|
/* Allow IO space to be anywhere in the memory */
|
2007-07-10 05:06:53 +08:00
|
|
|
#define IO_SPACE_LIMIT 0xffffffff
|
|
|
|
|
2008-10-15 15:50:23 +08: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 18:51:57 +08:00
|
|
|
if ((phys_addr < 0x80000000) && ((phys_addr < 0x30000000) ||
|
|
|
|
(phys_addr >= 0x30000000 + SZ_1M)))
|
2008-10-15 15:50:23 +08:00
|
|
|
mtype = MT_DEVICE_NONSHARED;
|
|
|
|
}
|
|
|
|
|
|
|
|
return __arm_ioremap(phys_addr, size, mtype);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-03-28 17:59:08 +08:00
|
|
|
/* io address mapping macro */
|
2008-11-30 19:45:54 +08:00
|
|
|
#define __io(a) __typesafe_io(a)
|
2007-07-10 05:06:53 +08:00
|
|
|
|
2008-11-30 19:45:54 +08:00
|
|
|
#define __mem_pci(a) (a)
|
2007-07-10 05:06:53 +08:00
|
|
|
|
|
|
|
#endif
|