summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRom Lemarchand <rlemarchand@sta.samsung.com>2011-03-25 15:21:35 -0700
committerRom Lemarchand <rlemarchand@sta.samsung.com>2011-03-25 15:51:00 -0700
commite434daaec1fa391587fa646a099f9e3c4557cc05 (patch)
tree552384b0a921a9ab788da6af8d046ad2d0f0ef6c
parent44aec062d82fe3ca2ab8bdf1ee0c5bbd8a85e4b2 (diff)
downloadsamsung-e434daaec1fa391587fa646a099f9e3c4557cc05.tar.gz
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 b01b63ca8cc..9f8622efeb7 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)