From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAAAFC2D0C0 for ; Thu, 26 Dec 2019 20:28:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE3472080D for ; Thu, 26 Dec 2019 20:28:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iXavWfXo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE3472080D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6cL3VTidwyPX1SsR25uIz4agGhGmINzoHaVwu2jq70o=; b=iXavWfXofYnUa1 8a/WEnb1zeXmiq0atBuArkV5feKXV81Ub6caHB4Ussrn4Xks6kznXrNKOnRc44GZo6XTYvk8+A4Ex s2U4gkAoW1uMKBKhFaLgCdEZUH2JQ6QWRuKKYpt9UB+r/rONhhDB4TmwkYY3cd50gzFSs28PfaaOR 8437lHJQQ8WixsHh+BFFyRy4EUAtAD7VZ4mjn8xi625lfV6F8mHM7gwa/O2A5WTAB3IkUqfrgY8XQ P19NWqkmiYtouC2ULAg/GPJebbLKqZbA/jbODNZwUV9jCJacXNG6tzMOip9qMAsb2d5Akx+rdi5Bx y4mbrFjmpsL3RFH9ui9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ikZjs-0001iv-Vp; Thu, 26 Dec 2019 20:28:08 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ikZjo-0001hu-PR; Thu, 26 Dec 2019 20:28:06 +0000 Received: from [193.173.216.178] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ikZjg-0007qI-RB; Thu, 26 Dec 2019 21:27:56 +0100 From: Heiko Stuebner To: Chen-Yu Tsai Subject: Re: [PATCH] Revert "rockchip: make sure timer7 is enabled on rk3288 platforms" Date: Thu, 26 Dec 2019 21:27:45 +0100 Message-ID: <1865524.AMUeMo0HA2@phil> In-Reply-To: References: <20191225025908.25305-1-kever.yang@rock-chips.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191226_122805_001572_FB799924 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , "open list:ARM/Rockchip SoC..." , Kever Yang , linux-arm-kernel , linux-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Mittwoch, 25. Dezember 2019, 04:02:29 CET schrieb Chen-Yu Tsai: > On Wed, Dec 25, 2019 at 10:59 AM Kever Yang wrote: > > > > This reverts commit 2a9fe3ca84afff6259820c4f62e579f41476becc. > > All the U-Boot version for rk3288 including mainline, rockchip > > legacy/next-dev, have init the timer7, so no need to init it in kernel > > again. > > What about the ChromeOS bootloader? Coreboot does seem to start timer7 correctly: https://github.com/coreboot/coreboot/blob/master/src/soc/rockchip/rk3288/timer.c But old rk3288 Android TV-boxes do contain bootloaders not doing that and as the owners of such boxes will most often not have too great development tools available, that would break newer kernels for them, which is really bad as we value backwards compatibility very much. Instead (just checked theoretically) could we just check for psci existence? I.e. the calling order seems to be: start_kernel() (in init/main.c) -> setup_arch() -> psci_dt_init() -> populates struct psci_ops -> time_init() -> machine_desc->init_time() so in rockchip_timer_init() you should "just" be able to check like if (of_machine_is_compatible("rockchip,rk3288") && !psci_ops.cpu_on) { /* timer init */ } Heiko > > One more reason is that if we enable the trust for rk3288, then timer7 is > > not able to be accessed in kernel. > > > > Signed-off-by: Kever Yang > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel