]> Pileus Git - ~andy/linux/commitdiff
ARM: use read_cpuid_id() instead of read_cpuid(CPUID_ID)
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 30 Jan 2013 16:38:21 +0000 (17:38 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 31 Jan 2013 20:44:47 +0000 (21:44 +0100)
Both calls are identical currently. This patch prepares to deprecate
read_cpuid on machines without cp15.

Also move an unconditional usage of read_cpuid_cachetype to a more local
scope as read_cpuid_cachetype uses read_cpuid, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Message-Id: 1359646587-1788-1-git-send-email-u.kleine-koenig@pengutronix.de

arch/arm/kernel/setup.c
arch/arm/kernel/smp_scu.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/omap-smp.c

index 3f6cbb2e3edae392f2b73520b89b6ee3b19e8437..1cc9e1796415c77a16fd8093e6dff00e557e1586 100644 (file)
@@ -291,10 +291,10 @@ static int cpu_has_aliasing_icache(unsigned int arch)
 
 static void __init cacheid_init(void)
 {
-       unsigned int cachetype = read_cpuid_cachetype();
        unsigned int arch = cpu_architecture();
 
        if (arch >= CPU_ARCH_ARMv6) {
+               unsigned int cachetype = read_cpuid_cachetype();
                if ((cachetype & (7 << 29)) == 4 << 29) {
                        /* ARMv7 register format */
                        arch = CPU_ARCH_ARMv7;
index b9f015e843d8d10c461197c4399663942fb721e9..743a3bfe6a675fc03d4641122adc08a29a995e43 100644 (file)
@@ -41,7 +41,7 @@ void scu_enable(void __iomem *scu_base)
 
 #ifdef CONFIG_ARM_ERRATA_764369
        /* Cortex-A9 only */
-       if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) {
+       if ((read_cpuid_id() & 0xff0ffff0) == 0x410fc090) {
                scu_ctrl = __raw_readl(scu_base + 0x30);
                if (!(scu_ctrl & 1))
                        __raw_writel(scu_ctrl | 0x1, scu_base + 0x30);
index 45cc7ed4dd5875e4a9ceb290ca14a85b931b33db..1377c363fdeddff497e48e05be9a921cb888e290 100644 (file)
@@ -300,7 +300,7 @@ void __init omap3xxx_check_revision(void)
         * If the processor type is Cortex-A8 and the revision is 0x0
         * it means its Cortex r0p0 which is 3430 ES1.0.
         */
-       cpuid = read_cpuid(CPUID_ID);
+       cpuid = read_cpuid_id();
        if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) {
                omap_revision = OMAP3430_REV_ES1_0;
                cpu_rev = "1.0";
@@ -450,7 +450,7 @@ void __init omap4xxx_check_revision(void)
         * Use ARM register to detect the correct ES version
         */
        if (!rev && (hawkeye != 0xb94e) && (hawkeye != 0xb975)) {
-               idcode = read_cpuid(CPUID_ID);
+               idcode = read_cpuid_id();
                rev = (idcode & 0xf) - 1;
        }
 
index cd42d921940dcdb1dd91de67bb56b0350e2b442a..707098ecf8d3b9fd7d9397c2d2bf0af573eb6624 100644 (file)
@@ -209,7 +209,7 @@ static void __init omap4_smp_init_cpus(void)
        unsigned int i = 0, ncores = 1, cpu_id;
 
        /* Use ARM cpuid check here, as SoC detection will not work so early */
-       cpu_id = read_cpuid(CPUID_ID) & CPU_MASK;
+       cpu_id = read_cpuid_id() & CPU_MASK;
        if (cpu_id == CPU_CORTEX_A9) {
                /*
                 * Currently we can't call ioremap here because