aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <robert@schwebel.de>2008-04-02 05:29:30 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-17 11:15:17 -0400
commitd2db9aaa4a5b9f2a1d54080c13f5ff4fc6d0ae1b (patch)
tree356086f774a58af35a14f2f6a732e4693719a13c
parent2c130fd5294499cd94578f8c792e190959372763 (diff)
[ARM] 4887/1: i.MXC family: Separate current platform code
From: Juergen Beisert <j.beisert@pengutronix.de> This patch separates the current code into i.MX2 and i.MX3 and modifies the Kconfig files to reflect this separation in the menus. Things happend since last review: - make i.MX3 compile again - fix some structure names to be conform with all the shared/common sources from i.MX1/i.MX2 Previous changes: - stay conform to other Kconfig files (note from Russell King) Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/plat-mxc/Kconfig2
-rw-r--r--include/asm-arm/arch-mxc/hardware.h25
-rw-r--r--include/asm-arm/arch-mxc/irqs.h4
-rw-r--r--include/asm-arm/arch-mxc/mx31.h30
-rw-r--r--include/asm-arm/arch-mxc/mxc.h5
5 files changed, 43 insertions, 23 deletions
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index 03a65c0dfb60..bb6e12738fb3 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -4,7 +4,7 @@ menu "Freescale MXC Implementations"
4 4
5choice 5choice
6 prompt "MXC/iMX System Type" 6 prompt "MXC/iMX System Type"
7 default 0 7 default ARCH_MX3
8 8
9config ARCH_MX3 9config ARCH_MX3
10 bool "MX3-based" 10 bool "MX3-based"
diff --git a/include/asm-arm/arch-mxc/hardware.h b/include/asm-arm/arch-mxc/hardware.h
index e70387e91b77..e87ff0679d5e 100644
--- a/include/asm-arm/arch-mxc/hardware.h
+++ b/include/asm-arm/arch-mxc/hardware.h
@@ -13,34 +13,19 @@
13 13
14#include <asm/sizes.h> 14#include <asm/sizes.h>
15 15
16#include <asm/arch/mx31.h> 16#ifdef CONFIG_ARCH_MX3
17# include <asm/arch/mx31.h>
18#endif
17 19
18#include <asm/arch/mxc.h> 20#include <asm/arch/mxc.h>
19 21
20#define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM)
21
22/* 22/*
23 * --------------------------------------------------------------------------- 23 * ---------------------------------------------------------------------------
24 * Board specific defines 24 * Board specific defines
25 * --------------------------------------------------------------------------- 25 * ---------------------------------------------------------------------------
26 */ 26 */
27#define MXC_EXP_IO_BASE (MXC_GPIO_INT_BASE + MXC_MAX_GPIO_LINES) 27#ifdef CONFIG_MACH_MX31ADS
28 28# include <asm/arch/board-mx31ads.h>
29#include <asm/arch/board-mx31ads.h>
30
31#ifndef MXC_MAX_EXP_IO_LINES
32#define MXC_MAX_EXP_IO_LINES 0
33#endif 29#endif
34 30
35#define MXC_MAX_VIRTUAL_INTS 16
36#define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES)
37#define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE
38#define MXC_SDIO2_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 1)
39#define MXC_SDIO3_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 2)
40
41#define MXC_MAX_INTS (MXC_MAX_INT_LINES + \
42 MXC_MAX_GPIO_LINES + \
43 MXC_MAX_EXP_IO_LINES + \
44 MXC_MAX_VIRTUAL_INTS)
45
46#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ 31#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
diff --git a/include/asm-arm/arch-mxc/irqs.h b/include/asm-arm/arch-mxc/irqs.h
index a64e66ba4ae4..b2c5205e1962 100644
--- a/include/asm-arm/arch-mxc/irqs.h
+++ b/include/asm-arm/arch-mxc/irqs.h
@@ -19,7 +19,9 @@
19#define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x) 19#define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x)
20 20
21/* Number of normal interrupts */ 21/* Number of normal interrupts */
22#define NR_IRQS MXC_MAX_INTS 22#define NR_IRQS (MXC_MAX_INT_LINES + \
23 MXC_MAX_GPIO_LINES + \
24 MXC_MAX_VIRTUAL_INTS)
23 25
24/* Number of fast interrupts */ 26/* Number of fast interrupts */
25#define NR_FIQS MXC_MAX_INTS 27#define NR_FIQS MXC_MAX_INTS
diff --git a/include/asm-arm/arch-mxc/mx31.h b/include/asm-arm/arch-mxc/mx31.h
index 85c49c9e5d15..36a1af495bb3 100644
--- a/include/asm-arm/arch-mxc/mx31.h
+++ b/include/asm-arm/arch-mxc/mx31.h
@@ -317,6 +317,8 @@
317#define MXC_MAX_INT_LINES 64 317#define MXC_MAX_INT_LINES 64
318 318
319#define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES 319#define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES
320#define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM)
321#define MXC_MAX_VIRTUAL_INTS 16
320 322
321/*! 323/*!
322 * Number of GPIO port as defined in the IC Spec 324 * Number of GPIO port as defined in the IC Spec
@@ -329,7 +331,33 @@
329 331
330#define PROD_SIGNATURE 0x1 /* For MX31 */ 332#define PROD_SIGNATURE 0x1 /* For MX31 */
331 333
334/* silicon revisions specific to i.MX31 */
335#define CHIP_REV_1_0 0x10
336#define CHIP_REV_1_1 0x11
337#define CHIP_REV_1_2 0x12
338#define CHIP_REV_1_3 0x13
339#define CHIP_REV_2_0 0x20
340#define CHIP_REV_2_1 0x21
341#define CHIP_REV_2_2 0x22
342#define CHIP_REV_2_3 0x23
343#define CHIP_REV_3_0 0x30
344#define CHIP_REV_3_1 0x31
345#define CHIP_REV_3_2 0x32
346
332#define SYSTEM_REV_MIN CHIP_REV_1_0 347#define SYSTEM_REV_MIN CHIP_REV_1_0
333#define SYSTEM_REV_NUM 3 348#define SYSTEM_REV_NUM 3
334 349
335#endif /* __ASM_ARCH_MXC_MX31_H__ */ 350#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
351
352/* this is a i.MX31 CPU */
353#define cpu_is_mx31() (1)
354
355extern unsigned int system_rev;
356
357static inline int mx31_revision(void)
358{
359 return system_rev;
360}
361#endif
362
363#endif /* __ASM_ARCH_MXC_MX31_H__ */
diff --git a/include/asm-arm/arch-mxc/mxc.h b/include/asm-arm/arch-mxc/mxc.h
index f1349734b8af..146d3f60951a 100644
--- a/include/asm-arm/arch-mxc/mxc.h
+++ b/include/asm-arm/arch-mxc/mxc.h
@@ -15,6 +15,11 @@
15#error "Do not include directly." 15#error "Do not include directly."
16#endif 16#endif
17 17
18/* clean up all things that are not used */
19#ifndef CONFIG_ARCH_MX3
20# define cpu_is_mx31() (0)
21#endif
22
18/* 23/*
19 ***************************************** 24 *****************************************
20 * GPT Register definitions * 25 * GPT Register definitions *