From patchwork Sun Jun 21 13:10:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagar Shrikant Kadam X-Patchwork-Id: 1313937 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=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=bAHZ+xl6; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49qXwy5nwMz9sSf for ; Sun, 21 Jun 2020 23:11:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F50981D4D; Sun, 21 Jun 2020 15:10:44 +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="bAHZ+xl6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 343DC81D3A; Sun, 21 Jun 2020 15:10:34 +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-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20622.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::622]) (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 466E481D2B for ; Sun, 21 Jun 2020 15:10:29 +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=RiZv38ern9pitqI9AF0lmQ12Zhbrth+u2pZ8qJKa5His/N4pZR6ecsyzZ4SRLfPhdHpX1wen8XMyUbOiEcRxXNBe9Hw1a5G48TTIUlFXDE7xGnQ2hE/lb4Vw1fPNO1kUxUplauJgYxhjvh+T0mTKJmm5pRh3TEWywI3Xi0Z2N9zSlZyUV8LJJW5uJXvrF4tCpk+Ng7OVz+T80rwhEoDUjVsg2AzjzzMnBAg7v1qNh9pN5FC3BgkY7px59swExaZdBijojIJVuXrXtKjg0mfOHhx+d7BNQK0wxj71rZrXQWywl9MUfq14ge3H6pB0ueV7mCQx0qvJeo23s47bMvNLKg== 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=bTdfR7qLZr9Pu0kYwpwzhgPFSIrPBLtlzUmbHcvwDuk=; b=jCz+P0spH55LZV1LN0XnoXEBSwu7q+schhX+NRlGAyV0jESar2pDrX3glOSxxHURySrcfliVNYcEgNwx5Jz2Xo5Q44JCB7tw2aFcxAU9PxyjGF393/1M/j+Qz8SY2TP6VZsmADXhM9GXBlobuxQFF/xV7WxqmnTutATkTdHRSKZf/UDBa/XaShcQyewSg/P3heHRD3uM1Jk7FT3P2QTyUpZxbn64GFL9PK7Pz1jI+O9Jx7nW95fL/dnHFPWp+ujXniKJMsYMyoR0dNATYvjlfVPyaIkB+FMTZxdKATkpJoViJhJBmEqcS9rRjuv2m0sYBJ3vHGN115UjCBI3ZF5aTw== 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=bTdfR7qLZr9Pu0kYwpwzhgPFSIrPBLtlzUmbHcvwDuk=; b=bAHZ+xl6aRresnojrpGR21FjalUN0cEEYAcITOZLPHfo+QWHj8Int4OWurrZmj5MVqa5ic6mx266LjaVB69sgJ/TIpSvzqBNneVdpAdv5QyGeM5jYvQ2rDuZ9waUNYwCQ04YtBTbs2RPPCFDk0BeY1qKLTDRszKZzLinll55o0M= 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 BN6PR13MB1473.namprd13.prod.outlook.com (2603:10b6:404:11a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.10; Sun, 21 Jun 2020 13:10:27 +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.3131.016; Sun, 21 Jun 2020 13:10:27 +0000 From: Sagar Shrikant Kadam To: u-boot@lists.denx.de Cc: rick@andestech.com, lukma@denx.de, bmeng.cn@gmail.com, jagan@amarulasolutions.com, pragnesh.patel@sifive.com, anup.patel@wdc.com, sjg@chromium.org, seanga2@gmail.com, Sagar Shrikant Kadam Subject: [PATCH v4 2/4] riscv: dts: hifive-unleashed-a00: add cpu aliases Date: Sun, 21 Jun 2020 06:10:06 -0700 Message-Id: <1592745008-17196-3-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592745008-17196-1-git-send-email-sagar.kadam@sifive.com> References: <1592745008-17196-1-git-send-email-sagar.kadam@sifive.com> X-ClientProxiedBy: BYAPR21CA0001.namprd21.prod.outlook.com (2603:10b6:a03:114::11) 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 BYAPR21CA0001.namprd21.prod.outlook.com (2603:10b6:a03:114::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.2 via Frontend Transport; Sun, 21 Jun 2020 13:10:26 +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: 69ed0e5e-df1f-4f28-4ed3-08d815e47779 X-MS-TrafficTypeDiagnostic: BN6PR13MB1473: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 04410E544A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XIS1iZbQU4Kq12XhZi8FEVIn/ztnhaVE89OY0RWQohdHIutREfbekLpaluBKdYOswobCwSXCZ5kLh+9LLZkxF9VgDZZIN7wscfcXt0PBrzpzoS+hJ4ShlZL+TesE8VUY1fHUj6Rt78UUDo4QdoW3Swry6TZEKbK1iZFvTixYsAi2Id2EkeqkrhmCC9WUiZG/2mztXSjbSExVVLBu1TFC1G3DgNIwNxXtMKCrl/12DGsKKQvN8wYCnu7+IKDZlZN9kVo/fwK1rAYNwAlWO67ho94t/bylxw8qQB14KP0qkvSqplvG2E473SWQmY8jeMxDCSGOEhit9g9u80wq5agNbw== 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:(396003)(366004)(376002)(136003)(346002)(39830400003)(316002)(86362001)(6486002)(478600001)(52116002)(7696005)(5660300002)(66556008)(66946007)(66476007)(2616005)(956004)(6666004)(16526019)(186003)(26005)(6916009)(2906002)(36756003)(8936002)(8676002)(107886003)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Z06gRfc4W1VpDEk4V+bGKwTl1CPzAZdRTP8yam/gGCsfY/inVE9fIQ1AKCUkzqnqRMWysvPLaMlWb/gS1DLn7GDyEIETboi2lJsp6r6NUlenL7Q+20DCRCQYuIcHvNW1BYauhbW+7k2gE0zxM8JLuc8ijbZ7KZVE9f/xXDInpM1bt99qXElDmVD71zyGBftwNdOmkecrmjbP2cgDgYrYPkIGWJ78HplJ2PPKjiIfWlatkTv+JXvcDatHlzDpyVXW1+/qHQhBpYaI4NgqaavSWeTyirLJ1nOwELv8vAVmJUubK6kTjMFpvC+EQYBdCXHT4KbgkPMptodq0Qwm/8dQyRwVNlacdhdWFps0eODQ20O6duhFXqXRD1GzwAKaHPtuvxs/MwHYVMV3jpNMcka6RA0hrcV5l1iD3MueM0LcTK/aHWi644NAlOv53n9XY+I4/zf/RE/oTigaGgnW+0HGK2sOYYCz3zhMGC3uX4NACjA= X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69ed0e5e-df1f-4f28-4ed3-08d815e47779 X-MS-Exchange-CrossTenant-AuthSource: BN8PR13MB2611.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2020 13:10:27.6059 (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: 1cOycIQm1dTdUTlkpEf8tOt5JON4BP/AxrDOuDE0Xy2QA5Ri+4gL40D6fQJJcKv6vpuz3qmPAuHwILipQG3GWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR13MB1473 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add cpu aliases to U-Boot specific dtsi for hifive-unleashed. Without aliases we see that the CPU device sequence numbers are set randomly and the cpu list/detail command will show it as follows: => cpu list 1: cpu@0 rv64imac 0: cpu@1 rv64imafdc 2: cpu@2 rv64imafdc 3: cpu@3 rv64imafdc 4: cpu@4 rv64imafdc Seems like CPU probing with dm-model also relies on aliases as observed in case spi. The fu540-c000-u-boot.dtsi has cpu0/1/2/3/4 nodes and so adding corresponding aliases we can ensure that cpu devices are assigned proper sequence as follows: => cpu list 0: cpu@0 rv64imac 1: cpu@1 rv64imafdc 2: cpu@2 rv64imafdc 3: cpu@3 rv64imafdc 4: cpu@4 rv64imafdc Signed-off-by: Sagar Shrikant Kadam Reviewed-by: Pragnesh Patel --- arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi index 3038064..69a3cd3 100644 --- a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi +++ b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi @@ -8,6 +8,11 @@ / { aliases { + cpu0 = &cpu0; + cpu1 = &cpu1; + cpu2 = &cpu2; + cpu3 = &cpu3; + cpu4 = &cpu4; spi0 = &qspi0; spi2 = &qspi2; };