Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1428384ybc; Sat, 16 Nov 2019 23:22:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw1WOFasx2zIuQjHlFbm4CP6tq0FNMBmJ8EBPcPK02Lxzn3TxTUZthPAIZCWqOSi7vtEGA4 X-Received: by 2002:a17:906:4913:: with SMTP id b19mr15928793ejq.61.1573975371863; Sat, 16 Nov 2019 23:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573975371; cv=none; d=google.com; s=arc-20160816; b=iSmXDhym/bqnVZFu58t3xp1/bXtOvmBazlV8eoiU8zFOgHPtuOvBt+JX7YflIGCO3U bI3PHSSOiGuiV7X3NFEN+gvCfCQWzKTxGstfPDgNzgnqvu+R7Jk1+DSQSc/0DOxiaNMd pcB06dGUhYBO9LiXMMsjuX8/hUEFjRJcGCnkPHKbIWgxChEEivg8H15DPeY3J9d28EVq Vi3MH/sPTVEfBnKjLF+4wATj4PNgLjjgaJaRGi8umvSGZ4CJvAoTGpqavpATt91gsLTY SnpsnPnUXzY2+cINW2NYZUEZLM1Dx7FnkEk64+yX+uyXN7d4c+v/8EqSoOEidx9v4Z+a QBvw== 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=HjqRwP8ArD57XZgZHFi7uv9wq/Vh7HoVCAtLDhEKBao=; b=e2I4raIZSqioI9Gp/iM7VDp/Ar4Tmd+SPJNJM+uOrDq16ju69U42m34OenTufO3vOn UgdkKsllf8IjkjQYKDIbNdEUfQnt40sOaWCCjzJ2nfYAzN3WZPm93sFmv8knNJNMmRdN C0xF65OopPpzWDJGb8LywyomU9BnRJPvMoQysTHto6JklVx45i47MC0S63+C9rdJKgQr 5Y5NhhbIlqcHmcqgtwmEr6LQTx/Da52pwzBNNDoI6tXyWGS0mlNPSFwknNvuQBjGmAW+ qvStRk1JM8OpRg1ZjxMiiePFUgodnnp3dzriw0Ox6SILtwoqdw6LLmSUHp5T3rTpWoyL mlfg== 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 h13si9502935ejq.54.2019.11.16.23.22.27; Sat, 16 Nov 2019 23:22:51 -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; 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 S1726213AbfKQHV0 (ORCPT + 99 others); Sun, 17 Nov 2019 02:21:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:40824 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726134AbfKQHVY (ORCPT ); Sun, 17 Nov 2019 02:21:24 -0500 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 9E238B317; Sun, 17 Nov 2019 07:21:22 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=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=20F=C3=A4rber?= , Russell King Subject: [PATCH v3 8/8] ARM: realtek: Enable RTD1195 arch timer Date: Sun, 17 Nov 2019 08:21:09 +0100 Message-Id: <20191117072109.20402-9-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191117072109.20402-1-afaerber@suse.de> References: <20191117072109.20402-1-afaerber@suse.de> 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 Without this magic write the timer doesn't work and boot gets stuck. Signed-off-by: Andreas Färber --- What is the name of the register 0xff018000? Is 0x1 a BIT(0) write, or how are the register bits defined? Is this a reset or a clock gate? How should we model it in DT? v2 -> v3: Unchanged v2: New arch/arm/mach-realtek/rtd1195.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-realtek/rtd1195.c b/arch/arm/mach-realtek/rtd1195.c index b31a4066be87..0532379c74f5 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, -- 2.16.4