From patchwork Tue Dec 11 09:34:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1010928 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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.b="KhR12ovF"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43DZfy2TSCz9s9h for ; Tue, 11 Dec 2018 20:40:10 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1D9BEC2259B; Tue, 11 Dec 2018 09:32:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 27EAEC22655; Tue, 11 Dec 2018 09:30:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4D065C22669; Tue, 11 Dec 2018 09:30:17 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id 6DE83C22172 for ; Tue, 11 Dec 2018 09:30:13 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id g189so6381234pgc.5 for ; Tue, 11 Dec 2018 01:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=ab4I9u+86tv0t3uIsaKCRlC9rUmbMIvK9UXfZzXB52o=; b=KhR12ovFHwBDsbyAHNxob3I+B8rdef7GoLtGLhf94rhlfaJr8I7KOeucGJmHqAG2E4 P3DRbrGqPYPKDcZR4A/LdPVxXM2RKJj0R4cYhTxPVeYOhj36rix6d0xwOKVxYTYvaNSf vYi28N+rMWVBblfntALXeFZyWvSFsH9wvS9E87PvnN5+9Bil4O+B1TJ5eFxfkEsFsvi8 JGHc2zHcyLj+w6xoIoGZ3DvWFNRDax0ibLnTjv2pbiVeYxjV6CD7jxZQAEUxLIltts+c Oaf5KaHQ2+IrLdj6f5hOBtKyr94ILQvoZ3To4HlI47fGqFbpU3D5PI9ycuWQ3AQ3tCXV DAfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ab4I9u+86tv0t3uIsaKCRlC9rUmbMIvK9UXfZzXB52o=; b=kegOgm43esbbomRArii7l0biofM9TG2VJbU4xEhPts58299A1pKocX7Etgnj5QiNZD rJD0pRGjcM+dEpWFthpoAZO3FWjVxj8OD/uc/ReI6x4nPS8yTDl/l26VyBmZmxb5ir9B 9UNjezRq/vJjvp5A6xOvUZbFTXZQZ6pHUadqllN1IK+tEl6KbfCHO/ELXkXsr0FAUUNG 5RszCLt3Nhon+bpPBILcFzUXYBRrCuORJ+NgO9BO9BN9ELIQv3iwOAz3Y/2dE6phl0I4 WXuqauY6HQ+DDE1fYyqNipUvM2p8EOVM+b7rDVU8IQT+vrx8LZWiKR2d7hrZGQ4xmBd6 UcZg== X-Gm-Message-State: AA+aEWZri6hDfKe9tqG3TSaBaT7MeB2kQxwZx0CjjmndHUPHgfF6hPPk E0OwRpAbG5F1jLBi8FfNKyg= X-Google-Smtp-Source: AFSGD/WVvDLpoMbl93dxWpjYFPVRN8Fw5ejYSBWZsCJw6pOrNZrNiIqW/H2rcg70HGhajpkQ6gaRaQ== X-Received: by 2002:a63:68c4:: with SMTP id d187mr13772968pgc.11.1544520612095; Tue, 11 Dec 2018 01:30:12 -0800 (PST) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id n66sm21916129pfk.19.2018.12.11.01.30.11 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Dec 2018 01:30:11 -0800 (PST) From: Bin Meng To: Rick Chen , Simon Glass , Lukas Auer , Anup Patel , U-Boot Mailing List Date: Tue, 11 Dec 2018 01:34:43 -0800 Message-Id: <1544520901-31558-8-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1544520901-31558-1-git-send-email-bmeng.cn@gmail.com> References: <1544520901-31558-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH v3 07/25] riscv: Introduce a Kconfig option for machine mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Anup Patel So far we have a Kconfig option for supervisor mode. This adds an option for the machine mode. Signed-off-by: Anup Patel Signed-off-by: Bin Meng Reviewed-by: Lukas Auer --- Changes in v3: None Changes in v2: - incorporated and reworked Anup's S-mode timer patch @ http://patchwork.ozlabs.org/patch/1006663/ arch/riscv/Kconfig | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 6d85ac9..55c60e4 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -62,6 +62,22 @@ config CMODEL_MEDANY endchoice +choice + prompt "Run Mode" + default RISCV_MMODE + +config RISCV_MMODE + bool "Machine" + help + Choose this option to build U-Boot for RISC-V M-Mode. + +config RISCV_SMODE + bool "Supervisor" + help + Choose this option to build U-Boot for RISC-V S-Mode. + +endchoice + config RISCV_ISA_C bool "Emit compressed instructions" default y @@ -73,11 +89,6 @@ config RISCV_ISA_C config RISCV_ISA_A def_bool y -config RISCV_SMODE - bool "Run in S-Mode" - help - Enable this option to build U-Boot for RISC-V S-Mode - config 32BIT bool