aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRom Lemarchand <rlemarchand@sta.samsung.com>2011-03-25 15:21:35 -0700
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:53:47 -0800
commitaf5b8a5c105d5b08ee77594701e9682462768466 (patch)
treee2b9b08fa01a511cd00b0cdc53e7a6afa07f3083
parentda4284c7d5c99a515158b0d615155bc0f2376912 (diff)
downloadkernel_samsung_crespo-af5b8a5c105d5b08ee77594701e9682462768466.zip
kernel_samsung_crespo-af5b8a5c105d5b08ee77594701e9682462768466.tar.gz
kernel_samsung_crespo-af5b8a5c105d5b08ee77594701e9682462768466.tar.bz2
ARM: herring: Add herring machine check to revision macros
Add extra check to ensure that the herring revision check macros returns false when running on non-herring hardware. Change-Id: I177b614344d8525f0db7e775a202468fb8a7051d Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
-rwxr-xr-xarch/arm/mach-s5pv210/herring.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-s5pv210/herring.h b/arch/arm/mach-s5pv210/herring.h
index b01b63c..9f8622e 100755
--- a/arch/arm/mach-s5pv210/herring.h
+++ b/arch/arm/mach-s5pv210/herring.h
@@ -3,6 +3,7 @@
*/
#include <asm/system.h>
+#include <asm/mach-types.h>
#ifndef __HERRING_H__
#define __HERRING_H__
@@ -13,11 +14,12 @@ void herring_bt_uart_wake_peer(struct uart_port *port);
extern void s3c_setup_uart_cfg_gpio(unsigned char port);
#ifdef CONFIG_MACH_HERRING
-# define herring_is_cdma_wimax_dev() ((system_rev & 0xFFF0) == 0x20)
-# define herring_is_cdma_wimax_rev(n) \
- ((system_rev & 0xFFFF) == (0x20 | ((n) & 0xF)))
+# define herring_is_cdma_wimax_dev() (machine_is_herring() && \
+ ((system_rev & 0xFFF0) == 0x20))
+# define herring_is_cdma_wimax_rev(n) (herring_is_cdma_wimax_dev() && \
+ (system_rev & 0xF) == ((n) & 0xF))
# define herring_is_cdma_wimax_rev0() herring_is_cdma_wimax_rev(0)
-# define herring_is_tft_dev() (system_rev >= 0x30)
+# define herring_is_tft_dev() (machine_is_herring() && (system_rev >= 0x30))
#else
# define herring_is_cdma_wimax_dev() (0)
# define herring_is_cdma_wimax_rev0() (0)