Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6235978ybx; Mon, 11 Nov 2019 06:08:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwCDBHuG/HpMDhzwLGSNCpQE2c4wzqFWg/MzODDJJ+rg1uRpE7M85149eKYy8EQgzTXrbDn X-Received: by 2002:a1c:4489:: with SMTP id r131mr19533486wma.132.1573481315906; Mon, 11 Nov 2019 06:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573481315; cv=none; d=google.com; s=arc-20160816; b=ylx2PLULDDqYXia5n0SiCfeB98zHEIXr3gpf6cZafaduXgz0jl2nw5FMKMlVXvTMNn 0Gsw7k5uuDHgbMLVvs4xZSk0zpRCEPBrig7RkxtZlNq3WJOZBulSLsRRzSZsy88DCJhZ dVMsuhHfEuciXQlWmqGz1H5KmwawqVUQN4nHGCoYqD79WXrdhLc25bWIUofUv/gMD1eg 4gttds+q3dKqB/WL8TE2zcPCtl1Z45zfQ31BKt/RLp9kJFvOzM0MRs4je+R4cnz7OBrT /TZ9JOr0RNJ7P51fkyJk3eNFNbK/mb4gONRopMZfGE61rdiRkUCgxMMFt3J0XCLGikF0 ROUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+/Y2KrElV7WuOlbhVtVkPVZzokBiLzkE9XqPZHWAkRo=; b=VgWzZKROaZNIN3Lh1pAbaCWOOGAyOGxDwb2/wGOAizBXrrwM2k3UxyDJp6KaAid4pb mI0vgUzAjXdWi6y6p+2e8w9vsqELMSDNDMbfQwgHqI6q2uwXX1JOryl7z9UIYoEDCMdt ZLq4+biaAkHh27naHqfkMvqcA6kHHatFRlLqCgvMnfWYLKtX1AVfZ+h8o7kAtBffFu1d NRoJ1lDbXC7YREbck9GsKzZrLIPnyCpVoDpto1z+ZwOcYuXd7eyzAfYycd+d0L9WF4w+ 2r2dfxE2jtSgrxfXIQ0/lhnRLDNG4CZB/RPi2kBu2mV+hK6TApU7rzU/faWi6f314apG l0Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V+PBH9ro; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si11112202edd.140.2019.11.11.06.08.11; Mon, 11 Nov 2019 06:08:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V+PBH9ro; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbfKKOG0 (ORCPT + 99 others); Mon, 11 Nov 2019 09:06:26 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46392 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbfKKOG0 (ORCPT ); Mon, 11 Nov 2019 09:06:26 -0500 Received: by mail-wr1-f66.google.com with SMTP id b3so14734913wrs.13 for ; Mon, 11 Nov 2019 06:06:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+/Y2KrElV7WuOlbhVtVkPVZzokBiLzkE9XqPZHWAkRo=; b=V+PBH9roG+uCAcjxBMg9abG2Rixd7T7rZJTeWi9rlCB3JwgOQW4JDoCm2FnJR/rHCK +TvvQeJmjCyuQeWjVuVij10wQ4Wf8Tp5b8DocHurl5bczScO2d+flwcuFF8LkRVSmbnJ tNEj3i+Z66lJ/gTERRJTsH80ffpfkkhw56HPEelAat/7df5znfFS7yvmnIF4YUpfrk1E hditUWupkBjHbji9Z/fBaHwT5adp89U4Nael8+gfx8p9H22WClNyYhsDp7dP3THgQiFJ WqjIg5TLN9F+f6mpS2zVxKnbYrZUJS2Z/9iWC95blO74NM8BpduPtKWwDHzW8quXr92n hoIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+/Y2KrElV7WuOlbhVtVkPVZzokBiLzkE9XqPZHWAkRo=; b=j1M8B8z1RzOnySYBjLVZSpg0xDAUJ9GSUgI4OJnzDalu3+roC1ADEzEpHniYJtm2KJ VIhuKyOChwjqjE71tTjeYiAR1sI8GHXYtZgbkFuw+UdO+nHANv/kWeQdtPJwu628NYab 3TvD7MZLafgtDNAFxL0NHcKOg0aSkLCQoE6RTLd9tiX2Gsxsq7EKJ8mvyA7FeSmt36xT ncoR63CRuJG7W/xmPsAAjonOFy7CJAH8ZaZ0OxZUyzewmcFQxwxqKGB7AP7OFgytxkDd GL9FtyXcD6WC0Z0LoC6OUFq1b35eIGOKEjidEqx70GJVKl16n4HrQqp/T8kMFjdYFncI 1qNw== X-Gm-Message-State: APjAAAVxTkxsxR+V0hmgVxItC+gDOu0UhchhayKVjW92wf2WtOjz1SBC wu0kOE+EvikqNOF3VUSOhWMLL+gXkogT8M8Egi5Uv1uc X-Received: by 2002:adf:c641:: with SMTP id u1mr21451436wrg.361.1573481184040; Mon, 11 Nov 2019 06:06:24 -0800 (PST) MIME-Version: 1.0 References: <20191111133421.14390-1-anup.patel@wdc.com> In-Reply-To: From: David Abdurachmanov Date: Mon, 11 Nov 2019 16:05:40 +0200 Message-ID: Subject: Re: [PATCH] RISC-V: Enable SYSCON reboot and poweroff drivers To: Anup Patel Cc: Paul Walmsley , Palmer Dabbelt , Anup Patel , "linux-kernel@vger.kernel.org" , Atish Patra , Alistair Francis , "linux-riscv@lists.infradead.org" , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 3:43 PM Anup Patel wrote: > > Correct Palmer's email address > > > -----Original Message----- > > From: Anup Patel > > Sent: Monday, November 11, 2019 7:05 PM > > To: Palmer Dabbelt ; Paul Walmsley > > > > Cc: Atish Patra ; Alistair Francis > > ; Christoph Hellwig ; Anup Patel > > ; linux-riscv@lists.infradead.org; linux- > > kernel@vger.kernel.org; Anup Patel > > Subject: [PATCH] RISC-V: Enable SYSCON reboot and poweroff drivers > > > > We can use SYSCON reboot and poweroff drivers for the SiFive test device > > found on QEMU virt machine and SiFive SOCs. > > > > This patch enables SYSCON reboot and poweroff drivers in RV64 and RV32 > > defconfigs. > > > > Signed-off-by: Anup Patel > > --- > > arch/riscv/configs/defconfig | 4 ++++ > > arch/riscv/configs/rv32_defconfig | 4 ++++ > > 2 files changed, 8 insertions(+) > > > > diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig > > index 420a0dbef386..73a6ee31a7d2 100644 > > --- a/arch/riscv/configs/defconfig > > +++ b/arch/riscv/configs/defconfig > > @@ -63,6 +63,10 @@ CONFIG_HW_RANDOM_VIRTIO=y CONFIG_SPI=y > > CONFIG_SPI_SIFIVE=y # CONFIG_PTP_1588_CLOCK is not set > > +CONFIG_POWER_RESET=y Why not to add select POWER_RESET to arch/riscv/Kconfig ? This seems to be a popular choice (?). I went this path recently while enabling gpio-restart on SiFive Unleashed on a private branch. [..] arch/arm/mach-exynos/Kconfig: select POWER_RESET arch/arm/mach-exynos/Kconfig: select POWER_RESET_SYSCON arch/arm/mach-exynos/Kconfig: select POWER_RESET_SYSCON_POWEROFF arch/arm/mach-gemini/Kconfig: select POWER_RESET arch/arm/mach-gemini/Kconfig: select POWER_RESET_GEMINI_POWEROFF arch/arm/mach-gemini/Kconfig: select POWER_RESET_SYSCON arch/arm/mach-hisi/Kconfig: select POWER_RESET arch/arm/mach-hisi/Kconfig: select POWER_RESET_HISI arch/arm/mach-integrator/Kconfig: select POWER_RESET arch/arm/mach-integrator/Kconfig: select POWER_RESET_VERSATILE arch/arm/mach-realview/Kconfig: select POWER_RESET arch/arm/mach-realview/Kconfig: select POWER_RESET_VERSATILE arch/arm/mach-versatile/Kconfig: select POWER_RESET arch/arm/mach-versatile/Kconfig: select POWER_RESET_VERSATILE arch/arm/mach-vexpress/Kconfig: select POWER_RESET arch/arm/mach-vexpress/Kconfig: select POWER_RESET_VEXPRESS arch/arm64/Kconfig: select POWER_RESET [..] > > +CONFIG_POWER_RESET_SYSCON=y > > +CONFIG_POWER_RESET_SYSCON_POWEROFF=y > > +CONFIG_SYSCON_REBOOT_MODE=y > > CONFIG_DRM=y > > CONFIG_DRM_RADEON=y > > CONFIG_DRM_VIRTIO_GPU=y > > diff --git a/arch/riscv/configs/rv32_defconfig > > b/arch/riscv/configs/rv32_defconfig > > index 87ee6e62b64b..1429e1254295 100644 > > --- a/arch/riscv/configs/rv32_defconfig > > +++ b/arch/riscv/configs/rv32_defconfig > > @@ -61,6 +61,10 @@ CONFIG_VIRTIO_CONSOLE=y > > CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y # > > CONFIG_PTP_1588_CLOCK is not set > > +CONFIG_POWER_RESET=y > > +CONFIG_POWER_RESET_SYSCON=y > > +CONFIG_POWER_RESET_SYSCON_POWEROFF=y > > +CONFIG_SYSCON_REBOOT_MODE=y > > CONFIG_DRM=y > > CONFIG_DRM_RADEON=y > > CONFIG_DRM_VIRTIO_GPU=y > > -- > > 2.17.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv