blob: 22328b70ba5d1b4525df7d14d0c703a77d575949 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* linux/include/asm-arm/arch-s3c2410/uncompress.h
2 *
Ben Dooksf0560762006-12-17 19:59:20 +01003 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
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.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011*/
12
13#ifndef __ASM_ARCH_UNCOMPRESS_H
14#define __ASM_ARCH_UNCOMPRESS_H
15
Ben Dooksa14a26a2007-07-22 16:13:29 +010016#include <asm/arch/regs-gpio.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <asm/arch/map.h>
18
19/* working in physical space... */
20#undef S3C2410_GPIOREG
Lucas Correia Villa Real0367a8d2006-01-26 15:20:50 +000021#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
Ben Dooksa14a26a2007-07-22 16:13:29 +010022
23#include <asm/plat-s3c/uncompress.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
25/* how many bytes we allow into the FIFO at a time in FIFO mode */
26#define FIFO_MAX (14)
27
Ben Dooksa14a26a2007-07-22 16:13:29 +010028static void arch_detect_cpu(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070029{
Ben Dooksa14a26a2007-07-22 16:13:29 +010030 unsigned int cpuid;
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Lucas Correia Villa Realbd7b1702005-04-25 23:12:50 +010032 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033 cpuid &= S3C2410_GSTATUS1_IDMASK;
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Ben Dooksa14a26a2007-07-22 16:13:29 +010035 if (cpuid == S3C2410_GSTATUS1_2440 ||
36 cpuid == S3C2410_GSTATUS1_2442) {
37 fifo_mask = S3C2440_UFSTAT_TXMASK;
38 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 } else {
Ben Dooksa14a26a2007-07-22 16:13:29 +010040 fifo_mask = S3C2410_UFSTAT_TXMASK;
41 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
Linus Torvalds1da177e2005-04-16 15:20:36 -070042 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070043}
44
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#endif /* __ASM_ARCH_UNCOMPRESS_H */