From patchwork Thu Sep 15 21:05:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marty Plummer X-Patchwork-Id: 9334743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C59B760839 for ; Thu, 15 Sep 2016 21:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B31D929BAA for ; Thu, 15 Sep 2016 21:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7F8529BAF; Thu, 15 Sep 2016 21:08:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0452329BAE for ; Thu, 15 Sep 2016 21:08:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkdro-0000uC-S5; Thu, 15 Sep 2016 21:06:44 +0000 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkdqi-0008J8-2f for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2016 21:05:41 +0000 Received: by mail-oi0-x243.google.com with SMTP id 2so5082852oif.2 for ; Thu, 15 Sep 2016 14:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eWsXv9D/jGcM+MxNuES3D2nGUTBMtCkqWU+Ewfcqsck=; b=jL1VAbYM2wb0ctqsxAZAluZZK/buj9CTpaViTSS6r9n9B93pS0n39v3pC40itGksQ9 jT6c+SEtd5NjJ1u3W6E2tGL1gVPJYwUPd71aKRNcTJwix0UG4UPJ6d9BS4hIFuW/iZis 30fRArfvN0QT5mevlgpGCFsWlkoJsz+rpB25Ms4Tus1QZQv+uIQfMduoB9ydUU7LA8Dx lSyFGg5WUFh8ub2MXS3QHVFUGgyXoO2eBD1RnMyY0J60xcYtWephIUIntcB/TlnYYiiF TcO1eGEx3aDzZFMmY5b4LxRJDiV2DSP6JPRGThQcjao8rAycrdRE6qa8+DYzNi5NKTGh 9DYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eWsXv9D/jGcM+MxNuES3D2nGUTBMtCkqWU+Ewfcqsck=; b=CDKKrVXMhaOZ6cdC3K/FhbpTilvuw96xacdyo0PcdSlv+gJK2hIipgAJWA5awkvqkE hS2avmCJppzK5kuT/9exGY6Ym+tqx28Cme2cm6AG1b1cxI7lSIkKKFukGgo+VKfgX/Q6 BLc69mteO4+jX52EOXbpOGtkKoijKxTyuWTFll4phkWAxHRF+ly8VqrJzeXDgnAj0Ns+ VYmA4y0TYipOROasSgSs8eZedbJDvsxgOH5RFBxTJ6MQwyM6IAdrTLI7qjxA/P3GL/5H j//gJejeIIdP8z7FbhZYJk++DtOaySGgWl5KI11JrZuKNcdBsQWkHClGGr1DMDRxPWAi lObQ== X-Gm-Message-State: AE9vXwMDGUorK08D5TR5newBY5OO5J+ClLyI55yK8QXIZ8guvLNIeKh6PcYF7cfM7p1Dcw== X-Received: by 10.202.186.65 with SMTP id k62mr10268295oif.143.1473973514715; Thu, 15 Sep 2016 14:05:14 -0700 (PDT) Received: from tha-monstah.mydomain (cpe-72-176-81-0.stx.res.rr.com. [72.176.81.0]) by smtp.googlemail.com with ESMTPSA id e15sm1679185otc.21.2016.09.15.14.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Sep 2016 14:05:14 -0700 (PDT) From: Marty Plummer To: xuwei5@hisilicon.com Subject: [RFC PATCH v2 1/5] ARM: hisi: Make 3620 explicit, remove wildcards Date: Thu, 15 Sep 2016 16:05:01 -0500 Message-Id: <20160915210505.21878-2-netz.kernel@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160915210505.21878-1-netz.kernel@gmail.com> References: <20160915210505.21878-1-netz.kernel@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160915_140536_354507_9A18A068 X-CRM114-Status: GOOD ( 15.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, andrew@lunn.ch, linux@arm.linux.org.uk, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Marty Plummer --- arch/arm/Kconfig.debug | 2 +- arch/arm/boot/dts/Makefile | 2 +- arch/arm/configs/hisi_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/mach-hisi/Kconfig | 4 ++-- arch/arm/mach-hisi/core.h | 10 +++++----- arch/arm/mach-hisi/hisilicon.c | 6 +++--- arch/arm/mach-hisi/hotplug.c | 16 ++++++++-------- arch/arm/mach-hisi/platsmp.c | 24 ++++++++++++------------ 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index a9693b6..9094ca6 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -280,7 +280,7 @@ choice config DEBUG_HI3620_UART bool "Hisilicon HI3620 Debug UART" - depends on ARCH_HI3xxx + depends on ARCH_HI3620 select DEBUG_UART_PL01X help Say Y here if you want kernel low-level debugging support diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index faacd52..7ffd3a3 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -154,7 +154,7 @@ dtb-$(CONFIG_ARCH_EXYNOS5) += \ exynos5440-sd5v1.dtb \ exynos5440-ssdk5440.dtb \ exynos5800-peach-pi.dtb -dtb-$(CONFIG_ARCH_HI3xxx) += \ +dtb-$(CONFIG_ARCH_HI3620) += \ hi3620-hi4511.dtb dtb-$(CONFIG_ARCH_HIGHBANK) += \ highbank.dtb \ diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defconfig index b2e340b..14c8da6 100644 --- a/arch/arm/configs/hisi_defconfig +++ b/arch/arm/configs/hisi_defconfig @@ -4,7 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_BLK_DEV_INITRD=y CONFIG_RD_LZMA=y CONFIG_ARCH_HISI=y -CONFIG_ARCH_HI3xxx=y +CONFIG_ARCH_HI3620=y CONFIG_PARTITION_ADVANCED=y CONFIG_CMDLINE_PARTITION=y CONFIG_ARCH_HIX5HD2=y diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 2c8665c..a63865e 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -45,7 +45,7 @@ CONFIG_MACH_BERLIN_BG2Q=y CONFIG_ARCH_DIGICOLOR=y CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HISI=y -CONFIG_ARCH_HI3xxx=y +CONFIG_ARCH_HI3620=y CONFIG_ARCH_HIX5HD2=y CONFIG_ARCH_HIP01=y CONFIG_ARCH_HIP04=y diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index a3b091a..8a552c3 100644 --- a/arch/arm/mach-hisi/Kconfig +++ b/arch/arm/mach-hisi/Kconfig @@ -12,8 +12,8 @@ if ARCH_HISI menu "Hisilicon platform type" -config ARCH_HI3xxx - bool "Hisilicon Hi36xx family" +config ARCH_HI3620 + bool "Hisilicon Hi3620 family" depends on ARCH_MULTI_V7 select CACHE_L2X0 select HAVE_ARM_SCU if SMP diff --git a/arch/arm/mach-hisi/core.h b/arch/arm/mach-hisi/core.h index e883583..cb7bc84 100644 --- a/arch/arm/mach-hisi/core.h +++ b/arch/arm/mach-hisi/core.h @@ -3,13 +3,13 @@ #include -extern void hi3xxx_set_cpu_jump(int cpu, void *jump_addr); -extern int hi3xxx_get_cpu_jump(int cpu); +extern void hi3620_set_cpu_jump(int cpu, void *jump_addr); +extern int hi3620_get_cpu_jump(int cpu); extern void secondary_startup(void); -extern void hi3xxx_cpu_die(unsigned int cpu); -extern int hi3xxx_cpu_kill(unsigned int cpu); -extern void hi3xxx_set_cpu(int cpu, bool enable); +extern void hi3620_cpu_die(unsigned int cpu); +extern int hi3620_cpu_kill(unsigned int cpu); +extern void hi3620_set_cpu(int cpu, bool enable); extern void hix5hd2_set_cpu(int cpu, bool enable); extern void hix5hd2_cpu_die(unsigned int cpu); diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c index c08c44e..dfa1ee8 100644 --- a/arch/arm/mach-hisi/hisilicon.c +++ b/arch/arm/mach-hisi/hisilicon.c @@ -9,7 +9,7 @@ * 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. -*/ + */ #include #include @@ -44,12 +44,12 @@ static void __init hi3620_map_io(void) iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc)); } -static const char *const hi3xxx_compat[] __initconst = { +static const char *const hi3620_compat[] __initconst = { "hisilicon,hi3620-hi4511", NULL, }; DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)") .map_io = hi3620_map_io, - .dt_compat = hi3xxx_compat, + .dt_compat = hi3620_compat, MACHINE_END diff --git a/arch/arm/mach-hisi/hotplug.c b/arch/arm/mach-hisi/hotplug.c index a129aae..f06b428 100644 --- a/arch/arm/mach-hisi/hotplug.c +++ b/arch/arm/mach-hisi/hotplug.c @@ -143,7 +143,7 @@ static void set_cpu_hi3620(int cpu, bool enable) } } -static int hi3xxx_hotplug_init(void) +static int hi3620_hotplug_init(void) { struct device_node *node; @@ -157,10 +157,10 @@ static int hi3xxx_hotplug_init(void) return -ENOENT; } -void hi3xxx_set_cpu(int cpu, bool enable) +void hi3620_set_cpu(int cpu, bool enable) { if (!ctrl_base) { - if (hi3xxx_hotplug_init() < 0) + if (hi3620_hotplug_init() < 0) return; } @@ -262,24 +262,24 @@ static inline void cpu_enter_lowpower(void) } #ifdef CONFIG_HOTPLUG_CPU -void hi3xxx_cpu_die(unsigned int cpu) +void hi3620_cpu_die(unsigned int cpu) { cpu_enter_lowpower(); - hi3xxx_set_cpu_jump(cpu, phys_to_virt(0)); + hi3620_set_cpu_jump(cpu, phys_to_virt(0)); cpu_do_idle(); /* We should have never returned from idle */ panic("cpu %d unexpectedly exit from shutdown\n", cpu); } -int hi3xxx_cpu_kill(unsigned int cpu) +int hi3620_cpu_kill(unsigned int cpu) { unsigned long timeout = jiffies + msecs_to_jiffies(50); - while (hi3xxx_get_cpu_jump(cpu)) + while (hi3620_get_cpu_jump(cpu)) if (time_after(jiffies, timeout)) return 0; - hi3xxx_set_cpu(cpu, false); + hi3620_set_cpu(cpu, false); return 1; } diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c index e1d6764..e36783e 100644 --- a/arch/arm/mach-hisi/platsmp.c +++ b/arch/arm/mach-hisi/platsmp.c @@ -23,7 +23,7 @@ static void __iomem *ctrl_base; -void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) +void hi3620_set_cpu_jump(int cpu, void *jump_addr) { cpu = cpu_logical_map(cpu); if (!cpu || !ctrl_base) @@ -31,7 +31,7 @@ void hi3xxx_set_cpu_jump(int cpu, void *jump_addr) writel_relaxed(virt_to_phys(jump_addr), ctrl_base + ((cpu - 1) << 2)); } -int hi3xxx_get_cpu_jump(int cpu) +int hi3620_get_cpu_jump(int cpu) { cpu = cpu_logical_map(cpu); if (!cpu || !ctrl_base) @@ -56,7 +56,7 @@ static void __init hisi_enable_scu_a9(void) } } -static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) +static void __init hi3620_smp_prepare_cpus(unsigned int max_cpus) { struct device_node *np = NULL; u32 offset = 0; @@ -81,20 +81,20 @@ static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) } } -static int hi3xxx_boot_secondary(unsigned int cpu, struct task_struct *idle) +static int hi3620_boot_secondary(unsigned int cpu, struct task_struct *idle) { - hi3xxx_set_cpu(cpu, true); - hi3xxx_set_cpu_jump(cpu, secondary_startup); + hi3620_set_cpu(cpu, true); + hi3620_set_cpu_jump(cpu, secondary_startup); arch_send_wakeup_ipi_mask(cpumask_of(cpu)); return 0; } -static const struct smp_operations hi3xxx_smp_ops __initconst = { - .smp_prepare_cpus = hi3xxx_smp_prepare_cpus, - .smp_boot_secondary = hi3xxx_boot_secondary, +static const struct smp_operations hi3620_smp_ops __initconst = { + .smp_prepare_cpus = hi3620_smp_prepare_cpus, + .smp_boot_secondary = hi3620_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU - .cpu_die = hi3xxx_cpu_die, - .cpu_kill = hi3xxx_cpu_kill, + .cpu_die = hi3620_cpu_die, + .cpu_kill = hi3620_cpu_kill, #endif }; @@ -181,6 +181,6 @@ static const struct smp_operations hip01_smp_ops __initconst = { .smp_boot_secondary = hip01_boot_secondary, }; -CPU_METHOD_OF_DECLARE(hi3xxx_smp, "hisilicon,hi3620-smp", &hi3xxx_smp_ops); +CPU_METHOD_OF_DECLARE(hi3620_smp, "hisilicon,hi3620-smp", &hi3620_smp_ops); CPU_METHOD_OF_DECLARE(hix5hd2_smp, "hisilicon,hix5hd2-smp", &hix5hd2_smp_ops); CPU_METHOD_OF_DECLARE(hip01_smp, "hisilicon,hip01-smp", &hip01_smp_ops);