[ARM] 4515/1: S3C: Move uncompress code to plat-s3c
[firefly-linux-kernel-4.4.55.git] / include / asm-arm / arch-s3c2410 / uncompress.h
1 /* linux/include/asm-arm/arch-s3c2410/uncompress.h
2  *
3  * Copyright (c) 2003 Simtec Electronics
4  *      Ben Dooks <ben@simtec.co.uk>
5  *
6  * S3C2410 - uncompress code
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11 */
12
13 #ifndef __ASM_ARCH_UNCOMPRESS_H
14 #define __ASM_ARCH_UNCOMPRESS_H
15
16 #include <asm/arch/regs-gpio.h>
17 #include <asm/arch/map.h>
18
19 /* working in physical space... */
20 #undef S3C2410_GPIOREG
21 #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
22
23 #include <asm/plat-s3c/uncompress.h>
24
25 /* how many bytes we allow into the FIFO at a time in FIFO mode */
26 #define FIFO_MAX         (14)
27
28 static void arch_detect_cpu(void)
29 {
30         unsigned int cpuid;
31
32         cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
33         cpuid &= S3C2410_GSTATUS1_IDMASK;
34
35         if (cpuid == S3C2410_GSTATUS1_2440 ||
36             cpuid == S3C2410_GSTATUS1_2442) {
37                 fifo_mask = S3C2440_UFSTAT_TXMASK;
38                 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
39         } else {
40                 fifo_mask = S3C2410_UFSTAT_TXMASK;
41                 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
42         }
43 }
44
45 #endif /* __ASM_ARCH_UNCOMPRESS_H */