From patchwork Tue Feb 11 06:04:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1236175 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fptalSvx; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Gsjn2CQbz9sRN for ; Tue, 11 Feb 2020 17:06:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 587B881549; Tue, 11 Feb 2020 07:05:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fptalSvx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8708180E9D; Tue, 11 Feb 2020 07:05:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 674568101F for ; Tue, 11 Feb 2020 07:05:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x844.google.com with SMTP id w8so7097697qts.11 for ; Mon, 10 Feb 2020 22:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2s/RtqBgCbaPDUwdOq5tYXR7KEMcd/WKpDMNPVMafew=; b=fptalSvxm032DXTh78njzLB7TbjZrKyLKViDjXJMsbIKHyTjLJNAOzVRhRze7Zj5qF F7f8TY5edh2HdO8N1y0Bgu9i3IFdhVHmosD4bTNUMQiBF8MLNvjsL35SpGdJ413kWKjQ YlxAxepP6kBkIDuulJjXfMstB3QQ4eBpFaz6WBj3g0UbMMeEJmLYa0SNHAqG76AUscZu Ta/CseLELrelRvulW9zH+A53qj/iDv4vs0bgEu/Et8C2PdGi+H7YQKFRrGuHB8bVNIUE 1Bc8OBStgNGySFCWyHunkKR/koVlYbDrcxR6VGUj2n7OzYYcywlsh0dFOEO3jNBMxc0p dmUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2s/RtqBgCbaPDUwdOq5tYXR7KEMcd/WKpDMNPVMafew=; b=oPMcm6wyP2PmniNCE3RpoS3bTtoieuOl7VE+qhoHOJX0v+yEc4ijpHrzMMwjiukRRL NYgEjw7wrk/fnse1wotdAxcxiQ9/p+6p3cb159t2IRJAOrK+2FPjVunihgqMog3DxoFc u1qZEfqerZoIYfabI8Hwf37P5QgfjV+Ax7zIeXJpYdCyqkE8b+6Lx6KNQCpzJyC5tUSm Ue3JaF63HUbUQqo32z8q3W6QtDkIuumnmA3XMnOz+0pSoUCkFU+pMOHf9/zQZXRZw9bP 3lJORS1tJz5KPJZuXi5kzsE8n89J6k4G66KUfThIqT920Bf3602wFI1fASquGt27QByB 0WuQ== X-Gm-Message-State: APjAAAW3s7AJN8mf1uy3/Y9jtZtxtX5BeoWIdLQjCuUbXE2CPR+dUtTv xjl5LkODYxfPiyuc9KCOFVfKVByje3GEiQ== X-Google-Smtp-Source: APXvYqzmlHUg1yHkws1uMmJNiNp6cR41O/Ak72Esj1IAtBIZuyhdnPPLcVOin4X1K8pxpMSwj2nG2Q== X-Received: by 2002:aed:31e2:: with SMTP id 89mr1076524qth.35.1581401107121; Mon, 10 Feb 2020 22:05:07 -0800 (PST) Received: from localhost.localdomain ([75.102.135.197]) by smtp.gmail.com with ESMTPSA id n4sm1497608qti.55.2020.02.10.22.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 22:05:06 -0800 (PST) From: Sean Anderson To: u-boot@lists.denx.de Subject: [PATCH v4 10/17] riscv: Allow use of reset drivers Date: Tue, 11 Feb 2020 01:04:18 -0500 Message-Id: <20200211060425.1619471-11-seanga2@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200211060425.1619471-1-seanga2@gmail.com> References: <20200211060425.1619471-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rick Chen Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.1 at phobos.denx.de X-Virus-Status: Clean Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/lib/reset.c b/arch/riscv/lib/reset.c index b8cecb309d..6cf6387f10 100644 --- a/arch/riscv/lib/reset.c +++ b/arch/riscv/lib/reset.c @@ -6,6 +6,7 @@ #include #include +#ifndef CONFIG_SYSRESET int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("resetting ...\n"); @@ -15,3 +16,4 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#endif