]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - arch/arm/plat-mxc/include/mach/hardware.h
linux-2.6.35.3-fsl-10.3.2.txt.gz patch applied
[linux-imx.git] / arch / arm / plat-mxc / include / mach / hardware.h
index ebadf4ac43fcec4a55b4dffdd5bdf16e69bb255c..5effc021e997301e4335ab6ee34365c06eef6e8e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2004-2011 Freescale Semiconductor, Inc.
  * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
  *
  * This program is free software; you can redistribute it and/or
 
 #include <asm/sizes.h>
 
+/*
+ * ---------------------------------------------------------------------------
+ * Processor specific defines
+ * ---------------------------------------------------------------------------
+ */
+#define CHIP_REV_1_0           0x10
+#define CHIP_REV_1_1           0x11
+#define CHIP_REV_1_2           0x12
+#define CHIP_REV_1_3           0x13
+#define CHIP_REV_2_0           0x20
+#define CHIP_REV_2_1           0x21
+#define CHIP_REV_2_2           0x22
+#define CHIP_REV_2_3           0x23
+#define CHIP_REV_3_0           0x30
+#define CHIP_REV_3_1           0x31
+#define CHIP_REV_3_2           0x32
+
+#define BOARD_REV_1            0x000
+#define BOARD_REV_2            0x100
+#define BOARD_REV_3            0x200
+#define BOARD_REV_4            0x300
+#define BOARD_REV_5            0x400
+
 #define IMX_IO_ADDRESS(addr, module)                                   \
        ((void __force __iomem *)                                       \
         (((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>
+#include <mach/mx5x.h>
 #endif
 
 #ifdef CONFIG_ARCH_MX3
 #include <mach/mx35.h>
 #endif
 
+#ifdef CONFIG_ARCH_MX37
+#include <mach/mx37.h>
+#endif
+
 #ifdef CONFIG_ARCH_MX2
 # include <mach/mx2x.h>
 # ifdef CONFIG_MACH_MX21
 # include <mach/mxc91231.h>
 #endif
 
+#ifndef __ASSEMBLY__
+extern unsigned int system_rev;
+#define board_is_rev(rev)      (((system_rev & 0x0F00) == rev) ? 1 : 0)
+#endif
+
+#ifdef CONFIG_ARCH_MX5
+#define board_is_mx53_loco_mc34708() \
+  (cpu_is_mx53() &&  (board_is_rev(BOARD_REV_2) || board_is_rev(BOARD_REV_4)))
+/*BOARD_REV_2: revA,BOARD_REV_4: revB*/
+#define board_is_mx53_arm2()  (cpu_is_mx53() && board_is_rev(BOARD_REV_2))
+#define board_is_mx53_evk_a() (cpu_is_mx53() && board_is_rev(BOARD_REV_1))
+#define board_is_mx53_evk_b() (cpu_is_mx53() && board_is_rev(BOARD_REV_3))
+#define board_is_mx53_ard_a() (cpu_is_mx53() && board_is_rev(BOARD_REV_1))
+#define board_is_mx53_ard_b() (cpu_is_mx53() && board_is_rev(BOARD_REV_2))
+#define board_is_mx50_rd3()      (cpu_is_mx50() && board_is_rev(BOARD_REV_4))
+#endif
+
 #include <mach/mxc.h>
 
+/*!
+ * Register an interrupt handler for the SMN as well as the SCC.  In some
+ * implementations, the SMN is not connected at all, and in others, it is
+ * on the same interrupt line as the SCM. Comment this line out accordingly
+ */
+#define USE_SMN_INTERRUPT
+
+/*!
+ * This option is used to set or clear the RXDMUXSEL bit in control reg 3.
+ * Certain platforms need this bit to be set in order to receive Irda data.
+ */
+#define MXC_UART_IR_RXDMUX      0x0004
+/*!
+ * This option is used to set or clear the RXDMUXSEL bit in control reg 3.
+ * Certain platforms need this bit to be set in order to receive UART data.
+ */
+#define MXC_UART_RXDMUX         0x0004
+
+#ifndef MXC_INT_FORCE
+#define MXC_INT_FORCE  -1
+#endif
 #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */