]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm/imx21: add kbuild support for the Freescale i.MX21
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Mon, 26 Jan 2009 15:34:52 +0000 (16:34 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Fri, 13 Mar 2009 09:33:45 +0000 (10:33 +0100)
* adds Kconfig variables
* specifies different physical address for i.MX21 because of the
  different memory layouts
* disables support for UART5/UART6 in the i.MX serial driver
  (the i.MX21 doesn't have those modules)

Based on code from "Martin Fuzzey" <mfuzzey@gmail.com>

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx2/Kconfig
arch/arm/mach-mx2/Makefile.boot
arch/arm/mach-mx2/serial.c
arch/arm/plat-mxc/include/mach/memory.h
arch/arm/plat-mxc/include/mach/mxc.h

index 1eaa97cb716d052b26dc36224a48f685d7c07879..412d2d55b08c86c4521668eb1bc9a32ea893e208 100644 (file)
@@ -1,12 +1,25 @@
 comment "MX2 family CPU support"
        depends on ARCH_MX2
 
+choice
+       prompt "MX2 Type"
+       depends on ARCH_MX2
+       default MACH_MX21
+
+config MACH_MX21
+       bool "i.MX21 support"
+       depends on ARCH_MX2
+       help
+         This enables support for Freescale's MX2 based i.MX21 processor.
+
 config MACH_MX27
        bool "i.MX27 support"
        depends on ARCH_MX2
        help
          This enables support for Freescale's MX2 based i.MX27 processor.
 
+endchoice
+
 comment "MX2 Platforms"
        depends on ARCH_MX2
 
index 696831dcd485e2f4cdd9ad3d7a51f935d5b5905a..e867398a8fdbb5304493c40104635e1e40a3f778 100644 (file)
@@ -1,3 +1,7 @@
-   zreladdr-y  := 0xA0008000
-params_phys-y  := 0xA0000100
-initrd_phys-y  := 0xA0800000
+zreladdr-$(CONFIG_MACH_MX21)   := 0xC0008000
+params_phys-$(CONFIG_MACH_MX21)        := 0xC0000100
+initrd_phys-$(CONFIG_MACH_MX21)        := 0xC0800000
+
+zreladdr-$(CONFIG_MACH_MX27)   := 0xA0008000
+params_phys-$(CONFIG_MACH_MX27)        := 0xA0000100
+initrd_phys-$(CONFIG_MACH_MX27)        := 0xA0800000
index 16debc296dad53ff3f440169d0dbed6383e61dfe..b9e66fb11860eebcc6229b6def7e48919270a4c2 100644 (file)
@@ -99,6 +99,7 @@ struct platform_device mxc_uart_device3 = {
        .num_resources = ARRAY_SIZE(uart3),
 };
 
+#ifdef CONFIG_MACH_MX27
 static struct resource uart4[] = {
        {
                .start = UART5_BASE_ADDR,
@@ -136,3 +137,4 @@ struct platform_device mxc_uart_device5 = {
        .resource = uart5,
        .num_resources = ARRAY_SIZE(uart5),
 };
+#endif
index 0b808399097fe25459334f037c185e8b62e86d5f..e0783e619580a3e39e0dcb9ed87e21b2cd5365e8 100644 (file)
 #if defined CONFIG_ARCH_MX1
 #define PHYS_OFFSET            UL(0x08000000)
 #elif defined CONFIG_ARCH_MX2
+#ifdef CONFIG_MACH_MX21
+#define PHYS_OFFSET            UL(0xC0000000)
+#endif
+#ifdef CONFIG_MACH_MX27
 #define PHYS_OFFSET            UL(0xA0000000)
+#endif
 #elif defined CONFIG_ARCH_MX3
 #define PHYS_OFFSET            UL(0x80000000)
 #endif
index f6caab0621316e3597e226c1a33fd63d22094be5..bbd848e004d733f7d7cb7b7ef40a3b794b18ead0 100644 (file)
 # define cpu_is_mx31() (0)
 #endif
 
+#ifndef CONFIG_MACH_MX21
+# define cpu_is_mx21() (0)
+#endif
+
 #ifndef CONFIG_MACH_MX27
 # define cpu_is_mx27() (0)
 #endif