Commit 36d8b17b authored by Russell King's avatar Russell King Committed by Russell King

[ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols

Make the cpu_is_pxaXXX() macros define to zero when support for a
particular CPU is disabled.  This allows us to eliminate code for
CPUs which aren't enabled.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 2c8086a5
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef CONFIG_PXA25x
#define __cpu_is_pxa21x(id) \ #define __cpu_is_pxa21x(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xf3f; \ unsigned int _id = (id) >> 4 & 0xf3f; \
...@@ -73,30 +74,50 @@ ...@@ -73,30 +74,50 @@
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x2d0 || _id == 0x290; \ _id == 0x2d0 || _id == 0x290; \
}) })
#else
#define __cpu_is_pxa21x(id) (0)
#define __cpu_is_pxa25x(id) (0)
#endif
#ifdef CONFIG_PXA27x
#define __cpu_is_pxa27x(id) \ #define __cpu_is_pxa27x(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x411; \ _id == 0x411; \
}) })
#else
#define __cpu_is_pxa27x(id) (0)
#endif
#ifdef CONFIG_CPU_PXA300
#define __cpu_is_pxa300(id) \ #define __cpu_is_pxa300(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x688; \ _id == 0x688; \
}) })
#else
#define __cpu_is_pxa300(id) (0)
#endif
#ifdef CONFIG_CPU_PXA310
#define __cpu_is_pxa310(id) \ #define __cpu_is_pxa310(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x689; \ _id == 0x689; \
}) })
#else
#define __cpu_is_pxa310(id) (0)
#endif
#ifdef CONFIG_CPU_PXA320
#define __cpu_is_pxa320(id) \ #define __cpu_is_pxa320(id) \
({ \ ({ \
unsigned int _id = (id) >> 4 & 0xfff; \ unsigned int _id = (id) >> 4 & 0xfff; \
_id == 0x603 || _id == 0x682; \ _id == 0x603 || _id == 0x682; \
}) })
#else
#define __cpu_is_pxa320(id) (0)
#endif
#define cpu_is_pxa21x() \ #define cpu_is_pxa21x() \
({ \ ({ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment