Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250045
b: refs/heads/master
c: d286a43
h: refs/heads/master
i:
  250043: 857e8e5
v: v3
  • Loading branch information
Uwe Kleine-König authored and Sascha Hauer committed May 19, 2011
1 parent 7d65342 commit a5d50d3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7db4d88206e20b8d91e8e7bba3b79805a1b1a98d
refs/heads/master: d286a43aa248cb657e0876b5aa4fe0034170d05c
4 changes: 2 additions & 2 deletions trunk/arch/arm/plat-mxc/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@

#define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x))

#include <mach/mxc.h>

#ifdef CONFIG_ARCH_MX5
#include <mach/mx50.h>
#include <mach/mx51.h>
Expand Down Expand Up @@ -125,8 +127,6 @@
# include <mach/mx25.h>
#endif

#include <mach/mxc.h>

#define imx_map_entry(soc, name, _type) { \
.virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
.pfn = __phys_to_pfn(soc ## _ ## name ## _BASE_ADDR), \
Expand Down
23 changes: 15 additions & 8 deletions trunk/arch/arm/plat-mxc/include/mach/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,26 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff

#ifdef CONFIG_ARCH_MX3
#define __arch_ioremap __mx3_ioremap
#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
#include <mach/hardware.h>

#define __arch_ioremap __imx_ioremap
#define __arch_iounmap __iounmap

#define addr_in_module(addr, mod) \
((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)

static inline void __iomem *
__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
__imx_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.
if (mtype == MT_DEVICE && (cpu_is_mx31() || cpu_is_mx35())) {
/*
* Access all peripherals below 0x80000000 as nonshared device
* on mx3, but leave l2cc alone. Otherwise cache corruptions
* can occur.
*/
if ((phys_addr < 0x80000000) && ((phys_addr < 0x30000000) ||
(phys_addr >= 0x30000000 + SZ_1M)))
if (phys_addr < 0x80000000 &&
!addr_in_module(phys_addr, MX3x_L2CC))
mtype = MT_DEVICE_NONSHARED;
}

Expand Down

0 comments on commit a5d50d3

Please sign in to comment.