2 /* arch/arm/mach-s3c2410/include/mach/uncompress.h
4 * Copyright (c) 2003, 2007 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
8 * S3C2410 - uncompress code
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #ifndef __ASM_ARCH_UNCOMPRESS_H
16 #define __ASM_ARCH_UNCOMPRESS_H
18 #include <mach/regs-gpio.h>
21 /* working in physical space... */
22 #undef S3C2410_GPIOREG
23 #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
25 #include <plat/uncompress.h>
27 static inline int is_arm926(void)
31 asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid
));
33 return ((cpuid
& 0xff0) == 0x260);
36 static void arch_detect_cpu(void)
40 cpuid
= *((volatile unsigned int *)S3C2410_GSTATUS1
);
41 cpuid
&= S3C2410_GSTATUS1_IDMASK
;
43 if (is_arm926() || cpuid
== S3C2410_GSTATUS1_2440
||
44 cpuid
== S3C2410_GSTATUS1_2442
) {
45 fifo_mask
= S3C2440_UFSTAT_TXMASK
;
46 fifo_max
= 63 << S3C2440_UFSTAT_TXSHIFT
;
48 fifo_mask
= S3C2410_UFSTAT_TXMASK
;
49 fifo_max
= 15 << S3C2410_UFSTAT_TXSHIFT
;
53 #endif /* __ASM_ARCH_UNCOMPRESS_H */