From patchwork Thu Oct 31 16:53:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 178212 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3110230ill; Thu, 31 Oct 2019 09:53:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbvfreR6wPSXHQvrqGJKlJV1/W5Ye/mgE0P5Y9xxU7EzlfhSgv1e4FvHPFG+RJJePvn2Jk X-Received: by 2002:a17:906:4bcb:: with SMTP id x11mr5176663ejv.9.1572540801243; Thu, 31 Oct 2019 09:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572540801; cv=none; d=google.com; s=arc-20160816; b=NLjET8LtiEeKClO6BR1OneazFkKtsCSuWPSO5tMoBNqsAJ9E8qgOxxb1gXiJkKFaNi UJXABwgiY6xPoQxbAb32pkAYjCF8ltNZcvoh8GhHG1K276prnSy2T8UNdo0fb/lurU/b CY1n5izb6J1T1HisMfiH/I0+93S5BRHh0WBMyXsrTQtpCDatG8QM6840iId6GBaqyihg GaZJLSKGzViPJECAJ/bHJmt29ABNpFi9E1hMUtBZaCZ6Uw9bXKNpH1x7TvjBMkmkwMtv fWAdol9RoIjb+1OVuj5IX5nLTT2JbaROj1soyuFTHgw4xOc2gU82VFkzJSe1pJxAzSud PMxg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VO90jkr8UVLWUhwHWwmGTRXgc7q1cdz5y6VBnUkA3tw=; b=S0Tfcb7hHl2NXuTop8PG6VTY2KfOe48Wxm1vcPYdxnv8mXEoYz9fbB75eCkc9LGRKf qN+IwHZxERnLX2Frk7Au3O0MM8OrSBEi9+9UAiiFkodX9Q5R82RCjITuzJ71sgUT1SbF ophd5d/57FB5gdXq8K7t4aw98yrBlFNYg7sQ+58vuT0SiqnlXGI/fogujJIimCcSZLtv Dj8UvQggXBIGUwUXt71GAB/Ui9hM4fjK2bPb46PWhJqz31eRwEwpVOmFS6nhNxcCSKpB 6Y8l5H0xQpfDASB7H+MoajRi/uyPg9YaFBQYQHNXL9OX+YCfb4LhBSqqvoW8XPHdU2hA 8uJA== ARC-Authentication-Results: i=1; mx.google.com; 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 v11si4693143edl.371.2019.10.31.09.53.20; Thu, 31 Oct 2019 09:53:21 -0700 (PDT) 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; 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 S1728804AbfJaQxR (ORCPT + 26 others); Thu, 31 Oct 2019 12:53:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:34808 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728753AbfJaQxO (ORCPT ); Thu, 31 Oct 2019 12:53:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BE77AB30A; Thu, 31 Oct 2019 16:53:12 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Russell King Subject: [PATCH v2 4/4] ARM: realtek: Enable RTD1195 arch timer Date: Thu, 31 Oct 2019 17:53:07 +0100 Message-Id: <20191031165308.14102-5-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191031165308.14102-1-afaerber@suse.de> References: <20191031165308.14102-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without this magic write the timer doesn't work and boot gets stuck. Signed-off-by: Andreas Färber --- v2: New arch/arm/mach-realtek/rtd1195.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.16.4 diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c index 99e5d3e96a8e..cd16f1e99646 100644 --- a/arch/arm/mach-realtek/rtd1195.c +++ b/arch/arm/mach-realtek/rtd1195.c @@ -5,6 +5,9 @@ * Copyright (c) 2017-2019 Andreas Färber */ +#include +#include +#include #include #include @@ -24,6 +27,18 @@ static void __init rtd1195_reserve(void) rtd1195_memblock_remove(0x18100000, 0x01000000); } +static void __init rtd1195_init_time(void) +{ + void __iomem *base; + + base = ioremap(0xff018000, 4); + writel(0x1, base); + iounmap(base); + + of_clk_init(NULL); + timer_probe(); +} + static const char *const rtd1195_dt_compat[] __initconst = { "realtek,rtd1195", NULL @@ -31,6 +46,7 @@ static const char *const rtd1195_dt_compat[] __initconst = { DT_MACHINE_START(rtd1195, "Realtek RTD1195") .dt_compat = rtd1195_dt_compat, + .init_time = rtd1195_init_time, .reserve = rtd1195_reserve, .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0,