Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1390449ybx; Thu, 31 Oct 2019 09:54:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPeHAk+yZ3Pyw5AHe0dJlQlW+6O4+gCBHEQanf42/h0kfpUaNSFc7+SX+6GqICSnVqZ/27 X-Received: by 2002:a17:906:7f06:: with SMTP id d6mr5006499ejr.323.1572540858021; Thu, 31 Oct 2019 09:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572540858; cv=none; d=google.com; s=arc-20160816; b=XoWnUOqVVYRcscCxcFMmd3275+FZpVxrwCu7fJ+cBQPoC3Q0xufWbExewlW4jvHmT5 89lszM1K4W1WhUMS11yyD45JfPDn5NPNnj7y74RqjJZ7b1zEsjq+fPr95NG69lVkOGuX TsQ4HSSuuUzb+iNG7HO6N742/rDv6XnRdOTP/WLPKUoqvua5CUlYfwGyCqUyk92GwJi3 gzCLCGDl+uYpEypt1vciYX/iPfL2MjPcrU687FFm50yAHSdW6J+AhsNWfzZqv+rao+OT FH09Ayx/c6RwjGcRSI43t3oQcW2+tnvqizLExk3lPnVT2SAr7tZhmIUebepUWqtxxHGg Ag0Q== 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 ov6si308002ejb.196.2019.10.31.09.53.54; Thu, 31 Oct 2019 09:54:18 -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 S1728793AbfJaQxQ (ORCPT + 99 others); Thu, 31 Oct 2019 12:53:16 -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=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 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 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 --- 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 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, -- 2.16.4