Message ID | 1593355503-24938-4-git-send-email-sagar.kadam@sifive.com |
---|---|
State | Accepted |
Commit | b6b233ddb78205abc76dde60179bd129368dc3e8 |
Delegated to: | Andes |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=selector1 header.b=GdE0BfQF; 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 49vtj70wmrz9sDX for <incoming@patchwork.ozlabs.org>; Mon, 29 Jun 2020 00:46:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6FCD181EAD; Sun, 28 Jun 2020 16:45:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="GdE0BfQF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 444A481E66; Sun, 28 Jun 2020 16:45:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20600.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::600]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 166B181E66 for <u-boot@lists.denx.de>; Sun, 28 Jun 2020 16:45:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sagar.kadam@sifive.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=akKYznPE6+aNbhpkv7nz3JAaE9sGt4Epxjpqmf3vfQcfB8jnOvsxM7/wB/gN1WU9NZ7gy4cxuBY0OGvAY4lsOZnrk6LIxbUrw02LM6W3bqErQpxrjfv6t1CRgOsug7FuEQ3lHfC+KLWmijFUSiS1FwWxadVB/1WrCzuVsUQSvM7RMkXCwwTZ0iRwIr1Vy3IQ6Qnsq0gQvuKRDrL3YssLh3WNw0hErtS3qJ5O+E1oqhrP0i4aY2duBSdNwlZdeQ7OGpJxT1TDDX2lhE1dvRVTLkppJ7xmuuPeYykMhw06WZDF6KaKGL4CvNOi88Z/Ha1kNV1zZOIjPMwiPHJ5IF5fWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EHPS+YNvMYXKpyQx3qiPOy75kb0ZU/0gspu+/51s9io=; b=RZcpQpFKPyWbkmCx6H1tVpSbeNg+z8rj3xG4oO2DSbhuvroQ/iygOKUlfhTEmS4P4sSxtHDINDTXRkkR7rImD0OCFO4vX6ov6fiwsLppQL8OZ+JyELx4Kub6jw5U/hRt+0IxEU8h9DFZm/YaywvdsN3rVxf37p5Vm7R9nXgTY0kfA8aI31SC5dOfiNxOJR3u4vRY6dgfNH7H0LwCMgBMjUU2wfb1VHxKEnidw9Fs3DcDCbjfE7AMSiEZ7mBLacaJuwuJd4A2alXBD3YNGgR4sZDLSf9o2E91wi3s0tA87KczIdsb+L3wza7MDTnKoabQQgdOS/RsWUD4rP+uMq88ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sifive.com; dmarc=pass action=none header.from=sifive.com; dkim=pass header.d=sifive.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EHPS+YNvMYXKpyQx3qiPOy75kb0ZU/0gspu+/51s9io=; b=GdE0BfQFFoUj3lyfWlwjryZI+f2zpCuS/OE3z6BGUOfX5LccZU3TunBVvPMCFxgnbXqfGMCDV7W5v0eOGQBVFlDNTMV5sF8HDxmXJMluGPvQy3tdVcP8ASOK3MGFwMdGb3mfhatMuqPY0/09NTtkthtnEwqKl0Ldiy+s4fCLgCY= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=sifive.com; Received: from BN8PR13MB2611.namprd13.prod.outlook.com (2603:10b6:408:81::17) by BN8PR13MB2689.namprd13.prod.outlook.com (2603:10b6:408:84::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.14; Sun, 28 Jun 2020 14:45:20 +0000 Received: from BN8PR13MB2611.namprd13.prod.outlook.com ([fe80::c1d9:f4ee:80ab:de83]) by BN8PR13MB2611.namprd13.prod.outlook.com ([fe80::c1d9:f4ee:80ab:de83%6]) with mapi id 15.20.3153.016; Sun, 28 Jun 2020 14:45:20 +0000 From: Sagar Shrikant Kadam <sagar.kadam@sifive.com> To: u-boot@lists.denx.de Cc: rick@andestech.com, bin.meng@windriver.com, jagan@amarulasolutions.com, pragnesh.patel@sifive.com, anup.patel@wdc.com, sjg@chromium.org, ye.li@nxp.com, peng.fan@nxp.com, seanga2@gmail.com, Sagar Shrikant Kadam <sagar.kadam@sifive.com> Subject: [PATCH v7 3/4] riscv: cpu: correctly handle the setting of CPU_FEAT_MMU bit Date: Sun, 28 Jun 2020 07:45:02 -0700 Message-Id: <1593355503-24938-4-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593355503-24938-1-git-send-email-sagar.kadam@sifive.com> References: <1593355503-24938-1-git-send-email-sagar.kadam@sifive.com> Content-Type: text/plain X-ClientProxiedBy: BY5PR17CA0001.namprd17.prod.outlook.com (2603:10b6:a03:1b8::14) To BN8PR13MB2611.namprd13.prod.outlook.com (2603:10b6:408:81::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from gamma07.internal.sifive.com (64.62.193.194) by BY5PR17CA0001.namprd17.prod.outlook.com (2603:10b6:a03:1b8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3131.20 via Frontend Transport; Sun, 28 Jun 2020 14:45:19 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [64.62.193.194] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84a41f27-fe7d-4f8e-31c3-08d81b71e19e X-MS-TrafficTypeDiagnostic: BN8PR13MB2689: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <BN8PR13MB2689253E57C622FC0F5A23F699910@BN8PR13MB2689.namprd13.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0448A97BF2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: frll/PZ5URg1yMcQt+RShlBlC45NwfI9/kVURn2AbbFqh+Kv9MoFcF1jMgdQa7/ElHQ23P6+WxmuNwwTLqu1rjGZPZFplGxCo5TN0Wwsuhge+DGmzElm3rwYpSKmPAigywOxr2CBiBH4nnwZKFvQghtIFBOb2N4Lbgfnq/zA6iYMCHoiLLcj0/A5jSM7JAzMzvFsadI+d09Sz8QNgU87aGz0bgeV2zgJvFTw7vf+WXq6XcjSFGrM6P7x0bSpzNIK63qkqrYGhJ8EaycpCgTUZZ+a6QdXbeO39hF6n+ldNzAMw8hYNykuXip3gUzuQ1an6U0pZ9TOeewAu/bB4vKk7w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR13MB2611.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(366004)(376002)(136003)(396003)(346002)(39830400003)(6486002)(86362001)(83380400001)(26005)(5660300002)(6666004)(7696005)(316002)(6916009)(186003)(52116002)(16526019)(478600001)(36756003)(8936002)(8676002)(66556008)(4326008)(107886003)(956004)(2906002)(2616005)(66946007)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: nYXPQyYJJaoy9lQwGKdz3oFhD3MHJ5bRG97Kt3dDdKaFrZ+qajeHAoBNhDmNIz+9O1mnNHa6eq/g7cHogupEy3rItrCSrHcRHYKr80PEHy+E5jvTRqo7qUMz7nQ9TePuajh8L24ovksP9L4vSC6p4DSyX0ggFUnyhuLJly9mEBem3FNDmZ1+N/oeuE0+L6Ardma4HbHqXVKYa6dYFZ9YGMJ7BWTW4jem0CyOiG5osJxE0RFsctXl5zNgL9Z8zyes9qv4DNeINkcjjnuGAKZblvusguXmhC8qIr3Gqnmsxn/wKFTrRTApXysTKXYlsETvtS6gk5NZY++1VpUGgDqY9pJuGwo3TYczBvz93vcWjRK0L9bgG/RjPIcDZqmWqA/Lq468UoqaE5PCmTAPibli5JR8M9Gp/3SptKC1/B6l3Bm0PACxVLLi2PkcSFw0tHB2f/CEUWcEZLnp0cagETQWSodqMSPYtrxE9FWNPaesi0Y= X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84a41f27-fe7d-4f8e-31c3-08d81b71e19e X-MS-Exchange-CrossTenant-AuthSource: BN8PR13MB2611.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2020 14:45:20.5249 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1lVfmyVZGdUgTYlxCkvVyRgyjx5mK1PEdvcL1ePNDJ/itasVCN8R56KBM8Iu8XSeNOpcDdGHV5tlKqJDivY1yA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR13MB2689 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
update clock handler and proper cpu features
|
expand
|
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c index 76b0489..112690f 100644 --- a/drivers/cpu/riscv_cpu.c +++ b/drivers/cpu/riscv_cpu.c @@ -36,9 +36,6 @@ static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info) struct clk clk; const char *mmu; - /* Zero out the frequency, in case sizeof(ulong) != sizeof(u32) */ - info->cpu_freq = 0; - /* First try getting the frequency from the assigned clock */ ret = clk_get_by_index(dev, 0, &clk); if (!ret) { @@ -52,7 +49,7 @@ static int riscv_cpu_get_info(struct udevice *dev, struct cpu_info *info) dev_read_u32(dev, "clock-frequency", (u32 *)&info->cpu_freq); mmu = dev_read_string(dev, "mmu-type"); - if (!mmu) + if (mmu) info->features |= BIT(CPU_FEAT_MMU); return 0;