1 2/* arch/arm/mach-s3c2410/include/mach/uncompress.h 3 * 4 * Copyright (c) 2003, 2007 Simtec Electronics 5 * http://armlinux.simtec.co.uk/ 6 * Ben Dooks <ben@simtec.co.uk> 7 * 8 * S3C2410 - uncompress code 9 * 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. 13*/ 14 15#ifndef __ASM_ARCH_UNCOMPRESS_H 16#define __ASM_ARCH_UNCOMPRESS_H 17 18#include <mach/regs-gpio.h> 19#include <mach/map.h> 20 21/* working in physical space... */ 22#undef S3C2410_GPIOREG 23#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) 24 25#include <plat/uncompress.h> 26 27static inline int is_arm926(void) 28{ 29 unsigned int cpuid; 30 31 asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid)); 32 33 return ((cpuid & 0xff0) == 0x260); 34} 35 36static void arch_detect_cpu(void) 37{ 38 unsigned int cpuid; 39 40 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); 41 cpuid &= S3C2410_GSTATUS1_IDMASK; 42 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; 47 } else { 48 fifo_mask = S3C2410_UFSTAT_TXMASK; 49 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; 50 } 51} 52 53#endif /* __ASM_ARCH_UNCOMPRESS_H */ 54