2005-04-16 16:20:36 -06:00
|
|
|
/* linux/include/asm-arm/arch-s3c2410/uncompress.h
|
|
|
|
*
|
2006-12-17 11:59:20 -07:00
|
|
|
* Copyright (c) 2003 Simtec Electronics
|
|
|
|
* Ben Dooks <ben@simtec.co.uk>
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* S3C2410 - uncompress code
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_UNCOMPRESS_H
|
|
|
|
#define __ASM_ARCH_UNCOMPRESS_H
|
|
|
|
|
2007-07-22 09:13:29 -06:00
|
|
|
#include <asm/arch/regs-gpio.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <asm/arch/map.h>
|
|
|
|
|
|
|
|
/* working in physical space... */
|
|
|
|
#undef S3C2410_GPIOREG
|
2006-01-26 08:20:50 -07:00
|
|
|
#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
|
2007-07-22 09:13:29 -06:00
|
|
|
|
|
|
|
#include <asm/plat-s3c/uncompress.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
/* how many bytes we allow into the FIFO at a time in FIFO mode */
|
|
|
|
#define FIFO_MAX (14)
|
|
|
|
|
2007-07-22 09:13:29 -06:00
|
|
|
static void arch_detect_cpu(void)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2007-07-22 09:13:29 -06:00
|
|
|
unsigned int cpuid;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2005-04-25 16:12:50 -06:00
|
|
|
cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
|
2005-04-16 16:20:36 -06:00
|
|
|
cpuid &= S3C2410_GSTATUS1_IDMASK;
|
|
|
|
|
2007-07-22 09:13:29 -06:00
|
|
|
if (cpuid == S3C2410_GSTATUS1_2440 ||
|
|
|
|
cpuid == S3C2410_GSTATUS1_2442) {
|
|
|
|
fifo_mask = S3C2440_UFSTAT_TXMASK;
|
|
|
|
fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
|
2005-04-16 16:20:36 -06:00
|
|
|
} else {
|
2007-07-22 09:13:29 -06:00
|
|
|
fifo_mask = S3C2410_UFSTAT_TXMASK;
|
|
|
|
fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __ASM_ARCH_UNCOMPRESS_H */
|