spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / arch / arm / plat-samsung / cpu.c
blob81c06d44c11e4f55cdcea71a60b2673d0e828c07
1 /* linux/arch/arm/plat-samsung/cpu.c
3 * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Samsung CPU Support
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.
13 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/io.h>
18 #include <asm/system.h>
20 #include <mach/map.h>
21 #include <plat/cpu.h>
23 unsigned long samsung_cpu_id;
24 static unsigned int samsung_cpu_rev;
26 unsigned int samsung_rev(void)
28 return samsung_cpu_rev;
30 EXPORT_SYMBOL(samsung_rev);
32 void __init s3c24xx_init_cpu(void)
34 /* nothing here yet */
36 samsung_cpu_rev = 0;
39 void __init s3c64xx_init_cpu(void)
41 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
42 if (!samsung_cpu_id) {
44 * S3C6400 has the ID register in a different place,
45 * and needs a write before it can be read.
47 __raw_writel(0x0, S3C_VA_SYS + 0xA1C);
48 samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C);
51 samsung_cpu_rev = 0;
54 void __init s5p_init_cpu(void __iomem *cpuid_addr)
56 samsung_cpu_id = __raw_readl(cpuid_addr);
57 samsung_cpu_rev = samsung_cpu_id & 0xFF;