aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-s3c2410
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2007-07-22 11:14:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-22 11:44:36 -0400
commit5c49218a15188cc036364c4cda325bae3cb138ae (patch)
tree7a33b7048b05275e6fd6b0f520511511e0fb290f /include/asm-arm/arch-s3c2410
parenta14a26aca610bbd09fb62fb9fd5dbf6b41321972 (diff)
[ARM] 4516/1: S3C: Fix uncompressor serial output for ARM926
Ensure we check for ARM926 in the uncompressor, as all current ARM926s do not have an ID register and all have S3C2440 style UARTs. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-s3c2410')
-rw-r--r--include/asm-arm/arch-s3c2410/uncompress.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h
index 22328b70ba5d..7058382a6405 100644
--- a/include/asm-arm/arch-s3c2410/uncompress.h
+++ b/include/asm-arm/arch-s3c2410/uncompress.h
@@ -25,6 +25,15 @@
25/* how many bytes we allow into the FIFO at a time in FIFO mode */ 25/* how many bytes we allow into the FIFO at a time in FIFO mode */
26#define FIFO_MAX (14) 26#define FIFO_MAX (14)
27 27
28static inline int is_arm926(void)
29{
30 unsigned int cpuid;
31
32 asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid));
33
34 return ((cpuid & 0xff0) == 0x260);
35}
36
28static void arch_detect_cpu(void) 37static void arch_detect_cpu(void)
29{ 38{
30 unsigned int cpuid; 39 unsigned int cpuid;
@@ -32,7 +41,7 @@ static void arch_detect_cpu(void)
32 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); 41 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
33 cpuid &= S3C2410_GSTATUS1_IDMASK; 42 cpuid &= S3C2410_GSTATUS1_IDMASK;
34 43
35 if (cpuid == S3C2410_GSTATUS1_2440 || 44 if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 ||
36 cpuid == S3C2410_GSTATUS1_2442) { 45 cpuid == S3C2410_GSTATUS1_2442) {
37 fifo_mask = S3C2440_UFSTAT_TXMASK; 46 fifo_mask = S3C2440_UFSTAT_TXMASK;
38 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 47 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;