2005-04-16 15:20:36 -07:00
/* linux/include/asm-arm/arch-s3c2410/uncompress.h
*
2007-07-22 16:22:06 +01:00
* Copyright ( c ) 2003 , 2007 Simtec Electronics
* http : //armlinux.simtec.co.uk/
2006-12-17 19:59:20 +01:00
* Ben Dooks < ben @ simtec . co . uk >
2005-04-16 15:20:36 -07: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 16:13:29 +01:00
# include <asm/arch/regs-gpio.h>
2005-04-16 15:20:36 -07:00
# include <asm/arch/map.h>
/* working in physical space... */
# undef S3C2410_GPIOREG
2006-01-26 15:20:50 +00:00
# define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
2007-07-22 16:13:29 +01:00
# include <asm/plat-s3c/uncompress.h>
2005-04-16 15:20:36 -07:00
2007-07-22 16:14:02 +01:00
static inline int is_arm926 ( void )
{
unsigned int cpuid ;
asm volatile ( " mrc p15, 0, %0, c1, c0, 0 " : " =r " ( cpuid ) ) ;
return ( ( cpuid & 0xff0 ) = = 0x260 ) ;
}
2007-07-22 16:13:29 +01:00
static void arch_detect_cpu ( void )
2005-04-16 15:20:36 -07:00
{
2007-07-22 16:13:29 +01:00
unsigned int cpuid ;
2005-04-16 15:20:36 -07:00
2005-04-25 23:12:50 +01:00
cpuid = * ( ( volatile unsigned int * ) S3C2410_GSTATUS1 ) ;
2005-04-16 15:20:36 -07:00
cpuid & = S3C2410_GSTATUS1_IDMASK ;
2007-07-22 16:14:02 +01:00
if ( is_arm926 ( ) | | cpuid = = S3C2410_GSTATUS1_2440 | |
2007-07-22 16:13:29 +01:00
cpuid = = S3C2410_GSTATUS1_2442 ) {
fifo_mask = S3C2440_UFSTAT_TXMASK ;
fifo_max = 63 < < S3C2440_UFSTAT_TXSHIFT ;
2005-04-16 15:20:36 -07:00
} else {
2007-07-22 16:13:29 +01:00
fifo_mask = S3C2410_UFSTAT_TXMASK ;
fifo_max = 15 < < S3C2410_UFSTAT_TXSHIFT ;
2005-04-16 15:20:36 -07:00
}
}
# endif /* __ASM_ARCH_UNCOMPRESS_H */