From patchwork Fri Jun 28 11:27:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2798591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5B7979F3C3 for ; Fri, 28 Jun 2013 12:10:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A51420181 for ; Fri, 28 Jun 2013 12:10:21 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC54D20178 for ; Fri, 28 Jun 2013 12:10:19 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UsWtm-0008GT-37; Fri, 28 Jun 2013 11:31:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UsWqC-0002HN-DI; Fri, 28 Jun 2013 11:27:48 +0000 Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UsWpx-0002FA-5J for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2013 11:27:33 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so2157965pbb.19 for ; Fri, 28 Jun 2013 04:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=cp2X4LZGHG6Qd6uUFRSOTGPliSkeSD2ttOUt/3zdZk0=; b=WvX7Z1zyDNtas7EhZQDvTgCO7xkHegtco/IdqMaMDSOY3Qyks0TY/EtVJEahug3sLE GYuSPzixINtLk+4ZTJVVUxenvuVr8Io6StwHlz44PPIhZj3PMMKMf8LxlTcbsQBgL0QU 2JGH7AyaGBkiR6/xB+Oz+fc6zgM+qzvPZYHBZBkL252ja9aVnmmiEsN9R2wUcaZBuFbS s75v9jZId9DdQRimf9lWdlHGYAdRE96bdFK/T8FT5/yiynUen4YvZ9bD+tZFUJZCPF5F RQ2qdK2UUGpqyqZcaK1GIVxOKlKcJGVm9Ew0SsJG2+eD8Pq3uTa7E8xjHz8rjCbeMGK4 dNuQ== X-Received: by 10.68.95.164 with SMTP id dl4mr10999235pbb.42.1372418831679; Fri, 28 Jun 2013 04:27:11 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id x8sm7701042pbb.39.2013.06.28.04.27.09 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Jun 2013 04:27:10 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 28 Jun 2013 20:27:13 +0900 Message-Id: <20130628112713.23809.67187.sendpatchset@w520> In-Reply-To: <20130628112655.23809.39115.sendpatchset@w520> References: <20130628112655.23809.39115.sendpatchset@w520> Subject: [PATCH 02/04] ARM: shmobile: Make r8a7790 Arch timer optional X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130628_072733_298706_E3E0492A X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: olof@lixom.net, horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Update the r8a7790 code to allow using other timers than Arch timer for clock events. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/Kconfig | 1 - arch/arm/mach-shmobile/board-lager.c | 1 + arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 + arch/arm/mach-shmobile/setup-r8a7790.c | 8 ++++++++ 4 files changed, 10 insertions(+), 1 deletion(-) --- 0001/arch/arm/mach-shmobile/Kconfig +++ work/arch/arm/mach-shmobile/Kconfig 2013-06-28 15:30:59.000000000 +0900 @@ -61,7 +61,6 @@ config ARCH_R8A7790 select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_GIC select CPU_V7 - select ARM_ARCH_TIMER select SH_CLK_CPG select RENESAS_IRQC --- 0001/arch/arm/mach-shmobile/board-lager.c +++ work/arch/arm/mach-shmobile/board-lager.c 2013-06-28 15:31:47.000000000 +0900 @@ -103,6 +103,7 @@ static const char *lager_boards_compat_d }; DT_MACHINE_START(LAGER_DT, "lager") + .init_early = r8a7790_init_delay, .init_irq = irqchip_init, .init_time = r8a7790_timer_init, .init_machine = lager_add_standard_devices, --- 0001/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ work/arch/arm/mach-shmobile/include/mach/r8a7790.h 2013-06-28 15:31:21.000000000 +0900 @@ -4,6 +4,7 @@ void r8a7790_add_standard_devices(void); void r8a7790_clock_init(void); void r8a7790_pinmux_init(void); +void r8a7790_init_delay(void); void r8a7790_timer_init(void); #endif /* __ASM_R8A7790_H__ */ --- 0003/arch/arm/mach-shmobile/setup-r8a7790.c +++ work/arch/arm/mach-shmobile/setup-r8a7790.c 2013-06-28 15:34:37.000000000 +0900 @@ -209,6 +209,13 @@ void __init r8a7790_timer_init(void) shmobile_timer_init(); } +void __init r8a7790_init_delay(void) +{ +#ifndef CONFIG_ARM_ARCH_TIMER + shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ +#endif +} + #ifdef CONFIG_USE_OF void __init r8a7790_add_standard_devices_dt(void) { @@ -221,6 +228,7 @@ static const char *r8a7790_boards_compat }; DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") + .init_early = r8a7790_init_delay, .init_irq = irqchip_init, .init_machine = r8a7790_add_standard_devices_dt, .init_time = r8a7790_timer_init,