Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2652190imj; Mon, 11 Feb 2019 06:30:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IZf+DbIyjiJBJJZS9XzxSjiDbhkh9sdSy/JMDkv9suXTDLoAhcuoilLM3agucgcB4OMtkkY X-Received: by 2002:a63:7c41:: with SMTP id l1mr33378875pgn.45.1549895419900; Mon, 11 Feb 2019 06:30:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895419; cv=none; d=google.com; s=arc-20160816; b=sCAgTSUnz+6mF5zWCncet+1fy9g401fOgV1b97CfZSxu0XGjMRJEfSzCD+RbGJNVL2 /HiBvIJaeB8jvS8p8r9tQhS/MLDK5eqiRDh0sW8zqaZEgjb5B1D8MwJVtZxkcUFCVN84 5pZqc0d4POLyW0gtAbI8UI5rJe5aAohKodMW+5gT+lh+FQKYO8/OEC8W1pN2tzGppTQC +Lw84lTATsTS9Kwn5XEE24Axf2OJh9HmKcvvuBqWplxYAylX1xByU5U56NO8tEn8Y9VF puruaRip2K+F/tVT7IYsmUlhhgPHce6Dh8tqw16x7ts4hcKwR6O9CNuZBPQccHQy9rIE oagA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mQ9Mcgxg+Z2n2Jclg00XKgYx8jLxkJjCgvVzlSDAJLE=; b=R/t9KIvOe+1Px9lc4nK5ORxxMe0k716fjIwnrySEtsz0Kug8OLJSpSGO77bXAN6mVL TIkbQFJNPfnZTnLN4y9eYwvmdkXHgJd6VnhLLnS9KVtGVQypvxEZjHL5jt9XwhULbCQG dCCCCPcfB/P933S8z4xHPOOfAqmASuJAF9Z+Nemf+qsMVbGL97jWxsV7K3EBoSy8/pF9 aiRNUDCMwwgSTQO3yqj6AV6eZXyGI6z7on1qBTKe3haDRCWuUvIa5BcanQxWHn/siS7H DkiWgFuiQN5LD0WFKf1Ciw0C/UXPrVV6JRxgww0k6wnXdX5HSVm3+VwFUOpyFbtWw+7/ n4+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HMh0+vcA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si8175303pgv.520.2019.02.11.06.30.03; Mon, 11 Feb 2019 06:30:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HMh0+vcA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729135AbfBKO2j (ORCPT + 99 others); Mon, 11 Feb 2019 09:28:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:34548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728480AbfBKO2g (ORCPT ); Mon, 11 Feb 2019 09:28:36 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CF9920821; Mon, 11 Feb 2019 14:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895315; bh=TG5/okjJlBdA1wIHTLa+yxwr4WllApE8lQhVZpYWl44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMh0+vcACXBeTNArqOqSRzjbREcsD3m0rFU/uZ3ouezGkRY4FEa0TvHOX5uO9veiU 3Lqv3ecppKrCjvW09VvTHhxaGL/ttZTmfFoyAApynLd/NTEAt8KW9gMmdFTSpjX+/u hG4xLTcrBDVbniAHugh8q8Xu6XOk4F+1zYFjic+I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Olof Johansson , Sasha Levin Subject: [PATCH 4.20 164/352] ARM: mmp: fix timer_init calls Date: Mon, 11 Feb 2019 15:16:31 +0100 Message-Id: <20190211141857.386778651@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ] The change to passing the timer frequency as a function argument was a good idea, but caused a build failure for one user that was missed in the update: arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer': arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration] Change that as well to fix the build error, and rename the function to put it into a proper namespace and make it clearer what is actually going on. I saw that the high 6500000 HZ frequency was previously only set with CONFIG_MMP2, but is now also used with MMP (pxa910), so I'm changing that back here. Please make sure that the frequencies are all correct now. Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson Signed-off-by: Sasha Levin --- arch/arm/mach-mmp/common.h | 2 +- arch/arm/mach-mmp/mmp2.c | 2 +- arch/arm/mach-mmp/pxa168.c | 2 +- arch/arm/mach-mmp/pxa910.c | 2 +- arch/arm/mach-mmp/time.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index 5ac2851ef5d3..483b8b6d3005 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h @@ -2,7 +2,7 @@ #include #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) -extern void timer_init(int irq, unsigned long rate); +extern void mmp_timer_init(int irq, unsigned long rate); extern void __init mmp_map_io(void); extern void mmp_restart(enum reboot_mode, const char *); diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index fb3e7e32c882..726c1a642dea 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -134,7 +134,7 @@ void __init mmp2_timer_init(void) clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); __raw_writel(clk_rst, APBC_TIMERS); - timer_init(IRQ_MMP2_TIMER1, 6500000); + mmp_timer_init(IRQ_MMP2_TIMER1, 6500000); } /* on-chip devices */ diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 77a358165a56..cdcf65ace3f9 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c @@ -79,7 +79,7 @@ void __init pxa168_timer_init(void) /* 3.25MHz, bus/functional clock enabled, release reset */ __raw_writel(TIMER_CLK_RST, APBC_TIMERS); - timer_init(IRQ_PXA168_TIMER1, 6500000); + mmp_timer_init(IRQ_PXA168_TIMER1, 3250000); } void pxa168_clear_keypad_wakeup(void) diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 1ccbba9ac495..d30a7d12bc98 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -116,7 +116,7 @@ void __init pxa910_timer_init(void) __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS); __raw_writel(TIMER_CLK_RST, APBC_TIMERS); - timer_init(IRQ_PXA910_AP1_TIMER1); + mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000); } /* on-chip devices */ diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index eab0fd8a7343..f9c295154b94 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -184,7 +184,7 @@ static struct irqaction timer_irq = { .dev_id = &ckevt, }; -void __init timer_init(int irq, unsigned long rate) +void __init mmp_timer_init(int irq, unsigned long rate) { timer_config(); @@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void) ret = -ENOMEM; goto out; } - timer_init(irq, rate); + mmp_timer_init(irq, rate); return; out: pr_err("Failed to get timer from device tree with error:%d\n", ret); -- 2.19.1