mxc: changes to common plat-mxc code to add support for i.MX5
authorAmit Kucheria <amit.kucheria@canonical.com>
Thu, 4 Feb 2010 20:09:40 +0000 (12:09 -0800)
committerAmit Kucheria <amit.kucheria@canonical.com>
Tue, 9 Feb 2010 16:32:10 +0000 (18:32 +0200)
Prepare for i.MX5 SoC code by adding the relevant macros to common plat-mxc
code.

Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
arch/arm/plat-mxc/include/mach/debug-macro.S
arch/arm/plat-mxc/include/mach/hardware.h
arch/arm/plat-mxc/include/mach/irqs.h
arch/arm/plat-mxc/include/mach/memory.h
arch/arm/plat-mxc/include/mach/mxc.h
arch/arm/plat-mxc/include/mach/timex.h

index 916d4fcb2ef2db022c32e2265944ab3bdb1f98e1..133d66bfb533c83559a5452985b2ecdea760bc74 100644 (file)
 #define UART_VADDR     AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
 #endif
 
+#ifdef CONFIG_ARCH_MX5
+#ifdef UART_PADDR
+#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
+#endif
+#include <mach/mx51.h>
+#define UART_PADDR     MX51_UART1_BASE_ADDR
+#define UART_VADDR     MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
+#endif
+
 #ifdef CONFIG_ARCH_MXC91231
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
index db14c56930a3abb200f75803fa720791317c97c1..ebadf4ac43fcec4a55b4dffdd5bdf16e69bb255c 100644 (file)
         (((unsigned long)((addr) - (module ## _BASE_ADDR)) < module ## _SIZE) ?\
         (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
 
+#ifdef CONFIG_ARCH_MX5
+#include <mach/mx51.h>
+#endif
+
 #ifdef CONFIG_ARCH_MX3
 #include <mach/mx3x.h>
 #include <mach/mx31.h>
index 38f150162e45129ce05872e54834fa47ea238075..a3ad643de5a1c1744ac463c4cdcdd02d67fcf267 100644 (file)
@@ -30,6 +30,8 @@
 #define MXC_GPIO_IRQS          (32 * 3)
 #elif defined CONFIG_ARCH_MX25
 #define MXC_GPIO_IRQS          (32 * 4)
+#elif defined CONFIG_ARCH_MX5
+#define MXC_GPIO_IRQS          (32 * 4)
 #elif defined CONFIG_ARCH_MXC91231
 #define MXC_GPIO_IRQS          (32 * 4)
 #endif
@@ -55,6 +57,7 @@
 #else
 #define MX3_IPU_IRQS 0
 #endif
+/* REVISIT: Add IPU irqs on IMX51 */
 
 #define NR_IRQS                        (MXC_IPU_IRQ_START + MX3_IPU_IRQS)
 
index 002eb91ab235cb55e2a0b6783e20e0975fd1a234..7cae9cb6208dc6761d5d6c5438faa12c6f61196c 100644 (file)
@@ -16,6 +16,7 @@
 #define MX25_PHYS_OFFSET       UL(0x80000000)
 #define MX27_PHYS_OFFSET       UL(0xa0000000)
 #define MX3x_PHYS_OFFSET       UL(0x80000000)
+#define MX51_PHYS_OFFSET       UL(0x90000000)
 #define MXC91231_PHYS_OFFSET   UL(0x90000000)
 
 #if !defined(CONFIG_RUNTIME_PHYS_OFFSET)
@@ -31,6 +32,8 @@
 #  define PHYS_OFFSET          MX3x_PHYS_OFFSET
 # elif defined CONFIG_ARCH_MXC91231
 #  define PHYS_OFFSET          MXC91231_PHYS_OFFSET
+# elif defined CONFIG_ARCH_MX5
+#  define PHYS_OFFSET          MX51_PHYS_OFFSET
 # endif
 #endif
 
index 800ae2a33b159d15556f0cdfb0199e7d200ef349..a790bf2129720c3e13a747fcf9e439229d7e4c9d 100644 (file)
@@ -30,6 +30,7 @@
 #define MXC_CPU_MX27           27
 #define MXC_CPU_MX31           31
 #define MXC_CPU_MX35           35
+#define MXC_CPU_MX51           51
 #define MXC_CPU_MXC91231       91231
 
 #ifndef __ASSEMBLY__
@@ -108,6 +109,18 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx35()         (0)
 #endif
 
+#ifdef CONFIG_ARCH_MX5
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX51
+# endif
+# define cpu_is_mx51()         (mxc_cpu_type == MXC_CPU_MX51)
+#else
+# define cpu_is_mx51()         (0)
+#endif
+
 #ifdef CONFIG_ARCH_MXC91231
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
index 527a6c24788ec175510daaa5de74e1b4aac77848..024416ed11cd9673bf5bf478f17412c81f6e98c8 100644 (file)
@@ -28,6 +28,8 @@
 #define CLOCK_TICK_RATE                16625000
 #elif defined CONFIG_ARCH_MX25
 #define CLOCK_TICK_RATE                16000000
+#elif defined CONFIG_ARCH_MX5
+#define CLOCK_TICK_RATE                8000000
 #elif defined CONFIG_ARCH_MXC91231
 #define CLOCK_TICK_RATE                13000000
 #endif
This page took 0.027695 seconds and 5 git commands to generate.