summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/include/mach/mx37.h
diff options
context:
space:
mode:
authorRob Herring <r.herring@freescale.com>2010-01-22 15:01:30 -0200
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-24 12:10:13 +0200
commit6ae58a9778c7a99ae0f496ca10deafe87b0dae0b (patch)
tree25d6d3820cbaa09c1f13e4b282dd0b1c88e67f59 /arch/arm/plat-mxc/include/mach/mx37.h
parent464b1e29cabf36a6f00909542bf3eb619e992b01 (diff)
ENGR00120393-5 imx: convert platform code to use iram allocator
Convert all i.MX platforms over to iram allocator functions. Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/mx37.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/mx37.h45
1 files changed, 10 insertions, 35 deletions
diff --git a/arch/arm/plat-mxc/include/mach/mx37.h b/arch/arm/plat-mxc/include/mach/mx37.h
index 1090a38fca11..8f0e38e0f618 100644
--- a/arch/arm/plat-mxc/include/mach/mx37.h
+++ b/arch/arm/plat-mxc/include/mach/mx37.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -39,7 +39,6 @@
* IRAM
*/
#define IRAM_BASE_ADDR 0x10000000 /* internal ram */
-#define IRAM_BASE_ADDR_VIRT 0xF8000000
#define IRAM_SIZE (9*SZ_8K) /* 72KB */
#if defined(CONFIG_MXC_SECURITY_SCC2) \
@@ -49,15 +48,6 @@
#define SCC_IRAM_SIZE 0
#endif
-/*#ifndef CONFIG_SDMA_IRAM
-#define CONFIG_SDMA_IRAM_SIZE 0
-#endif*/
-#ifdef CONFIG_SDMA_IRAM
-#define SDMA_IRAM_SIZE CONFIG_SDMA_IRAM_SIZE
-#else
-#define SDMA_IRAM_SIZE 0
-#endif
-
#ifdef CONFIG_SND_MXC_SOC_IRAM
#define SND_RAM_SIZE 0x6000
#else
@@ -70,23 +60,12 @@
#define USB_IRAM_SIZE 0
#endif
-#if (IRAM_SIZE < (SCC_IRAM_SIZE + SDMA_IRAM_SIZE + SND_RAM_SIZE + \
- USB_IRAM_SIZE))
-#error "IRAM size exceeded"
-#endif
-
#ifdef CONFIG_MXC_VPU_IRAM
-#define VPU_IRAM_SIZE (IRAM_BASE_ADDR + IRAM_SIZE - VPU_IRAM_BASE_ADDR)
+#define VPU_IRAM_SIZE (36 * SZ_1K)
#else
#define VPU_IRAM_SIZE 0
#endif
-#define SCC_IRAM_BASE_ADDR (IRAM_BASE_ADDR + IRAM_SIZE - SCC_IRAM_SIZE)
-#define SDMA_RAM_BASE_ADDR (IRAM_BASE_ADDR)
-#define SND_RAM_BASE_ADDR (IRAM_BASE_ADDR + SDMA_IRAM_SIZE)
-#define USB_IRAM_BASE_ADDR (SND_RAM_BASE_ADDR + SND_RAM_SIZE)
-#define VPU_IRAM_BASE_ADDR (USB_IRAM_BASE_ADDR + USB_IRAM_SIZE)
-
/*
* NFC
*/
@@ -266,23 +245,19 @@
*/
#define IO_ADDRESS(x) \
(void __force __iomem *) \
- (((x >= (unsigned long)IRAM_BASE_ADDR) && (x < (unsigned long)IRAM_BASE_ADDR + IRAM_SIZE)) ? IRAM_IO_ADDRESS(x):\
- ((x >= (unsigned long)PLATFORM_BASE_ADDR) && (x < (unsigned long)PLATFORM_BASE_ADDR + PLATFORM_SIZE)) ? PLATFORM_IO_ADDRESS(x):\
- ((x >= (unsigned long)TZIC_BASE_ADDR) && (x < (unsigned long)TZIC_BASE_ADDR + TZIC_SIZE)) ? TZIC_IO_ADDRESS(x):\
- ((x >= (unsigned long)DEBUG_BASE_ADDR) && (x < (unsigned long)DEBUG_BASE_ADDR + DEBUG_SIZE)) ? DEBUG_IO_ADDRESS(x):\
- ((x >= (unsigned long)SPBA0_BASE_ADDR) && (x < (unsigned long)SPBA0_BASE_ADDR + SPBA0_SIZE)) ? SPBA0_IO_ADDRESS(x):\
- ((x >= (unsigned long)AIPS1_BASE_ADDR) && (x < (unsigned long)AIPS1_BASE_ADDR + AIPS1_SIZE)) ? AIPS1_IO_ADDRESS(x):\
- ((x >= (unsigned long)AIPS2_BASE_ADDR) && (x < (unsigned long)AIPS2_BASE_ADDR + AIPS2_SIZE)) ? AIPS2_IO_ADDRESS(x):\
- ((x >= (unsigned long)NFC_BASE_ADDR_AXI) && (x < (unsigned long)NFC_BASE_ADDR_AXI + NFC_AXI_SIZE)) ? NFC_BASE_ADDR_AXI_IO_ADDRESS(x):\
- 0xDEADBEEF)
+ (((x >= (unsigned long)PLATFORM_BASE_ADDR) && (x < (unsigned long)PLATFORM_BASE_ADDR + PLATFORM_SIZE)) ? PLATFORM_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)TZIC_BASE_ADDR) && (x < (unsigned long)TZIC_BASE_ADDR + TZIC_SIZE)) ? TZIC_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)DEBUG_BASE_ADDR) && (x < (unsigned long)DEBUG_BASE_ADDR + DEBUG_SIZE)) ? DEBUG_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)SPBA0_BASE_ADDR) && (x < (unsigned long)SPBA0_BASE_ADDR + SPBA0_SIZE)) ? SPBA0_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)AIPS1_BASE_ADDR) && (x < (unsigned long)AIPS1_BASE_ADDR + AIPS1_SIZE)) ? AIPS1_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)AIPS2_BASE_ADDR) && (x < (unsigned long)AIPS2_BASE_ADDR + AIPS2_SIZE)) ? AIPS2_IO_ADDRESS(x) :\
+ ((x >= (unsigned long)NFC_BASE_ADDR_AXI) && (x < (unsigned long)NFC_BASE_ADDR_AXI + NFC_AXI_SIZE)) ? NFC_BASE_ADDR_AXI_IO_ADDRESS(x) :\
+ 0xDEADBEEF)
/*
* define the address mapping macros: in physical address order
*/
-#define IRAM_IO_ADDRESS(x) \
- (((x) - IRAM_BASE_ADDR) + IRAM_BASE_ADDR_VIRT)
-
#define PLATFORM_IO_ADDRESS(x) \
(((x) - PLATFORM_BASE_ADDR) + PLATFORM_BASE_ADDR_VIRT)